Qpid C++ Messaging API  0.20
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
qpid::types::Variant Class Reference

#include <Variant.h>

Public Types

typedef std::map< std::string,
Variant
Map
 
typedef std::list< VariantList
 

Public Member Functions

QPID_TYPES_EXTERN Variant ()
 
QPID_TYPES_EXTERN Variant (bool)
 
QPID_TYPES_EXTERN Variant (uint8_t)
 
QPID_TYPES_EXTERN Variant (uint16_t)
 
QPID_TYPES_EXTERN Variant (uint32_t)
 
QPID_TYPES_EXTERN Variant (uint64_t)
 
QPID_TYPES_EXTERN Variant (int8_t)
 
QPID_TYPES_EXTERN Variant (int16_t)
 
QPID_TYPES_EXTERN Variant (int32_t)
 
QPID_TYPES_EXTERN Variant (int64_t)
 
QPID_TYPES_EXTERN Variant (float)
 
QPID_TYPES_EXTERN Variant (double)
 
QPID_TYPES_EXTERN Variant (const std::string &)
 
QPID_TYPES_EXTERN Variant (const char *)
 
QPID_TYPES_EXTERN Variant (const Map &)
 
QPID_TYPES_EXTERN Variant (const List &)
 
QPID_TYPES_EXTERN Variant (const Variant &)
 
QPID_TYPES_EXTERN Variant (const Uuid &)
 
QPID_TYPES_EXTERN ~Variant ()
 
QPID_TYPES_EXTERN VariantType getType () const
 
QPID_TYPES_EXTERN bool isVoid () const
 
QPID_TYPES_EXTERN Variantoperator= (bool)
 
QPID_TYPES_EXTERN Variantoperator= (uint8_t)
 
QPID_TYPES_EXTERN Variantoperator= (uint16_t)
 
QPID_TYPES_EXTERN Variantoperator= (uint32_t)
 
QPID_TYPES_EXTERN Variantoperator= (uint64_t)
 
QPID_TYPES_EXTERN Variantoperator= (int8_t)
 
QPID_TYPES_EXTERN Variantoperator= (int16_t)
 
QPID_TYPES_EXTERN Variantoperator= (int32_t)
 
QPID_TYPES_EXTERN Variantoperator= (int64_t)
 
QPID_TYPES_EXTERN Variantoperator= (float)
 
QPID_TYPES_EXTERN Variantoperator= (double)
 
QPID_TYPES_EXTERN Variantoperator= (const std::string &)
 
QPID_TYPES_EXTERN Variantoperator= (const char *)
 
QPID_TYPES_EXTERN Variantoperator= (const Map &)
 
QPID_TYPES_EXTERN Variantoperator= (const List &)
 
QPID_TYPES_EXTERN Variantoperator= (const Variant &)
 
QPID_TYPES_EXTERN Variantoperator= (const Uuid &)
 
QPID_TYPES_EXTERN Variantparse (const std::string &)
 
QPID_TYPES_EXTERN bool asBool () const
 
QPID_TYPES_EXTERN uint8_t asUint8 () const
 
QPID_TYPES_EXTERN uint16_t asUint16 () const
 
QPID_TYPES_EXTERN uint32_t asUint32 () const
 
QPID_TYPES_EXTERN uint64_t asUint64 () const
 
QPID_TYPES_EXTERN int8_t asInt8 () const
 
QPID_TYPES_EXTERN int16_t asInt16 () const
 
QPID_TYPES_EXTERN int32_t asInt32 () const
 
QPID_TYPES_EXTERN int64_t asInt64 () const
 
QPID_TYPES_EXTERN float asFloat () const
 
QPID_TYPES_EXTERN double asDouble () const
 
QPID_TYPES_EXTERN std::string asString () const
 
QPID_TYPES_EXTERN Uuid asUuid () const
 
QPID_TYPES_EXTERN operator bool () const
 
QPID_TYPES_EXTERN operator uint8_t () const
 
QPID_TYPES_EXTERN operator uint16_t () const
 
QPID_TYPES_EXTERN operator uint32_t () const
 
QPID_TYPES_EXTERN operator uint64_t () const
 
QPID_TYPES_EXTERN operator int8_t () const
 
QPID_TYPES_EXTERN operator int16_t () const
 
QPID_TYPES_EXTERN operator int32_t () const
 
QPID_TYPES_EXTERN operator int64_t () const
 
QPID_TYPES_EXTERN operator float () const
 
QPID_TYPES_EXTERN operator double () const
 
