1 #ifndef JOBOPTIONSVC_PROPERTY_VALUE_H_ 2 #define JOBOPTIONSVC_PROPERTY_VALUE_H_ 13 #include <boost/variant.hpp> 45 VectorOfStrings&
Vector() {
return boost::get<VectorOfStrings>(
value_ ); }
46 const VectorOfStrings&
Vector()
const {
return boost::get<VectorOfStrings>(
value_ ); }
48 MapOfStrings&
Map() {
return boost::get<MapOfStrings>(
value_ ); }
49 const MapOfStrings&
Map()
const {
return boost::get<MapOfStrings>(
value_ ); }
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
PropertyValue(Value value, bool is_reference=false)
static PositionalPropertyValueException CouldNotFind(const Position &position, const std::string &name)
virtual ~PositionalPropertyValueException()
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)
PropertyValue(Value value, const Position &position, bool is_reference=false)
static PropertyValueException WrongRValue()
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
static PropertyValueException WrongLValue()
Helper functions to set/get the application return code.