7 #ifndef LABELED_VALUE_H 8 #define LABELED_VALUE_H 12 #include <boost/shared_ptr.hpp> 63 std::string getLabel()
const;
135 void add(LabeledValuePtr entry);
144 void add(
const int value,
const std::string& label);
152 const LabeledValuePtr&
get(
int value);
159 bool isDefined(
const int value)
const;
167 std::string getLabel(
const int value)
const;
171 LabeledValueMap map_;
bool operator<(Element const &a, Element const &b)
bool operator!=(const Element &a, const Element &b)
std::ostream & operator<<(std::ostream &os, const CSVRow &row)
Overrides standard output stream operator for CSVRow object.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
bool operator==(const Element &a, const Element &b)
std::map< unsigned int, LabeledValuePtr > LabeledValueMap
Defines a map of pointers to LabeledValues keyed by value.
Thrown if an error is encountered handling a LabeledValue.
boost::shared_ptr< LabeledValue > LabeledValuePtr
Defines a shared pointer to a LabeledValue instance.
LabeledValueError(const char *file, size_t line, const char *what)
Implements the concept of a constant value with a text label.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-lfc.
Implements a set of unique LabeledValues.
static const char * UNDEFINED_LABEL
Defines a text label returned by when value is not found.