Classes | Public Member Functions | Static Protected Member Functions | Friends
variant_topic_tools::BuiltinVariant Class Reference

Built-in variant type. More...

#include <BuiltinVariant.h>

Inheritance diagram for variant_topic_tools::BuiltinVariant:
Inheritance graph
[legend]

List of all members.

Classes

class  Value
 Built-in variant value (abstract base) More...
class  ValueImplT
 Built-in variant value (templated implementation) More...

Public Member Functions

 BuiltinVariant ()
 Default constructor.
 BuiltinVariant (const BuiltinVariant &src)
 Copy constructor.
 BuiltinVariant (const Variant &src)
 Copy constructor (overloaded version taking a variant)
double getNumericValue () const
 Retrieve the built-in variant's numeric value.
 ~BuiltinVariant ()
 Destructor.

Static Protected Member Functions

template<typename T >
static BuiltinVariant create (const DataType &type)
 Create a built-in variant.
template<typename T >
static double getNumericValue (const T &value, typename boost::enable_if< boost::type_traits::ice_or< boost::is_base_of< ros::Duration, T >::value, boost::is_base_of< ros::Time, T >::value > >::type *=0)
 Retrieve the built-in variant's numeric value (overloaded version taking a ROS duration or ROS time)
template<typename T >
static double getNumericValue (const T &value, typename boost::enable_if< typename type_traits::BuiltinType< T >::IsNumeric >::type *=0, typename boost::disable_if< boost::type_traits::ice_or< boost::is_base_of< ros::Duration, T >::value, boost::is_base_of< ros::Time, T >::value > >::type *=0)
 Retrieve the built-in variant's numeric value (overloaded version taking a numeric value other than a ROS duration or a ROS time)
template<typename T >
static double getNumericValue (const T &value, typename boost::disable_if< typename type_traits::BuiltinType< T >::IsNumeric >::type *=0)
 Retrieve the built-in variant's numeric value (overloaded version taking a non-numeric value)
template<typename T >
static bool isEqual (const typename type_traits::BuiltinType< T >::ValueType &lhs, const typename type_traits::BuiltinType< T >::ValueType &rhs, typename boost::enable_if< boost::has_equal_to< typename type_traits::BuiltinType< T >::ValueType, typename type_traits::BuiltinType< T >::ValueType, bool > >::type *=0)
 Compare the values of two built-in variants (overloaded version taking two comparable values)
template<typename T >
static bool isEqual (const typename type_traits::BuiltinType< T >::ValueType &lhs, const typename type_traits::BuiltinType< T >::ValueType &rhs, typename boost::disable_if< boost::has_equal_to< typename type_traits::BuiltinType< T >::ValueType, typename type_traits::BuiltinType< T >::ValueType, bool > >::type *=0)
 Compare the values of two built-in variants (overloaded version taking two non-comparable values)
template<typename T >
static void read (std::istream &stream, typename type_traits::BuiltinType< T >::ValueType &value, typename boost::enable_if< boost::is_same< T, bool > >::type *=0)
 Read a built-in variant from a stream (overloaded version taking a boolean value)
template<typename T >
static void read (std::istream &stream, typename type_traits::BuiltinType< T >::ValueType &value, typename boost::disable_if< boost::is_same< T, bool > >::type *=0, typename boost::enable_if< boost::has_right_shift< std::istream, typename type_traits::BuiltinType< T >::ValueType & > >::type *=0)
 Read a built-in variant from a stream (overloaded version taking a non-boolean, stream-readable value)
template<typename T >
static void read (std::istream &stream, typename type_traits::BuiltinType< T >::ValueType &value, typename boost::disable_if< boost::is_same< T, bool > >::type *=0, typename boost::disable_if< boost::has_right_shift< std::istream, typename type_traits::BuiltinType< T >::ValueType & > >::type *=0)
 Read a built-in variant from a stream (overloaded version taking a non-boolean, non-stream-readable value)
template<typename T >
static void write (std::ostream &stream, const typename type_traits::BuiltinType< T >::ValueType &value, typename boost::enable_if< boost::is_same< T, bool > >::type *=0)
 Write a variant to a stream (overloaded version taking a boolean value)
template<typename T >
static void write (std::ostream &stream, const typename type_traits::BuiltinType< T >::ValueType &value, typename boost::disable_if< boost::is_same< T, bool > >::type *=0, typename boost::enable_if< boost::has_left_shift< std::ostream, const typename type_traits::BuiltinType< T >::ValueType & > >::type *=0)
 Write a variant to a stream (overloaded version taking a non-boolean, stream-writable value)
template<typename T >
static void write (std::ostream &stream, const typename type_traits::BuiltinType< T >::ValueType &value, typename boost::disable_if< boost::is_same< T, bool > >::type *=0, typename boost::disable_if< boost::has_left_shift< std::ostream, const typename type_traits::BuiltinType< T >::ValueType & > >::type *=0)
 Write a variant to a stream (overloaded version taking a non-boolean, non-stream-writable value)

Friends

class BuiltinDataType
class Variant

Detailed Description

Built-in variant type.

Definition at line 35 of file BuiltinVariant.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 29 of file BuiltinVariant.cpp.

Copy constructor.

Definition at line 32 of file BuiltinVariant.cpp.

Copy constructor (overloaded version taking a variant)

Definition at line 36 of file BuiltinVariant.cpp.

Destructor.

Definition at line 42 of file BuiltinVariant.cpp.


Member Function Documentation

