16 #ifndef TORC_GENERIC_VALUE_HPP
17 #define TORC_GENERIC_VALUE_HPP
20 #include <boost/variant.hpp>
22 #ifdef GENOM_SERIALIZATION
23 #include <boost/serialization/access.hpp>
24 #endif //GENOM_SERIALIZATION
35 #ifdef GENOM_SERIALIZATION
36 friend class boost::serialization::access;
68 #ifdef GENOM_SERIALIZATION
69 friend class boost::serialization::access;
79 Number(int32_t inMantissa, int32_t inExponent);
87 bool operator <(const
Number& inRhs) const;
89 bool operator ==(const
Number& inRhs) const;
91 bool operator >(const
Number& inRhs) const;
93 bool operator >=(const
Number& inRhs) const;
95 bool operator <=(const
Number& inRhs) const;
97 bool operator !=(const
Number& inRhs) const;
110 #ifdef GENOM_SERIALIZATION
111 template <
class Archive>
void serialize(Archive& ar,
unsigned int) {
115 #endif //GENOM_SERIALIZATION
123 #ifdef GENOM_SERIALIZATION
124 friend class boost::serialization::access;
144 bool operator <(const
MiNoMax& inRhs) const;
146 bool operator ==(const
MiNoMax& inRhs) const;
148 bool operator !=(const
MiNoMax& inRhs) const;
150 bool operator >(const
MiNoMax& inRhs) const;
152 bool operator >=(const
MiNoMax& inRhs) const;
154 bool operator <=(const
MiNoMax& inRhs) const;
172 #ifdef GENOM_SERIALIZATION
173 template <
class Archive>
void serialize(Archive& ar,
unsigned int) {
180 #endif //GENOM_SERIALIZATION
187 #ifdef GENOM_SERIALIZATION
188 friend class boost::serialization::access;
198 Point(int32_t inX, int32_t inY);
206 bool operator <(const
Point& inRhs) const;
208 bool operator ==(const
Point& inRhs) const;
210 bool operator !=(const
Point& inRhs) const;
212 bool operator >(const
Point& inRhs) const;
214 bool operator >=(const
Point& inRhs) const;
216 bool operator <=(const
Point& inRhs) const;
218 inline const int32_t
getX() const;
220 void setX(const int32_t& inSource);
222 inline const int32_t
getY() const;
224 void setY(const int32_t& inSource);
227 #ifdef GENOM_SERIALIZATION
228 template <
class Archive>
void serialize(Archive& ar,
unsigned int) {
232 #endif //GENOM_SERIALIZATION
239 template <
typename _ValueType>
Value(
Type type,
const _ValueType& inSource);
256 template <typename _ValueType> _ValueType
get() const throw (
Error);
267 template <typename _ValueType>
void set(const _ValueType& inSource) throw (Error);
295 void setIsSet(const
bool& inSource);
298 #ifdef GENOM_SERIALIZATION
299 template <
class Archive>
void serialize(Archive& ar,
unsigned int);
300 #endif //GENOM_SERIALIZATION
312 return mMinUndefined;
316 return mMaxUndefined;
373 template <
typename _ValueType>
void Value::set(
const _ValueType& inSource)
throw (
Error) {
394 v = boost::get < _ValueType > (
mValue);
395 }
catch(
const boost::bad_get& bg) {
407 #endif // TORC_GENERIC_VALUE_HPP
const bool getIsSet() const
void setMantissa(const int32_t &inSource)
const Value::Number getNominal() const
const bool getMinUndefined() const
void setX(const int32_t &inSource)
void setNominal(const Value::Number &inSource)
void setMax(const Value::Number &inSource)
void setMin(const Value::Number &inSource)
const int32_t getY() const
const Value::Number getMax() const
const int32_t getX() const
The Error object thrown by different methods of EdifOM.
void set(const _ValueType &inSource)
const Type getType() const
boost::variant< Value::Boolean, Value::Integer, Value::Number, Value::MiNoMax, Value::Point, Value::String > mValue
void saveContextData(const std::string &inName, const boost::any &inSource)
const Value::Number getMin() const
const int32_t getExponent() const
void setType(const Type &inSource)
void setExponent(const int32_t &inSource)
const int32_t getMantissa() const
void setY(const int32_t &inSource)
const bool getMaxUndefined() const
void setIsSet(const bool &inSource)