23 #ifndef VARIANT_TOPIC_TOOLS_VARIANT_H 24 #define VARIANT_TOPIC_TOOLS_VARIANT_H 28 #include <boost/type_traits.hpp> 48 template <
typename T>
Variant(
const T& src);
126 void read(std::istream& stream);
130 void write(std::ostream& stream)
const;
142 template <
typename T>
operator T()
const;
192 virtual ValuePtr
clone()
const = 0;
196 virtual void read(std::istream& stream) = 0;
200 virtual void write(std::ostream& stream)
const = 0;
210 public virtual Value {
242 virtual const T&
getValue()
const = 0;
259 template <
typename T>
static void set(
Variant& variant,
const 265 value,
typename boost::enable_if<boost::is_base_of<Variant, T> >::
271 template <
typename T>
static void setValue(
Variant& dst,
const T& value,
272 typename boost::disable_if<boost::is_base_of<Variant, T> >::type* = 0);
277 template <
typename T>
static bool isEqual(
const Variant& variant,
const 278 T& value,
typename boost::enable_if<boost::is_base_of<Variant, T> >::
284 template <
typename T>
static bool isEqual(
const Variant& variant,
const 285 T& value,
typename boost::disable_if<boost::is_base_of<Variant, T> >::
290 template <
typename T>
static void assign(
Variant& dst,
const T& src,
291 typename boost::enable_if<boost::is_base_of<Variant, T> >::type* = 0);
295 template <
typename T>
static void assign(
Variant& dst,
const T& src,
296 typename boost::disable_if<boost::is_base_of<Variant, T> >::type* = 0);
308 #include <variant_topic_tools/Variant.tpp> Header file providing the DataType class interface.
Header file providing the data type traits.
Header file providing the Pointer class interface.