MeVisLabToolboxReference
DCMTree::TagId Class Reference

Class to wrap a tag-id. More...

#include <DCMTree_TagId.h>

Inheritance diagram for DCMTree::TagId:
DCMTree_Serialization::Serializable DCMTree_Serialization::Deserializable

List of all members.

Public Member Functions

 TagId ()
 ctor - sets the id to (0000,0000)
 TagId (RawTagId rawid)
 ctor - initialize to the given value
 TagId (const TagId &other)
 copy ctor
 TagId (unsigned short groupid, unsigned short elementid)
 ctor - create a new instance with id (groupid,elementid)
 TagId (std::string tidstr)
 ctor - create a new instance by conversion from the given string accepts string of the form t*H*t*,t*H*t* t* : any number of non , and non digits (a-f,A-F,0-9) H* : any number of digits (a-f,A-F,0-9)
virtual ~TagId ()
 dtor
TagIdoperator= (const TagId &other)
 assignment operator (used by copy-ctor)
bool operator== (const TagId &other) const
 is-equal operator
bool operator!= (const TagId &other) const
 is-not-equal operator
bool operator> (const TagId &other) const
 is-bigger-than operator
bool operator< (const TagId &other) const
 is-less-than operator
bool operator>= (const TagId &other) const
 if-bigger-than-or-equal operator
bool operator<= (const TagId &other) const
 if-smaller-than-or-equal operator
 operator RawTagId () const
 get access to the raw-id using auto-conversion
 operator RawTagId & ()
 get access to the raw-id using auto-conversion
unsigned short groupId () const
 get the upper word of the id -> group-identifier
unsigned short elementId () const
 get the lower word of the id -> element-identifier
bool isPrivate () const
 check if this id identifies a private tag (groupid is odd)
bool isPrivateCreator () const
 check if this id identifies a private creator tag
RawTagId privateTag (unsigned short slot) const
 Returns the tag ID of the corresponding private tag with the given slot.
RawTagId rawId () const
 access the raw value
RawTagIdrawId ()
 access the raw value
std::string toString () const
 convert this to a string of the form (groupid,elementid)
void fromStream (std::istream &in)
 extract this instance from the given stream
void toStream (std::ostream &out) const
 copy this instance recursively into the given stream
virtual void serializeX (DCMTree_Serialization::Sink &sink) const
 Writes data of this object to Sink.
virtual void deserializeX (DCMTree_Serialization::Source &source)
 Overwrites data of this object with data from Source.

Static Public Member Functions

static TagIdPtr create (RawTagId rawid)
static TagIdPtr create (const TagId &other)
static TagIdPtr create (unsigned short groupid, unsigned short elementid)
static TagIdPtr create (std::string tidstr)
static bool isPrivateTag (RawTagId id)
 Returns true if the given tag ID belongs to a private tag.

Detailed Description

Class to wrap a tag-id.

Definition at line 29 of file DCMTree_TagId.h.


Constructor & Destructor Documentation

DCMTree::TagId::TagId ( )

ctor - sets the id to (0000,0000)

DCMTree::TagId::TagId ( RawTagId  rawid)

ctor - initialize to the given value

DCMTree::TagId::TagId ( const TagId other)

copy ctor

DCMTree::TagId::TagId ( unsigned short  groupid,
unsigned short  elementid 
)

ctor - create a new instance with id (groupid,elementid)

DCMTree::TagId::TagId ( std::string  tidstr)

ctor - create a new instance by conversion from the given string accepts string of the form t*H*t*,t*H*t* t* : any number of non , and non digits (a-f,A-F,0-9) H* : any number of digits (a-f,A-F,0-9)

virtual DCMTree::TagId::~TagId ( ) [virtual]

dtor


Member Function Documentation

static TagIdPtr DCMTree::TagId::create ( RawTagId  rawid) [static]
static TagIdPtr DCMTree::TagId::create ( const TagId other) [static]
static TagIdPtr DCMTree::TagId::create ( std::string  tidstr) [static]
static TagIdPtr DCMTree::TagId::create ( unsigned short  groupid,
unsigned short  elementid 
) [static]
virtual void DCMTree::TagId::deserializeX ( DCMTree_Serialization::Source source) [virtual]

Overwrites data of this object with data from Source.

All the rules stated for SCR::Serializable::serializeX apply correspondingly.

See also:
SCR::Serializable::serializeX

Implements DCMTree_Serialization::Deserializable.

unsigned short DCMTree::TagId::elementId ( ) const

get the lower word of the id -> element-identifier

void DCMTree::TagId::fromStream ( std::istream &  in)

extract this instance from the given stream

Referenced by DCMTree::operator>>().

unsigned short DCMTree::TagId::groupId ( ) const

get the upper word of the id -> group-identifier

bool DCMTree::TagId::isPrivate ( ) const

check if this id identifies a private tag (groupid is odd)

bool DCMTree::TagId::isPrivateCreator ( ) const

check if this id identifies a private creator tag

bool DCMTree::TagId::isPrivateTag ( RawTagId  id) [inline, static]

Returns true if the given tag ID belongs to a private tag.

Definition at line 137 of file DCMTree_TagId.h.

DCMTree::TagId::operator RawTagId ( ) const

get access to the raw-id using auto-conversion

DCMTree::TagId::operator RawTagId & ( )

get access to the raw-id using auto-conversion

bool DCMTree::TagId::operator!= ( const TagId other) const

is-not-equal operator

bool DCMTree::TagId::operator< ( const TagId other) const

is-less-than operator

bool DCMTree::TagId::operator<= ( const TagId other) const

if-smaller-than-or-equal operator

TagId& DCMTree::TagId::operator= ( const TagId other)

assignment operator (used by copy-ctor)

bool DCMTree::TagId::operator== ( const TagId other) const

is-equal operator

bool DCMTree::TagId::operator> ( const TagId other) const

is-bigger-than operator

bool DCMTree::TagId::operator>= ( const TagId other) const

if-bigger-than-or-equal operator

RawTagId DCMTree::TagId::privateTag ( unsigned short  slot) const

Returns the tag ID of the corresponding private tag with the given slot.

Parameters:
slotThe slot of the private tag, e.g. the element ID of the corresponding private creator tag.
RawTagId DCMTree::TagId::rawId ( ) const

access the raw value

RawTagId& DCMTree::TagId::rawId ( )

access the raw value

virtual void DCMTree::TagId::serializeX ( DCMTree_Serialization::Sink sink) const [virtual]

Writes data of this object to Sink.

Implementations of Serializable::serializeX should strictly follow this pattern:

class C: public SCR::Serializable { T1 _m1; T2 _m2; T3 _m3; public: void serializeX(SCR::Sink &sink) const { SCR::serializeX(sink, _m1); SCR::serializeX(sink, _m2); SCR::serializeX(sink, _m3); } };

That is you should call some overloading of SCR::serializeX for every member.

If some of the types T1, T2, T3 are not serializable, you should make them serializable.

See also:
SCR

Implements DCMTree_Serialization::Serializable.

void DCMTree::TagId::toStream ( std::ostream &  out) const

copy this instance recursively into the given stream

Referenced by DCMTree::operator<<().

std::string DCMTree::TagId::toString ( ) const

convert this to a string of the form (groupid,elementid)


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