Isis 3 Programmer Reference
ObservationNumberList.h
Go to the documentation of this file.
1 #ifndef ObservationNumberList_h
2 #define ObservationNumberList_h
3 
27 #include <map>
28 #include <vector>
29 
30 #include <QString>
31 
32 #include "SerialNumberList.h"
33 
34 namespace Isis {
35 
61  public:
62  ObservationNumberList(const QString &list, bool checkTarget = true);
65 
66  void add(int isn, const int observationIndex, QString observationNumber) ;
67  int observationSize() const;
68 
70 
71  void remove(SerialNumberList *snlist);
72  void remove(const QString &listfile);
73 
74  bool hasObservationNumber(const QString &on);
75 
76  QString observationNumber(const QString &filename);
77  QString observationNumber(int index);
78  std::vector<QString> possibleFileNames(const QString &on);
79 
80  private:
85  struct ObservationSet {
86  int serialNumberIndex;
87  int observationNumberIndex;
88  QString observationNumber;
89  };
90 
91  void init(SerialNumberList *snlist);
92 
93  std::multimap<int, int> m_indexMap;
95  std::vector<ObservationSet> m_sets;
96  };
97 };
98 
99 #endif
100 
void init(SerialNumberList *snlist)
Initiates the ObservationNumberList.
int observationSize() const
How many unique observations are in the list?
int serialNumberIndex(const QString &sn)
Return a list index given a serial number.
QString observationNumber(const QString &filename)
Return an observation number given a filename.
An observation consiting of a serial number index to the ObservationNumberList, an observation number...
std::multimap< int, int > m_indexMap
Maps serial number index to observation number index.
int m_numberObservations
Count of observations in the observation number list.
ObservationNumberList(const QString &list, bool checkTarget=true)
Creates an ObservationNumberList from a filename.
Create a list of observation numbers from a file or serial number list.
int observationNumberMapIndex(const int serialNumberIndex)
Return a observation index given a serial number index.
std::vector< ObservationSet > m_sets
List of observation sets.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
std::vector< QString > possibleFileNames(const QString &on)
Return possible filenames given an observation number.
Serial Number list generator.
bool hasObservationNumber(const QString &on)
Determines whether or not the requested observation number exists in the list.
void add(int isn, const int observationIndex, QString observationNumber)
Adds a new serial number index / observation number index / observation number to the SerialNumberLis...