34 #ifndef SysCalTable_CLASS
35 #define SysCalTable_CLASS
102 #include <asdmIDLC.h>
302 static const std::vector<std::string>&
getKeyName();
319 unsigned int size()
const;
337 static std::string
name() ;
377 std::string
toXML() ;
386 asdmIDL::SysCalTableIDL *
toIDL() ;
395 void toIDL(asdmIDL::SysCalTableIDL& x)
const;
406 void fromIDL(asdmIDL::SysCalTableIDL x) ;
491 std::vector<SysCalRow *>
get() ;
499 const std::vector<SysCalRow *>&
get()
const ;
512 std::vector <SysCalRow*> *
getByContext(
Tag antennaId,
Tag spectralWindowId,
int feedId);
648 std::string
Key(
Tag antennaId,
Tag spectralWindowId,
int feedId) ;
658 void getByKeyNoAutoIncNoTime(std::vector <SysCalRow*>& vin, std::vector <SysCalRow*>& vout,
Tag antennaId,
Tag spectralWindowId,
int feedId);
717 void toFile(std::string directory);
std::string Key(Tag antennaId, Tag spectralWindowId, int feedId)
Returns a string built by concatenating the ascii representation of the parameters values suffixed wi...
std::vector< SysCalRow * > privateRows
A data structure to store the pointers on the table's rows.
void getByKeyNoAutoIncNoTime(std::vector< SysCalRow * > &vin, std::vector< SysCalRow * > &vout, Tag antennaId, Tag spectralWindowId, int feedId)
Fills the vector vout (passed by reference) with pointers on elements of vin whose attributes are equ...
SysCalTable(ASDM &container)
Create a SysCalTable.
static const ByteOrder * Machine_Endianity
std::string getVersion() const
Return the version information about this table.
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a SysCalTable as those produced by the toFile ...
void setEntity(Entity e)
Set this table's Entity.
std::vector< SysCalRow * > TIME_ROWS
unsigned int size() const
Return the number of rows in the table.
void toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
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...
The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval...
bool loadInProgress
Load the table in memory if necessary.
std::string MIMEXMLPart(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Private methods involved during the export of this table into disk file(s).
A class to represent byte order information.
SysCalRow * insertByStartTime(SysCalRow *x, std::vector< SysCalRow * > &row)
Insert a SysCalRow* in a vector of SysCalRow* so that it's ordered by ascending time.
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
The ASDM class is the container for all tables.
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
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...
SysCalRow * newRow()
====> Row creation.
std::map< std::string, TIME_ROWS > context
void addWithoutCheckingUnique(SysCalRow *x)
Brutally append an SysCalRow x to the collection of rows already stored in this table.
SysCalRow * getRowByKey(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId)
Returns a SysCalRow* given a key.
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...
SysCalRow * checkAndAdd(SysCalRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
static std::string name()
Return the name of this table.
Entity getEntity() const
Return this table's Entity.
SysCalRow * add(SysCalRow *x)
====> Append a row to its table.
asdmIDL::SysCalTableIDL * toIDL()
Conversion Methods.
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.
std::vector< SysCalRow * > * getByContext(Tag antennaId, Tag spectralWindowId, int feedId)
Returns all the rows sorted by ascending startTime for a given context.
void setFromXMLFile(const std::string &directory)
The SysCalTable class is an Alma table.
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
SysCalRow * lookup(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, int numReceptor, int numChan)
Look up the table for a row whose all attributes are equal to the corresponding parameters of the met...
void checkPresenceInMemory()
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
The SysCalRow class is a row of a SysCalTable.
void append(SysCalRow *x)
Brutally append an SysCalRow x to the collection of rows already stored in this table.
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.
void fromIDL(asdmIDL::SysCalTableIDL x)
Populate this table from the content of a SysCalTableIDL Corba structure.
const Double e
e and functions thereof:
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
std::string toXML()
Produces an XML representation conform to the schema defined for SysCal (SysCalTable.xsd).
ASDM & getContainer() const
Return the container to which this table belongs.
std::string getName() const
Return the name of this table.
The Entity class is an identification of a persistant entity in the ALMA archive. ...