12 #include <boost/multi_index_container.hpp> 13 #include <boost/multi_index/member.hpp> 14 #include <boost/multi_index/hashed_index.hpp> 15 #include <boost/multi_index/identity.hpp> 16 #include <boost/multi_index/ordered_index.hpp> 17 #include <boost/multi_index/sequenced_index.hpp> 51 typedef boost::multi_index_container<
53 boost::multi_index::indexed_by<
55 boost::multi_index::sequenced<
56 boost::multi_index::tag<ClassSequenceTag>
59 boost::multi_index::hashed_unique<
60 boost::multi_index::tag<ClassNameTag>,
61 boost::multi_index::identity<ClientClass>
70 class_def_(class_def), class_(subclass) {
87 typedef boost::multi_index_container<
89 boost::multi_index::indexed_by<
91 boost::multi_index::sequenced<
92 boost::multi_index::tag<TemplateClassSequenceTag>
95 boost::multi_index::hashed_unique<
96 boost::multi_index::tag<TemplateClassNameTag>,
97 boost::multi_index::member<SubClassRelation,
128 void insert(
const ClientClass& class_name) {
129 static_cast<void>(container_.push_back(class_name));
135 void erase(
const ClientClass& class_name);
139 return (container_.empty());
147 return (container_.size());
153 return (container_.cbegin());
156 return (container_.begin());
159 return (container_.begin());
166 return (container_.cend());
168 const_iterator
end()
const {
169 return (container_.end());
172 return (container_.end());
180 bool contains(
const ClientClass& x)
const;
194 std::string toText(
const std::string& separator =
", ")
const;
size_t size() const
Returns the number of classes.
Tag for the sequence index.
boost::shared_ptr< Element > ElementPtr
const_iterator cbegin() const
Iterators to the first element.
ClientClassContainer::const_iterator const_iterator
Type of iterators.
Tag for the sequence index.
boost::multi_index_container< ClientClass, boost::multi_index::indexed_by< boost::multi_index::sequenced< boost::multi_index::tag< ClassSequenceTag > >, boost::multi_index::hashed_unique< boost::multi_index::tag< ClassNameTag >, boost::multi_index::identity< ClientClass > > > > ClientClassContainer
the client class multi-index.
SubClassRelation(const ClientClass &class_def, const ClientClass &subclass)
Constructor.
ClientClass class_
The class or subclass name.
void clear()
Clears containers.
boost::multi_index_container< SubClassRelation, boost::multi_index::indexed_by< boost::multi_index::sequenced< boost::multi_index::tag< TemplateClassSequenceTag > >, boost::multi_index::hashed_unique< boost::multi_index::tag< TemplateClassNameTag >, boost::multi_index::member< SubClassRelation, ClientClass, &SubClassRelation::class_def_ > > > > SubClassRelationContainer
the subclass multi-index.
bool empty() const
Check if classes is empty.
Defines the logger used by the top-level component of kea-lfc.
ClientClasses()
Default constructor.
Defines a subclass to template class relation.
ClientClassContainer::iterator iterator
const_iterator begin() const
const_iterator cend() const
Iterators to the past the end element.
ClientClass class_def_
The class definition name.
void insert(const ClientClass &class_name)
Insert an element.
std::string ClientClass
Defines a single class name.
const_iterator end() const
Container for storing client class names.