casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Private Attributes | Friends
asdm::Tag Class Reference

The Tag class is an implementation of a unique index identifying a row of an ASDM table. More...

#include <Tag.h>

List of all members.

Public Member Functions

 Tag ()
 Create a default Tag that is null.
 Tag (unsigned int i)
 Create a Tag from an integer value.
 Tag (unsigned int i, const TagType *t)
 Create a Tag from an integer value and a TagType.
 Tag (const Tag &t)
 Create a Tag from a Tag (copy constructor).
 Tag (IDLTag &t)
 Tag(const string &id);.
string toString () const
 Return the Tag as a String.
void toBin (EndianOSStream &eoss)
 Write the binary representation of this to a EndianOSStream.
virtual ~Tag ()
 The Tag destructor.
TagTypegetTagType ()
 Returns the type of this Tag.
unsigned int getTagValue () const
 Returns the value of this Tag.
IDLTag toIDLTag () const
 Returns a IDLTag object built from this Tag.
string getTag () const
 Return this Tag value as a string.
Tagoperator= (const Tag &)
 Assignment operator.
bool equals (const Tag &t) const
bool operator== (const Tag &t) const
bool operator!= (const Tag &t) const
bool operator< (const Tag &t) const
bool operator> (const Tag &t) const
bool isNull () const
 Return true if and only if this Tag is null, i.e.
 Tag ()
 Create a default Tag that is null.
 Tag (unsigned int i)
 Create a Tag from an integer value.
 Tag (unsigned int i, const TagType *t)
 Create a Tag from an integer value and a TagType.
 Tag (const Tag &t)
 Create a Tag from a Tag (copy constructor).
 Tag (IDLTag &t)
 Tag(const string &id);.
string toString () const
 Return the Tag as a String.
void toBin (EndianOSStream &eoss)
 Write the binary representation of this to a EndianOSStream.
virtual ~Tag ()
 The Tag destructor.
TagTypegetTagType ()
 Returns the type of this Tag.
unsigned int getTagValue () const
 Returns the value of this Tag.
IDLTag toIDLTag () const
 Returns a IDLTag object built from this Tag.
string getTag () const
 Return this Tag value as a string.
Tagoperator= (const Tag &)
 Assignment operator.
bool equals (const Tag &t) const
bool operator== (const Tag &t) const
bool operator!= (const Tag &t) const
bool operator< (const Tag &t) const
bool operator> (const Tag &t) const
bool isNull () const
 Return true if and only if this Tag is null, i.e.

Static Public Member Functions

static Tag parseTag (string s)
 Create a Tag whose initial value is the specified string.
static void toBin (const vector< Tag > &tag, EndianOSStream &eoss)
 Write the binary representation of a 1D array of Tag to an EndianOSStream.
static Tag fromBin (EndianIStream &eis)
 Read the binary representation of a Tag from a EndianIStream.
static vector< Tagfrom1DBin (EndianIStream &eis)
 Read the binary representation of a of a vector of Tag from an EndianIStream and use the read value to set a vector of Tag.
static Tag parseTag (string s)
 Create a Tag whose initial value is the specified string.
static void toBin (const vector< Tag > &tag, EndianOSStream &eoss)
 Write the binary representation of a 1D array of Tag to an EndianOSStream.
static Tag fromBin (EndianIStream &eis)
 Read the binary representation of a Tag from a EndianIStream.
static vector< Tagfrom1DBin (EndianIStream &eis)
 Read the binary representation of a of a vector of Tag from an EndianIStream and use the read value to set a vector of Tag.

Protected Attributes

string tag
TagTypetype

Static Private Attributes

static boost::regex tagSyntax

Friends

std::ostream & operator<< (ostream &os, const Tag &x)
 Overloading of << to output the value of a Tag on an ostream.
std::istream & operator>> (istream &is, Tag &x)
 Overloading of >> to read a Tag from an istream.
std::ostream & operator<< (ostream &os, const Tag &x)
 Overloading of << to output the value of a Tag on an ostream.
std::istream & operator>> (istream &is, Tag &x)
 Overloading of >> to read a Tag from an istream.

Detailed Description

The Tag class is an implementation of a unique index identifying a row of an ASDM table.

Basically a Tag is defined by :

Version:
1.00 Jan. 7, 2005
Author:
Allen Farris
Version:
2.00 Aug. 3, 2006
Author:
Michel Caillat

Definition at line 78 of file Tag.h.


Constructor & Destructor Documentation

Create a default Tag that is null.

asdm::Tag::Tag ( unsigned int  i)

Create a Tag from an integer value.

Parameters:
ithe integer defining the Tag value.
Note:
The created Tag has a TagType::NoType.
asdm::Tag::Tag ( unsigned int  i,
const TagType t 
)

Create a Tag from an integer value and a TagType.

Parameters:
ian integer value to define the Tag value
ta TagType to define the type of the Tag
Note:
called with t == null this method creates a null Tag.
asdm::Tag::Tag ( const Tag t)

Create a Tag from a Tag (copy constructor).

asdm::Tag::Tag ( IDLTag &  t)

Tag(const string &id);.

Create a Tag from an IDLTag object.

Parameters:
tThe IDLTag object.
Exceptions:
TagFormatException
virtual asdm::Tag::~Tag ( ) [virtual]

The Tag destructor.

Create a default Tag that is null.

asdm::Tag::Tag ( unsigned int  i)

Create a Tag from an integer value.

Parameters:
ithe integer defining the Tag value.
Note:
The created Tag has a TagType::NoType.
asdm::Tag::Tag ( unsigned int  i,
const TagType t 
)

Create a Tag from an integer value and a TagType.

Parameters:
ian integer value to define the Tag value
ta TagType to define the type of the Tag
Note:
called with t == null this method creates a null Tag.
asdm::Tag::Tag ( const Tag t)

Create a Tag from a Tag (copy constructor).

asdm::Tag::Tag ( IDLTag &  t)

Tag(const string &id);.

Create a Tag from an IDLTag object.

Parameters:
tThe IDLTag object.
Exceptions:
TagFormatException
virtual asdm::Tag::~Tag ( ) [virtual]

The Tag destructor.


Member Function Documentation

bool asdm::Tag::equals ( const Tag t) const
Returns:
true if and only if this->value==t.value and this-> type==t.type
bool asdm::Tag::equals ( const Tag t) const
Returns:
true if and only if this->value==t.value and this-> type==t.type
static vector<Tag> asdm::Tag::from1DBin ( EndianIStream eis) [static]

Read the binary representation of a of a vector of Tag from an EndianIStream and use the read value to set a vector of Tag.

Parameters:
eiisthe EndianIStream to be read
Returns:
a vector of Tag
Exceptions:
TagFormatException
static vector<Tag> asdm::Tag::from1DBin ( EndianIStream eis) [static]

Read the binary representation of a of a vector of Tag from an EndianIStream and use the read value to set a vector of Tag.

Parameters:
eiisthe EndianIStream to be read
Returns:
a vector of Tag
Exceptions:
TagFormatException
static Tag asdm::Tag::fromBin ( EndianIStream eis) [static]

Read the binary representation of a Tag from a EndianIStream.

and use the read value to set a Tag.

Parameters:
eisthe the EndianIStream to be read
Returns:
a Tag
Exceptions:
TagFormatException
static Tag asdm::Tag::fromBin ( EndianIStream eis) [static]

Read the binary representation of a Tag from a EndianIStream.

and use the read value to set a Tag.

Parameters:
eisthe the EndianIStream to be read
Returns:
a Tag
Exceptions:
TagFormatException
string asdm::Tag::getTag ( ) const

Return this Tag value as a string.

Returns:
This Tag.
Deprecated:
string asdm::Tag::getTag ( ) const

Return this Tag value as a string.

Returns:
This Tag.
Deprecated:

Returns the type of this Tag.

Returns:
the type of this Tag as a TagType.
Note:
A null returned value indicates that the Tag is null (i.e. this.isNull() == true)/

Returns the type of this Tag.

Returns:
the type of this Tag as a TagType.
Note:
A null returned value indicates that the Tag is null (i.e. this.isNull() == true)/
unsigned int asdm::Tag::getTagValue ( ) const

Returns the value of this Tag.

The returned value has no meaning if the Tag is null.

Returns:
the value of this Tag as an int.
Note:
The returned integer value has a meaning if and only if the Taf is not null.
unsigned int asdm::Tag::getTagValue ( ) const

Returns the value of this Tag.

The returned value has no meaning if the Tag is null.

Returns:
the value of this Tag as an int.
Note:
The returned integer value has a meaning if and only if the Taf is not null.
bool asdm::Tag::isNull ( ) const

Return true if and only if this Tag is null, i.e.

if its TagType field is null.

