|
libqi-api
release-2.5.3-2016-11-18
|
#include <genericobject.hpp>
Public Member Functions | |
| GenericObject (ObjectTypeInterface *type, void *value) | |
| ~GenericObject () | |
| const MetaObject & | metaObject () |
| template<typename R , typename... Args> | |
| R | call (const std::string &methodName, Args &&...args) |
| template<typename R , typename... Args> | |
| qi::Future< R > | async (const std::string &methodName, Args &&...args) |
| qi::Future< AnyReference > | metaCall (unsigned int method, const GenericFunctionParameters ¶ms, MetaCallType callType=MetaCallType_Auto, Signature returnSignature=Signature()) |
| int | findMethod (const std::string &name, const GenericFunctionParameters ¶meters) |
| qi::Future< AnyReference > | metaCall (const std::string &nameWithOptionalSignature, const GenericFunctionParameters ¶ms, MetaCallType callType=MetaCallType_Auto, Signature returnSignature=Signature()) |
| void | post (const std::string &eventName, qi::AutoAnyReference p1=qi::AutoAnyReference(), qi::AutoAnyReference p2=qi::AutoAnyReference(), qi::AutoAnyReference p3=qi::AutoAnyReference(), qi::AutoAnyReference p4=qi::AutoAnyReference(), qi::AutoAnyReference p5=qi::AutoAnyReference(), qi::AutoAnyReference p6=qi::AutoAnyReference(), qi::AutoAnyReference p7=qi::AutoAnyReference(), qi::AutoAnyReference p8=qi::AutoAnyReference()) |
| void | metaPost (unsigned int event, const GenericFunctionParameters ¶ms) |
| void | metaPost (const std::string &nameWithOptionalSignature, const GenericFunctionParameters &in) |
| template<typename FUNCTOR_TYPE > | |
| qi::FutureSync< SignalLink > | connect (const std::string &eventName, FUNCTOR_TYPE callback, MetaCallType threadingModel=MetaCallType_Direct) |
| qi::FutureSync< SignalLink > | connect (const std::string &name, const SignalSubscriber &functor) |
| qi::FutureSync< SignalLink > | connect (unsigned int signal, const SignalSubscriber &subscriber) |
| Calls given functor when event is fired. Takes ownership of functor. More... | |
| qi::FutureSync< SignalLink > | connect (unsigned int signal, AnyObject target, unsigned int slot) |
| qi::FutureSync< void > | disconnect (SignalLink linkId) |
| Disconnect an event link. Returns if disconnection was successful. More... | |
| template<typename T > | |
| qi::FutureSync< T > | property (const std::string &name) |
| template<typename T > | |
| qi::FutureSync< void > | setProperty (const std::string &name, const T &val) |
| qi::FutureSync< AnyValue > | property (unsigned int id) |
| qi::FutureSync< void > | setProperty (unsigned int id, const AnyValue &val) |
| bool | isValid () |
| template<typename FUNCTION_TYPE > | |
| qi::FutureSync< SignalLink > | connect (const std::string &eventName, FUNCTION_TYPE callback, MetaCallType model) |
Public Member Functions inherited from qi::Manageable | |
| virtual | ~Manageable () |
| boost::mutex & | initMutex () |
| void | forceExecutionContext (boost::shared_ptr< ExecutionContext > eventLoop) |
| Override all ThreadingModel and force dispatch to given event loop. More... | |
| boost::shared_ptr < ExecutionContext > | executionContext () const |
| int | _nextTraceId () |
| bool | isStatsEnabled () const |
| void | enableStats (bool enable) |
| Set statistics gathering status. More... | |
| void | pushStats (int slotId, float wallTime, float userTime, float systemTime) |
Push statistics information about slotId. More... | |
| ObjectStatistics | stats () const |
| void | clearStats () |
| Reset all statistical data. More... | |
| bool | isTraceEnabled () const |
| void | enableTrace (bool enable) |
Public Attributes | |
| ObjectTypeInterface * | type |
| void * | value |
Public Attributes inherited from qi::Manageable | |
| Signal< EventTrace > | traceObject |
| Emitted each time a call starts and finishes, and for each signal trigger. More... | |
Additional Inherited Members | |
Public Types inherited from qi::Manageable | |
| using | MethodMap = std::map< unsigned int, std::pair< AnyFunction, MetaCallType >> |
| using | SignalGetter = boost::function< SignalBase *(void *)> |
| using | SignalMap = std::map< unsigned int, SignalGetter > |
Static Public Member Functions inherited from qi::Manageable | |
| static MethodMap & | manageableMmethodMap () |
| static SignalMap & | manageableSignalMap () |
| static MetaObject & | manageableMetaObject () |
| static void | _build () |
Static Public Attributes inherited from qi::Manageable | |
| static const uint32_t | startId = 80 |
| Starting id of features handled by Manageable. More... | |
| static const uint32_t | endId = 99 |
| Stop id of features handled by Manageable. More... | |
Protected Member Functions inherited from qi::Manageable | |
| Manageable () | |
| Manageable (const Manageable &b) | |
| Manageable & | operator= (const Manageable &b) |
Definition at line 39 of file genericobject.hpp.
| qi::GenericObject::GenericObject | ( | ObjectTypeInterface * | type, |
| void * | value | ||
| ) |
| qi::GenericObject::~GenericObject | ( | ) |
| qi::Future< R > qi::GenericObject::async | ( | const std::string & | methodName, |
| Args &&... | args | ||
| ) |
Definition at line 174 of file genericobject.hpp.
| R qi::GenericObject::call | ( | const std::string & | methodName, |
| Args &&... | args | ||
| ) |
Definition at line 163 of file genericobject.hpp.
| qi::FutureSync<SignalLink> qi::GenericObject::connect | ( | const std::string & | eventName, |
| FUNCTOR_TYPE | callback, | ||
| MetaCallType | threadingModel = MetaCallType_Direct |
||
| ) |
Connect an event to an arbitrary callback.
If you are within a service, it is recommended that you connect the event to one of your Slots instead of using this method.
| qi::FutureSync<SignalLink> qi::GenericObject::connect | ( | const std::string & | name, |
| const SignalSubscriber & | functor | ||
| ) |
| qi::FutureSync<SignalLink> qi::GenericObject::connect | ( | unsigned int | signal, |
| const SignalSubscriber & | subscriber | ||
| ) |
Calls given functor when event is fired. Takes ownership of functor.
| qi::FutureSync<SignalLink> qi::GenericObject::connect | ( | unsigned int | signal, |
| AnyObject | target, | ||
| unsigned int | slot | ||
| ) |
Connect an event to a method. Recommended use is when target is not a proxy. If target is a proxy and this is server-side, the event will be registered localy and the call will be forwarded. If target and this are proxies, the message will be routed through the current process.
| qi::FutureSync<SignalLink> qi::GenericObject::connect | ( | const std::string & | eventName, |
| FUNCTION_TYPE | callback, | ||
| MetaCallType | model | ||
| ) |
Definition at line 136 of file genericobject.hpp.
| qi::FutureSync<void> qi::GenericObject::disconnect | ( | SignalLink | linkId | ) |
Disconnect an event link. Returns if disconnection was successful.
| int qi::GenericObject::findMethod | ( | const std::string & | name, |
| const GenericFunctionParameters & | parameters | ||
| ) |
Find method named name callable with arguments parameters
|
inline |
Definition at line 121 of file genericobject.hpp.
| qi::Future<AnyReference> qi::GenericObject::metaCall | ( | unsigned int | method, |
| const GenericFunctionParameters & | params, | ||
| MetaCallType | callType = MetaCallType_Auto, |
||
| Signature | returnSignature = Signature() |
||
| ) |
| qi::Future<AnyReference> qi::GenericObject::metaCall | ( | const std::string & | nameWithOptionalSignature, |
| const GenericFunctionParameters & | params, | ||
| MetaCallType | callType = MetaCallType_Auto, |
||
| Signature | returnSignature = Signature() |
||
| ) |
Resolve the method Id and bounces to metaCall
| nameWithOptionalSignature | method name or method signature 'name::(args)' if signature is given, an exact match is required |
| params | arguments to the call |
| callType | type of the call |
| returnSignature | force the method to return a type |
| const MetaObject& qi::GenericObject::metaObject | ( | ) |
| void qi::GenericObject::metaPost | ( | unsigned int | event, |
| const GenericFunctionParameters & | params | ||
| ) |
| void qi::GenericObject::metaPost | ( | const std::string & | nameWithOptionalSignature, |
| const GenericFunctionParameters & | in | ||
| ) |
| void qi::GenericObject::post | ( | const std::string & | eventName, |
| qi::AutoAnyReference | p1 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p2 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p3 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p4 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p5 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p6 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p7 = qi::AutoAnyReference(), |
||
| qi::AutoAnyReference | p8 = qi::AutoAnyReference() |
||
| ) |
| qi::FutureSync< T > qi::GenericObject::property | ( | const std::string & | name | ) |
Definition at line 187 of file genericobject.hpp.
| qi::FutureSync<AnyValue> qi::GenericObject::property | ( | unsigned int | id | ) |
| qi::FutureSync< void > qi::GenericObject::setProperty | ( | const std::string & | name, |
| const T & | val | ||
| ) |
Definition at line 200 of file genericobject.hpp.
| qi::FutureSync<void> qi::GenericObject::setProperty | ( | unsigned int | id, |
| const AnyValue & | val | ||
| ) |
| ObjectTypeInterface* qi::GenericObject::type |
Definition at line 122 of file genericobject.hpp.
| void* qi::GenericObject::value |
Definition at line 123 of file genericobject.hpp.