libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
qi::detail::StaticObjectTypeBase Class Reference

#include <staticobjecttype.hpp>

Public Member Functions

void initialize (const MetaObject &mo, const ObjectTypeData &data)
 
const TypeInfoinfo () override
 Get the TypeInfo corresponding to this type. More...
 
const MetaObjectmetaObject (void *instance) override
 
ObjectUid uid (void *instance) const override
 
qi::Future< AnyReferencemetaCall (void *instance, AnyObject context, unsigned int method, const GenericFunctionParameters &params, MetaCallType callType, Signature returnSignature) override
 
void metaPost (void *instance, AnyObject context, unsigned int signal, const GenericFunctionParameters &params) override
 
qi::Future< SignalLinkconnect (void *instance, AnyObject context, unsigned int event, const SignalSubscriber &subscriber) override
 
qi::Future< void > disconnect (void *instance, AnyObject context, SignalLink linkId) override
 Disconnect an event link. Returns if disconnection was successful. More...
 
qi::Future< AnyValueproperty (void *instance, AnyObject context, unsigned int id) override
 
qi::Future< void > setProperty (void *instance, AnyObject context, unsigned int id, AnyValue value) override
 
const std::vector< std::pair
< TypeInterface
*, std::ptrdiff_t > > & 
parentTypes () override
 
void * initializeStorage (void *) override
 
void * ptrFromStorage (void **) override
 
void * clone (void *inst) override
 Allocate a storage and copy the value given as an argument. More...
 
void destroy (void *) override
 Free all resources of a storage. More...
 
bool less (void *a, void *b) override
 
- Public Member Functions inherited from qi::ObjectTypeInterface
virtual TypeKind kind ()
 
std::ptrdiff_t inherits (TypeInterface *other)
 
- Public Member Functions inherited from qi::TypeInterface
virtual ~TypeInterface ()=default
 
const char * infoString ()
 
qi::Signature signature (void *storage=nullptr, bool resolveDynamic=false)
 

Additional Inherited Members

- Static Public Member Functions inherited from qi::TypeInterface
static TypeInterfacefromSignature (const qi::Signature &sig)
 
- Static Public Attributes inherited from qi::ObjectTypeInterface
static const auto INHERITS_FAILED = PTRDIFF_MAX
 

Detailed Description

One instance of this class represents one C++ class

To avoid exposing this class, which means not being templated by the class type, we just store the two things we need in an erased way:

Definition at line 61 of file staticobjecttype.hpp.

Member Function Documentation

void* qi::detail::StaticObjectTypeBase::clone ( void *  )
overridevirtual

Allocate a storage and copy the value given as an argument.

Implements qi::TypeInterface.

qi::Future<SignalLink> qi::detail::StaticObjectTypeBase::connect ( void *  instance,
AnyObject  context,
unsigned int  event,
const SignalSubscriber &  subscriber 
)
overridevirtual
void qi::detail::StaticObjectTypeBase::destroy ( void *  )
overridevirtual

Free all resources of a storage.

Implements qi::TypeInterface.

qi::Future<void> qi::detail::StaticObjectTypeBase::disconnect ( void *  instance,
AnyObject  context,
SignalLink  linkId 
)
overridevirtual

Disconnect an event link. Returns if disconnection was successful.

Implements qi::ObjectTypeInterface.

const TypeInfo& qi::detail::StaticObjectTypeBase::info ( )
overridevirtual

Get the TypeInfo corresponding to this type.

Implements qi::TypeInterface.

void qi::detail::StaticObjectTypeBase::initialize ( const MetaObject mo,
const ObjectTypeData data 
)
void* qi::detail::StaticObjectTypeBase::initializeStorage ( void *  ptr)
overridevirtual

Initialize and return a new storage, from nothing or a T*.

If ptr is not null, it should be used as a storage (the method can usually just return ptr in that case).

Implements qi::TypeInterface.

bool qi::detail::StaticObjectTypeBase::less ( void *  a,
void *  b 
)
overridevirtual

Return true if a is less than b

Less must always work: compare pointers if you have to.

Implements qi::TypeInterface.

qi::Future<AnyReference> qi::detail::StaticObjectTypeBase::metaCall ( void *  instance,
AnyObject  context,
unsigned int  method,
const GenericFunctionParameters params,
MetaCallType  callType,
Signature  returnSignature 
)
overridevirtual
const MetaObject& qi::detail::StaticObjectTypeBase::metaObject ( void *  instance)
overridevirtual
void qi::detail::StaticObjectTypeBase::metaPost ( void *  instance,
AnyObject  context,
unsigned int  signal,
const GenericFunctionParameters params 
)
overridevirtual
const std::vector<std::pair<TypeInterface*, std::ptrdiff_t> >& qi::detail::StaticObjectTypeBase::parentTypes ( )
overridevirtual
Returns
parent types with associated pointer offset

Implements qi::ObjectTypeInterface.

qi::Future<AnyValue> qi::detail::StaticObjectTypeBase::property ( void *  instance,
AnyObject  context,
unsigned int  id 
)
overridevirtual
void* qi::detail::StaticObjectTypeBase::ptrFromStorage ( void **  )
overridevirtual

Get pointer to type from pointer to storage.

This allows for storing an integer value (for instance) directily into the pointer and avoid an allocation.

This method should be called on storage before casting it to a specific type.

Implements qi::TypeInterface.

qi::Future<void> qi::detail::StaticObjectTypeBase::setProperty ( void *  instance,
AnyObject  context,
unsigned int  id,
AnyValue  value 
)
overridevirtual
ObjectUid qi::detail::StaticObjectTypeBase::uid ( void *  instance) const
overridevirtual

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