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

#include <variant.hpp>

Public Member Functions

void assign (const char *buffer, size_t length)
 
template<>
void assign (const std::string &value)
 
template<>
void assign (const std::string_view &value)
 
template<typename T >
void assign (const T &value)
 
template<typename T >
convert () const
 
template<typename DST >
DST convert () const
 
template<>
double convert () const
 
template<typename T >
extract () const
 
template<>
std::string_view extract () const
 
const uint8_t * getRawStorage () const
 
BuiltinType getTypeID () const
 
Variantoperator= (const Variant &other)
 
 Variant ()
 
 Variant (const char *buffer, size_t length)
 
template<typename T >
 Variant (const T &value)
 
 Variant (const Variant &other)
 
 Variant (Variant &&other)
 
 ~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 81 of file variant.hpp.

Constructor & Destructor Documentation

◆ Variant() [1/5]

RosMsgParser::Variant::Variant ( )
inline

Definition at line 116 of file variant.hpp.

◆ ~Variant()

RosMsgParser::Variant::~Variant ( )
inline

Definition at line 195 of file variant.hpp.

◆ Variant() [2/5]

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

Definition at line 124 of file variant.hpp.

◆ Variant() [3/5]

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

Definition at line 140 of file variant.hpp.

◆ Variant() [4/5]

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

Definition at line 177 of file variant.hpp.

◆ Variant() [5/5]

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

Definition at line 189 of file variant.hpp.

Member Function Documentation

◆ assign() [1/4]

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

Definition at line 273 of file variant.hpp.

◆ assign() [2/4]

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

Definition at line 291 of file variant.hpp.

◆ assign() [3/4]

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

Definition at line 285 of file variant.hpp.

◆ assign() [4/4]

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

Definition at line 253 of file variant.hpp.

◆ clearStringIfNecessary()

void RosMsgParser::Variant::clearStringIfNecessary ( )
inlineprivate

Definition at line 264 of file variant.hpp.

◆ convert() [1/3]

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

◆ convert() [2/3]

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

Definition at line 299 of file variant.hpp.

◆ convert() [3/3]

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

Definition at line 371 of file variant.hpp.

◆ extract() [1/2]

template<typename T >
T RosMsgParser::Variant::extract
inline

Definition at line 213 of file variant.hpp.

◆ extract() [2/2]

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

Definition at line 227 of file variant.hpp.

◆ getRawStorage()

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

Definition at line 207 of file variant.hpp.

◆ getTypeID()

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

Definition at line 202 of file variant.hpp.

◆ operator=()

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

Definition at line 155 of file variant.hpp.

Member Data Documentation

◆ _storage

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

◆ _type

BuiltinType RosMsgParser::Variant::_type
private

Definition at line 203 of file variant.hpp.

◆ raw_data

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

Definition at line 197 of file variant.hpp.

◆ raw_string

char* RosMsgParser::Variant::raw_string

Definition at line 198 of file variant.hpp.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:52