casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VisBufferComponents2.h
Go to the documentation of this file.
1 #if ! defined (MSVIS_VisBufferComponents2_H)
2 #define MSVIS_VisBufferComponents2_H
3 
4 #include <casa/BasicSL/String.h>
5 #include <initializer_list>
6 #include <set>
7 
8 namespace casa {
9 
10 namespace vi {
11 
12 enum class VisBufferComponent2 {
13 
14  Unknown=-1,
15 
16  AllBeamOffsetsZero, // VisBufferAsync use only
17  AntennaMounts, // VisBufferAsync use only
18  Antenna1,
19  Antenna2,
20  ArrayId,
21  BeamOffsets, // VisBufferAsync use only
22  CorrType,
24  Direction1,
25  Direction2,
26  Exposure,
27  Feed1,
28  FeedPa1,
29  Feed2,
30  FeedPa2,
31  FieldId,
33  FlagCube,
34  FlagRow,
35  FloatData,
38  JonesC,
39  NAntennas,
40  NChannels,
42  NRows,
45  PolFrame,
48  ReceptorAngles, // VisBufferAsync use only
49  RowIds,
50  Scan,
51  Sigma,
53  StateId,
54  Time,
57  Weight,
62  Uvw,
70 
71  N_VisBufferComponents2 // must be last
72 
73 };
74 
75 
76 // <summary>
77 //
78 // This class encapsulates an enum with values corresponding to the various
79 // data components accessible via a VisBuffer. Its current usage is to
80 // specify the VisBuffer components to be prefetched when asynchronous I/O
81 // is in use or to specify the VisBuffer components that have been modified
82 // when a Visibility Processing Framework bucket-brigade is operating on
83 // a VisBuffer. This implementation should be replaced by a C++11 when
84 // the standard matures a bit.
85 //
86 // <prerequisite>
87 // <li> <linkto class="VisBuffer">VisBuffer</linkto>
88 // </prerequisite>
89 //
90 // </summary>
91 //
92 // <synopsis>
93 //
94 // </synopsis>
95 // <example>
96 //
97 // <code>
98 //
99 // </code>
100 // </example>
101 //
103 
104 public:
105 
106 
107  typedef std::set<VisBufferComponent2> Set;
109 
113 
114  const_iterator begin () const;
115  casacore::Bool contains (VisBufferComponent2 component) const;
116  casacore::Bool empty () const;
117  const_iterator end () const;
118  casacore::String toString () const;
119 
120  static VisBufferComponents2 all ();
121 
122  // * exceptThese *: n.b., use the component "Unknown" as the last one in the list so that the variadic
123  // framework knows when to stop.
124 
125  static VisBufferComponents2 exceptThese (std::initializer_list <VisBufferComponent2> components);
126 
128  static VisBufferComponents2 none ();
130 
131  // * these * : n.b., use the component "Unknown" as the last one in the list so that the variadic
132  // framework knows when to stop.
133 
134  static VisBufferComponents2 these (std::initializer_list<VisBufferComponent2> components);
135 
136 protected:
137 
138 private:
139 
141 
143 
145 
146 };
147 
148 } // end namespace vi
149 
150 
151 } // end namespace casa
152 #endif // ! defined (MSVIS_VisBufferComponents2_H)
153 
static VisBufferComponents2 all()
Elements::const_iterator const_iterator
static casacore::String name(VisBufferComponent2 id)
const_iterator end() const
VisBufferComponents2 operator+(const VisBufferComponents2 &other) const
casacore::Bool empty() const
VisBufferComponents2 & operator+=(const VisBufferComponents2 &other)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
static const VisBufferComponents2 all_p
casacore::String toString() const
std::set< VisBufferComponent2 > Set
static VisBufferComponents2 these(std::initializer_list< VisBufferComponent2 > components)
casacore::Bool contains(VisBufferComponent2 component) const
String: the storage and methods of handling collections of characters.
Definition: String.h:223
static VisBufferComponents2 singleton(VisBufferComponent2 component)
static VisBufferComponents2 exceptThese(std::initializer_list< VisBufferComponent2 > components)
This class encapsulates an enum with values corresponding to the various data components accessible v...
static VisBufferComponents2 initializeAll()
static VisBufferComponents2 none()
const_iterator begin() const