Public Member Functions | Private Member Functions | Private Attributes | List of all members
RosIntrospection::Variant Class Reference

#include <variant.hpp>

Public Member Functions

template<typename T >
void assign (const T &value)
 
void assign (const char *buffer, size_t length)
 
template<>
void assign (const absl::string_view &value)
 
template<>
void assign (const std::string &value)
 
template<typename T >
convert () const
 
template<typename DST >
DST convert () const
 
template<>
double convert () const
 
template<>
ros::Time convert () const
 
template<>
ros::Duration convert () const
 
template<>
std::string convert () const
 
template<typename T >
extract () const
 
template<>
absl::string_view extract () const
 
template<>
std::string extract () const
 
BuiltinType getTypeID () const
 
Variantoperator= (const Variant &other)
 
 Variant ()
 
 Variant (const Variant &other)
 
 Variant (Variant &&other)
 
template<typename T >
 Variant (const T &value)
 
 Variant (const char *buffer, size_t length)
 
 ~Variant ()
 

Private Member Functions

void clearStringIfNecessary ()
 

Private Attributes

union {
   std::array< uint8_t, 8 >   raw_data
 
   char *   raw_string
 
_storage
 
BuiltinType _type
 

Detailed Description

Definition at line 49 of file variant.hpp.

Constructor & Destructor Documentation

RosIntrospection::Variant::Variant ( )
inline

Definition at line 54 of file variant.hpp.

RosIntrospection::Variant::~Variant ( )
inline

Definition at line 158 of file variant.hpp.

RosIntrospection::Variant::Variant ( const Variant other)
inline

Definition at line 61 of file variant.hpp.

RosIntrospection::Variant::Variant ( Variant &&  other)
inline

Definition at line 76 of file variant.hpp.

template<typename T >
RosIntrospection::Variant::Variant ( const T &  value)
inline

Definition at line 138 of file variant.hpp.

RosIntrospection::Variant::Variant ( const char *  buffer,
size_t  length 
)
inline

Definition at line 152 of file variant.hpp.

Member Function Documentation

template<typename T >
void RosIntrospection::Variant::assign ( const T &  value)
inline

Definition at line 208 of file variant.hpp.

void RosIntrospection::Variant::assign ( const char *  buffer,
size_t  length 
)
inline

Definition at line 229 of file variant.hpp.

template<>
void RosIntrospection::Variant::assign ( const absl::string_view value)
inline

Definition at line 242 of file variant.hpp.

template<>
void RosIntrospection::Variant::assign ( const std::string &  value)
inline

Definition at line 247 of file variant.hpp.

void RosIntrospection::Variant::clearStringIfNecessary ( )
inlineprivate

Definition at line 220 of file variant.hpp.

template<typename T >
T RosIntrospection::Variant::convert ( ) const
template<typename DST >
DST RosIntrospection::Variant::convert ( ) const
inline

Definition at line 254 of file variant.hpp.

template<>
double RosIntrospection::Variant::convert ( ) const
inline

Definition at line 301 of file variant.hpp.

template<>
ros::Time RosIntrospection::Variant::convert ( ) const
inline

Definition at line 347 of file variant.hpp.

template<>
ros::Duration RosIntrospection::Variant::convert ( ) const
inline

Definition at line 356 of file variant.hpp.

template<>
std::string RosIntrospection::Variant::convert ( ) const
inline

Definition at line 366 of file variant.hpp.

template<typename T >
T RosIntrospection::Variant::extract ( ) const
inline

Definition at line 169 of file variant.hpp.

template<>
absl::string_view RosIntrospection::Variant::extract ( ) const
inline

Definition at line 183 of file variant.hpp.

template<>
std::string RosIntrospection::Variant::extract ( ) const
inline

Definition at line 195 of file variant.hpp.

BuiltinType RosIntrospection::Variant::getTypeID ( ) const
inline

Definition at line 165 of file variant.hpp.

Variant& RosIntrospection::Variant::operator= ( const Variant other)
inline

Definition at line 90 of file variant.hpp.

Member Data Documentation

union { ... } RosIntrospection::Variant::_storage
BuiltinType RosIntrospection::Variant::_type
private

Definition at line 130 of file variant.hpp.

std::array<uint8_t,8> RosIntrospection::Variant::raw_data

Definition at line 124 of file variant.hpp.

char* RosIntrospection::Variant::raw_string

Definition at line 125 of file variant.hpp.


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


ros_type_introspection
Author(s): Davide Faconti
autogenerated on Thu May 16 2019 02:39:10