12#include <boost/multi_index_container.hpp>
13#include <boost/multi_index/hashed_index.hpp>
14#include <boost/multi_index/identity.hpp>
15#include <boost/multi_index/ordered_index.hpp>
16#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>
75 typedef ClientClassContainer::iterator
iterator;
91 static_cast<void>(container_.push_back(class_name));
101 return (container_.empty());
109 return (container_.size());
115 return (container_.cbegin());
118 return (container_.begin());
121 return (container_.begin());
128 return (container_.cend());
131 return (container_.end());
134 return (container_.end());
156 std::string
toText(
const std::string& separator =
", ")
const;
Container for storing client class names.
void clear()
Clears containers.
ClientClassContainer::iterator iterator
ClientClassContainer::const_iterator const_iterator
Type of iterators.
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
bool empty() const
Check if classes is empty.
void erase(const ClientClass &class_name)
Erase element by name.
isc::data::ElementPtr toElement() const
Returns all class names as an ElementPtr of type ListElement.
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.
const_iterator cend() const
Iterators to the past the end element.
size_t size() const
Returns the number of classes.
boost::shared_ptr< Element > ElementPtr
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.
std::string ClientClass
Defines a single class name.
Defines the logger used by the top-level component of kea-lfc.
Tag for the sequence index.