34 #ifndef FeedTable_CLASS
35 #define FeedTable_CLASS
106 #include <asdmIDLC.h>
285 static const std::vector<std::string>&
getKeyName();
302 unsigned int size()
const;
320 static std::string
name() ;
360 std::string
toXML() ;
369 asdmIDL::FeedTableIDL *
toIDL() ;
378 void toIDL(asdmIDL::FeedTableIDL& x)
const;
389 void fromIDL(asdmIDL::FeedTableIDL x) ;
428 FeedRow *
newRow(
Tag antennaId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval,
int numReceptor, std::vector<std::vector<double > > beamOffset, std::vector<std::vector<Length > > focusReference, std::vector<PolarizationTypeMod::PolarizationType > polarizationTypes, std::vector<std::vector<Complex > > polResponse, std::vector<Angle > receptorAngle, std::vector<int> receiverId);
476 std::vector<FeedRow *>
get() ;
484 const std::vector<FeedRow *>&
get()
const ;
547 FeedRow*
lookup(
Tag antennaId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval,
int numReceptor, std::vector<std::vector<double > > beamOffset, std::vector<std::vector<Length > > focusReference, std::vector<PolarizationTypeMod::PolarizationType > polarizationTypes, std::vector<std::vector<Complex > > polResponse, std::vector<Angle > receptorAngle, std::vector<int> receiverId);
639 std::string
Key(
Tag antennaId,
Tag spectralWindowId) ;
708 void toFile(std::string directory);
The FeedRow class is a row of a FeedTable.
std::map< std::string, ID_TIME_ROWS > context
static const ByteOrder * Machine_Endianity
asdmIDL::FeedTableIDL * toIDL()
Conversion Methods.
void setFromXMLFile(const std::string &directory)
void append(FeedRow *x)
Brutally append an FeedRow x to the collection of rows already stored in this table.
The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval...
bool loadInProgress
Load the table in memory if necessary.
A class to represent byte order information.
std::string toXML()
Produces an XML representation conform to the schema defined for Feed (FeedTable.xsd).
std::string getVersion() const
Return the version information about this table.
The ASDM class is the container for all tables.
FeedRow * getRowByKey(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId)
Returns a FeedRow* given a key.
void fromIDL(asdmIDL::FeedTableIDL x)
Populate this table from the content of a FeedTableIDL Corba structure.
unsigned int size() const
Return the number of rows in the table.
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
Entity getEntity() const
Return this table's Entity.
static std::string name()
Return the name of this table.
FeedRow * checkAndAdd(FeedRow *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.
std::vector< FeedRow * > privateRows
A data structure to store the pointers on the table's rows.
static const std::vector< std::string > & getAttributesNames()
Return the names of the attributes of this table.
void setEntity(Entity e)
Set this table's Entity.
std::vector< FeedRow * > getRowByFeedId(int)
Returns a vector of pointers on rows whose key element feedId is equal to the parameter feedId...
void addWithoutCheckingUnique(FeedRow *x)
Brutally append an FeedRow x to the collection of rows already stored in this table.
ASDM & getContainer() const
Return the container to which this table belongs.
std::string Key(Tag antennaId, Tag spectralWindowId)
Returns a string built by concatenating the ascii representation of the parameters values suffixed wi...
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
void checkPresenceInMemory()
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::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
std::vector< std::vector< FeedRow * > > ID_TIME_ROWS
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 fromXML(std::string &xmlDoc)
Populate this table from the content of a XML document that is required to be conform to the XML sche...
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...
The FeedTable class is an Alma table.
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:
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
FeedRow * newRow()
====> Row creation.
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
FeedRow * lookup(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int numReceptor, std::vector< std::vector< double > > beamOffset, std::vector< std::vector< Length > > focusReference, std::vector< PolarizationTypeMod::PolarizationType > polarizationTypes, std::vector< std::vector< Complex > > polResponse, std::vector< Angle > receptorAngle, std::vector< int > receiverId)
Look up the table for a row whose all attributes except the autoincrementable one are equal to the co...
void setFromFile(const std::string &directory)
Reads and parses a file containing a representation of a FeedTable as those produced by the toFile me...
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 toFile(std::string directory)
Stores a representation (binary or XML) of this table into a file.
void getByKeyNoAutoIncNoTime(std::vector< FeedRow * > &vin, std::vector< FeedRow * > &vout, Tag antennaId, Tag spectralWindowId)
Fills the vector vout (passed by reference) with pointers on elements of vin whose attributes are equ...
FeedRow * insertByStartTime(FeedRow *x, std::vector< FeedRow * > &row)
Insert a FeedRow* in a vector of FeedRow* so that it's ordered by ascending time. ...
FeedRow * add(FeedRow *x)
====> Append a row to its table.
FeedTable(ASDM &container)
Create a FeedTable.
The Entity class is an identification of a persistant entity in the ALMA archive. ...