libqi-api
2.8.7.4
|
#include <structtypeinterface.hxx>
Public Types | |
using | Methods = DefaultTypeImplMethods< std::pair< F, S >, TypeByPointerPOD< std::pair< F, S >>> |
using | BackendType = typename std::pair< F, S > |
Public Member Functions | |
TypeImpl () | |
std::vector< TypeInterface * > | memberTypes () override |
void * | get (void *storage, unsigned int index) override |
Get the field storage at index (not a copy) More... | |
void | set (void **storage, unsigned int index, void *valStorage) override |
Set the fields of the struct at index (copies the value given) More... | |
_QI_BOUNCE_TYPE_METHODS (Methods) | |
![]() | |
AnyReferenceVector | values (void *storage) |
Get all the fields of the structure. More... | |
virtual std::vector< void * > | get (void *storage) |
Get all the fields storages of the struct (not a copy) More... | |
virtual void | set (void **storage, const std::vector< void * > &) |
Set all the fields of the struct (copies the values given in the vector) More... | |
TypeKind | kind () override |
virtual std::vector< std::string > | elementsName () |
Get the names of the fields of the struct. More... | |
virtual std::string | className () |
Get the type name of the struct. More... | |
virtual bool | convertFrom (std::map< std::string,::qi::AnyValue > &fields, const std::vector< std::tuple< std::string, TypeInterface * >> &missing, const std::map< std::string,::qi::AnyReference > &dropfields) |
Fill missing fields caused by conversion from a different struct. Return whether fill succeeded. More... | |
virtual bool | convertTo (std::map< std::string,::qi::AnyValue > &fields, const std::vector< std::tuple< std::string, TypeInterface * >> &missing, const std::map< std::string,::qi::AnyReference > &dropfields) |
Fill missing fields caused by conversion to a different struct. Return whether fill succeeded. More... | |
![]() | |
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 | |
std::vector< TypeInterface * > | _memberTypes |
Additional Inherited Members | |
![]() | |
static TypeInterface * | fromSignature (const qi::Signature &sig) |
Definition at line 567 of file structtypeinterface.hxx.
using qi::TypeImpl< std::pair< F, S > >::BackendType = typename std::pair<F, S> |
Definition at line 571 of file structtypeinterface.hxx.
using qi::TypeImpl< std::pair< F, S > >::Methods = DefaultTypeImplMethods<std::pair<F, S>, TypeByPointerPOD<std::pair<F,S>>> |
Definition at line 570 of file structtypeinterface.hxx.
|
inline |
Definition at line 572 of file structtypeinterface.hxx.
qi::TypeImpl< std::pair< F, S > >::_QI_BOUNCE_TYPE_METHODS | ( | Methods | ) |
|
inlineoverridevirtual |
Get the field storage at index (not a copy)
Implements qi::StructTypeInterface.
Definition at line 580 of file structtypeinterface.hxx.
|
inlineoverridevirtual |
Get all the member types
Note that this function does not recieve a storage argument. There must be one instance of StructTypeInterface per type of struct. If you need dynamic structs, look at makeTupleType().
Implements qi::StructTypeInterface.
Definition at line 579 of file structtypeinterface.hxx.
|
inlineoverridevirtual |
Set the fields of the struct at index (copies the value given)
Implements qi::StructTypeInterface.
Definition at line 589 of file structtypeinterface.hxx.
std::vector<TypeInterface*> qi::TypeImpl< std::pair< F, S > >::_memberTypes |
Definition at line 577 of file structtypeinterface.hxx.