34 #ifndef ScaleTable_CLASS
35 #define ScaleTable_CLASS
164 static const std::vector<std::string>&
getKeyName();
181 unsigned int size()
const;
199 static std::string
name() ;
239 std::string
toXML() ;
248 asdmIDL::ScaleTableIDL *
toIDL() ;
257 void toIDL(asdmIDL::ScaleTableIDL& x)
const;
268 void fromIDL(asdmIDL::ScaleTableIDL x) ;
295 ScaleRow *
newRow(TimeScaleMod::TimeScale timeScale, DataScaleMod::DataScale crossDataScale, DataScaleMod::DataScale autoDataScale, WeightTypeMod::WeightType weightType);
342 std::vector<ScaleRow *>
get() ;
350 const std::vector<ScaleRow *>&
get()
const ;
386 ScaleRow*
lookup(TimeScaleMod::TimeScale timeScale, DataScaleMod::DataScale crossDataScale, DataScaleMod::DataScale autoDataScale, WeightTypeMod::WeightType weightType);
458 std::vector<ScaleRow *>
row;
516 void toFile(std::string directory);
void setEntity(Entity e)
Set this table's Entity.
std::vector< ScaleRow * > row
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
ScaleRow * newRow()
====> Row creation.
static const ByteOrder * Machine_Endianity
ScaleRow * getRowByKey(Tag scaleId)
Returns a ScaleRow* given a key.
void autoIncrement(std::string key, ScaleRow *x)
std::string getVersion() const
Return the version information about this table.
void setFromXMLFile(const std::string &directory)
void fromIDL(asdmIDL::ScaleTableIDL x)
Populate this table from the content of a ScaleTableIDL Corba structure.
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
A class to represent byte order information.
The ScaleTable class is an Alma table.
The ScaleRow class is a row of a ScaleTable.
void checkPresenceInMemory()
ScaleRow * checkAndAdd(ScaleRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
The ASDM class is the container for all tables.
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.
void addWithoutCheckingUnique(ScaleRow *x)
Brutally append an ScaleRow x to the collection of rows already stored in this table.
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
ScaleRow * add(ScaleRow *x)
====> Append a row to its table.
bool loadInProgress
Load the table in memory if necessary.
std::map< std::string, int > noAutoIncIds
A map for the autoincrementation algorithm.
ScaleRow * lookup(TimeScaleMod::TimeScale timeScale, DataScaleMod::DataScale crossDataScale, DataScaleMod::DataScale autoDataScale, WeightTypeMod::WeightType weightType)
Look up the table for a row whose all attributes except the autoincrementable one are equal to the co...
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...
ScaleTable(ASDM &container)
Create a ScaleTable.
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the 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 Tag class is an implementation of a unique index identifying a row of an ASDM table...
asdmIDL::ScaleTableIDL * toIDL()
Conversion Methods.
void append(ScaleRow *x)
Brutally append an ScaleRow x to the collection of rows already stored in this table.
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
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.
unsigned int size() const
Return the number of rows in the 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).
const Double e
e and functions thereof:
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...
void toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
static std::string name()
Return the name of this table.
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a ScaleTable as those produced by the toFile m...
ASDM & getContainer() const
Return the container to which this table belongs.
std::vector< ScaleRow * > privateRows
A data structure to store the pointers on the table's rows.
std::string toXML()
Produces an XML representation conform to the schema defined for Scale (ScaleTable.xsd).
Entity getEntity() const
Return this table's Entity.
std::string getName() const
Return the name of this table.
The Entity class is an identification of a persistant entity in the ALMA archive. ...