Public Member Functions | Private Member Functions | Private Attributes | List of all members
RosMsgParser::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 std::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<>
RosMsgParser::Time convert () const
 
template<>
std::string convert () const
 
template<typename T >
extract () const
 
template<>
std::string_view extract () const
 
template<>
std::string extract () const
 
const uint8_t * getRawStorage () 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

◆ Variant() [1/5]

RosMsgParser::Variant::Variant ( )
inline

Definition at line 54 of file variant.hpp.

◆ ~Variant()

RosMsgParser::Variant::~Variant ( )
inline

Definition at line 160 of file variant.hpp.

◆ Variant() [2/5]

RosMsgParser::Variant::Variant ( const Variant other)
inline

Definition at line 61 of file variant.hpp.

◆ Variant() [3/5]

RosMsgParser::Variant::Variant ( Variant &&  other)
inline

Definition at line 76 of file variant.hpp.

◆ Variant() [4/5]

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

Definition at line 141 of file variant.hpp.

◆ Variant() [5/5]

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

Definition at line 154 of file variant.hpp.

Member Function Documentation

◆ assign() [1/4]

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

Definition at line 213 of file variant.hpp.

◆ assign() [2/4]

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

Definition at line 233 of file variant.hpp.

◆ assign() [3/4]

template<>
void RosMsgParser::Variant::assign ( const std::string_view value)
inline

Definition at line 246 of file variant.hpp.

◆ assign() [4/4]

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

Definition at line 251 of file variant.hpp.

◆ clearStringIfNecessary()

void RosMsgParser::Variant::clearStringIfNecessary ( )
inlineprivate

Definition at line 224 of file variant.hpp.

◆ convert() [1/5]

template<typename T >
T RosMsgParser::Variant::convert ( ) const

◆ convert() [2/5]

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

Definition at line 258 of file variant.hpp.

◆ convert() [3/5]

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

Definition at line 304 of file variant.hpp.

◆ convert() [4/5]

template<>
RosMsgParser::Time RosMsgParser::Variant::convert ( ) const
inline

Definition at line 346 of file variant.hpp.

◆ convert() [5/5]

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

Definition at line 356 of file variant.hpp.

◆ extract() [1/3]

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

Definition at line 175 of file variant.hpp.

◆ extract() [2/3]

template<>
std::string_view RosMsgParser::Variant::extract ( ) const
inline

Definition at line 188 of file variant.hpp.

◆ extract() [3/3]

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

Definition at line 200 of file variant.hpp.

◆ getRawStorage()

const uint8_t * RosMsgParser::Variant::getRawStorage ( ) const
inline

Definition at line 171 of file variant.hpp.

◆ getTypeID()

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

Definition at line 167 of file variant.hpp.

◆ operator=()

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

Definition at line 90 of file variant.hpp.

Member Data Documentation

◆ _storage

union { ... } RosMsgParser::Variant::_storage

◆ _type

BuiltinType RosMsgParser::Variant::_type
private

Definition at line 133 of file variant.hpp.

◆ raw_data

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

Definition at line 127 of file variant.hpp.

◆ raw_string

char* RosMsgParser::Variant::raw_string

Definition at line 128 of file variant.hpp.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:12:56