cppexpose  1.0.0.b785e04f23b8
C++ library for type introspection, reflection, and scripting interface
Public Member Functions | List of all members
cppexpose::TypeInterface Class Referenceabstract

Base interface for accessing typed values. More...

#include <cppexpose/include/cppexpose/typed/TypeInterface.h>

Public Member Functions

 TypeInterface ()
 Constructor. More...
 
virtual ~TypeInterface ()
 Destructor. More...
 
virtual bool isEnum () const =0
 Check if value is of enum-type. More...
 
virtual bool isArray () const =0
 Check if value is of array-type. More...
 
virtual bool isVariant () const =0
 Check if value is of type cppexpose::Variant. More...
 
virtual bool isString () const =0
 Check if value is of type string. More...
 
virtual bool isBool () const =0
 Check if value is of type bool. More...
 
virtual bool isNumber () const =0
 Check if value is a number. More...
 
virtual bool isIntegral () const =0
 Check if value is an integral. More...
 
virtual bool isSignedIntegral () const =0
 Check if value is a signed integral. More...
 
virtual bool isUnsignedIntegral () const =0
 Check if value is an unsigned integral. More...
 
virtual bool isFloatingPoint () const =0
 Check if value is a floating point number. More...
 
virtual Variant toVariant () const =0
 Convert value into variant. More...
 
virtual bool fromVariant (const Variant &value)=0
 Set value from variant. More...
 
virtual std::string toString () const =0
 Convert value into string. More...
 
virtual bool fromString (const std::string &value)=0
 Set value from string. More...
 
virtual bool toBool () const =0
 Convert value into bool. More...
 
virtual bool fromBool (bool value)=0
 Set value from bool. More...
 
virtual long long toLongLong () const =0
 Convert value into long long. More...
 
virtual bool fromLongLong (long long value)=0
 Set value from long long. More...
 
virtual unsigned long long toULongLong () const =0
 Convert value into unsigned long long. More...
 
virtual bool fromULongLong (unsigned long long value)=0
 Set value from unsigned long long. More...
 
virtual double toDouble () const =0
 Convert value into double. More...
 
virtual bool fromDouble (double value)=0
 Set value from double. More...
 

Detailed Description

Base interface for accessing typed values.

This interface allows for accessing typed values and their possible conversions. It is used for both properties and variants.

Constructor & Destructor Documentation

cppexpose::TypeInterface::TypeInterface ( )

Constructor.

virtual cppexpose::TypeInterface::~TypeInterface ( )
virtual

Destructor.

Member Function Documentation

virtual bool cppexpose::TypeInterface::isEnum ( ) const
pure virtual

Check if value is of enum-type.

Returns
'true' if value is an enum, else 'false'
virtual bool cppexpose::TypeInterface::isArray ( ) const
pure virtual

Check if value is of array-type.

Returns
'true' if value is an array, else 'false'
virtual bool cppexpose::TypeInterface::isVariant ( ) const
pure virtual

Check if value is of type cppexpose::Variant.

Returns
'true' if value is a variant, else 'false'
virtual bool cppexpose::TypeInterface::isString ( ) const
pure virtual

Check if value is of type string.

Returns
'true' if value is a string, else 'false'
virtual bool cppexpose::TypeInterface::isBool ( ) const
pure virtual

Check if value is of type bool.

Returns
'true' if value is a bool, else 'false'
virtual bool cppexpose::TypeInterface::isNumber ( ) const
pure virtual

Check if value is a number.

Returns
'true' if value is a number, else 'false'
virtual bool cppexpose::TypeInterface::isIntegral ( ) const
pure virtual

Check if value is an integral.

Returns
'true' if value is a integral, else 'false'
virtual bool cppexpose::TypeInterface::isSignedIntegral ( ) const
pure virtual

Check if value is a signed integral.

Returns
'true' if value is a signed integral, else 'false'
virtual bool cppexpose::TypeInterface::isUnsignedIntegral ( ) const
pure virtual

Check if value is an unsigned integral.

Returns
'true' if value is an unsigned integral, else 'false'
virtual bool cppexpose::TypeInterface::isFloatingPoint ( ) const
pure virtual

Check if value is a floating point number.

Returns
'true' if value is a floating point number, else 'false'
virtual Variant cppexpose::TypeInterface::toVariant ( ) const
pure virtual

Convert value into variant.

Returns
Variant representation of the value
virtual bool cppexpose::TypeInterface::fromVariant ( const Variant &  value)
pure virtual

Set value from variant.

Parameters
[in]valueVariant value
Returns
'true' if value could be set, else 'false'
virtual std::string cppexpose::TypeInterface::toString ( ) const
pure virtual

Convert value into string.

Returns
String representation of the value
virtual bool cppexpose::TypeInterface::fromString ( const std::string &  value)
pure virtual

Set value from string.

Parameters
[in]valueString value
Returns
'true' if value could be set, else 'false'
virtual bool cppexpose::TypeInterface::toBool ( ) const
pure virtual

Convert value into bool.

Returns
Converted value
virtual bool cppexpose::TypeInterface::fromBool ( bool  value)
pure virtual

Set value from bool.

Parameters
[in]valueInput value
Returns
'true' if value could be set, else 'false'
virtual long long cppexpose::TypeInterface::toLongLong ( ) const
pure virtual

Convert value into long long.

Returns
Converted value
virtual bool cppexpose::TypeInterface::fromLongLong ( long long  value)
pure virtual

Set value from long long.

Parameters
[in]valueInput value
Returns
'true' if value could be set, else 'false'
virtual unsigned long long cppexpose::TypeInterface::toULongLong ( ) const
pure virtual

Convert value into unsigned long long.

Returns
Converted value
virtual bool cppexpose::TypeInterface::fromULongLong ( unsigned long long  value)
pure virtual

Set value from unsigned long long.

Parameters
[in]valueInput value
Returns
'true' if value could be set, else 'false'
virtual double cppexpose::TypeInterface::toDouble ( ) const
pure virtual

Convert value into double.

Returns
Converted value
virtual bool cppexpose::TypeInterface::fromDouble ( double  value)
pure virtual

Set value from double.

Parameters
[in]valueInput value
Returns
'true' if value could be set, else 'false'

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