asdm::AlmaRadiometerTable Class Reference

#include <AlmaRadiometerTable.h>

Inheritance diagram for asdm::AlmaRadiometerTable:

Inheritance graph
[legend]
Collaboration diagram for asdm::AlmaRadiometerTable:

Collaboration graph
[legend]
List of all members.

Detailed Description

The AlmaRadiometerTable class is an Alma table.

Generated from model's revision "1.46", branch "ALMA-5_1_1-B"

Attributes of AlmaRadiometer
Name Type Comment

Key

modeId Tag  

Value
(Mandarory)

numBand int  

Definition at line 152 of file AlmaRadiometerTable.h.

Public Member Functions

virtual ~AlmaRadiometerTable ()
ASDMgetContainer () const
 Return the container to which this table belongs.
unsigned int size ()
 Return the number of rows in the table.
string getName () const
 Return the name of this table.
Entity getEntity () const
 Return this table's Entity.
void setEntity (Entity e)
 Set this table's Entity.
AlmaRadiometerRownewRow ()
 Create a new row with default values.
AlmaRadiometerRownewRowEmpty ()
 Has the same definition than the newRow method with the same signature.
AlmaRadiometerRownewRow (int numBand)
 Create a new row initialized to the specified values.
AlmaRadiometerRownewRowFull (int numBand)
 Has the same definition than the newRow method with the same signature.
AlmaRadiometerRownewRow (AlmaRadiometerRow *row)
 Create a new row using a copy constructor mechanism.
AlmaRadiometerRownewRowCopy (AlmaRadiometerRow *row)
 Has the same definition than the newRow method with the same signature.
AlmaRadiometerRowadd (AlmaRadiometerRow *x)
 Add a row.
vector< AlmaRadiometerRow * > get ()
 Get all rows.
AlmaRadiometerRowgetRowByKey (Tag modeId)
 Returns a AlmaRadiometerRow* given a key.
AlmaRadiometerRowlookup (int numBand)
 Look up the table for a row whose all attributes except the autoincrementable one are equal to the corresponding parameters of the method.
AlmaRadiometerTableIDL * toIDL ()
 Convert this table into a AlmaRadiometerTableIDL CORBA structure.
void fromIDL (AlmaRadiometerTableIDL x) throw (DuplicateKey,ConversionException)
 Populate this table from the content of a AlmaRadiometerTableIDL Corba structure.
char * toFITS () const throw (ConversionException)
 To be implemented.
void fromFITS (char *fits) throw (ConversionException)
 To be implemented.
string toVOTable () const throw (ConversionException)
 To be implemented.
void fromVOTable (string vo) throw (ConversionException)
 To be implemented.
string toXML () throw (ConversionException)
 Translate this table to an XML representation conform to the schema defined for AlmaRadiometer (AlmaRadiometerTable.xsd).
void fromXML (string xmlDoc) throw (ConversionException)
 Populate this table from the content of a XML document that is required to be conform to the XML schema defined for a AlmaRadiometer (AlmaRadiometerTable.xsd).
string toMIME ()
 Serialize this into a stream of bytes and encapsulates that stream into a MIME message.
void setFromMIME (const string &mimeMsg)
 Extracts the binary part of a MIME message and deserialize its content to fill this with the result of the deserialization.
void toFile (string directory)
 Stores a representation (binary or XML) of this table into a file.
void setFromFile (const string &directory)
 Reads and parses a file containing a representation of a AlmaRadiometerTable as those produced by the toFile method.

Static Public Member Functions

static vector< string > getKeyName ()
 Return the list of field names that make up key key as an array of strings.

Private Member Functions

 AlmaRadiometerTable (ASDM &container)
 Create a AlmaRadiometerTable.
void autoIncrement (string key, AlmaRadiometerRow *x)
AlmaRadiometerRowcheckAndAdd (AlmaRadiometerRow *x) throw (DuplicateKey, UniquenessViolationException)
 If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and throw exception if not.
void error () throw (ConversionException)

Private Attributes

ASDMcontainer
bool archiveAsBin
bool fileAsBin
Entity entity
map< string, int > noAutoIncIds
 A map for the autoincrementation algorithm.
vector< AlmaRadiometerRow * > privateRows
 A data structure to store the pointers on the table's rows.
vector< AlmaRadiometerRow * > row

Static Private Attributes

static string tableName
 The name of this table.
static vector< string > key
 The list of field names that make up key key.

Friends

class asdm::ASDM


Constructor & Destructor Documentation

virtual asdm::AlmaRadiometerTable::~AlmaRadiometerTable (  )  [virtual]

asdm::AlmaRadiometerTable::AlmaRadiometerTable ( ASDM container  )  [private]

Create a AlmaRadiometerTable.

