- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

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 ()
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...
Public Member Functions inherited from qi::OptionalTypeInterface
TypeKind | kind () override
Public Member Functions inherited from qi::TypeInterface
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 Public Member Functions inherited from qi::TypeInterface
static TypeInterface * | fromSignature (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

template<typename O>

using qi::OptionalTypeInterfaceImpl< O >::TypeMethodsImpl = DefaultTypeImplMethods<O, TypeByPointerPOD<O>>

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

template<typename O >

qi::OptionalTypeInterfaceImpl< O >::OptionalTypeInterfaceImpl | ( |  | ) |

Definition at line 47 of file optionaltypeinterface.hxx.

## Member Function Documentation

template<typename O >

bool qi::OptionalTypeInterfaceImpl< O >::hasValue | ( | void * | storage | ) |
| override virtual

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 | ) |
| override virtual

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
| ) |  |
| override virtual

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 | ) |
| override virtual

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 | ( |  | ) |
| override virtual

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:

- /home/opennao/work/release-2.8/sdk/libqi/qi/type/detail/optionaltypeinterface.hxx