12#include <boost/shared_ptr.hpp>
144 void add(
const int value,
const std::string& label);
167 std::string
getLabel(
const int value)
const;
This is a base class for exceptions thrown from the DNS library module.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Thrown if an error is encountered handling a LabeledValue.
LabeledValueError(const char *file, size_t line, const char *what)
Implements a set of unique LabeledValues.
static const char * UNDEFINED_LABEL
Defines a text label returned by when value is not found.
bool isDefined(const int value) const
Tests if the set contains an entry for the given value.
const LabeledValuePtr & get(int value)
Fetches a pointer to the entry associated with value.
virtual ~LabeledValueSet()
Destructor.
std::string getLabel(const int value) const
Fetches the label for the given value.
void add(LabeledValuePtr entry)
Adds the given entry to the set.
LabeledValueSet()
Constructor.
Implements the concept of a constant value with a text label.
int getValue() const
Gets the integer value of this instance.
bool operator!=(const LabeledValue &other) const
Inequality operator.
LabeledValue(const int value, const std::string &label)
Constructor.
bool operator==(const LabeledValue &other) const
Equality operator.
bool operator<(const LabeledValue &other) const
Less-than operator.
std::string getLabel() const
Gets the text label of this instance.
virtual ~LabeledValue()
Destructor.
std::ostream & operator<<(std::ostream &os, const CSVRow &row)
Overrides standard output stream operator for CSVRow object.
std::map< unsigned int, LabeledValuePtr > LabeledValueMap
Defines a map of pointers to LabeledValues keyed by value.
boost::shared_ptr< LabeledValue > LabeledValuePtr
Defines a shared pointer to a LabeledValue instance.
Defines the logger used by the top-level component of kea-lfc.