34 #ifndef PointingTable_CLASS
35 #define PointingTable_CLASS
106 #include <asdmIDLC.h>
288 static const std::vector<std::string>&
getKeyName();
305 unsigned int size()
const;
323 static std::string
name() ;
363 std::string
toXML() ;
372 asdmIDL::PointingTableIDL *
toIDL() ;
381 void toIDL(asdmIDL::PointingTableIDL& x)
const;
392 void fromIDL(asdmIDL::PointingTableIDL x) ;
435 PointingRow *
newRow(
Tag antennaId,
ArrayTimeInterval timeInterval,
int numSample, std::vector<std::vector<Angle > > encoder,
bool pointingTracking,
bool usePolynomials,
ArrayTime timeOrigin,
int numTerm, std::vector<std::vector<Angle > > pointingDirection, std::vector<std::vector<Angle > > target, std::vector<std::vector<Angle > > offset,
int pointingModelId);
489 std::vector<PointingRow *>
get() ;
497 const std::vector<PointingRow *>&
get()
const ;
564 PointingRow*
lookup(
Tag antennaId,
ArrayTimeInterval timeInterval,
int numSample, std::vector<std::vector<Angle > > encoder,
bool pointingTracking,
bool usePolynomials,
ArrayTime timeOrigin,
int numTerm, std::vector<std::vector<Angle > > pointingDirection, std::vector<std::vector<Angle > > target, std::vector<std::vector<Angle > > offset,
int pointingModelId);
654 std::string
Key(
Tag antennaId) ;
723 void toFile(std::string directory);
std::string getVersion() const
Return the version information about this table.
PointingRow * lookup(Tag antennaId, ArrayTimeInterval timeInterval, int numSample, std::vector< std::vector< Angle > > encoder, bool pointingTracking, bool usePolynomials, ArrayTime timeOrigin, int numTerm, std::vector< std::vector< Angle > > pointingDirection, std::vector< std::vector< Angle > > target, std::vector< std::vector< Angle > > offset, int pointingModelId)
Look up the table for a row whose all attributes are equal to the corresponding parameters of the met...
static const ByteOrder * Machine_Endianity
The PointingTable class is an Alma table.
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
bool loadInProgress
Load the table in memory if necessary.
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a PointingTable as those produced by the toFil...
void addWithoutCheckingUnique(PointingRow *x)
Brutally append an PointingRow x to the collection of rows already stored in this table...
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
std::vector< PointingRow * > privateRows
A data structure to store the pointers on the table's rows.
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).
The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval...
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.
void getByKeyNoAutoIncNoTime(std::vector< PointingRow * > &vin, std::vector< PointingRow * > &vout, Tag antennaId)
Fills the vector vout (passed by reference) with pointers on elements of vin whose attributes are equ...
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::vector< PointingRow * > * getByContext(Tag antennaId)
Returns all the rows sorted by ascending startTime for a given context.
A class to represent byte order information.
The ASDM class is the container for all tables.
The PointingRow class is a row of a PointingTable.
PointingRow * getRowByKey(Tag antennaId, ArrayTimeInterval timeInterval)
Returns a PointingRow* given a key.
PointingRow * insertByStartTime(PointingRow *x, std::vector< PointingRow * > &row)
Insert a PointingRow* in a vector of PointingRow* so that it's ordered by ascending time...
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
PointingRow * newRow()
====> Row creation.
std::vector< PointingRow * > TIME_ROWS
Entity getEntity() const
Return this table's Entity.
std::map< std::string, TIME_ROWS > context
ASDM & getContainer() const
Return the container to which this table belongs.
PointingTable(ASDM &container)
Create a PointingTable.
void toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
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 fromXML(std::string &xmlDoc)
Populate this table from the content of a XML document that is required to be conform to the XML sche...
PointingRow * add(PointingRow *x)
====> Append a row to its table.
void setEntity(Entity e)
Set this table's Entity.
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
void append(PointingRow *x)
Brutally append an PointingRow x to the collection of rows already stored in this table...
The Tag class is an implementation of a unique index identifying a row of an ASDM 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...
asdmIDL::PointingTableIDL * toIDL()
Conversion Methods.
std::string Key(Tag antennaId)
Returns a string built by concatenating the ascii representation of the parameters values suffixed wi...
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
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 toMIME(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Serialize this into a stream of bytes and encapsulates that stream into a MIME message.
unsigned int size() const
Return the number of rows in the table.
std::string toXML()
Produces an XML representation conform to the schema defined for Pointing (PointingTable.xsd).
void fromIDL(asdmIDL::PointingTableIDL x)
Populate this table from the content of a PointingTableIDL Corba structure.
PointingRow * checkAndAdd(PointingRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
The Entity class is an identification of a persistant entity in the ALMA archive. ...
void setFromXMLFile(const std::string &directory)