MeVisLab Toolbox Reference
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

Public Member Functions

 TagId ()
 ctor - sets the id to (0000,0000)
More...
 
 TagId (RawTagId rawid)
 ctor - initialize to the given value More...
 
 TagId (const TagId &other)
 copy ctor More...
 
 TagId (unsigned short groupid, unsigned short elementid)
 ctor - create a new instance with id (groupid,elementid) More...
 
 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) More...
 
 ~TagId () override
 dtor More...
 
TagIdoperator= (const TagId &other)
 assignment operator (used by copy-ctor) More...
 
bool operator== (const TagId &other) const
 is-equal operator More...
 
bool operator!= (const TagId &other) const
 is-not-equal operator More...
 
bool operator> (const TagId &other) const
 is-bigger-than operator More...
 
bool operator< (const TagId &other) const
 is-less-than operator More...
 
bool operator>= (const TagId &other) const
 if-bigger-than-or-equal operator More...
 
bool operator<= (const TagId &other) const
 if-smaller-than-or-equal operator More...
 
 operator RawTagId () const
 get access to the raw-id using auto-conversion More...
 
 operator RawTagId & ()
 get access to the raw-id using auto-conversion More...
 
unsigned short groupId () const
 get the upper word of the id -> group-identifier More...
 
unsigned short elementId () const
 get the lower word of the id -> element-identifier More...
 
bool isPrivate () const
 check if this id identifies a private tag (groupid is odd) More...
 
bool isPrivateCreator () const
 check if this id identifies a private creator tag More...
 
RawTagId privateTag (unsigned short slot) const
 Returns the tag ID of the corresponding private tag with the given slot. More...
 
RawTagId rawId () const
 access the raw value More...
 
RawTagIdrawId ()
 access the raw value More...
 
std::string toString () const
 convert this to a string of the form (groupid,elementid) More...
 
void fromStream (std::istream &in)
 extract this instance from the given stream More...
 
void toStream (std::ostream &out) const
 copy this instance recursively into the given stream More...
 
void serializeX (DCMTree_Serialization::Sink &sink) const override
 Writes data of this object to Sink. More...
 
void deserializeX (DCMTree_Serialization::Source &source) override
 Overwrites data of this object with data from Source. More...
 
- Public Member Functions inherited from DCMTree_Serialization::Serializable
virtual ~Serializable ()
 Empty. More...
 
- Public Member Functions inherited from DCMTree_Serialization::Deserializable
virtual ~Deserializable ()
 Empty. More...
 

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. More...
 

Detailed Description

Class to wrap a tag-id.

Definition at line 39 of file DCMTree_TagId.h.

Constructor & Destructor Documentation

◆ TagId() [1/5]

DCMTree::TagId::TagId ( )

ctor - sets the id to (0000,0000)

◆ TagId() [2/5]

DCMTree::TagId::TagId ( RawTagId  rawid)

ctor - initialize to the given value

◆ TagId() [3/5]

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

copy ctor

◆ TagId() [4/5]

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

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

◆ TagId() [5/5]

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)

◆ ~TagId()

DCMTree::TagId::~TagId ( )
override

dtor

Member Function Documentation

◆ create() [1/4]

static TagIdPtr DCMTree::TagId::create ( const TagId other)
static

◆ create() [2/4]

static TagIdPtr DCMTree::TagId::create ( RawTagId  rawid)
static

◆ create() [3/4]

static TagIdPtr DCMTree::TagId::create ( std::string  tidstr)
static

◆ create() [4/4]

static TagIdPtr DCMTree::TagId::create ( unsigned short  groupid,
unsigned short  elementid 
)
static

◆ deserializeX()

void DCMTree::TagId::deserializeX ( DCMTree_Serialization::Source source)
overridevirtual

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.

◆ elementId()

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

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

◆ fromStream()

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

extract this instance from the given stream

Referenced by DCMTree::operator>>().

◆ groupId()

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

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

◆ isPrivate()

bool DCMTree::TagId::isPrivate ( ) const

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

◆ isPrivateCreator()

bool DCMTree::TagId::isPrivateCreator ( ) const

check if this id identifies a private creator tag

◆ isPrivateTag()

bool DCMTree::TagId::isPrivateTag ( RawTagId  id)
inlinestatic

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

Definition at line 147 of file DCMTree_TagId.h.

◆ operator RawTagId()

DCMTree::TagId::operator RawTagId ( ) const

get access to the raw-id using auto-conversion

◆ operator RawTagId &()

DCMTree::TagId::operator RawTagId & ( )

get access to the raw-id using auto-conversion

◆ operator!=()

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

is-not-equal operator

◆ operator<()

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

is-less-than operator

◆ operator<=()

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

if-smaller-than-or-equal operator

◆ operator=()

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

assignment operator (used by copy-ctor)

◆ operator==()

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

is-equal operator

◆ operator>()

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

is-bigger-than operator

◆ operator>=()

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

if-bigger-than-or-equal operator

◆ privateTag()

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.

◆ rawId() [1/2]

RawTagId& DCMTree::TagId::rawId ( )

access the raw value

◆ rawId() [2/2]

RawTagId DCMTree::TagId::rawId ( ) const

access the raw value

◆ serializeX()

void DCMTree::TagId::serializeX ( DCMTree_Serialization::Sink sink) const
overridevirtual

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.

◆ toStream()

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

copy this instance recursively into the given stream

Referenced by DCMTree::operator<<().

◆ toString()

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: