Flow123d
JS_before_hm-2115-gf629a871a
|
Go to the documentation of this file.
18 #ifndef TYPE_SELECTION_HH_
19 #define TYPE_SELECTION_HH_
75 <<
"Key " << EI_KeyName::qval <<
" not found in Selection:\n" << EI_Selection::val );
77 <<
"Value " << EI_Value::val <<
" not found in Selection:\n" << EI_Selection::val );
99 Selection(
const string &name,
const std::string &description =
"");
120 TypeHash content_hash()
const override;
127 bool is_finished()
const override;
134 string type_name()
const override;
136 string class_name()
const override;
163 int name_to_int(
const string &key)
const;
170 string int_to_name(
const int &
value)
const;
176 inline bool has_name(
const string &key)
const;
179 inline bool has_value(
const int &val)
const;
182 inline unsigned int size()
const;
189 bool is_closed()
const override;
197 void finished_check()
const;
204 string key_list()
const;
218 void add_value(
const int value,
const std::string &key,
249 std::shared_ptr<SelectionData>
data_;
264 return (data_->key_to_index_.find(key_h) != data_->key_to_index_.end());
271 return (data_->value_to_index_.find(val) != data_->value_to_index_.end());
278 ASSERT_EQ(data_->keys_.size(), data_->key_to_index_.size()).error();
279 return data_->keys_.size();
286 ASSERT(data_->closed_)(this->type_name()).error();
294 return data_->keys_.begin();
302 return data_->keys_.end();
309 return begin() + name_to_int(key);
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
static constexpr bool value
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual)
bool operator==(const Null &, const Null &)