IsisDlm  Version 0.2
FileRepository.h
Go to the documentation of this file.
1 
2 //_Title FileRepository.h Singleton file repository for ISIS DLM
3 //
4 //_Hist Sept 09 2004 Kris Becker, USGS
5 //_Version: $Id: FileRepository.h,v 1.3 2004/11/02 15:38:53 kbecker Exp $
6 //_End
8 #if !defined(FileRepository_h)
9 #define FileRepository_h
10 #include <string>
11 #include <list>
12 #include "iFile.h"
13 
14 class Isis::Cube;
15 class Isis::Pvl;
16 
17 namespace ISISDLM {
18 
19 
38  public:
39  static const char* const ID;
40 
50  static FileRepository *Instance();
51 
52  int size() const { return (_files.size()); }
53 
54  iFile::Iid addCube(const std::string &filename, Isis::Cube *cube,
55  bool readonly = true);
56  iFile::Iid addPvl(const std::string &filename, Isis::Pvl *pvl,
57  bool readonly = true);
58 
60  iFile *getNthFile(int nth = 0);
61 
62  bool removeFile(iFile::Iid id);
63  void Purge();
64 
65  protected:
67 
68  private:
72 
74  std::list<iFile *> _files;
75 
76 };
77 
78 
79 }
80 #endif