Odil
A C++11 library for the DICOM standard
Loading...
Searching...
No Matches
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 class  Type { Tag , String , None }
 Type of the key. More...
 

Public Member Functions

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

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()

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

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

◆ get_tag()

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

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

◆ get_type()

Type const & 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: