39 BaseProperty::BaseProperty(
const std::string name_) :_name(name_){
45 std::pair<PropertyMapIterator,bool> result = insert(make_pair(p->
name(), p));
70 it->second->fromString(value);
78 os << p->
name() <<
", ";
91 vector<string> valuesMap =
strSplit(values,
",");
92 for (
size_t i = 0; i < valuesMap.size(); ++i) {
93 vector<string> m =
strSplit(valuesMap[i],
"=");
95 cerr <<
__PRETTY_FUNCTION__ <<
": unable to extract name=value pair from " << valuesMap[i] << endl;
99 string value =
trim(m[1]);
100 status = status && updatePropertyFromString(name, value);
BaseClass::iterator PropertyMapIterator
#define __PRETTY_FUNCTION__
BaseClass::const_iterator PropertyMapConstIterator
std::vector< std::string > strSplit(const std::string &str, const std::string &delimiters)
bool addProperty(BaseProperty *p)
std::string trim(const std::string &s)
bool updatePropertyFromString(const std::string &name, const std::string &value)
void writeToCSV(std::ostream &os) const
bool eraseProperty(const std::string &name_)
virtual std::string toString() const =0
bool updateMapFromString(const std::string &values)
const std::string & name()