24 for (std::list<std::pair<std::string, tlp::DataType *>>::const_iterator it = data.begin();
25 it != data.end(); ++it) {
26 const std::pair<std::string, tlp::DataType *> &p = *it;
29 value = *(
static_cast<T *
>(p.second->value));
39 for (std::list<std::pair<std::string, tlp::DataType *>>::iterator it = data.begin();
40 it != data.end(); ++it) {
41 std::pair<std::string, tlp::DataType *> &p = *it;
44 value = *(
static_cast<T *
>(p.second->value));
56 TypedData<T> dtc(
new T(value));
bool get(const std::string &key, T &value) const
Returns the stored value associated with the given key. The stored value is a copy of the original va...
void set(const std::string &key, const T &value)
Stores a copy of the given param, associated with the key. The value must have a well-formed copy con...
void setData(const std::string &str, const DataType *value)
Set from an untyped value.
bool getAndFree(const std::string &key, T &value)
Returns the stored value, and deletes the stored copy. If no value is found, nothing is deleted...