23 #ifndef MESSAGE_VAL20091211H 24 #define MESSAGE_VAL20091211H 28 #include "dccl_constants.h" 32 namespace transitional
40 MAX_DBL_PRECISION = 15
76 void set(std::string sval);
81 void set(
double dval,
int precision = MAX_DBL_PRECISION);
91 bool get(std::string& s)
const;
98 bool get(
bool& b)
const;
102 bool get(
long& t)
const;
106 bool get(
double& d)
const;
114 operator bool()
const;
118 operator std::string()
const;
122 operator long()
const;
126 operator int()
const;
130 operator unsigned()
const;
134 operator float()
const;
136 operator std::vector<DCCLMessageVal>()
const;
144 unsigned precision()
const {
return precision_; }
151 bool operator==(
const std::string& s)
const;
152 bool operator==(
double d)
const;
153 bool operator==(
long l)
const;
154 bool operator==(
bool b)
const;
161 friend std::ostream& operator<<(std::ostream& os,
const DCCLMessageVal& mv);
174 std::ostream& operator<<(std::ostream& os,
const DCCLMessageVal& mv);
175 std::ostream& operator<<(std::ostream& os, const std::vector<DCCLMessageVal>& vm);
DCCLCppType type() const
what type is the original type of this DCCLMessageVal?
bool empty() const
was this just constructed with DCCLMessageVal() ?
DCCLCppType
Enumeration of C++ types used in DCCL.
The global namespace for the Goby project.