13#include <boost/multi_index_container.hpp>
14#include <boost/multi_index/member.hpp>
15#include <boost/multi_index/hashed_index.hpp>
16#include <boost/multi_index/identity.hpp>
17#include <boost/multi_index/ordered_index.hpp>
18#include <boost/multi_index/sequenced_index.hpp>
52typedef boost::multi_index_container<
54 boost::multi_index::indexed_by<
56 boost::multi_index::sequenced<
57 boost::multi_index::tag<ClassSequenceTag>
60 boost::multi_index::hashed_unique<
61 boost::multi_index::tag<ClassNameTag>,
62 boost::multi_index::identity<ClientClass>
88typedef boost::multi_index_container<
90 boost::multi_index::indexed_by<
92 boost::multi_index::sequenced<
93 boost::multi_index::tag<TemplateClassSequenceTag>
96 boost::multi_index::hashed_unique<
97 boost::multi_index::tag<TemplateClassNameTag>,
160 static_cast<void>(container_.push_back(class_name));
170 return (container_.empty());
178 return (container_.size());
184 return (container_.cbegin());
188 return (container_.begin());
192 return (container_.begin());
199 return (container_.cend());
203 return (container_.end());
207 return (container_.end());
237 std::string
toText(
const std::string& separator =
", ")
const;
Container for storing client class names.
bool equals(const ClientClasses &other) const
Compares two ClientClasses container for equality.
void clear()
Clears containers.
ClientClassContainer::iterator iterator
bool contains(const ClientClass &x) const
returns if class x belongs to the defined classes
void insert(const ClientClass &class_name)
Insert an element.
const_iterator begin() const
virtual ~ClientClasses()
Destructor.
bool empty() const
Check if classes is empty.
void erase(const ClientClass &class_name)
Erase element by name.
ClientClasses & operator=(const ClientClasses &other)
Assigns the contents of on container to another.
bool operator==(const ClientClasses &other) const
Compares two ClientClasses containers for equality.
ClientClassContainer::const_iterator const_iterator
Type of iterators.
virtual isc::data::ElementPtr toElement() const
Returns all class names as an ElementPtr of type ListElement.
void fromElement(isc::data::ConstElementPtr list)
Sets contents from a ListElement.
bool intersects(const ClientClasses &cclasses) const
returns whether this container has at least one class in common with a given container.
ClientClasses()
Default constructor.
const_iterator end() const
std::string toText(const std::string &separator=", ") const
Returns all class names as text.
const_iterator cbegin() const
Iterators to the first element.
bool operator!=(const ClientClasses &other) const
Compares two ClientClasses container for inequality.
const_iterator cend() const
Iterators to the past the end element.
size_t size() const
Returns the number of classes.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
std::string ClientClass
Defines a single class name.
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.
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.
Defines the logger used by the top-level component of kea-lfc.
Abstract class for configuration Cfg_* classes.
Tag for the sequence index.
Defines a subclass to template class relation.
ClientClass class_def_
The class definition name.
ClientClass class_
The class or subclass name.
SubClassRelation(const ClientClass &class_def, const ClientClass &subclass)
Constructor.
Tag for the sequence index.