Odil
A C++11 library for the DICOM standard
Public Types | Public Member Functions | List of all members
odil::ElementsDictionaryKey Class Reference

Key of a dictionary of DICOM elements. More...

#include <ElementsDictionary.h>

Public Types

enum  Type { Type::Tag, Type::String, Type::None }
 Type of the key. More...
 

Public Member Functions

 ElementsDictionaryKey ()
 Create a key with type equal to None. More...
 
 ElementsDictionaryKey (Tag const &value)
 Create a key with type equal to Tag. More...
 
 ElementsDictionaryKey (std::string const &value)
 Create a key with type equal to String. More...
 
const Typeget_type () const
 Return the type. More...
 
const Tagget_tag () const
 Return the tag value or raise an exception if type is not Tag. More...
 
const std::string & get_string () const
 Return the string value or raise an exception if type is not String. More...
 
void set (Tag const value)
 Set the type to Tag. More...
 
void set (std::string const &value)
 Set the type to String. More...
 
bool operator< (ElementsDictionaryKey const &other) const
 Comparator. More...
 
bool operator== (ElementsDictionaryKey const &other) const
 Comparator. More...
 

Detailed Description

Key of a dictionary of DICOM elements.

Member Enumeration Documentation

◆ Type

Type of the key.

Enumerator
Tag 
String 
None 

Constructor & Destructor Documentation

◆ ElementsDictionaryKey() [1/3]

odil::ElementsDictionaryKey::ElementsDictionaryKey ( )

Create a key with type equal to None.

◆ ElementsDictionaryKey() [2/3]

odil::ElementsDictionaryKey::ElementsDictionaryKey ( Tag const &  value)

Create a key with type equal to Tag.

◆ ElementsDictionaryKey() [3/3]

odil::ElementsDictionaryKey::ElementsDictionaryKey ( std::string const &  value)

Create a key with type equal to String.

Member Function Documentation

◆ get_string()

const std::string& odil::ElementsDictionaryKey::get_string ( ) const

Return the string value or raise an exception if type is not String.

◆ get_tag()

const Tag& odil::ElementsDictionaryKey::get_tag ( ) const

Return the tag value or raise an exception if type is not Tag.

◆ get_type()

const Type& odil::ElementsDictionaryKey::get_type ( ) const

Return the type.

◆ operator<()

bool odil::ElementsDictionaryKey::operator< ( ElementsDictionaryKey const &  other) const

Comparator.

◆ operator==()

bool odil::ElementsDictionaryKey::operator== ( ElementsDictionaryKey const &  other) const

Comparator.

◆ set() [1/2]

void odil::ElementsDictionaryKey::set ( std::string const &  value)

Set the type to String.

◆ set() [2/2]

void odil::ElementsDictionaryKey::set ( Tag const  value)

Set the type to Tag.


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