template<typename T >
static BuiltinVariant variant_topic_tools::BuiltinVariant::create ( const DataType type) [static, protected]

Create a built-in variant.

Retrieve the built-in variant's numeric value.

Definition at line 55 of file BuiltinVariant.cpp.

template<typename T >
static double variant_topic_tools::BuiltinVariant::getNumericValue ( const T &  value,
typename boost::enable_if< boost::type_traits::ice_or< boost::is_base_of< ros::Duration, T >::value, boost::is_base_of< ros::Time, T >::value > >::type = 0 
) [static, protected]

Retrieve the built-in variant's numeric value (overloaded version taking a ROS duration or ROS time)

template<typename T >
static double variant_topic_tools::BuiltinVariant::getNumericValue ( const T &  value,
typename boost::enable_if< typename type_traits::BuiltinType< T >::IsNumeric >::type = 0,
typename boost::disable_if< boost::type_traits::ice_or< boost::is_base_of< ros::Duration, T >::value, boost::is_base_of< ros::Time, T >::value > >::type = 0 
) [static, protected]

Retrieve the built-in variant's numeric value (overloaded version taking a numeric value other than a ROS duration or a ROS time)

template<typename T >
static double variant_topic_tools::BuiltinVariant::getNumericValue ( const T &  value,
typename boost::disable_if< typename type_traits::BuiltinType< T >::IsNumeric >::type = 0 
) [static, protected]

Retrieve the built-in variant's numeric value (overloaded version taking a non-numeric value)

template<typename T >
static bool variant_topic_tools::BuiltinVariant::isEqual ( const typename type_traits::BuiltinType< T >::ValueType &  lhs,
const typename type_traits::BuiltinType< T >::ValueType &  rhs,
typename boost::enable_if< boost::has_equal_to< typename type_traits::BuiltinType< T >::ValueType, typename type_traits::BuiltinType< T >::ValueType, bool > >::type = 0 
) [static, protected]

Compare the values of two built-in variants (overloaded version taking two comparable values)

template<typename T >
static bool variant_topic_tools::BuiltinVariant::isEqual ( const typename type_traits::BuiltinType< T >::ValueType &  lhs,
const typename type_traits::BuiltinType< T >::ValueType &  rhs,
typename boost::disable_if< boost::has_equal_to< typename type_traits::BuiltinType< T >::ValueType, typename type_traits::BuiltinType< T >::ValueType, bool > >::type = 0 
) [static, protected]

Compare the values of two built-in variants (overloaded version taking two non-comparable values)

template<typename T >
static void variant_topic_tools::BuiltinVariant::read ( std::istream &  stream,
typename type_traits::BuiltinType< T >::ValueType &  value,
typename boost::enable_if< boost::is_same< T, bool > >::type = 0 
) [static, protected]

Read a built-in variant from a stream (overloaded version taking a boolean value)

template<typename T >
static void variant_topic_tools::BuiltinVariant::read ( std::istream &  stream,
typename type_traits::BuiltinType< T >::ValueType &  value,
typename boost::disable_if< boost::is_same< T, bool > >::type = 0,
typename boost::enable_if< boost::has_right_shift< std::istream, typename type_traits::BuiltinType< T >::ValueType & > >::type = 0 
) [static, protected]

Read a built-in variant from a stream (overloaded version taking a non-boolean, stream-readable value)

template<typename T >
static void variant_topic_tools::BuiltinVariant::read ( std::istream &  stream,
typename type_traits::BuiltinType< T >::ValueType &  value,
typename boost::disable_if< boost::is_same< T, bool > >::type = 0,
typename boost::disable_if< boost::has_right_shift< std::istream, typename type_traits::BuiltinType< T >::ValueType & > >::type = 0 
) [static, protected]

Read a built-in variant from a stream (overloaded version taking a non-boolean, non-stream-readable value)

template<typename T >
static void variant_topic_tools::BuiltinVariant::write ( std::ostream &  stream,
const typename type_traits::BuiltinType< T >::ValueType &  value,
typename boost::enable_if< boost::is_same< T, bool > >::type = 0 
) [static, protected]

Write a variant to a stream (overloaded version taking a boolean value)

template<typename T >
static void variant_topic_tools::BuiltinVariant::write ( std::ostream &  stream,
const typename type_traits::BuiltinType< T >::ValueType &  value,
typename boost::disable_if< boost::is_same< T, bool > >::type = 0,
typename boost::enable_if< boost::has_left_shift< std::ostream, const typename type_traits::BuiltinType< T >::ValueType & > >::type = 0 
) [static, protected]

Write a variant to a stream (overloaded version taking a non-boolean, stream-writable value)

template<typename T >
static void variant_topic_tools::BuiltinVariant::write ( std::ostream &  stream,
const typename type_traits::BuiltinType< T >::ValueType &  value,
typename boost::disable_if< boost::is_same< T, bool > >::type = 0,
typename boost::disable_if< boost::has_left_shift< std::ostream, const typename type_traits::BuiltinType< T >::ValueType & > >::type = 0 
) [static, protected]

Write a variant to a stream (overloaded version taking a non-boolean, non-stream-writable value)


Friends And Related Function Documentation

friend class BuiltinDataType [friend]

Definition at line 37 of file BuiltinVariant.h.

friend class Variant [friend]

Definition at line 38 of file BuiltinVariant.h.


The documentation for this class was generated from the following files:


variant_topic_tools
Author(s): Ralf Kaestner
autogenerated on Fri Aug 5 2016 06:06:27