#include <src/JobOptionsSvc/PropertyValue.h>
Definition at line 21 of file PropertyValue.h.
typedef boost::scoped_ptr<const PropertyValue> Gaudi::Parsers::PropertyValue::ConstScopedPtr |
typedef std::map<std::string, std::string> Gaudi::Parsers::PropertyValue::MapOfStrings |
typedef boost::scoped_ptr<PropertyValue> Gaudi::Parsers::PropertyValue::ScopedPtr |
typedef boost::variant<std::string, std::vector<std::string>, std::map<std::string, std::string> > Gaudi::Parsers::PropertyValue::Value |
typedef std::vector<std::string> Gaudi::Parsers::PropertyValue::VectorOfStrings |
Gaudi::Parsers::PropertyValue::PropertyValue |
( |
const Value & |
value, |
|
|
bool |
is_reference = false |
|
) |
| |
|
inlineexplicit |
Gaudi::Parsers::PropertyValue::PropertyValue |
( |
const Value & |
value, |
|
|
const Position & |
position, |
|
|
bool |
is_reference = false |
|
) |
| |
|
inline |
bool Gaudi::Parsers::PropertyValue::HasPosition |
( |
| ) |
const |
|
inline |
bool Gaudi::Parsers::PropertyValue::IsMap |
( |
| ) |
const |
bool Gaudi::Parsers::PropertyValue::IsReference |
( |
| ) |
const |
|
inline |
bool Gaudi::Parsers::PropertyValue::IsSimple |
( |
| ) |
const |
bool Gaudi::Parsers::PropertyValue::IsVector |
( |
| ) |
const |
const MapOfStrings& Gaudi::Parsers::PropertyValue::Map |
( |
| ) |
const |
|
inline |
const gp::PropertyValue Gaudi::Parsers::PropertyValue::operator+ |
( |
const PropertyValue & |
right | ) |
|
Definition at line 68 of file PropertyValue.cpp.
PropertyValue(const Value &value, bool is_reference=false)
gp::PropertyValue & Gaudi::Parsers::PropertyValue::operator+= |
( |
const PropertyValue & |
right | ) |
|
Definition at line 30 of file PropertyValue.cpp.
37 if (right.IsSimple()) {
38 boost::get<VectorOfStrings>(
value_).push_back(
39 boost::get<std::string>(right.value_));
42 if (right.IsVector()){
44 BOOST_FOREACH(
const std::string&
item,
45 boost::get<VectorOfStrings>(right.value_)) {
58 const MapOfStrings& rmap = boost::get<MapOfStrings>(right.value_);
59 BOOST_FOREACH(
const MapOfStrings::value_type&
item, rmap) {
std::vector< std::string > VectorOfStrings
std::map< std::string, std::string > MapOfStrings
struct GAUDI_API map
Parametrisation class for map-like implementation.
static PropertyValueException WrongRValue()
static PropertyValueException WrongLValue()
const gp::PropertyValue Gaudi::Parsers::PropertyValue::operator- |
( |
const PropertyValue & |
right | ) |
|
Definition at line 116 of file PropertyValue.cpp.
PropertyValue(const Value &value, bool is_reference=false)
gp::PropertyValue & Gaudi::Parsers::PropertyValue::operator-= |
( |
const PropertyValue & |
right | ) |
|
Definition at line 74 of file PropertyValue.cpp.
81 if (right.IsSimple()) {
82 vec.erase(std::find(vec.begin(), vec.end(), right.String()));
86 if (right.IsVector()) {
88 BOOST_FOREACH(
const std::string&
item, rvec) {
89 vec.erase(std::find(vec.begin(), vec.end(),
item));
98 if (right.IsSimple()) {
99 map.erase(right.String());
103 if (right.IsVector()) {
105 BOOST_FOREACH(
const std::string& item, rvec) {
std::vector< std::string > VectorOfStrings
std::map< std::string, std::string > MapOfStrings
struct GAUDI_API map
Parametrisation class for map-like implementation.
static PropertyValueException WrongRValue()
VectorOfStrings & Vector()
static PropertyValueException WrongLValue()
const Position& Gaudi::Parsers::PropertyValue::position |
( |
| ) |
const |
|
inline |
std::string& Gaudi::Parsers::PropertyValue::String |
( |
| ) |
|
|
inline |
const std::string& Gaudi::Parsers::PropertyValue::String |
( |
| ) |
const |
|
inline |
std::string Gaudi::Parsers::PropertyValue::ToString |
( |
| ) |
const |
Definition at line 120 of file PropertyValue.cpp.
122 const std::vector<std::string>*
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_)) {
133 }
else if (
const std::vector<std::string>*
135 std::string result =
"[";
136 std::string delim =
"";
137 BOOST_FOREACH(
const std::string& in, *value) {
138 result += delim + in;
142 }
else if (
const std::map<std::string, std::string>*
144 std::string result =
"{";
145 std::string delim =
"";
146 typedef std::pair<std::string, std::string> pair_t;
147 BOOST_FOREACH(
const pair_t& in, *value) {
148 result += delim + in.first +
":" + in.second;
155 return std::string();
bool Gaudi::Parsers::PropertyValue::is_reference_ |
|
private |
Position Gaudi::Parsers::PropertyValue::position_ |
|
private |
Value Gaudi::Parsers::PropertyValue::value_ |
|
private |
The documentation for this class was generated from the following files: