18 #ifndef TYPE_SELECTION_HH_
19 #define TYPE_SELECTION_HH_
73 <<
"Key " << EI_KeyName::qval <<
" not found in Selection:\n" << EI_Selection::val );
75 <<
"Value " << EI_Value::val <<
" not found in Selection:\n" << EI_Selection::val );
96 Selection(
const string &name,
const std::string &description =
"");
103 Selection &
add_value(
const int value,
const std::string &key,
const std::string &description =
"");
169 inline bool has_name(
const string &key)
const;
172 inline bool has_value(
const int &val)
const;
175 inline unsigned int size()
const;
178 bool finish(
bool is_generic =
false)
override
214 void add_value(
const int value,
const std::string &key,
const std::string &description);
241 std::shared_ptr<SelectionData>
data_;
256 return (
data_->key_to_index_.find(key_h) !=
data_->key_to_index_.end());
263 return (
data_->value_to_index_.find(val) !=
data_->value_to_index_.end());
271 return data_->keys_.size();
286 return data_->keys_.begin();
294 return data_->keys_.end();
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual)