libqi-api
2.8.7.4
|
#include <optionaltypeinterface.hxx>
Public Types | |
using | ValueType = typename O::value_type |
using | TypeMethodsImpl = DefaultTypeImplMethods< O, TypeByPointerPOD< O >> |
Public Member Functions | |
OptionalTypeInterfaceImpl () | |
TypeInterface * | valueType () 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... | |
![]() | |
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) |
Public Attributes | |
TypeInterface * | _valueType |
Additional Inherited Members | |
![]() | |
static TypeInterface * | fromSignature (const qi::Signature &sig) |
With Any T: (boost::optional<T> || std::optional<T>) O
Definition at line 29 of file optionaltypeinterface.hxx.
using qi::OptionalTypeInterfaceImpl< O >::TypeMethodsImpl = DefaultTypeImplMethods<O, TypeByPointerPOD<O>> |
Definition at line 41 of file optionaltypeinterface.hxx.
using qi::OptionalTypeInterfaceImpl< O >::ValueType = typename O::value_type |
Definition at line 32 of file optionaltypeinterface.hxx.
qi::OptionalTypeInterfaceImpl< O >::OptionalTypeInterfaceImpl | ( | ) |
Definition at line 47 of file optionaltypeinterface.hxx.
|
overridevirtual |
Return true if the optional has a value, false if not.
Implements qi::OptionalTypeInterface.
Definition at line 59 of file optionaltypeinterface.hxx.
|
overridevirtual |
Resets the optional value, making the optional empty.
Implements qi::OptionalTypeInterface.
Definition at line 80 of file optionaltypeinterface.hxx.
|
overridevirtual |
Set the optional value.
Implements qi::OptionalTypeInterface.
Definition at line 73 of file optionaltypeinterface.hxx.
|
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.
|
overridevirtual |
Get the type of the optional element.
Implements qi::OptionalTypeInterface.
Definition at line 53 of file optionaltypeinterface.hxx.
TypeInterface* qi::OptionalTypeInterfaceImpl< O >::_valueType |
Definition at line 43 of file optionaltypeinterface.hxx.