13 #include <boost/algorithm/string/classification.hpp>
14 #include <boost/algorithm/string/constants.hpp>
15 #include <boost/algorithm/string/split.hpp>
27 std::vector<std::string> split_text;
28 boost::split(split_text, class_names, boost::is_any_of(
","),
29 boost::algorithm::token_compress_off);
30 for (
size_t i = 0; i < split_text.size(); ++i) {
33 if (!trimmed.empty()) {
42 auto it = idx.find(class_name);
43 if (it != idx.end()) {
44 static_cast<void>(idx.erase(it));
51 return (idx.count(x) != 0);
58 if (class_it !=
cbegin()) {
Defines elements for storing the names of client classes.
static ElementPtr create(const Position &pos=ZERO_POSITION())
static ElementPtr createList(const Position &pos=ZERO_POSITION())
Creates an empty ListElement type ElementPtr.
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.
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.
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.
boost::shared_ptr< Element > ElementPtr
std::string ClientClass
Defines a single class name.
string trim(const string &instring)
Trim Leading and Trailing Spaces.
Defines the logger used by the top-level component of kea-lfc.