USGS

Isis 3.0 Developer's Reference (API)

Home

ObservationNumberList.h

Go to the documentation of this file.
00001 #ifndef ObservationNumberList_h
00002 #define ObservationNumberList_h
00003 
00027 #include <string>
00028 #include <map>
00029 #include <vector>
00030 
00031 #include "SerialNumberList.h"
00032 
00033 namespace Isis {
00034 
00054   class ObservationNumberList : public Isis::SerialNumberList {
00055     public:
00056       ObservationNumberList(const std::string &list, bool checkTarget = true);
00057       ObservationNumberList(Isis::SerialNumberList *snlist);
00058       ~ObservationNumberList();
00059 
00060       void Add(int isn, const int observationIndex, std::string observationNumber) ;
00061       int ObservationSize() const;
00062 
00063       int ObservationNumberMapIndex(const int serialNumberIndex);
00064 
00065       void Remove(Isis::SerialNumberList *snlist);
00066       void Remove(const std::string &listfile);
00067 
00068       bool HasObservationNumber(const std::string &on);
00069 
00070       std::string ObservationNumber(const std::string &filename);
00071       std::string ObservationNumber(int index);
00072       std::vector<std::string> PossibleFilenames(const std::string &on);
00073 
00074     private:
00075       struct ObservationSet {
00076         int serialNumberIndex;
00077         int observationNumberIndex;
00078         std::string observationNumber;
00079       };
00080 
00081       void init(Isis::SerialNumberList *snlist);
00082 
00083       std::vector<ObservationSet> p_sets;
00084       std::multimap<int, int> p_indexMap;
00085       int p_numberObservations;
00086   };
00087 };
00088 
00089 #endif
00090