8 #ifndef TYPE_SELECTION_HH_
9 #define TYPE_SELECTION_HH_
60 <<
"Key " << EI_KeyName::qval <<
" not found in Selection:\n" << EI_Selection::val );
62 <<
"Value " << EI_Value::val <<
" not found in Selection:\n" << EI_Selection::val );
93 Selection(
const string &name,
const std::string &description =
"");
98 Selection &
add_value(
const int value,
const std::string &key,
const std::string &description =
"");
156 inline bool has_name(
const string &key)
const;
161 inline bool has_value(
const int &val)
const;
166 inline unsigned int size()
const;
170 {
close();
return true; }
193 void add_value(
const int value,
const std::string &key,
const std::string &description);
218 boost::shared_ptr<SelectionData>
data_;
233 return (
data_->key_to_index_.find(key_h) !=
data_->key_to_index_.end());
240 return (
data_->value_to_index_.find(val) !=
data_->value_to_index_.end());
250 return data_->keys_.size();
265 return data_->keys_.begin();
273 return data_->keys_.end();