ALBA
albaDirectory.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaDirectory
5 Authors: Based on itkDirectory (www.itk.org), adapted by Marco Petrone
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __albaDirectory_h
18#define __albaDirectory_h
19
20#include "albaObject.h"
21#include <iostream>
22#include <string>
23#include <vector>
24
25#ifdef ALBA_EXPORTS
26#include "albaDllMacros.h"
27EXPORT_STL_VECTOR(ALBA_EXPORT,std::string);
28#endif
29
35class ALBA_EXPORT albaDirectory : public albaObject
36{
37public:
40
42
47 bool Load(const char* dir);
48
50 int GetNumberOfFiles() { return m_Files.size();}
51
53 const char* GetFile(int index);
54
55protected:
56 //template class ALBA_EXPORT std::allocator<std::string>;
57 //template class ALBA_EXPORT std::vector<std::string, std::allocator<std::string>>;
58 std::vector<wxString> m_Files; // Array of Files
59 wxString m_Path; // Path to Open'ed directory
60private:
61 albaDirectory(const albaDirectory&); //purposely not implemented
62 void operator=(const albaDirectory&); //purposely not implemented
63};
64
65#endif
#define EXPORT_STL_VECTOR(declspec_, T_)
Definition: albaDllMacros.h:84
Portable directory/filename traversal.
Definition: albaDirectory.h:36
bool Load(const char *dir)
Load the specified directory and load the names of the files in that directory.
wxString m_Path
Definition: albaDirectory.h:59
const char * GetFile(int index)
Return the file at the given index, the indexing is 0 based.
int GetNumberOfFiles()
Return the number of files in the current directory.
Definition: albaDirectory.h:50
albaTypeMacro(albaDirectory, albaObject)
std::vector< wxString > m_Files
Definition: albaDirectory.h:58
Abstract superclass for all ALBA classes implementing RTTI APIs.
Definition: albaObject.h:38