34 #ifndef WeatherTable_CLASS
35 #define WeatherTable_CLASS
118 #include <asdmIDLC.h>
283 static const std::vector<std::string>&
getKeyName();
300 unsigned int size()
const;
318 static std::string
name() ;
358 std::string
toXML() ;
367 asdmIDL::WeatherTableIDL *
toIDL() ;
376 void toIDL(asdmIDL::WeatherTableIDL& x)
const;
387 void fromIDL(asdmIDL::WeatherTableIDL x) ;
464 std::vector<WeatherRow *>
get() ;
472 const std::vector<WeatherRow *>&
get()
const ;
609 std::string
Key(
Tag stationId) ;
678 void toFile(std::string directory);
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
static const ByteOrder * Machine_Endianity
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval...
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
WeatherTable(ASDM &container)
Create a WeatherTable.
void append(WeatherRow *x)
Brutally append an WeatherRow x to the collection of rows already stored in this table.
A class to represent byte order information.
ASDM & getContainer() const
Return the container to which this table belongs.
WeatherRow * checkAndAdd(WeatherRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
std::string getName() const
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...
std::string Key(Tag stationId)
Returns a string built by concatenating the ascii representation of the parameters values suffixed wi...
The ASDM class is the container for all tables.
std::vector< WeatherRow * > TIME_ROWS
WeatherRow * getRowByKey(Tag stationId, ArrayTimeInterval timeInterval)
Returns a WeatherRow* given a key.
std::vector< WeatherRow * > * getByContext(Tag stationId)
Returns all the rows sorted by ascending startTime for a given context.
std::string getVersion() const
Return the version information about this table.
void setFromXMLFile(const std::string &directory)
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a WeatherTable as those produced by the toFile...
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...
std::string toXML()
Produces an XML representation conform to the schema defined for Weather (WeatherTable.xsd).
void checkPresenceInMemory()
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
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.
std::vector< WeatherRow * > privateRows
A data structure to store the pointers on the table's rows.
bool loadInProgress
Load the table in memory if necessary.
Entity getEntity() const
Return this table's Entity.
WeatherRow * add(WeatherRow *x)
====> Append a row to its table.
std::map< std::string, TIME_ROWS > context
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...
WeatherRow * insertByStartTime(WeatherRow *x, std::vector< WeatherRow * > &row)
Insert a WeatherRow* in a vector of WeatherRow* so that it's ordered by ascending time...
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
void getByKeyNoAutoIncNoTime(std::vector< WeatherRow * > &vin, std::vector< WeatherRow * > &vout, Tag stationId)
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.
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 std::string name()
Return the name of this table.
const Double e
e and functions thereof:
asdmIDL::WeatherTableIDL * toIDL()
Conversion Methods.
unsigned int size() const
Return the number of rows in the table.
The WeatherTable class is an Alma table.
WeatherRow * newRow()
====> Row creation.
The WeatherRow class is a row of a WeatherTable.
void fromIDL(asdmIDL::WeatherTableIDL x)
Populate this table from the content of a WeatherTableIDL Corba structure.
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
void toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
WeatherRow * lookup(Tag stationId, ArrayTimeInterval timeInterval)
Look up the table for a row whose all attributes are equal to the corresponding parameters of the met...
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 Entity class is an identification of a persistant entity in the ALMA archive. ...
void addWithoutCheckingUnique(WeatherRow *x)
Brutally append an WeatherRow x to the collection of rows already stored in this table.