34 #ifndef SBSummaryTable_CLASS
35 #define SBSummaryTable_CLASS
118 #include <asdmIDLC.h>
298 static const std::vector<std::string>&
getKeyName();
315 unsigned int size()
const;
333 static std::string
name() ;
373 std::string
toXML() ;
382 asdmIDL::SBSummaryTableIDL *
toIDL() ;
391 void toIDL(asdmIDL::SBSummaryTableIDL& x)
const;
402 void fromIDL(asdmIDL::SBSummaryTableIDL x) ;
449 SBSummaryRow *
newRow(
EntityRef sbSummaryUID,
EntityRef projectUID,
EntityRef obsUnitSetUID,
double frequency, ReceiverBandMod::ReceiverBand frequencyBand, SBTypeMod::SBType sbType,
Interval sbDuration,
int numObservingMode, std::vector<std::string > observingMode,
int numberRepeats,
int numScienceGoal, std::vector<std::string > scienceGoal,
int numWeatherConstraint, std::vector<std::string > weatherConstraint);
496 std::vector<SBSummaryRow *>
get() ;
504 const std::vector<SBSummaryRow *>&
get()
const ;
560 SBSummaryRow*
lookup(
EntityRef sbSummaryUID,
EntityRef projectUID,
EntityRef obsUnitSetUID,
double frequency, ReceiverBandMod::ReceiverBand frequencyBand, SBTypeMod::SBType sbType,
Interval sbDuration,
int numObservingMode, std::vector<std::string > observingMode,
int numberRepeats,
int numScienceGoal, std::vector<std::string > scienceGoal,
int numWeatherConstraint, std::vector<std::string > weatherConstraint);
632 std::vector<SBSummaryRow *>
row;
690 void toFile(std::string directory);
static const ByteOrder * Machine_Endianity
The Interval class implements an interval of time in units of nanoseconds.
asdmIDL::SBSummaryTableIDL * toIDL()
Conversion Methods.
SBSummaryRow * newRow()
====> Row creation.
std::vector< SBSummaryRow * > privateRows
A data structure to store the pointers on the table's rows.
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...
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
static std::string name()
Return the name of this table.
ASDM & getContainer() const
Return the container to which this table belongs.
void autoIncrement(std::string key, SBSummaryRow *x)
A class to represent byte order information.
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.
The ASDM class is the container for all tables.
void append(SBSummaryRow *x)
Brutally append an SBSummaryRow x to the collection of rows already stored in this table...
SBSummaryTable(ASDM &container)
Create a SBSummaryTable.
SBSummaryRow * add(SBSummaryRow *x)
====> Append a row to its table.
SBSummaryRow * checkAndAdd(SBSummaryRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
virtual ~SBSummaryTable()
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
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).
The EntityRef class is an identification of a persistant entity in the ALMA archive.
void addWithoutCheckingUnique(SBSummaryRow *x)
Brutally append an SBSummaryRow x to the collection of rows already stored in this table...
std::string toXML()
Produces an XML representation conform to the schema defined for SBSummary (SBSummaryTable.xsd).
std::map< std::string, int > noAutoIncIds
A map for the autoincrementation algorithm.
void setFromXMLFile(const std::string &directory)
void setEntity(Entity e)
Set this table's Entity.
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...
std::string getName() const
Return the name of this table.
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
void fromIDL(asdmIDL::SBSummaryTableIDL x)
Populate this table from the content of a SBSummaryTableIDL Corba structure.
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
void toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
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:
The SBSummaryTable class is an Alma table.
bool loadInProgress
Load the table in memory if necessary.
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 checkPresenceInMemory()
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
The SBSummaryRow class is a row of a SBSummaryTable.
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
SBSummaryRow * lookup(EntityRef sbSummaryUID, EntityRef projectUID, EntityRef obsUnitSetUID, double frequency, ReceiverBandMod::ReceiverBand frequencyBand, SBTypeMod::SBType sbType, Interval sbDuration, int numObservingMode, std::vector< std::string > observingMode, int numberRepeats, int numScienceGoal, std::vector< std::string > scienceGoal, int numWeatherConstraint, std::vector< std::string > weatherConstraint)
Look up the table for a row whose all attributes except the autoincrementable one are equal to the co...
std::vector< SBSummaryRow * > row
SBSummaryRow * getRowByKey(Tag sBSummaryId)
Returns a SBSummaryRow* given a key.
Entity getEntity() const
Return this table's Entity.
The Entity class is an identification of a persistant entity in the ALMA archive. ...
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a SBSummaryTable as those produced by the toFi...