This constructor is private because only the container can create tables. All tables must know the container to which they belong.

Parameters:
container The container to which this table belongs.


Member Function Documentation

static vector<string> asdm::AlmaRadiometerTable::getKeyName (  )  [static]

Return the list of field names that make up key key as an array of strings.

Returns:
a vector of string.

ASDM& asdm::AlmaRadiometerTable::getContainer (  )  const

Return the container to which this table belongs.

Returns:
the ASDM containing this table.

unsigned int asdm::AlmaRadiometerTable::size (  )  [virtual]

Return the number of rows in the table.

Returns:
the number of rows in an unsigned int.

Implements asdm::Representable.

string asdm::AlmaRadiometerTable::getName (  )  const [virtual]

Return the name of this table.

Returns:
the name of this table in a string.

Implements asdm::Representable.

Entity asdm::AlmaRadiometerTable::getEntity (  )  const [virtual]

Return this table's Entity.

Implements asdm::Representable.

void asdm::AlmaRadiometerTable::setEntity ( Entity  e  )  [virtual]

Set this table's Entity.

Parameters:
e An entity.

Implements asdm::Representable.

AlmaRadiometerRow* asdm::AlmaRadiometerTable::newRow (  ) 

Create a new row with default values.

Returns:
a pointer on a AlmaRadiometerRow

AlmaRadiometerRow* asdm::AlmaRadiometerTable::newRowEmpty (  ) 

Has the same definition than the newRow method with the same signature.

Provided to facilitate the call from Python, otherwise the newRow method will be preferred.

AlmaRadiometerRow* asdm::AlmaRadiometerTable::newRow ( int  numBand  ) 

Create a new row initialized to the specified values.

Returns:
a pointer on the created and initialized row.
Parameters:
numBand. 

AlmaRadiometerRow* asdm::AlmaRadiometerTable::newRowFull ( int  numBand  ) 

Has the same definition than the newRow method with the same signature.

Provided to facilitate the call from Python, otherwise the newRow method will be preferred.

AlmaRadiometerRow* asdm::AlmaRadiometerTable::newRow ( AlmaRadiometerRow row  ) 

Create a new row using a copy constructor mechanism.

The method creates a new AlmaRadiometerRow owned by this. Each attribute of the created row is a (deep) copy of the corresponding attribute of row. The method does not add the created row to this, its simply parents it to this, a call to the add method has to be done in order to get the row added (very likely after having modified some of its attributes). If row is null then the method returns a new AlmaRadiometerRow with default values for its attributes.

Parameters:
row the row which is to be copied.

AlmaRadiometerRow* asdm::AlmaRadiometerTable::newRowCopy ( AlmaRadiometerRow row  ) 

Has the same definition than the newRow method with the same signature.

Provided to facilitate the call from Python, otherwise the newRow method will be preferred.

AlmaRadiometerRow* asdm::AlmaRadiometerTable::add ( AlmaRadiometerRow x  ) 

Add a row.

If there table contains a row whose key's fields are equal to x's ones then return a pointer on this row (i.e. no actual insertion is performed) otherwise add x to the table and return x.

Parameters:
x. A pointer on the row to be added.
Returns:
a AlmaRadiometerRow pointer.

vector<AlmaRadiometerRow *> asdm::AlmaRadiometerTable::get (  ) 

Get all rows.

Returns:
Alls rows as a vector of pointers of AlmaRadiometerRow. The elements of this vector are stored in the order in which they have been added to the AlmaRadiometerTable.

AlmaRadiometerRow* asdm::AlmaRadiometerTable::getRowByKey ( Tag  modeId  ) 

Returns a AlmaRadiometerRow* given a key.

Returns:
a pointer to the row having the key whose values are passed as parameters, or 0 if no row exists for that key.
Parameters:
modeId. 

AlmaRadiometerRow* asdm::AlmaRadiometerTable::lookup ( int  numBand  ) 

Look up the table for a row whose all attributes except the autoincrementable one are equal to the corresponding parameters of the method.

Returns:
a pointer on this row if any, null otherwise.
Parameters:
numBand. 

AlmaRadiometerTableIDL* asdm::AlmaRadiometerTable::toIDL (  ) 

Convert this table into a AlmaRadiometerTableIDL CORBA structure.

Returns:
a pointer to a AlmaRadiometerTableIDL

void asdm::AlmaRadiometerTable::fromIDL ( AlmaRadiometerTableIDL  x  )  throw (DuplicateKey,ConversionException)

Populate this table from the content of a AlmaRadiometerTableIDL Corba structure.

Exceptions:
DuplicateKey Thrown if the method tries to add a row having a key that is already in the table.
ConversionException 

char* asdm::AlmaRadiometerTable::toFITS (  )  const throw (ConversionException) [virtual]

