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 =
"");
160 inline bool has_name(
const string &key)
const;
165 inline bool has_value(
const int &val)
const;
170 inline unsigned int size()
const;
174 {
close();
return true; }
197 void add_value(
const int value,
const std::string &key,
const std::string &description);
222 boost::shared_ptr<SelectionData>
data_;
237 return (
data_->key_to_index_.find(key_h) !=
data_->key_to_index_.end());
244 return (
data_->value_to_index_.find(val) !=
data_->value_to_index_.end());
252 "Sizes of Type:Selection doesn't match. (map: %ld vec: %ld)\n",
data_->key_to_index_.size(),
data_->keys_.size());
254 return data_->keys_.size();
269 return data_->keys_.begin();
277 return data_->keys_.end();
#define ASSERT_EQUAL(a, b)