Public Types | Public Member Functions | Private Attributes | List of all members
UVariant Class Reference

#include <UVariant.h>

Public Types

enum  Type {
  kBool, kChar, kUChar, kShort,
  kUShort, kInt, kUInt, kFloat,
  kDouble, kStr, kCharArray, kUCharArray,
  kShortArray, kUShortArray, kIntArray, kUIntArray,
  kFloatArray, kDoubleArray, kUndef
}
 

Public Member Functions

bool isBool () const
 
bool isChar () const
 
bool isCharArray () const
 
bool isDouble () const
 
bool isDoubleArray () const
 
bool isFloat () const
 
bool isFloatArray () const
 
bool isInt () const
 
bool isIntArray () const
 
bool isShort () const
 
bool isShortArray () const
 
bool isStr () const
 
bool isUChar () const
 
bool isUCharArray () const
 
bool isUInt () const
 
bool isUIntArray () const
 
bool isUndef () const
 
bool isUShort () const
 
bool isUShortArray () const
 
bool toBool () const
 
char toChar (bool *ok=0) const
 
std::vector< char > toCharArray (bool *ok=0) const
 
double toDouble (bool *ok=0) const
 
std::vector< double > toDoubleArray (bool *ok=0) const
 
float toFloat (bool *ok=0) const
 
std::vector< float > toFloatArray (bool *ok=0) const
 
int toInt (bool *ok=0) const
 
std::vector< int > toIntArray (bool *ok=0) const
 
short toShort (bool *ok=0) const
 
std::vector< short > toShortArray (bool *ok=0) const
 
std::string toStr (bool *ok=0) const
 
unsigned char toUChar (bool *ok=0) const
 
std::vector< unsigned char > toUCharArray (bool *ok=0) const
 
unsigned int toUInt (bool *ok=0) const
 
std::vector< unsigned int > toUIntArray (bool *ok=0) const
 
unsigned short toUShort (bool *ok=0) const
 
std::vector< unsigned short > toUShortArray (bool *ok=0) const
 
Type type () const
 
 UVariant ()
 
 UVariant (const bool &value)
 
 UVariant (const char &value)
 
 UVariant (const unsigned char &value)
 
 UVariant (const short &value)
 
 UVariant (const unsigned short &value)
 
 UVariant (const int &value)
 
 UVariant (const unsigned int &value)
 
 UVariant (const float &value)
 
 UVariant (const double &value)
 
 UVariant (const char *value)
 
 UVariant (const std::string &value)
 
 UVariant (const std::vector< char > &value)
 
 UVariant (const std::vector< unsigned char > &value)
 
 UVariant (const std::vector< short > &value)
 
 UVariant (const std::vector< unsigned short > &value)
 
 UVariant (const std::vector< int > &value)
 
 UVariant (const std::vector< unsigned int > &value)
 
 UVariant (const std::vector< float > &value)
 
 UVariant (const std::vector< double > &value)
 
virtual ~UVariant ()
 

Private Attributes

std::vector< unsigned char > data_
 
Type type_
 

Detailed Description

Experimental class...

Definition at line 30 of file UVariant.h.

Member Enumeration Documentation

◆ Type

Enumerator
kBool 
kChar 
kUChar 
kShort 
kUShort 
kInt 
kUInt 
kFloat 
kDouble 
kStr 
kCharArray 
kUCharArray 
kShortArray 
kUShortArray 
kIntArray 
kUIntArray 
kFloatArray 
kDoubleArray 
kUndef 

Definition at line 33 of file UVariant.h.

Constructor & Destructor Documentation

◆ UVariant() [1/20]

UVariant::UVariant ( )

Definition at line 25 of file UVariant.cpp.

◆ UVariant() [2/20]

UVariant::UVariant ( const bool &  value)

Definition at line 29 of file UVariant.cpp.

◆ UVariant() [3/20]

UVariant::UVariant ( const char &  value)

