2 #ifndef JOBOPTIONSVC_PROPERTY_VALUE_H_
3 #define JOBOPTIONSVC_PROPERTY_VALUE_H_
14 #include <boost/variant.hpp>
15 #include <boost/scoped_ptr.hpp>
19 namespace Gaudi {
namespace Parsers {
27 typedef boost::variant<std::string, std::vector<std::string>,
28 std::map<std::string, std::string> >
Value;
42 const std::string&
String()
const {
return boost::get<std::string>(
value_);}
46 return boost::get<VectorOfStrings>(
value_);}
76 std::runtime_error(message){}
90 const std::string& message):
std::runtime_error(message),
95 const std::string& name) {
97 "Could not find property "+name+
".");
102 const std::string& name) {
104 "Could not find property '"+name+
"'.");
109 const std::string& name) {
111 "Could not find unit '"+name+
"'.");
121 #endif // JOBOPTIONSVC_PROPERTY_VALUE_H_
const PropertyValue operator-(const PropertyValue &right)
std::vector< std::string > VectorOfStrings
std::map< std::string, std::string > MapOfStrings
const std::string & String() const
static PositionalPropertyValueException CouldNotFind(const Position &position, const std::string &name)
virtual ~PositionalPropertyValueException()
PropertyValue(const Value &value, bool is_reference=false)
const MapOfStrings & Map() const
PositionalPropertyValueException(const Position &position, const std::string &message)
static PositionalPropertyValueException CouldNotFindUnit(const Position &position, const std::string &name)
const VectorOfStrings & Vector() const
PropertyValueException(const std::string &message)
static PropertyValueException WrongRValue()
boost::scoped_ptr< const PropertyValue > ConstScopedPtr
const Position & position() const
boost::variant< std::string, std::vector< std::string >, std::map< std::string, std::string > > Value
VectorOfStrings & Vector()
PropertyValue & operator+=(const PropertyValue &right)
const Position & position() const
static PositionalPropertyValueException CouldNotFindProperty(const Position &position, const std::string &name)
const PropertyValue operator+(const PropertyValue &right)
PropertyValue & operator-=(const PropertyValue &right)
std::string ToString() const
PropertyValue(const Value &value, const Position &position, bool is_reference=false)
std
AIDA -> ROTO converter.
This is a number of static methods for bootstrapping the Gaudi framework.
boost::scoped_ptr< PropertyValue > ScopedPtr
static PropertyValueException WrongLValue()