casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Private Attributes | Friends | List of all members
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>

Public Member Functions

 Tag ()
 Create a default Tag that is null. More...
 
 Tag (unsigned int i)
 Create a Tag from an integer value. More...
 
 Tag (unsigned int i, const TagType *t)
 Create a Tag from an integer value and a TagType. More...
 
 Tag (const Tag &t)
 Create a Tag from a Tag (copy constructor). More...
 
 Tag (asdmIDLTypes::IDLTag &t)
 Tag(const string &id);. More...
 
std::string toString () const
 Return the Tag as a String. More...
 
void toBin (EndianOSStream &eoss)
 Write the binary representation of this to a EndianOSStream. More...
 
virtual ~Tag ()
 The Tag destructor. More...
 
TagTypegetTagType ()
 Returns the type of this Tag. More...
 
unsigned int getTagValue () const
 Returns the value of this Tag. More...
 
asdmIDLTypes::IDLTag toIDLTag () const
 Returns a IDLTag object built from this Tag. More...
 
std::string getTag () const
 Return this Tag value as a string. More...
 
Tagoperator= (const Tag &)
 Assignment operator. More...
 
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. More...
 

Static Public Member Functions

static Tag parseTag (std::string s)
 Create a Tag whose initial value is the specified string. More...
 
static void toBin (const std::vector< Tag > &tag, EndianOSStream &eoss)
 Write the binary representation of a 1D array of Tag to an EndianOSStream. More...
 
static Tag fromBin (EndianIStream &eis)
 Read the binary representation of a Tag from a EndianIStream. More...
 
static std::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. More...
 

Protected Attributes

std::string tag
 
TagTypetype
 

Static Private Attributes

static boost::regex tagSyntax
 

Friends

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

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 73 of file Tag.h.

Constructor & Destructor Documentation

asdm::Tag::Tag ( )

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 ( asdmIDLTypes::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
static std::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
std::string asdm::Tag::getTag ( ) const

Return this Tag value as a string.

Returns
This Tag.
Deprecated:
TagType* asdm::Tag::getTagType ( )

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.
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
Note
Note that the types of the Tags being compared is not taken into account.
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
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 ( std::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.

static void asdm::Tag::toBin ( const std::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
asdmIDLTypes::IDLTag asdm::Tag::toIDLTag ( ) const

Returns a IDLTag object built from this Tag.

Returns
an IDLTag.
std::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<< ( std::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>> ( std::istream &  is,
Tag x 
)
friend

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

Member Data Documentation

std::string asdm::Tag::tag
protected

Definition at line 256 of file Tag.h.

boost::regex asdm::Tag::tagSyntax
staticprivate

Definition at line 261 of file Tag.h.

TagType* asdm::Tag::type
protected

Definition at line 257 of file Tag.h.


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