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 class  Type { Tag , String , 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...
 
Type const & get_type () const
 Return the type. More...
 
Tag const & get_tag () const
 Return the tag value or raise an exception if type is not Tag. More...
 
std::string const & 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()

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: