34 #ifndef MainTable_CLASS
35 #define MainTable_CLASS
239 static const std::vector<std::string>&
getKeyName();
256 unsigned int size()
const;
274 static std::string
name() ;
314 std::string
toXML() ;
323 asdmIDL::MainTableIDL *
toIDL() ;
332 void toIDL(asdmIDL::MainTableIDL& x)
const;
343 void fromIDL(asdmIDL::MainTableIDL x) ;
388 MainRow *
newRow(
ArrayTime time,
Tag configDescriptionId,
Tag fieldId,
int numAntenna, TimeSamplingMod::TimeSampling timeSampling,
Interval interval,
int numIntegration,
int scanNumber,
int subscanNumber, int64_t dataSize,
EntityRef dataUID, std::vector<Tag> stateId,
Tag execBlockId);
442 std::vector<MainRow *>
get() ;
450 const std::vector<MainRow *>&
get()
const ;
521 MainRow*
lookup(
ArrayTime time,
Tag configDescriptionId,
Tag fieldId,
int numAntenna, TimeSamplingMod::TimeSampling timeSampling,
Interval interval,
int numIntegration,
int scanNumber,
int subscanNumber, int64_t dataSize,
EntityRef dataUID, std::vector<Tag> stateId,
Tag execBlockId);
611 std::string
Key(
Tag configDescriptionId,
Tag fieldId) ;
680 void toFile(std::string directory);
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 getName() const
Return the name of this table.
std::map< std::string, TIME_ROWS > context
static const ByteOrder * Machine_Endianity
std::vector< MainRow * > * getByContext(Tag configDescriptionId, Tag fieldId)
Returns all the rows sorted by ascending startTime for a given context.
The Interval class implements an interval of time in units of nanoseconds.
MainRow * checkAndAdd(MainRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
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...
A class to represent byte order information.
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
void checkPresenceInMemory()
void getByKeyNoAutoIncNoTime(std::vector< MainRow * > &vin, std::vector< MainRow * > &vout, Tag configDescriptionId, Tag fieldId)
Fills the vector vout (passed by reference) with pointers on elements of vin whose attributes are equ...
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.
std::string Key(Tag configDescriptionId, Tag fieldId)
Returns a string built by concatenating the ascii representation of the parameters values suffixed wi...
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
MainRow * newRow()
====> Row creation.
std::string toXML()
Produces an XML representation conform to the schema defined for Main (MainTable.xsd).
MainTable(ASDM &container)
Create a MainTable.
bool loadInProgress
Load the table in memory if necessary.
std::vector< MainRow * > TIME_ROWS
The EntityRef class is an identification of a persistant entity in the ALMA archive.
Entity getEntity() const
Return this table's Entity.
void addWithoutCheckingUnique(MainRow *x)
Brutally append an MainRow x to the collection of rows already stored in this table.
MainRow * getRowByKey(ArrayTime time, Tag configDescriptionId, Tag fieldId)
Returns a MainRow* given a key.
std::vector< MainRow * > privateRows
A data structure to store the pointers on the table's rows.
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
The MainRow class is a row of a MainTable.
void fromIDL(asdmIDL::MainTableIDL x)
Populate this table from the content of a MainTableIDL Corba structure.
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
ASDM & getContainer() const
Return the container to which this table belongs.
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 setFromMIMEFile(const std::string &directory)
Private methods involved during the build of this table out of the content of file(s) containing an e...
asdmIDL::MainTableIDL * toIDL()
Conversion Methods.
MainRow * insertByTime(MainRow *x, std::vector< MainRow * > &row)
Insert a MainRow* in a vector of MainRow* so that it's ordered by ascending time. ...
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
static std::string name()
Return the name of this table.
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
MainRow * lookup(ArrayTime time, Tag configDescriptionId, Tag fieldId, int numAntenna, TimeSamplingMod::TimeSampling timeSampling, Interval interval, int numIntegration, int scanNumber, int subscanNumber, int64_t dataSize, EntityRef dataUID, std::vector< Tag > stateId, Tag execBlockId)
Look up the table for a row whose all attributes are equal to the corresponding parameters of the met...
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
void append(MainRow *x)
Brutally append an MainRow x to the collection of rows already stored in this table.
MainRow * add(MainRow *x)
====> Append a row to its table.
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.
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:
std::string getVersion() const
Return the version information about this table.
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a MainTable as those produced by the toFile me...
void setEntity(Entity e)
Set this table's Entity.
The MainTable class is an Alma table.
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
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.
void setFromXMLFile(const std::string &directory)
The Entity class is an identification of a persistant entity in the ALMA archive. ...