7 #ifndef STAMPED_VALUE_H
8 #define STAMPED_VALUE_H
12 #include <boost/multi_index/hashed_index.hpp>
13 #include <boost/multi_index/mem_fun.hpp>
14 #include <boost/multi_index/ordered_index.hpp>
15 #include <boost/multi_index_container.hpp>
16 #include <boost/shared_ptr.hpp>
65 StampedValue(
const std::string& name,
const std::string& value);
70 static StampedValuePtr
create(
const std::string& name);
80 static StampedValuePtr
create(
const std::string& name,
89 static StampedValuePtr
create(
const std::string& name,
90 const std::string& value);
103 static StampedValuePtr
create(
const std::string& name,
104 const std::string& value,
175 void validateConstruct()
const;
207 typedef boost::multi_index_container<
209 boost::multi_index::indexed_by<
211 boost::multi_index::hashed_non_unique<
212 boost::multi_index::tag<StampedValueNameIndexTag>,
213 boost::multi_index::const_mem_fun<
221 boost::multi_index::ordered_non_unique<
222 boost::multi_index::tag<StampedValueModificationTimeIndexTag>,
223 boost::multi_index::const_mem_fun<
225 boost::posix_time::ptime,
This class represents configuration element which is associated with database identifier, modification timestamp and servers.
int64_t getIntegerValue() const
Returns value as signed integer.
bool getBoolValue() const
Returns value as a boolean.
boost::shared_ptr< StampedValue > StampedValuePtr
Pointer to the stamped value.
double getDoubleValue() const
Returns value as a real number.
int getType() const
Returns a type of the value.
boost::shared_ptr< Element > ElementPtr
static StampedValuePtr create(const std::string &name)
Factory function creating a null value.
std::string getName() const
Returns value name.
bool amNull() const
Checks if the value is null.
boost::posix_time::ptime getModificationTime() const
Returns timestamp.
Tag for the index for access by modification time.
boost::shared_ptr< const Element > ConstElementPtr
This class represents a named configuration parameter, e.g.
Tag for the index for access by value name.
StampedValue(const std::string &name)
Constructor creating a null value.
Defines the logger used by the top-level component of kea-dhcp-ddns.
boost::multi_index_container< StampedValuePtr, boost::multi_index::indexed_by< boost::multi_index::hashed_non_unique< boost::multi_index::tag< StampedValueNameIndexTag >, boost::multi_index::const_mem_fun< StampedValue, std::string,&StampedValue::getName > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< StampedValueModificationTimeIndexTag >, boost::multi_index::const_mem_fun< BaseStampedElement, boost::posix_time::ptime,&BaseStampedElement::getModificationTime > > >> StampedValueCollection
Multi index container for StampedValue.
ConstElementPtr getElementValue() const
Returns the value as Element.
This class represents configuration element which is associated with database identifier and the modi...
std::string getValue() const
Returns value as string.