VisBufferComponents2.h

Go to the documentation of this file.
00001 #if ! defined (MSVIS_VisBufferComponents2_H)
00002 #define MSVIS_VisBufferComponents2_H
00003 
00004 #include <casa/BasicSL/String.h>
00005 #include <initializer_list>
00006 #include <set>
00007 
00008 namespace casa {
00009 
00010 namespace vi {
00011 
00012 enum class VisBufferComponent2 {
00013 
00014     Unknown=-1,
00015 
00016     AllBeamOffsetsZero,  // VisBufferAsync use only
00017     AntennaMounts,       // VisBufferAsync use only
00018     Antenna1,
00019     Antenna2,
00020     ArrayId,
00021     BeamOffsets,         // VisBufferAsync use only
00022     CorrType,
00023     DataDescriptionIds,
00024     Direction1,
00025     Direction2,
00026     Exposure,
00027     Feed1,
00028     FeedPa1,
00029     Feed2,
00030     FeedPa2,
00031     FieldId,
00032     FlagCategory,
00033     FlagCube,
00034     FlagRow,
00035     FloatData,
00036     Frequencies,
00037     ImagingWeight,
00038     JonesC,
00039     NAntennas,
00040     NChannels,
00041     NCorrelations,
00042     NRows,
00043     ObservationId,
00044     PhaseCenter,
00045     PolFrame,
00046     PolarizationId,
00047     ProcessorId,
00048     ReceptorAngles,       // VisBufferAsync use only
00049     RowIds,
00050     Scan,
00051     Sigma,
00052     SpectralWindows,
00053     StateId,
00054     Time,
00055     TimeCentroid,
00056     TimeInterval,
00057     Weight,
00058     WeightScaled,
00059     WeightSpectrum,
00060     SigmaSpectrum,
00061     WeightSpectrumScaled,
00062     Uvw,
00063     VisibilityCorrected,
00064     VisibilityModel,
00065     VisibilityObserved,
00066     VisibilityCubeCorrected,
00067     VisibilityCubeModel,
00068     VisibilityCubeObserved,
00069     VisibilityCubeFloat,
00070 
00071     N_VisBufferComponents2 // must be last
00072 
00073 };
00074 
00075 
00076 // <summary>
00077 //
00078 // This class encapsulates an enum with values corresponding to the various
00079 // data components accessible via a VisBuffer.  Its current usage is to
00080 // specify the VisBuffer components to be prefetched when asynchronous I/O
00081 // is in use or to specify the VisBuffer components that have been modified
00082 // when a Visibility Processing Framework bucket-brigade is operating on
00083 // a VisBuffer.  This implementation should be replaced by a C++11 when
00084 // the standard matures a bit.
00085 //
00086 // <prerequisite>
00087 //   <li> <linkto class="VisBuffer">VisBuffer</linkto>
00088 // </prerequisite>
00089 //
00090 // </summary>
00091 //
00092 // <synopsis>
00093 //
00094 // </synopsis>
00095 // <example>
00096 //
00097 // <code>
00098 //
00099 // </code>
00100 // </example>
00101 //
00102 class VisBufferComponents2 {
00103 
00104 public:
00105 
00106 
00107     typedef std::set<VisBufferComponent2> Set;
00108     typedef Set::const_iterator const_iterator;
00109 
00110     VisBufferComponents2 operator+ (const VisBufferComponents2 & other) const;
00111     VisBufferComponents2 & operator+= (const VisBufferComponents2 & other);
00112     VisBufferComponents2 & operator+= (VisBufferComponent2 componentToAdd);
00113 
00114     const_iterator begin () const;
00115     Bool contains (VisBufferComponent2 component) const;
00116     Bool empty () const;
00117     const_iterator end () const;
00118     String toString () const;
00119 
00120     static VisBufferComponents2 all ();
00121 
00122     // * exceptThese *: n.b., use the component "Unknown" as the last one in the list so that the variadic
00123     // framework knows when to stop.
00124 
00125     static VisBufferComponents2 exceptThese (std::initializer_list <VisBufferComponent2> components);
00126 
00127     static String name (VisBufferComponent2 id);
00128     static VisBufferComponents2 none ();
00129     static VisBufferComponents2 singleton (VisBufferComponent2 component);
00130 
00131     // * these * : n.b., use the component "Unknown" as the last one in the list so that the variadic
00132     // framework knows when to stop.
00133 
00134     static VisBufferComponents2 these (std::initializer_list<VisBufferComponent2> components);
00135 
00136 protected:
00137 
00138 private:
00139 
00140     Set set_p;
00141 
00142     static const VisBufferComponents2 all_p;
00143 
00144     static VisBufferComponents2 initializeAll ();
00145 
00146 };
00147 
00148 } // end namespace vi
00149 
00150 
00151 } // end namespace casa
00152 #endif // ! defined (MSVIS_VisBufferComponents2_H)
00153 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1