12 #include <boost/format.hpp>
13 #include <boost/foreach.hpp>
15 namespace gp = Gaudi::Parsers;
17 bool gp::PropertyValue::IsSimple()
const {
18 return boost::get<std::string>(&value_) != NULL;
21 bool gp::PropertyValue::IsVector()
const {
22 return boost::get<std::vector<std::string> >(&value_) != NULL;
25 bool gp::PropertyValue::IsMap()
const {
26 return boost::get<std::map<std::string, std::string> >(&value_) != NULL;
32 if (IsSimple() || IsReference()) {
33 throw PropertyValueException::WrongLValue();
38 boost::get<VectorOfStrings>(value_).push_back(
39 boost::get<std::string>(right.
value_));
45 boost::get<VectorOfStrings>(right.
value_)) {
50 throw PropertyValueException::WrongRValue();
55 throw PropertyValueException::WrongRValue();
67 const gp::PropertyValue
75 if (IsSimple() || IsReference()) {
76 throw PropertyValueException::WrongLValue();
93 throw PropertyValueException::WrongRValue();
110 throw PropertyValueException::WrongRValue();
112 throw PropertyValueException::WrongLValue();
115 const gp::PropertyValue
123 value = boost::get<std::vector<std::string> >(&value_);
124 assert(value != NULL);
125 if (value->
at(0) !=
"") {
126 return "@"+value->
at(0)+
"."+value->
at(1);
128 return "@"+value->
at(0);
131 if (
const std::string* value = boost::get<std::string>(&value_)) {
138 result += delim + in;
147 BOOST_FOREACH(
const pair_t& in, *value) {
148 result += delim + in.
first +
":" + in.second;