10 #include <boost/algorithm/string/classification.hpp> 11 #include <boost/algorithm/string/constants.hpp> 12 #include <boost/algorithm/string/split.hpp> 21 std::vector<std::string> split_text;
22 boost::split(split_text, class_names, boost::is_any_of(
","),
23 boost::algorithm::token_compress_off);
24 for (
size_t i = 0; i < split_text.size(); ++i) {
27 if (!trimmed.empty()) {
36 auto it = idx.find(class_name);
37 if (it != idx.end()) {
38 static_cast<void>(idx.erase(it));
45 return (idx.count(x) != 0);
52 if (class_it !=
cbegin()) {
std::string toText(const std::string &separator=", ") const
Returns all class names as text.
bool contains(const ClientClass &x) const
returns if class x belongs to the defined classes
Defines elements for storing the names of client classes.
const_iterator cbegin() const
Iterators to the first element.
ClientClassContainer::const_iterator const_iterator
Type of iterators.
Defines the logger used by the top-level component of kea-lfc.
ClientClasses()
Default constructor.
void erase(const ClientClass &class_name)
Erase element by name.
const_iterator cend() const
Iterators to the past the end element.
string trim(const string &instring)
Trim Leading and Trailing Spaces.
void insert(const ClientClass &class_name)
Insert an element.
std::string ClientClass
Defines a single class name.