libqi-api
2.8.7.4
|
#include <typeinterface.hpp>
Public Member Functions | |
virtual TypeInterface * | valueType ()=0 |
Get the type of the optional element. More... | |
virtual bool | hasValue (void *storage)=0 |
Return true if the optional has a value, false if not. More... | |
virtual AnyReference | value (void *storage)=0 |
Get the optional value or a default constructed AnyReference if no value is set. More... | |
virtual void | set (void **storage, void *valueStorage)=0 |
Set the optional value. More... | |
virtual void | reset (void **storage)=0 |
Resets the optional value, making the optional empty. More... | |
TypeKind | kind () override |
![]() | |
virtual | ~TypeInterface ()=default |
virtual const TypeInfo & | info ()=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) |
Additional Inherited Members | |
![]() | |
static TypeInterface * | fromSignature (const qi::Signature &sig) |
Type that either is empty or contains a value.
Definition at line 334 of file typeinterface.hpp.
|
pure virtual |
Return true if the optional has a value, false if not.
Implemented in qi::OptionalTypeInterfaceImpl< O >, and qi::OptionalTypeInterfaceImpl< boost::optional< T > >.
|
inlineoverridevirtual |
Get the kind of the data.
This is used to downcast the TypeInterface object to a specialized interface.
Reimplemented from qi::TypeInterface.
Definition at line 347 of file typeinterface.hpp.
|
pure virtual |
Resets the optional value, making the optional empty.
Implemented in qi::OptionalTypeInterfaceImpl< O >, and qi::OptionalTypeInterfaceImpl< boost::optional< T > >.
|
pure virtual |
Set the optional value.
Implemented in qi::OptionalTypeInterfaceImpl< O >, and qi::OptionalTypeInterfaceImpl< boost::optional< T > >.
|
pure virtual |
Get the optional value or a default constructed AnyReference if no value is set.
Implemented in qi::OptionalTypeInterfaceImpl< O >, and qi::OptionalTypeInterfaceImpl< boost::optional< T > >.
|
pure virtual |
Get the type of the optional element.
Implemented in qi::OptionalTypeInterfaceImpl< O >, and qi::OptionalTypeInterfaceImpl< boost::optional< T > >.