5 #include <boost/tokenizer.hpp> 6 #include <boost/algorithm/string.hpp> 11 using namespace Gaudi;
27 typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
28 boost::char_separator<char> sep(
"(), ");
29 tokenizer tokens(prop, sep);
30 int nToks(distance(tokens.begin(), tokens.end()));
31 auto it = tokens.begin();
36 boost::erase_all(k,
"'");
39 }
else if (nToks == 2) {
49 boost::erase_all(cn,
"'");
55 boost::erase_all(k,
"'");
64 std::cerr <<
"Unable to instantiate a DataObjID from a Property " << s
92 if (s.
find(
"(") != std::string::npos) {
97 typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
98 boost::char_separator<char> sep(
"[](), ");
99 tokenizer tokens(prop, sep);
100 auto it = tokens.begin();
105 while (it != tokens.end()) {
118 boost::erase_all(cn,
"'");
124 boost::erase_all(k,
"'");
147 o <<
"'" << v.
key() <<
"'";
149 o <<
"(" << v.
clid() <<
",'" << v.
key() <<
"')";
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
DataObjIDProperty(const std::string &name, DataObjID &ref)
void toStream(std::ostream &out) const override
value -> stream
const std::string name() const
property name
bool isSuccess() const
Test for a status code of SUCCESS.
std::string toString() const override
value -> string
bool setValue(const DataObjID &value)
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
std::string toString() const override
value -> string
~DataObjIDProperty() override
StatusCode fromString(const std::string &s) override
string -> value
Helper class to simplify the migration old properties deriving directly from PropertyBase.
DataObjID * m_pValue
Pointer to the real property.
bool setValue(const DataObjIDColl &value)
This class is used for returning status codes from appropriate routines.
bool useUpdateHandler() override
use the call-back function at update, if available
const std::string & key() const
StatusCode fromString(const std::string &s) override
string -> value
unsigned int CLID
Class ID definition.
const DataObjID & value() const
void useReadHandler() const
use the call-back function at reading, if available
virtual ~DataObjIDCollProperty()
DataObjIDColl * m_pValue
Pointer to the real property.
const DataObjIDColl & value() const
void toStream(std::ostream &out) const override
value -> stream
DataObjIDCollProperty(const std::string &name, DataObjIDColl &ref)
Helper functions to set/get the application return code.