My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
RegAxisRange.h
Go to the documentation of this file.
1 #ifndef GCP_UTIL_REGAXISRANGE_H
2 #define GCP_UTIL_REGAXISRANGE_H
3 
11 #include "gcp/util/common/AxisRange.h"
12 #include "gcp/util/common/CoordRange.h"
13 
14 #include "gcp/control/code/unix/libunix_src/common/genericregs.h"
15 
16 #include <vector>
17 
18 namespace gcp {
19  namespace util {
20 
21  class RegDescription;
22 
27  class RegAxisRange : public AxisRange {
28  public:
29 
34  RegAxisRange(RegDescription& reg, CoordRange* range=0);
35  RegAxisRange();
36  RegAxisRange(RegMapBlock* block);
37 
38  void setTo(RegDescription& reg, CoordRange* range);
39 
43  virtual ~RegAxisRange();
44 
48  inline int currentSlot() {
49  return iSlotOffset_ < 0 ? -1 : (int)currentElement() + iSlotOffset_;
50  }
51 
57 
58  // Assignment operator
59 
60  void operator=(const RegAxisRange& obj);
61  void operator=(RegAxisRange& obj);
62 
66  friend std::ostream& operator<<(std::ostream& os, RegAxisRange& range);
67 
68  private:
69 
70  int iSlotOffset_;
71 
72  }; // End class RegAxisRange
73 
74  } // End namespace util
75 } // End namespace gcp
76 
77 
78 
79 
80 #endif // End #ifndef GCP_UTIL_REGAXISRANGE_H
int currentSlot()
Definition: RegAxisRange.h:48
unsigned currentElement()
Definition: AxisRange.h:52
Definition: AxisRange.h:19
RegAxisRange()
Definition: RegAxisRange.cc:42
friend std::ostream & operator<<(std::ostream &os, RegAxisRange &range)
virtual ~RegAxisRange()
Definition: RegAxisRange.cc:73
Definition: CoordRange.h:20
CoordRange currentCoordRange()
Definition: RegAxisRange.cc:89
void setTo(RegDescription &reg, CoordRange *range)
Definition: RegAxisRange.cc:62
void operator=(const RegAxisRange &obj)
Definition: RegAxisRange.cc:98
Definition: RegAxisRange.h:27
Definition: RegDescription.h:26