QPID_TYPES_EXTERN operator std::string () const
 
QPID_TYPES_EXTERN operator Uuid () const
 
QPID_TYPES_EXTERN const MapasMap () const
 
QPID_TYPES_EXTERN MapasMap ()
 
QPID_TYPES_EXTERN const ListasList () const
 
QPID_TYPES_EXTERN ListasList ()
 
QPID_TYPES_EXTERN const
std::string & 
getString () const
 
QPID_TYPES_EXTERN std::string & getString ()
 
QPID_TYPES_EXTERN void setEncoding (const std::string &)
 
QPID_TYPES_EXTERN const
std::string & 
getEncoding () const
 
QPID_TYPES_EXTERN bool isEqualTo (const Variant &a) const
 
QPID_TYPES_EXTERN void reset ()
 

Detailed Description

Represents a value of variable type.

Member Typedef Documentation

typedef std::list<Variant> qpid::types::Variant::List
typedef std::map<std::string, Variant> qpid::types::Variant::Map

Constructor & Destructor Documentation

QPID_TYPES_EXTERN qpid::types::Variant::Variant ( )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( bool  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( uint8_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( uint16_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( uint32_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( uint64_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( int8_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( int16_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( int32_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( int64_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( float  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( double  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( const std::string &  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( const char *  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( const Map )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( const List )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( const Variant )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( const Uuid )
QPID_TYPES_EXTERN qpid::types::Variant::~Variant ( )

Member Function Documentation

QPID_TYPES_EXTERN bool qpid::types::Variant::asBool ( ) const
QPID_TYPES_EXTERN double qpid::types::Variant::asDouble ( ) const
QPID_TYPES_EXTERN float qpid::types::Variant::asFloat ( ) const
QPID_TYPES_EXTERN int16_t qpid::types::Variant::asInt16 ( ) const
QPID_TYPES_EXTERN int32_t qpid::types::Variant::asInt32 ( ) const
QPID_TYPES_EXTERN int64_t qpid::types::Variant::asInt64 ( ) const
QPID_TYPES_EXTERN int8_t qpid::types::Variant::asInt8 ( ) const
QPID_TYPES_EXTERN const List& qpid::types::Variant::asList ( ) const
QPID_TYPES_EXTERN List& qpid::types::Variant::asList ( )
QPID_TYPES_EXTERN const Map& qpid::types::Variant::asMap ( ) const
QPID_TYPES_EXTERN Map& qpid::types::Variant::asMap ( )
QPID_TYPES_EXTERN std::string qpid::types::Variant::asString ( ) const
QPID_TYPES_EXTERN uint16_t qpid::types::Variant::asUint16 ( ) const
QPID_TYPES_EXTERN uint32_t qpid::types::Variant::asUint32 ( ) const
QPID_TYPES_EXTERN uint64_t qpid::types::Variant::asUint64 ( ) const
QPID_TYPES_EXTERN uint8_t qpid::types::Variant::asUint8 ( ) const
QPID_TYPES_EXTERN Uuid qpid::types::Variant::asUuid ( ) const
QPID_TYPES_EXTERN const std::string& qpid::types::Variant::getEncoding ( ) const
QPID_TYPES_EXTERN const std::string& qpid::types::Variant::getString ( ) const

Unlike asString(), getString() will not do any conversions and will throw InvalidConversion if the type is not STRING.

QPID_TYPES_EXTERN std::string& qpid::types::Variant::getString ( )
QPID_TYPES_EXTERN VariantType qpid::types::Variant::getType ( ) const
QPID_TYPES_EXTERN bool qpid::types::Variant::isEqualTo ( const Variant a) const
QPID_TYPES_EXTERN bool qpid::types::Variant::isVoid ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator bool ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator double ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator float ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator int16_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator int32_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator int64_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator int8_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator std::string ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator uint16_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator uint32_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator uint64_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator uint8_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator Uuid ( ) const
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( bool  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( uint8_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( uint16_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( uint32_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( uint64_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( int8_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( int16_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( int32_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( int64_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( float  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( double  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( const std::string &  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( const char *  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( const Map )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( const List )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( const Variant )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( const Uuid )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::parse ( const std::string &  )

Parses the argument and assigns itself the appropriate value. Recognises integers, doubles and booleans.

QPID_TYPES_EXTERN void qpid::types::Variant::reset ( )
QPID_TYPES_EXTERN void qpid::types::Variant::setEncoding ( const std::string &  )

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