34 #ifndef CalDeviceTable_CLASS
35 #define CalDeviceTable_CLASS
223 static const std::vector<std::string>&
getKeyName();
240 unsigned int size()
const;
258 static std::string
name() ;
298 std::string
toXML() ;
307 asdmIDL::CalDeviceTableIDL *
toIDL() ;
316 void toIDL(asdmIDL::CalDeviceTableIDL& x)
const;
327 void fromIDL(asdmIDL::CalDeviceTableIDL x) ;
412 std::vector<CalDeviceRow *>
get() ;
420 const std::vector<CalDeviceRow *>&
get()
const ;
433 std::vector <CalDeviceRow*> *
getByContext(
Tag antennaId,
Tag spectralWindowId,
int feedId);
569 std::string
Key(
Tag antennaId,
Tag spectralWindowId,
int feedId) ;
579 void getByKeyNoAutoIncNoTime(std::vector <CalDeviceRow*>& vin, std::vector <CalDeviceRow*>& vout,
Tag antennaId,
Tag spectralWindowId,
int feedId);
638 void toFile(std::string directory);
unsigned int size() const
Return the number of rows in the table.
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
std::string toMIME(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Serialize this into a stream of bytes and encapsulates that stream into a MIME message.
The CalDeviceRow class is a row of a CalDeviceTable.
void setFromMIMEFile(const std::string &directory)
Private methods involved during the build of this table out of the content of file(s) containing an e...
static const ByteOrder * Machine_Endianity
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
std::string toXML()
Produces an XML representation conform to the schema defined for CalDevice (CalDeviceTable.xsd).
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a CalDeviceTable as those produced by the toFi...
CalDeviceRow * insertByStartTime(CalDeviceRow *x, std::vector< CalDeviceRow * > &row)
Insert a CalDeviceRow* in a vector of CalDeviceRow* so that it's ordered by ascending time...
The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval...
void toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
A class to represent byte order information.
void setFromMIME(const std::string &mimeMsg)
Extracts the binary part of a MIME message and deserialize its content to fill this with the result o...
The ASDM class is the container for all tables.
CalDeviceRow * newRow()
====> Row creation.
std::string Key(Tag antennaId, Tag spectralWindowId, int feedId)
Returns a string built by concatenating the ascii representation of the parameters values suffixed wi...
CalDeviceRow * add(CalDeviceRow *x)
====> Append a row to its table.
static std::string name()
Return the name of this table.
std::vector< CalDeviceRow * > * getByContext(Tag antennaId, Tag spectralWindowId, int feedId)
Returns all the rows sorted by ascending startTime for a given context.
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
void checkPresenceInMemory()
CalDeviceRow * lookup(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, int numCalload, std::vector< CalibrationDeviceMod::CalibrationDevice > calLoadNames)
Look up the table for a row whose all attributes are equal to the corresponding parameters of the met...
ASDM & getContainer() const
Return the container to which this table belongs.
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
void fromIDL(asdmIDL::CalDeviceTableIDL x)
Populate this table from the content of a CalDeviceTableIDL Corba structure.
void setEntity(Entity e)
Set this table's Entity.
void addWithoutCheckingUnique(CalDeviceRow *x)
Brutally append an CalDeviceRow x to the collection of rows already stored in this table...
bool loadInProgress
Load the table in memory if necessary.
void getByKeyNoAutoIncNoTime(std::vector< CalDeviceRow * > &vin, std::vector< CalDeviceRow * > &vout, Tag antennaId, Tag spectralWindowId, int feedId)
Fills the vector vout (passed by reference) with pointers on elements of vin whose attributes are equ...
CalDeviceRow * getRowByKey(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId)
Returns a CalDeviceRow* given a key.
virtual ~CalDeviceTable()
CalDeviceRow * checkAndAdd(CalDeviceRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
std::vector< CalDeviceRow * > TIME_ROWS
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
std::string getVersion() const
Return the version information about this table.
The CalDeviceTable class is an Alma table.
void append(CalDeviceRow *x)
Brutally append an CalDeviceRow x to the collection of rows already stored in this table...
std::string getName() const
Return the name of this table.
Entity getEntity() const
Return this table's Entity.
std::map< std::string, TIME_ROWS > context
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
std::vector< CalDeviceRow * > privateRows
A data structure to store the pointers on the table's rows.
A pure virtual class whose derived classes are expected to be functors whose behaviours will be to re...
The Representable interface is implemented by all tables and by the container.
const Double e
e and functions thereof:
void setFromXMLFile(const std::string &directory)
void fromXML(std::string &xmlDoc)
Populate this table from the content of a XML document that is required to be conform to the XML sche...
std::string MIMEXMLPart(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Private methods involved during the export of this table into disk file(s).
asdmIDL::CalDeviceTableIDL * toIDL()
Conversion Methods.
The Entity class is an identification of a persistant entity in the ALMA archive. ...
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
CalDeviceTable(ASDM &container)
Create a CalDeviceTable.