34 #ifndef CalDataTable_CLASS
35 #define CalDataTable_CLASS
104 #include <asdmIDLC.h>
256 static const std::vector<std::string>&
getKeyName();
273 unsigned int size()
const;
291 static std::string
name() ;
331 std::string
toXML() ;
340 asdmIDL::CalDataTableIDL *
toIDL() ;
349 void toIDL(asdmIDL::CalDataTableIDL& x)
const;
360 void fromIDL(asdmIDL::CalDataTableIDL x) ;
393 CalDataRow *
newRow(
ArrayTime startTimeObserved,
ArrayTime endTimeObserved,
EntityRef execBlockUID, CalDataOriginMod::CalDataOrigin calDataType, CalTypeMod::CalType calType,
int numScan, std::vector<int > scanSet);
440 std::vector<CalDataRow *>
get() ;
448 const std::vector<CalDataRow *>&
get()
const ;
490 CalDataRow*
lookup(
ArrayTime startTimeObserved,
ArrayTime endTimeObserved,
EntityRef execBlockUID, CalDataOriginMod::CalDataOrigin calDataType, CalTypeMod::CalType calType,
int numScan, std::vector<int > scanSet);
562 std::vector<CalDataRow *>
row;
620 void toFile(std::string directory);
CalDataRow * lookup(ArrayTime startTimeObserved, ArrayTime endTimeObserved, EntityRef execBlockUID, CalDataOriginMod::CalDataOrigin calDataType, CalTypeMod::CalType calType, int numScan, std::vector< int > scanSet)
Look up the table for a row whose all attributes except the autoincrementable one are equal to the co...
static const ByteOrder * Machine_Endianity
void addWithoutCheckingUnique(CalDataRow *x)
Brutally append an CalDataRow x to the collection of rows already stored in this table.
CalDataRow * checkAndAdd(CalDataRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a CalDataTable as those produced by the toFile...
ASDM & getContainer() const
Return the container to which this table belongs.
std::string getVersion() const
Return the version information about this table.
A class to represent byte order information.
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
bool loadInProgress
Load the table in memory if necessary.
std::string getName() const
Return the name of this table.
The ASDM class is the container for all tables.
std::map< std::string, int > noAutoIncIds
A map for the autoincrementation algorithm.
void fromIDL(asdmIDL::CalDataTableIDL x)
Populate this table from the content of a CalDataTableIDL Corba structure.
void append(CalDataRow *x)
Brutally append an CalDataRow x to the collection of rows already stored in this table.
std::vector< CalDataRow * > privateRows
A data structure to store the pointers on the table's rows.
void checkPresenceInMemory()
CalDataTable(ASDM &container)
Create a CalDataTable.
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
CalDataRow * newRow()
====> Row creation.
unsigned int size() const
Return the number of rows in the table.
The EntityRef class is an identification of a persistant entity in the ALMA archive.
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 toXML()
Produces an XML representation conform to the schema defined for CalData (CalDataTable.xsd).
asdmIDL::CalDataTableIDL * toIDL()
Conversion Methods.
Entity getEntity() const
Return this table's Entity.
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
void autoIncrement(std::string key, CalDataRow *x)
CalDataRow * add(CalDataRow *x)
====> Append a row to its table.
void setEntity(Entity e)
Set this table's Entity.
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
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...
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
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 setFromXMLFile(const std::string &directory)
const Double e
e and functions thereof:
std::vector< CalDataRow * > row
static std::string name()
Return the name of this table.
void toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
std::string MIMEXMLPart(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Private methods involved during the export of this table into disk file(s).
The CalDataTable class is an Alma table.
The CalDataRow class is a row of a CalDataTable.
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...
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.
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
CalDataRow * getRowByKey(Tag calDataId)
Returns a CalDataRow* given a key.
The Entity class is an identification of a persistant entity in the ALMA archive. ...