34 #ifndef StateTable_CLASS
35 #define StateTable_CLASS
170 static const std::vector<std::string>&
getKeyName();
187 unsigned int size()
const;
205 static std::string
name() ;
245 std::string
toXML() ;
254 asdmIDL::StateTableIDL *
toIDL() ;
263 void toIDL(asdmIDL::StateTableIDL& x)
const;
274 void fromIDL(asdmIDL::StateTableIDL x) ;
301 StateRow *
newRow(CalibrationDeviceMod::CalibrationDevice calDeviceName,
bool sig,
bool ref,
bool onSky);
348 std::vector<StateRow *>
get() ;
356 const std::vector<StateRow *>&
get()
const ;
392 StateRow*
lookup(CalibrationDeviceMod::CalibrationDevice calDeviceName,
bool sig,
bool ref,
bool onSky);
464 std::vector<StateRow *>
row;
522 void toFile(std::string directory);
void toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
static const ByteOrder * Machine_Endianity
Entity getEntity() const
Return this table's Entity.
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.
ASDM & getContainer() const
Return the container to which this table belongs.
StateRow * checkAndAdd(StateRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
std::vector< StateRow * > privateRows
A data structure to store the pointers on the table's rows.
void fromIDL(asdmIDL::StateTableIDL x)
Populate this table from the content of a StateTableIDL Corba structure.
void setFromXMLFile(const std::string &directory)
void autoIncrement(std::string key, StateRow *x)
A class to represent byte order information.
std::string getVersion() const
Return the version information about this table.
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...
The ASDM class is the container for all tables.
static std::string name()
Return the name of this table.
unsigned int size() const
Return the number of rows in the table.
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
std::string getName() const
Return the name of this table.
The StateRow class is a row of a StateTable.
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 toXML()
Produces an XML representation conform to the schema defined for State (StateTable.xsd).
The StateTable class is an Alma table.
StateRow * newRow()
====> Row creation.
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
StateRow * getRowByKey(Tag stateId)
Returns a StateRow* given a key.
std::map< std::string, int > noAutoIncIds
A map for the autoincrementation algorithm.
void setEntity(Entity e)
Set this table's Entity.
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
std::string MIMEXMLPart(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Private methods involved during the export of this table into disk file(s).
void checkPresenceInMemory()
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
StateRow * lookup(CalibrationDeviceMod::CalibrationDevice calDeviceName, bool sig, bool ref, bool onSky)
Look up the table for a row whose all attributes except the autoincrementable one are equal to the co...
StateTable(ASDM &container)
Create a StateTable.
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.
std::vector< StateRow * > row
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 setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
const Double e
e and functions thereof:
asdmIDL::StateTableIDL * toIDL()
Conversion Methods.
void append(StateRow *x)
Brutally append an StateRow x to the collection of rows already stored in this table.
void addWithoutCheckingUnique(StateRow *x)
Brutally append an StateRow x to the collection of rows already stored in this table.
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a StateTable as those produced by the toFile m...
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...
StateRow * add(StateRow *x)
====> Append a row to its table.
bool loadInProgress
Load the table in memory if necessary.
The Entity class is an identification of a persistant entity in the ALMA archive. ...