Returns:
true if and only if this Tag is null.
bool asdm::Tag::isNull ( ) const

Return true if and only if this Tag is null, i.e.

if its TagType field is null.

Returns:
true if and only if this Tag is null.
bool asdm::Tag::operator!= ( const Tag t) const
Returns:
true if this->value != t.value or this->type != t.value
bool asdm::Tag::operator!= ( const Tag t) const
Returns:
true if this->value != t.value or this->type != t.value
bool asdm::Tag::operator< ( const Tag t) const
Returns:
true if this->value < t.value
Note:
Note that the types of the Tags being compared is not taken into account.
bool asdm::Tag::operator< ( const Tag t) const
Returns:
true if this->value < t.value
Note:
Note that the types of the Tags being compared is not taken into account.
Tag& asdm::Tag::operator= ( const Tag )

Assignment operator.

Tag& asdm::Tag::operator= ( const Tag )

Assignment operator.

bool asdm::Tag::operator== ( const Tag t) const
    @return true if and only if this->value==t.value and this-> type==t.type
Note:
Behaves exactly like the equals method.
bool asdm::Tag::operator== ( const Tag t) const
    @return true if and only if this->value==t.value and this-> type==t.type
Note:
Behaves exactly like the equals method.
bool asdm::Tag::operator> ( const Tag t) const
Returns:
true if this->value > t.value
Note:
Note that the types of the Tags being compared is not taken into account.
bool asdm::Tag::operator> ( const Tag t) const
Returns:
true if this->value > t.value
Note:
Note that the types of the Tags being compared is not taken into account.
static Tag asdm::Tag::parseTag ( string  s) [static]

Create a Tag whose initial value is the specified string.

Exceptions:
TagFormatException
static Tag asdm::Tag::parseTag ( string  s) [static]

Create a Tag whose initial value is the specified string.

Exceptions:
TagFormatException
void asdm::Tag::toBin ( EndianOSStream eoss)

Write the binary representation of this to a EndianOSStream.

void asdm::Tag::toBin ( EndianOSStream eoss)

Write the binary representation of this to a EndianOSStream.

static void asdm::Tag::toBin ( const vector< Tag > &  tag,
EndianOSStream eoss 
) [static]

Write the binary representation of a 1D array of Tag to an EndianOSStream.

Parameters:
tagthe vector of Tag to be written
eossthe EndianOSStream to be written to
static void asdm::Tag::toBin ( const vector< Tag > &  tag,
EndianOSStream eoss 
) [static]

Write the binary representation of a 1D array of Tag to an EndianOSStream.

Parameters:
tagthe vector of Tag to be written
eossthe EndianOSStream to be written to
IDLTag asdm::Tag::toIDLTag ( ) const

Returns a IDLTag object built from this Tag.

Returns:
an IDLTag.
IDLTag asdm::Tag::toIDLTag ( ) const

Returns a IDLTag object built from this Tag.

Returns:
an IDLTag.
string asdm::Tag::toString ( ) const

Return the Tag as a String.

The resulting string consists in the string representation of the type followed by an underscore followed by the String representation of the value. Examples : "Antenna_12", "SpectralWindow_0".

Returns:
The Tag as a String.
string asdm::Tag::toString ( ) const

Return the Tag as a String.

The resulting string consists in the string representation of the type followed by an underscore followed by the String representation of the value. Examples : "Antenna_12", "SpectralWindow_0".

Returns:
The Tag as a String.

Friends And Related Function Documentation

std::ostream& operator<< ( ostream &  os,
const Tag x 
) [friend]

Overloading of << to output the value of a Tag on an ostream.

Parameters:
osa reference to the ostream to be written on.
xa const reference to a Tag.
std::ostream& operator<< ( ostream &  os,
const Tag x 
) [friend]

Overloading of << to output the value of a Tag on an ostream.

Parameters:
osa reference to the ostream to be written on.
xa const reference to a Tag.
std::istream& operator>> ( istream &  is,
Tag x 
) [friend]

Overloading of >> to read a Tag from an istream.

std::istream& operator>> ( istream &  is,
Tag x 
) [friend]

Overloading of >> to read a Tag from an istream.


Member Data Documentation

string asdm::Tag::tag [protected]

Definition at line 261 of file Tag.h.

static boost::regex asdm::Tag::tagSyntax [static, private]

Definition at line 265 of file Tag.h.

TagType * asdm::Tag::type [protected]

Definition at line 262 of file Tag.h.


The documentation for this class was generated from the following files: