34 #ifndef FocusTable_CLASS
35 #define FocusTable_CLASS
196 static const std::vector<std::string>&
getKeyName();
213 unsigned int size()
const;
231 static std::string
name() ;
271 std::string
toXML() ;
280 asdmIDL::FocusTableIDL *
toIDL() ;
289 void toIDL(asdmIDL::FocusTableIDL& x)
const;
300 void fromIDL(asdmIDL::FocusTableIDL x) ;
331 FocusRow *
newRow(
Tag antennaId,
ArrayTimeInterval timeInterval,
bool focusTracking, std::vector<Length > focusOffset, std::vector<Angle > focusRotationOffset,
int focusModelId);
385 std::vector<FocusRow *>
get() ;
393 const std::vector<FocusRow *>&
get()
const ;
448 FocusRow*
lookup(
Tag antennaId,
ArrayTimeInterval timeInterval,
bool focusTracking, std::vector<Length > focusOffset, std::vector<Angle > focusRotationOffset,
int focusModelId);
538 std::string
Key(
Tag antennaId) ;
607 void toFile(std::string directory);
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.
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
ASDM & getContainer() const
Return the container to which this table belongs.
static const ByteOrder * Machine_Endianity
std::string toXML()
Produces an XML representation conform to the schema defined for Focus (FocusTable.xsd).
Entity getEntity() const
Return this table's Entity.
The FocusTable class is an Alma table.
The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval...
FocusRow * add(FocusRow *x)
====> Append a row to its table.
std::string getName() const
Return the name of this table.
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
A class to represent byte order information.
FocusRow * lookup(Tag antennaId, ArrayTimeInterval timeInterval, bool focusTracking, std::vector< Length > focusOffset, std::vector< Angle > focusRotationOffset, int focusModelId)
Look up the table for a row whose all attributes are equal to the corresponding parameters of the met...
static std::string name()
Return the name of this table.
The ASDM class is the container for all tables.
The FocusRow class is a row of a FocusTable.
std::string getVersion() const
Return the version information about this table.
asdmIDL::FocusTableIDL * toIDL()
Conversion Methods.
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 addWithoutCheckingUnique(FocusRow *x)
Brutally append an FocusRow x to the collection of rows already stored in this table.
void getByKeyNoAutoIncNoTime(std::vector< FocusRow * > &vin, std::vector< FocusRow * > &vout, Tag antennaId)
Fills the vector vout (passed by reference) with pointers on elements of vin whose attributes are equ...
void setEntity(Entity e)
Set this table's Entity.
std::map< std::string, TIME_ROWS > context
FocusRow * getRowByKey(Tag antennaId, ArrayTimeInterval timeInterval)
Returns a FocusRow* given a key.
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a FocusTable as those produced by the toFile m...
std::vector< FocusRow * > * getByContext(Tag antennaId)
Returns all the rows sorted by ascending startTime for a given context.
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.
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
void fromIDL(asdmIDL::FocusTableIDL x)
Populate this table from the content of a FocusTableIDL Corba structure.
std::vector< FocusRow * > privateRows
A data structure to store the pointers on the table's rows.
FocusRow * checkAndAdd(FocusRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
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...
FocusRow * insertByStartTime(FocusRow *x, std::vector< FocusRow * > &row)
Insert a FocusRow* in a vector of FocusRow* so that it's ordered by ascending time.
FocusTable(ASDM &container)
Create a FocusTable.
The Tag class is an implementation of a unique index identifying a row of an ASDM 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.
std::string MIMEXMLPart(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Private methods involved during the export of this table into disk file(s).
bool loadInProgress
Load the table in memory if necessary.
const Double e
e and functions thereof:
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
void append(FocusRow *x)
Brutally append an FocusRow x to the collection of rows already stored in this table.
std::vector< FocusRow * > TIME_ROWS
std::string Key(Tag antennaId)
Returns a string built by concatenating the ascii representation of the parameters values suffixed wi...
FocusRow * newRow()
====> Row creation.
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
The Entity class is an identification of a persistant entity in the ALMA archive. ...
void checkPresenceInMemory()