34 #ifndef HistoryTable_CLASS
35 #define HistoryTable_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::HistoryTableIDL *
toIDL() ;
289 void toIDL(asdmIDL::HistoryTableIDL& x)
const;
300 void fromIDL(asdmIDL::HistoryTableIDL x) ;
337 HistoryRow *
newRow(
Tag execBlockId,
ArrayTime time, std::string message, std::string priority, std::string
origin, std::string objectId, std::string application, std::string cliCommand, std::string appParms);
391 std::vector<HistoryRow *>
get() ;
399 const std::vector<HistoryRow *>&
get()
const ;
460 HistoryRow*
lookup(
Tag execBlockId,
ArrayTime time, std::string message, std::string priority, std::string
origin, std::string objectId, std::string application, std::string cliCommand, std::string appParms);
550 std::string
Key(
Tag execBlockId) ;
619 void toFile(std::string directory);
void append(HistoryRow *x)
Brutally append an HistoryRow 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.
static const ByteOrder * Machine_Endianity
std::string toXML()
Produces an XML representation conform to the schema defined for History (HistoryTable.xsd).
void fromIDL(asdmIDL::HistoryTableIDL x)
Populate this table from the content of a HistoryTableIDL Corba structure.
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
A class to represent byte order information.
std::map< std::string, TIME_ROWS > context
std::vector< HistoryRow * > privateRows
A data structure to store the pointers on the table's rows.
std::vector< HistoryRow * > TIME_ROWS
HistoryTable(ASDM &container)
Create a HistoryTable.
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
The ASDM class is the container for all tables.
HistoryRow * checkAndAdd(HistoryRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
ASDM & getContainer() const
Return the container to which this table belongs.
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
std::string Key(Tag execBlockId)
Returns a string built by concatenating the ascii representation of the parameters values suffixed wi...
std::vector< HistoryRow * > * getByContext(Tag execBlockId)
Returns all the rows sorted by ascending startTime for a given context.
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 > & getAttributesNames()
Return the names of the attributes of this table.
void checkPresenceInMemory()
HistoryRow * add(HistoryRow *x)
====> Append a row to its table.
static std::string name()
Return the name of this 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).
std::string getVersion() const
Return the version information about this table.
HistoryRow * newRow()
====> Row creation.
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a HistoryTable as those produced by the toFile...
void addWithoutCheckingUnique(HistoryRow *x)
Brutally append an HistoryRow x to the collection of rows already stored in this table.
The HistoryRow class is a row of a HistoryTable.
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
unsigned int size() const
Return the number of rows in the table.
void toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
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...
virtual Origin origin() const =0
ABSTRACT METHODS //.
void getByKeyNoAutoIncNoTime(std::vector< HistoryRow * > &vin, std::vector< HistoryRow * > &vout, Tag execBlockId)
Fills the vector vout (passed by reference) with pointers on elements of vin whose attributes are equ...
HistoryRow * lookup(Tag execBlockId, ArrayTime time, std::string message, std::string priority, std::string origin, std::string objectId, std::string application, std::string cliCommand, std::string appParms)
Look up the table for a row whose all attributes are equal to the corresponding parameters of the met...
HistoryRow * getRowByKey(Tag execBlockId, ArrayTime time)
Returns a HistoryRow* given a key.
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
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.
void setFromXMLFile(const std::string &directory)
const Double e
e and functions thereof:
Entity getEntity() const
Return this table's Entity.
HistoryRow * insertByTime(HistoryRow *x, std::vector< HistoryRow * > &row)
Insert a HistoryRow* in a vector of HistoryRow* so that it's ordered by ascending time...
The HistoryTable class is an Alma table.
asdmIDL::HistoryTableIDL * toIDL()
Conversion Methods.
void setEntity(Entity e)
Set this table's Entity.
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
std::string getName() const
Return the name of 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...
bool loadInProgress
Load the table in memory if necessary.
The Entity class is an identification of a persistant entity in the ALMA archive. ...
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...