8 #define INST_Selected(r, data, type) template class Selected<type>;
13 template <
typename ObjType>
16 if (m_selection_name.empty()) {
17 m_selection_name =
"MASTER";
19 m_selection = notstd::make_cloneable<Selection<ObjType> >(
20 _tmplt.primclex().template db<ObjType>(), m_selection_name);
21 }
else if (m_selection_name.empty()) {
22 m_selection_name = m_selection->name();
23 if (m_selection_name.empty()) {
24 m_selection_name =
"unknown";
30 template <
typename ObjType>
32 return std::unique_ptr<Selected>(this->_clone());
35 template <
typename ObjType>
40 template <
typename ObjType>
42 return this->
name() +
"(" + m_selection_name +
")";
45 template <
typename ObjType>
47 if (_obj.name().find(
"equiv") != std::string::npos) {
50 return m_selection->is_selected(_obj.name());
53 template <
typename ObjType>
55 if ((m_selection && m_selection->data().size()) || m_selection_name.size()) {
59 m_selection_name = args;
#define INST_Selected(r, data, type)
Returns true if configuration is specified in given selection (default: MASTER)
bool parse_args(const std::string &args) override
bool init(const ObjType &_tmplt) const override
std::string short_header(const ObjType &_config) const override
std::unique_ptr< Selected > clone() const
Selected * _clone() const override
Clone.
bool evaluate(const ObjType &_obj) const override
True if obj is in Selection and it is selected.
GenericDatumFormatter< std::string, DataObject > name()