MeVisLab Toolbox Reference
|
Class to wrap a tag ID. More...
#include <DCMTree_TagId.h>
Public Member Functions | |
TagId () | |
Constructor - sets the ID to (0000,0000) More... | |
TagId (RawTagId rawid) | |
Constructor - initialize to the given value. More... | |
TagId (const TagId &other) | |
Copy Constructor. More... | |
TagId (unsigned short groupid, unsigned short elementid) | |
Constructor that creates a new instance with ID (groupid,elementid) More... | |
TagId (std::string tidstr) | |
Constructor that creates a new instance by conversion from the given string. More... | |
~TagId () override | |
Destructor. More... | |
TagId & | operator= (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 | |
Returns access to the raw ID using auto-conversion. More... | |
operator RawTagId & () | |
Returns access to the raw ID using auto-conversion. More... | |
unsigned short | groupId () const |
Returns the upper word of the ID -> group-identifier. More... | |
unsigned short | elementId () const |
Returns the lower word of the ID -> element-identifier. More... | |
bool | isPrivate () const |
Checks whether this ID identifies a private tag (groupid is odd) More... | |
bool | isPrivateCreator () const |
Checks whether 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 |
Returns the raw value . More... | |
RawTagId & | rawId () |
Returns the raw value. More... | |
std::string | toString () const |
Converts this to a string of the form (groupid, elementid). More... | |
void | fromStream (std::istream &in) |
Extracts this instance from the given stream. More... | |
void | toStream (std::ostream &out) const |
Copies 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... | |
![]() | |
virtual | ~Serializable () |
Empty. More... | |
![]() | |
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... | |
Class to wrap a tag ID.
Definition at line 39 of file DCMTree_TagId.h.
DCMTree::TagId::TagId | ( | ) |
Constructor - sets the ID to (0000,0000)
DCMTree::TagId::TagId | ( | RawTagId | rawid | ) |
Constructor - initialize to the given value.
DCMTree::TagId::TagId | ( | const TagId & | other | ) |
Copy Constructor.
DCMTree::TagId::TagId | ( | unsigned short | groupid, |
unsigned short | elementid | ||
) |
Constructor that creates a new instance with ID (groupid,elementid)
DCMTree::TagId::TagId | ( | std::string | tidstr | ) |
Constructor that creates 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)
|
override |
Destructor.
|
static |
|
static |
|
overridevirtual |
Overwrites data of this object with data from source
.
All the rules stated for SCR::Serializable::serializeX apply correspondingly.
Implements DCMTree_Serialization::Deserializable.
unsigned short DCMTree::TagId::elementId | ( | ) | const |
Returns the lower word of the ID -> element-identifier.
void DCMTree::TagId::fromStream | ( | std::istream & | in | ) |
Extracts this instance from the given stream.
Referenced by DCMTree::operator>>().
unsigned short DCMTree::TagId::groupId | ( | ) | const |
Returns the upper word of the ID -> group-identifier.
bool DCMTree::TagId::isPrivate | ( | ) | const |
Checks whether this ID identifies a private tag (groupid is odd)
bool DCMTree::TagId::isPrivateCreator | ( | ) | const |
Checks whether this ID identifies a private creator tag.
|
inlinestatic |
Returns true
if the given tag ID belongs to a private tag.
Definition at line 147 of file DCMTree_TagId.h.
DCMTree::TagId::operator RawTagId | ( | ) | const |
Returns access to the raw ID using auto-conversion.
DCMTree::TagId::operator RawTagId & | ( | ) |
Returns 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
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.
slot | The slot of the private tag, e.g., the element ID of the corresponding private creator tag. |
RawTagId& DCMTree::TagId::rawId | ( | ) |
Returns the raw value.
RawTagId DCMTree::TagId::rawId | ( | ) | const |
Returns the raw value .
|
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.
Implements DCMTree_Serialization::Serializable.
void DCMTree::TagId::toStream | ( | std::ostream & | out | ) | const |
Copies this instance recursively into the given stream.
Referenced by DCMTree::operator<<().
std::string DCMTree::TagId::toString | ( | ) | const |
Converts this to a string of the form (groupid, elementid).