11 #include <boost/format.hpp> 15 bool gp::PropertyValue::IsSimple()
const {
16 return boost::get<std::string>(&value_) != NULL;
19 bool gp::PropertyValue::IsVector()
const {
20 return boost::get<std::vector<std::string> >(&value_) != NULL;
23 bool gp::PropertyValue::IsMap()
const {
24 return boost::get<std::map<std::string, std::string> >(&value_) != NULL;
30 if (IsSimple() || IsReference()) {
31 throw PropertyValueException::WrongLValue();
36 boost::get<VectorOfStrings>(value_).push_back(
37 boost::get<std::string>(right.
value_));
42 for (
const auto& item : boost::get<VectorOfStrings>(right.
value_)) {
47 throw PropertyValueException::WrongRValue();
52 throw PropertyValueException::WrongRValue();
56 for (
const auto& item : rmap) {
64 const gp::PropertyValue
72 if (IsSimple() || IsReference()) {
73 throw PropertyValueException::WrongLValue();
85 for (
const auto& item : rvec) {
90 throw PropertyValueException::WrongRValue();
102 for (
const auto& item : rvec) {
107 throw PropertyValueException::WrongRValue();
109 throw PropertyValueException::WrongLValue();
112 const gp::PropertyValue
120 value = boost::get<std::vector<std::string> >(&value_);
121 assert(value != NULL);
122 if (value->
at(0) !=
"") {
123 return "@"+value->
at(0)+
"."+value->
at(1);
125 return "@"+value->
at(0);
128 if (
const std::string* value = boost::get<std::string>(&value_)) {
134 for (
const auto& in : *value) {
135 result += delim + in;
143 for (
const auto& in : *value) {
144 result += delim + in.first +
":" + in.second;
KeyedObjectManager< vector > Vector
Forward declaration of specialized std::vector-like object manager.
struct GAUDI_API map
Parametrisation class for map-like implementation.
VectorOfStrings & Vector()
GAUDI_API Stat operator-(const Stat &stat, const double value)
external operator for subtraction of Stat and a number
KeyedObjectManager< map > Map
Forward declaration of specialized std::map-like object manager.
decltype(std::declval< TP >()+std::declval< T >()) operator+(const T &v, const Property< TP, V, H > &p)
implemantation of (value + property)