sptk2 logo
SPTK Home Page
Public Types | Public Member Functions | Friends | List of all members
sptk::VariantData Class Reference

Public Types

using Storage = std::variant< bool, int32_t, int64_t, double, const uint8_t *, const void *, DateTime, Buffer, MoneyData >
 

Public Member Functions

 VariantData ()=default
 
 VariantData (const VariantData &other)=default
 
 VariantData (VariantData &&other) noexcept
 
VariantDataoperator= (const VariantData &other)=default
 
VariantDataoperator= (VariantData &&other) noexcept=default
 
template<typename T >
T & get ()
 Access to variant data. More...
 
template<typename T >
const T & get () const
 Access to variant data. More...
 
template<typename T >
void set (const T &value)
 
void type (VariantType dataType)
 
void type (VariantDataType dataType)
 
void setNull (bool isNull)
 
VariantType type () const
 
void size (size_t dataSize)
 
size_t size () const
 

Friends

class Variant_SetMethods
 

Constructor & Destructor Documentation

◆ VariantData() [1/3]

sptk::VariantData::VariantData ( )
default

Default constructor

◆ VariantData() [2/3]

sptk::VariantData::VariantData ( const VariantData other)
default

Copy constructor

Parameters
otherOther object

◆ VariantData() [3/3]

sptk::VariantData::VariantData ( VariantData &&  other)
inlinenoexcept

Move constructor

Parameters
otherOther object

Member Function Documentation

◆ get() [1/2]

template<typename T >
T & sptk::VariantData::get ( )
inline

Access to variant data.

Returns
variant data reference

◆ get() [2/2]

template<typename T >
const T & sptk::VariantData::get ( ) const
inline

Access to variant data.

Returns
variant data reference

◆ operator=() [1/2]

VariantData & sptk::VariantData::operator= ( const VariantData other)
default

Copy assigment

Parameters
otherOther object

◆ operator=() [2/2]

VariantData & sptk::VariantData::operator= ( VariantData &&  other)
defaultnoexcept

Move assignment

Parameters
otherOther object

◆ set()

template<typename T >
void sptk::VariantData::set ( const T &  value)
inline

Set internal data

Parameters
valueInternal data

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

Fri Oct 14 2022 09:58:47: SPTK 5.4.1