Definition at line 35 of file UVariant.cpp.

◆ UVariant() [4/20]

UVariant::UVariant ( const unsigned char &  value)

Definition at line 41 of file UVariant.cpp.

◆ UVariant() [5/20]

UVariant::UVariant ( const short &  value)

Definition at line 47 of file UVariant.cpp.

◆ UVariant() [6/20]

UVariant::UVariant ( const unsigned short &  value)

Definition at line 53 of file UVariant.cpp.

◆ UVariant() [7/20]

UVariant::UVariant ( const int &  value)

Definition at line 59 of file UVariant.cpp.

◆ UVariant() [8/20]

UVariant::UVariant ( const unsigned int &  value)

Definition at line 65 of file UVariant.cpp.

◆ UVariant() [9/20]

UVariant::UVariant ( const float &  value)

Definition at line 71 of file UVariant.cpp.

◆ UVariant() [10/20]

UVariant::UVariant ( const double &  value)

Definition at line 77 of file UVariant.cpp.

◆ UVariant() [11/20]

UVariant::UVariant ( const char *  value)

Definition at line 83 of file UVariant.cpp.

◆ UVariant() [12/20]

UVariant::UVariant ( const std::string value)

Definition at line 90 of file UVariant.cpp.

◆ UVariant() [13/20]

UVariant::UVariant ( const std::vector< char > &  value)

Definition at line 96 of file UVariant.cpp.

◆ UVariant() [14/20]

UVariant::UVariant ( const std::vector< unsigned char > &  value)

Definition at line 102 of file UVariant.cpp.

◆ UVariant() [15/20]

UVariant::UVariant ( const std::vector< short > &  value)

Definition at line 108 of file UVariant.cpp.

◆ UVariant() [16/20]

UVariant::UVariant ( const std::vector< unsigned short > &  value)

Definition at line 114 of file UVariant.cpp.

◆ UVariant() [17/20]

UVariant::UVariant ( const std::vector< int > &  value)

Definition at line 120 of file UVariant.cpp.

◆ UVariant() [18/20]

UVariant::UVariant ( const std::vector< unsigned int > &  value)

Definition at line 126 of file UVariant.cpp.

◆ UVariant() [19/20]

UVariant::UVariant ( const std::vector< float > &  value)

Definition at line 132 of file UVariant.cpp.

◆ UVariant() [20/20]

UVariant::UVariant ( const std::vector< double > &  value)

Definition at line 138 of file UVariant.cpp.

◆ ~UVariant()

virtual UVariant::~UVariant ( )
inlinevirtual

Definition at line 117 of file UVariant.h.

Member Function Documentation

◆ isBool()

bool UVariant::isBool ( ) const
inline

Definition at line 79 of file UVariant.h.

◆ isChar()

bool UVariant::isChar ( ) const
inline

Definition at line 80 of file UVariant.h.

◆ isCharArray()

bool UVariant::isCharArray ( ) const
inline

Definition at line 89 of file UVariant.h.

◆ isDouble()

bool UVariant::isDouble ( ) const
inline

Definition at line 87 of file UVariant.h.

◆ isDoubleArray()

bool UVariant::isDoubleArray ( ) const
inline

Definition at line 96 of file UVariant.h.

◆ isFloat()

bool UVariant::isFloat ( ) const
inline

Definition at line 86 of file UVariant.h.

◆ isFloatArray()

bool UVariant::isFloatArray ( ) const
inline

Definition at line 95 of file UVariant.h.

◆ isInt()

bool UVariant::isInt ( ) const
inline

Definition at line 84 of file UVariant.h.

◆ isIntArray()

bool UVariant::isIntArray ( ) const
inline

Definition at line 93 of file UVariant.h.

◆ isShort()

bool UVariant::isShort ( ) const
inline

Definition at line 82 of file UVariant.h.

◆ isShortArray()

bool UVariant::isShortArray ( ) const
inline

Definition at line 91 of file UVariant.h.

