34 #ifndef StationTable_CLASS
35 #define StationTable_CLASS
169 static const std::vector<std::string>&
getKeyName();
186 unsigned int size()
const;
204 static std::string
name() ;
244 std::string
toXML() ;
253 asdmIDL::StationTableIDL *
toIDL() ;
262 void toIDL(asdmIDL::StationTableIDL& x)
const;
273 void fromIDL(asdmIDL::StationTableIDL x) ;
345 std::vector<StationRow *>
get() ;
353 const std::vector<StationRow *>&
get()
const ;
459 std::vector<StationRow *>
row;
517 void toFile(std::string directory);
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
std::vector< StationRow * > privateRows
A data structure to store the pointers on the table's rows.
asdmIDL::StationTableIDL * toIDL()
Conversion Methods.
Entity getEntity() const
Return this table's Entity.
static const ByteOrder * Machine_Endianity
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...
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
ASDM & getContainer() const
Return the container to which this table belongs.
A class to represent byte order information.
std::string getVersion() const
Return the version information about this table.
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 ASDM class is the container for all tables.
virtual casacore::String type() const
Implements RegionShape::type.
void setEntity(Entity e)
Set this table's Entity.
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a StationTable as those produced by the toFile...
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
The StationTable class is an Alma table.
std::vector< StationRow * > 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.
void addWithoutCheckingUnique(StationRow *x)
Brutally append an StationRow x to the collection of rows already stored in this table.
StationRow * lookup(std::string name, std::vector< Length > position, StationTypeMod::StationType type)
Look up the table for a row whose all attributes except the autoincrementable one are equal to the co...
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
StationRow * add(StationRow *x)
====> Append a row to its table.
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.
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.
const Double e
e and functions thereof:
StationRow * getRowByKey(Tag stationId)
Returns a StationRow* 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...
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
bool loadInProgress
Load the table in memory if necessary.
void checkPresenceInMemory()
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...
void append(StationRow *x)
Brutally append an StationRow x to the collection of rows already stored in this table.
void autoIncrement(std::string key, StationRow *x)
StationRow * checkAndAdd(StationRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
std::string getName() const
Return the name of this table.
The StationRow class is a row of a StationTable.
std::string toXML()
Produces an XML representation conform to the schema defined for Station (StationTable.xsd).
unsigned int size() const
Return the number of rows in the table.
StationRow * newRow()
====> Row creation.
void fromIDL(asdmIDL::StationTableIDL x)
Populate this table from the content of a StationTableIDL Corba structure.
std::map< std::string, int > noAutoIncIds
A map for the autoincrementation algorithm.
void setFromXMLFile(const std::string &directory)
StationTable(ASDM &container)
Create a StationTable.
The Entity class is an identification of a persistant entity in the ALMA archive. ...