libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | List of all members
qi::OptionalTypeInterfaceImpl< O > Class Template Reference

#include <optionaltypeinterface.hxx>

Public Types

using ValueType = typename O::value_type
 
using TypeMethodsImpl = DefaultTypeImplMethods< O, TypeByPointerPOD< O >>
 

Public Member Functions

 OptionalTypeInterfaceImpl ()
 
TypeInterfacevalueType () override
 Get the type of the optional element. More...
 
bool hasValue (void *storage) override
 Return true if the optional has a value, false if not. More...
 
AnyReference value (void *storage) override
 Get the optional value or a default constructed AnyReference if no value is set. More...
 
void set (void **storage, void *valueStorage) override
 Set the optional value. More...
 
void reset (void **storage) override
 Resets the optional value, making the optional empty. More...
 
- Public Member Functions inherited from qi::OptionalTypeInterface
TypeKind kind () override
 
- Public Member Functions inherited from qi::TypeInterface
virtual ~TypeInterface ()=default
 
virtual const TypeInfoinfo ()=0
 Get the TypeInfo corresponding to this type. More...
 
virtual void * initializeStorage (void *ptr=nullptr)=0
 
virtual void * ptrFromStorage (void **)=0
 
virtual void * clone (void *)=0
 Allocate a storage and copy the value given as an argument. More...
 
virtual void destroy (void *)=0
 Free all resources of a storage. More...
 
virtual bool less (void *a, void *b)=0
 
const char * infoString ()
 
qi::Signature signature (void *storage=nullptr, bool resolveDynamic=false)
 

Public Attributes

TypeInterface_valueType
 

Additional Inherited Members

- Static Public Member Functions inherited from qi::TypeInterface
static TypeInterfacefromSignature (const qi::Signature &sig)
 

Detailed Description

template<typename O>
class qi::OptionalTypeInterfaceImpl< O >

With Any T: (boost::optional<T> || std::optional<T>) O

Definition at line 29 of file optionaltypeinterface.hxx.

Member Typedef Documentation

Definition at line 41 of file optionaltypeinterface.hxx.

template<typename O>
using qi::OptionalTypeInterfaceImpl< O >::ValueType = typename O::value_type

Definition at line 32 of file optionaltypeinterface.hxx.

Constructor & Destructor Documentation

Definition at line 47 of file optionaltypeinterface.hxx.

Member Function Documentation

template<typename O >
bool qi::OptionalTypeInterfaceImpl< O >::hasValue ( void *  storage)
overridevirtual

Return true if the optional has a value, false if not.

Implements qi::OptionalTypeInterface.

Definition at line 59 of file optionaltypeinterface.hxx.

template<typename O >
void qi::OptionalTypeInterfaceImpl< O >::reset ( void **  storage)
overridevirtual

Resets the optional value, making the optional empty.

Implements qi::OptionalTypeInterface.

Definition at line 80 of file optionaltypeinterface.hxx.

template<typename O >
void qi::OptionalTypeInterfaceImpl< O >::set ( void **  storage,
void *  valueStorage 
)
overridevirtual

Set the optional value.

Implements qi::OptionalTypeInterface.

Definition at line 73 of file optionaltypeinterface.hxx.

template<typename O >
AnyReference qi::OptionalTypeInterfaceImpl< O >::value ( void *  storage)
overridevirtual

Get the optional value or a default constructed AnyReference if no value is set.

Implements qi::OptionalTypeInterface.

Definition at line 66 of file optionaltypeinterface.hxx.

template<typename O >
TypeInterface * qi::OptionalTypeInterfaceImpl< O >::valueType ( )
overridevirtual

Get the type of the optional element.

Implements qi::OptionalTypeInterface.

Definition at line 53 of file optionaltypeinterface.hxx.

Member Data Documentation

template<typename O>
TypeInterface* qi::OptionalTypeInterfaceImpl< O >::_valueType

Definition at line 43 of file optionaltypeinterface.hxx.


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