#include <IdDictField.h>
Definition at line 16 of file IdDictField.h.
◆ IdDictField() [1/3]
| IdDictField::IdDictField |
( |
const std::string & | name | ) |
|
Definition at line 12 of file IdDictField.cxx.
14{
15}
const std::string & name() const
◆ IdDictField() [2/3]
◆ ~IdDictField()
| IdDictField::~IdDictField |
( |
| ) |
|
|
default |
◆ IdDictField() [3/3]
◆ add_label()
| void IdDictField::add_label |
( |
std::unique_ptr< const IdDictLabel > | label | ) |
|
Definition at line 36 of file IdDictField.cxx.
36 {
38}
const IdDictLabel & label(size_t index) const
std::vector< std::unique_ptr< const IdDictLabel > > m_labels
◆ clear()
| void IdDictField::clear |
( |
| ) |
|
◆ find_label()
| const IdDictLabel * IdDictField::find_label |
( |
const std::string & | name | ) |
const |
Definition at line 28 of file IdDictField.cxx.
28 {
30 if (p &&
p->name() ==
name)
return p.get();
31 }
32 return nullptr;
33}
◆ get_label()
| const std::string & IdDictField::get_label |
( |
size_t | index | ) |
const |
Definition at line 51 of file IdDictField.cxx.
51 {
52 try{
54 } catch (std::out_of_range& e) {
55 throw std::out_of_range(std::format("IdDictField::get_label : Attempt to access index {} in vector of size {}",
57 }
58}
◆ get_label_number()
| size_t IdDictField::get_label_number |
( |
| ) |
const |
◆ get_label_value()
Definition at line 61 of file IdDictField.cxx.
61 {
63 if (std::ranges::find_if(
name,[](
const char c){
return !std::isdigit(c); }) !=
name.end()) {
68 return(value);
69 }
71 }
72 }
73 try{
76 } catch (const std::invalid_argument& e) {
77 std::cerr <<
"Warning : label " <<
name <<
" not found: "<<
e.what() << std::endl;
78 }
79
80 return(0);
81}
◆ index()
| size_t IdDictField::index |
( |
| ) |
const |
|
inline |
◆ label()
| const IdDictLabel & IdDictField::label |
( |
size_t | index | ) |
const |
|
inline |
◆ name()
| const std::string & IdDictField::name |
( |
| ) |
const |
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ set_index()
| void IdDictField::set_index |
( |
size_t | index | ) |
|
◆ verify()
| bool IdDictField::verify |
( |
| ) |
const |
◆ m_index
| size_t IdDictField::m_index {} |
|
private |
◆ m_labels
| std::vector<std::unique_ptr<const IdDictLabel> > IdDictField::m_labels |
|
private |
◆ m_name
| std::string IdDictField::m_name |
|
private |
The documentation for this class was generated from the following files: