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.

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.

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.

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

asdm::Tag::Tag (  ) 

Create a default Tag that is null.

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

Create a Tag from an integer value.

Parameters:
i the 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:
i an integer value to define the Tag value
t a 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:
t The 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 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:
eiis the 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:
eis the 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:
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
Returns:
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 ( string  s  )  [static]

Create a Tag whose initial value is the specified string.

Exceptions:
TagFormatException 
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:
tag the vector of Tag to be written
eoss the EndianOSStream to be written to
void asdm::Tag::toBin ( EndianOSStream eoss  ) 

Write the binary representation of this to a EndianOSStream.

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.

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:
os a reference to the ostream to be written on.
x a const reference to a Tag.
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.

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 file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1