34 #ifndef SwitchCycleTable_CLASS
35 #define SwitchCycleTable_CLASS
107 class SwitchCycleRow;
204 static const std::vector<std::string>&
getKeyName();
221 unsigned int size()
const;
239 static std::string
name() ;
279 std::string
toXML() ;
288 asdmIDL::SwitchCycleTableIDL *
toIDL() ;
297 void toIDL(asdmIDL::SwitchCycleTableIDL& x)
const;
308 void fromIDL(asdmIDL::SwitchCycleTableIDL x) ;
337 SwitchCycleRow *
newRow(
int numStep, std::vector<float > weightArray, std::vector<std::vector<Angle > > dirOffsetArray, std::vector<Frequency > freqOffsetArray, std::vector<Interval > stepDurationArray);
384 std::vector<SwitchCycleRow *>
get() ;
392 const std::vector<SwitchCycleRow *>&
get()
const ;
430 SwitchCycleRow*
lookup(
int numStep, std::vector<float > weightArray, std::vector<std::vector<Angle > > dirOffsetArray, std::vector<Frequency > freqOffsetArray, std::vector<Interval > stepDurationArray);
502 std::vector<SwitchCycleRow *>
row;
560 void toFile(std::string directory);
static const ByteOrder * Machine_Endianity
std::vector< SwitchCycleRow * > privateRows
A data structure to store the pointers on the table's rows.
static std::string name()
Return the name of this 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...
void autoIncrement(std::string key, SwitchCycleRow *x)
std::string getVersion() const
Return the version information about this table.
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a SwitchCycleTable as those produced by the to...
SwitchCycleRow * lookup(int numStep, std::vector< float > weightArray, std::vector< std::vector< Angle > > dirOffsetArray, std::vector< Frequency > freqOffsetArray, std::vector< Interval > stepDurationArray)
Look up the table for a row whose all attributes except the autoincrementable one are equal to the co...
void fromIDL(asdmIDL::SwitchCycleTableIDL x)
Populate this table from the content of a SwitchCycleTableIDL Corba structure.
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
std::string MIMEXMLPart(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Private methods involved during the export of this table into disk file(s).
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.
A class to represent byte order information.
asdmIDL::SwitchCycleTableIDL * toIDL()
Conversion Methods.
unsigned int size() const
Return the number of rows in 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 ASDM class is the container for all tables.
std::vector< SwitchCycleRow * > row
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
virtual ~SwitchCycleTable()
std::map< std::string, int > noAutoIncIds
A map for the autoincrementation algorithm.
The SwitchCycleRow class is a row of a SwitchCycleTable.
bool loadInProgress
Load the table in memory if necessary.
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
void setEntity(Entity e)
Set this table's Entity.
SwitchCycleRow * checkAndAdd(SwitchCycleRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
void toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
void checkPresenceInMemory()
The SwitchCycleTable class is an Alma table.
ASDM & getContainer() const
Return the container to which this table belongs.
SwitchCycleRow * newRow()
====> Row creation.
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...
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
std::string getName() const
Return the name of this table.
void append(SwitchCycleRow *x)
Brutally append an SwitchCycleRow x to the collection of rows already stored in this table...
SwitchCycleRow * add(SwitchCycleRow *x)
====> Append a row to its table.
void setFromXMLFile(const std::string &directory)
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.
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
const Double e
e and functions thereof:
Entity getEntity() const
Return this table's Entity.
std::string toXML()
Produces an XML representation conform to the schema defined for SwitchCycle (SwitchCycleTable.xsd).
void addWithoutCheckingUnique(SwitchCycleRow *x)
Brutally append an SwitchCycleRow x to the collection of rows already stored in this table...
SwitchCycleTable(ASDM &container)
Create a SwitchCycleTable.
SwitchCycleRow * getRowByKey(Tag switchCycleId)
Returns a SwitchCycleRow* given a key.
The Entity class is an identification of a persistant entity in the ALMA archive. ...