Isis 3 Programmer Reference
HiCalTypes.h
Go to the documentation of this file.
1 #ifndef HiCalTypes_h
2 #define HiCalTypes_h
3 
25 #include <string>
26 #include <vector>
27 #include <iostream>
28 #include <sstream>
29 
30 #include "tnt_array1d.h"
31 #include "tnt_array1d_utils.h"
32 #include "tnt_array2d.h"
33 #include "tnt_array2d_utils.h"
34 
35 #include "IString.h"
36 #include "PvlKeyword.h"
37 
38 namespace Isis {
39 
40 typedef TNT::Array1D<double> HiVector;
41 typedef TNT::Array2D<double> HiMatrix;
42 
43 class HiHistory {
44  public:
52  friend std::ostream &operator<<(std::ostream &o, const HiHistory &h) {
53  std::vector<QString>::const_iterator it = h._events.begin();
54 
55  while (it != h._events.end()) {
56  o << *it << "; ";
57  it++;
58  }
59  return (o);
60  }
61 
62  public:
63  HiHistory() { }
64  HiHistory(const HiHistory &h) : _events(h._events) { }
65  virtual ~HiHistory() { }
66 
67  inline int size() const { return (_events.size()); }
68  void add(const QString &event) { _events.push_back(event); }
69  QString get(unsigned int index = 0) const {
70  if (index < _events.size()) {
71  return (_events[index]);
72  }
73  else {
74  return (QString(""));
75  }
76  }
77 
78  void clear() { _events.clear(); }
79 
80  PvlKeyword makekey(const QString &name = "History") const {
81  PvlKeyword key(name);
82  for (unsigned int i = 0 ; i < _events.size() ; i++) {
83  key.addValue(_events[i]);
84  }
85  return (key);
86  }
87 
88  private:
89  std::vector<QString> _events;
90 };
91 
92 };
93 #endif
friend std::ostream & operator<<(std::ostream &o, const HiHistory &h)
Output operator for history events.
Definition: HiCalTypes.h:52
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
TNT::Array2D< double > HiMatrix
2-D buffer
Definition: HiCalTypes.h:41
TNT::Array1D< double > HiVector
1-D Buffer
Definition: HiCalTypes.h:40