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