◆ isStr()

bool UVariant::isStr ( ) const
inline

Definition at line 88 of file UVariant.h.

◆ isUChar()

bool UVariant::isUChar ( ) const
inline

Definition at line 81 of file UVariant.h.

◆ isUCharArray()

bool UVariant::isUCharArray ( ) const
inline

Definition at line 90 of file UVariant.h.

◆ isUInt()

bool UVariant::isUInt ( ) const
inline

Definition at line 85 of file UVariant.h.

◆ isUIntArray()

bool UVariant::isUIntArray ( ) const
inline

Definition at line 94 of file UVariant.h.

◆ isUndef()

bool UVariant::isUndef ( ) const
inline

Definition at line 78 of file UVariant.h.

◆ isUShort()

bool UVariant::isUShort ( ) const
inline

Definition at line 83 of file UVariant.h.

◆ isUShortArray()

bool UVariant::isUShortArray ( ) const
inline

Definition at line 92 of file UVariant.h.

◆ toBool()

bool UVariant::toBool ( ) const

Definition at line 145 of file UVariant.cpp.

◆ toChar()

char UVariant::toChar ( bool *  ok = 0) const

Definition at line 158 of file UVariant.cpp.

◆ toCharArray()

std::vector< char > UVariant::toCharArray ( bool *  ok = 0) const

Definition at line 693 of file UVariant.cpp.

◆ toDouble()

double UVariant::toDouble ( bool *  ok = 0) const

Definition at line 613 of file UVariant.cpp.

◆ toDoubleArray()

std::vector< double > UVariant::toDoubleArray ( bool *  ok = 0) const

Definition at line 849 of file UVariant.cpp.

◆ toFloat()

float UVariant::toFloat ( bool *  ok = 0) const

Definition at line 584 of file UVariant.cpp.

◆ toFloatArray()

std::vector< float > UVariant::toFloatArray ( bool *  ok = 0) const

Definition at line 827 of file UVariant.cpp.

◆ toInt()

int UVariant::toInt ( bool *  ok = 0) const

Definition at line 454 of file UVariant.cpp.

◆ toIntArray()

std::vector< int > UVariant::toIntArray ( bool *  ok = 0) const

Definition at line 783 of file UVariant.cpp.

◆ toShort()

short UVariant::toShort ( bool *  ok = 0) const

Definition at line 312 of file UVariant.cpp.

◆ toShortArray()

std::vector< short > UVariant::toShortArray ( bool *  ok = 0) const

Definition at line 739 of file UVariant.cpp.

◆ toStr()

std::string UVariant::toStr ( bool *  ok = 0) const

Definition at line 634 of file UVariant.cpp.

◆ toUChar()

unsigned char UVariant::toUChar ( bool *  ok = 0) const

Definition at line 235 of file UVariant.cpp.

◆ toUCharArray()

std::vector< unsigned char > UVariant::toUCharArray ( bool *  ok = 0) const

Definition at line 716 of file UVariant.cpp.

◆ toUInt()

unsigned int UVariant::toUInt ( bool *  ok = 0) const

Definition at line 515 of file UVariant.cpp.

◆ toUIntArray()

std::vector< unsigned int > UVariant::toUIntArray ( bool *  ok = 0) const

Definition at line 805 of file UVariant.cpp.

◆ toUShort()

unsigned short UVariant::toUShort ( bool *  ok = 0) const

Definition at line 381 of file UVariant.cpp.

◆ toUShortArray()

std::vector< unsigned short > UVariant::toUShortArray ( bool *  ok = 0) const

Definition at line 761 of file UVariant.cpp.

◆ type()

Type UVariant::type ( ) const
inline

Definition at line 76 of file UVariant.h.

Member Data Documentation

◆ data_

std::vector<unsigned char> UVariant::data_
private

Definition at line 121 of file UVariant.h.

◆ type_

Type UVariant::type_
private

Definition at line 120 of file UVariant.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:38:59