34 #ifndef PulsarTable_CLASS
35 #define PulsarTable_CLASS
235 static const std::vector<std::string>&
getKeyName();
252 unsigned int size()
const;
270 static std::string
name() ;
310 std::string
toXML() ;
319 asdmIDL::PulsarTableIDL *
toIDL() ;
328 void toIDL(asdmIDL::PulsarTableIDL& x)
const;
339 void fromIDL(asdmIDL::PulsarTableIDL x) ;
413 std::vector<PulsarRow *>
get() ;
421 const std::vector<PulsarRow *>&
get()
const ;
529 std::vector<PulsarRow *>
row;
587 void toFile(std::string directory);
PulsarTable(ASDM &container)
Create a PulsarTable.
static const ByteOrder * Machine_Endianity
PulsarRow * lookup(ArrayTime refTime, Frequency refPulseFreq, double refPhase, int numBin)
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 PulsarTable as those produced by the toFile ...
PulsarRow * getRowByKey(Tag pulsarId)
Returns a PulsarRow* given a key.
void autoIncrement(std::string key, PulsarRow *x)
A class to represent byte order information.
static const std::vector< std::string > & defaultAttributesNamesInBin()
Return the default sorted list of attributes names in the binary representation of the table...
The ASDM class is the container for all tables.
std::vector< PulsarRow * > row
unsigned int size() const
Return the number of rows in the table.
PulsarRow * checkAndAdd(PulsarRow *x, bool skipCheckUniqueness=false)
If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and...
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.
void checkPresenceInMemory()
void append(PulsarRow *x)
Brutally append an PulsarRow x to the collection of rows already stored in this table.
std::string getVersion() const
Return the version information about this table.
std::string getName() const
Return the name of this table.
BinaryAttributeReaderFunctor * getUnknownAttributeBinaryReader(const std::string &attributeName) const
The PulsarTable class is an Alma 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...
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 toMIME(const asdm::ByteOrder *byteOrder=asdm::ByteOrder::Machine_Endianity)
Serialize this into a stream of bytes and encapsulates that stream into a MIME message.
bool loadInProgress
Load the table in memory if necessary.
std::string toXML()
Produces an XML representation conform to the schema defined for Pulsar (PulsarTable.xsd).
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...
PulsarRow * newRow()
====> Row creation.
std::map< std::string, BinaryAttributeReaderFunctor * > unknownAttributes2Functors
void fromIDL(asdmIDL::PulsarTableIDL x)
Populate this table from the content of a PulsarTableIDL Corba structure.
static std::string name()
Return the name of this table.
The ArrayTime class implements the concept of a point in time, implemented as an Interval of time sin...
void setFromXMLFile(const std::string &directory)
The PulsarRow class is a row of a PulsarTable.
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
asdmIDL::PulsarTableIDL * toIDL()
Conversion Methods.
std::vector< PulsarRow * > privateRows
A data structure to store the pointers on the table's rows.
static const std::vector< std::string > & getKeyName()
Return the list of field names that make up key key as an array of strings.
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 addWithoutCheckingUnique(PulsarRow *x)
Brutally append an PulsarRow x to the collection of rows already stored in this table.
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...
The Frequency class implements a quantity of frequency in hertz.
Entity getEntity() const
Return this table's Entity.
void setEntity(Entity e)
Set this table's Entity.
std::map< std::string, int > noAutoIncIds
A map for the autoincrementation algorithm.
void setUnknownAttributeBinaryReader(const std::string &attributeName, BinaryAttributeReaderFunctor *barFctr)
The Entity class is an identification of a persistant entity in the ALMA archive. ...
PulsarRow * add(PulsarRow *x)
====> Append a row to its table.