To be implemented.

Implements asdm::Representable.

void asdm::AlmaRadiometerTable::fromFITS ( char *  fits  )  throw (ConversionException) [virtual]

To be implemented.

Implements asdm::Representable.

string asdm::AlmaRadiometerTable::toVOTable (  )  const throw (ConversionException) [virtual]

To be implemented.

Implements asdm::Representable.

void asdm::AlmaRadiometerTable::fromVOTable ( string  vo  )  throw (ConversionException) [virtual]

To be implemented.

Implements asdm::Representable.

string asdm::AlmaRadiometerTable::toXML (  )  throw (ConversionException) [virtual]

Translate this table to an XML representation conform to the schema defined for AlmaRadiometer (AlmaRadiometerTable.xsd).

Returns:
a string containing the XML representation.

Implements asdm::Representable.

void asdm::AlmaRadiometerTable::fromXML ( string  xmlDoc  )  throw (ConversionException) [virtual]

Populate this table from the content of a XML document that is required to be conform to the XML schema defined for a AlmaRadiometer (AlmaRadiometerTable.xsd).

Implements asdm::Representable.

string asdm::AlmaRadiometerTable::toMIME (  ) 

Serialize this into a stream of bytes and encapsulates that stream into a MIME message.

Returns:
a string containing the MIME message.

void asdm::AlmaRadiometerTable::setFromMIME ( const string &  mimeMsg  ) 

Extracts the binary part of a MIME message and deserialize its content to fill this with the result of the deserialization.

Parameters:
mimeMsg the string containing the MIME message.
Exceptions:
ConversionException 

void asdm::AlmaRadiometerTable::toFile ( string  directory  ) 

Stores a representation (binary or XML) of this table into a file.

Depending on the boolean value of its private field fileAsBin a binary serialization of this (fileAsBin==true) will be saved in a file "AlmaRadiometer.bin" or an XML representation (fileAsBin==false) will be saved in a file "AlmaRadiometer.xml". The file is always written in a directory whose name is passed as a parameter.

Parameters:
directory The name of directory where the file containing the table's representation will be saved.

void asdm::AlmaRadiometerTable::setFromFile ( const string &  directory  ) 

Reads and parses a file containing a representation of a AlmaRadiometerTable as those produced by the toFile method.

This table is populated with the result of the parsing.

Parameters:
directory The name of the directory containing the file te be read and parsed.
Exceptions:
ConversionException If any error occurs while reading the files in the directory or parsing them.

void asdm::AlmaRadiometerTable::autoIncrement ( string  key,
AlmaRadiometerRow x 
) [private]

AlmaRadiometerRow* asdm::AlmaRadiometerTable::checkAndAdd ( AlmaRadiometerRow x  )  throw (DuplicateKey, UniquenessViolationException) [private]

If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and throw exception if not.

Check if *x verifies the key uniqueness rule and throw an exception if not. Append x to its table.

void asdm::AlmaRadiometerTable::error (  )  throw (ConversionException) [private]


Friends And Related Function Documentation

friend class asdm::ASDM [friend]

Definition at line 153 of file AlmaRadiometerTable.h.


Member Data Documentation

ASDM& asdm::AlmaRadiometerTable::container [private]

Definition at line 418 of file AlmaRadiometerTable.h.

bool asdm::AlmaRadiometerTable::archiveAsBin [private]

Definition at line 420 of file AlmaRadiometerTable.h.

bool asdm::AlmaRadiometerTable::fileAsBin [private]

Definition at line 421 of file AlmaRadiometerTable.h.

Entity asdm::AlmaRadiometerTable::entity [private]

Definition at line 423 of file AlmaRadiometerTable.h.

map<string,int> asdm::AlmaRadiometerTable::noAutoIncIds [private]

A map for the autoincrementation algorithm.

Definition at line 427 of file AlmaRadiometerTable.h.

string asdm::AlmaRadiometerTable::tableName [static, private]

The name of this table.

Definition at line 434 of file AlmaRadiometerTable.h.

vector<string> asdm::AlmaRadiometerTable::key [static, private]

The list of field names that make up key key.

Definition at line 440 of file AlmaRadiometerTable.h.

vector<AlmaRadiometerRow * > asdm::AlmaRadiometerTable::privateRows [private]

A data structure to store the pointers on the table's rows.

In all cases we maintain a private ArrayList of AlmaRadiometerRow s.

Definition at line 455 of file AlmaRadiometerTable.h.

vector<AlmaRadiometerRow *> asdm::AlmaRadiometerTable::row [private]

Definition at line 459 of file AlmaRadiometerTable.h.


The documentation for this class was generated from the following file:
Generated on Mon Sep 1 22:42:31 2008 for NRAOCASA by  doxygen 1.5.1