|
libqi-api
2.8.7.4
|
#include <object.hxx>
Public Types | |
| using | MaybeAnyObject = typename boost::mpl::if_< typename boost::is_same< T, Empty >::type, None, Object< Empty >>::type |
Public Member Functions | |
| Object () | |
| template<typename U > | |
| Object (const Object< U > &o) | |
| template<typename U > | |
| Object< T > & | operator= (const Object< U > &o) |
| Object (const Object &o) | |
| Object< T > & | operator= (const Object &o) |
| Object (const qi::Future< MaybeAnyObject > &fobj) | |
| Object (const qi::FutureSync< MaybeAnyObject > &fobj) | |
| template<typename U > | |
| Object (GenericObject *go, boost::shared_ptr< U > other) | |
| Shares ref counter with other, which must handle the destruction of go. More... | |
| template<typename U > | |
| Object (boost::shared_ptr< U > other) | |
| bool | isValid () const |
| operator bool () const | |
| operator Object< Empty > () const | |
| friend | KA_GENERATE_REGULAR_OP_GREATER (Object) friend KA_GENERATE_REGULAR_OP_LESS_OR_EQUAL(Object) friend KA_GENERATE_REGULAR_OP_GREATER_OR_EQUAL(Object) ObjectUid uid() const |
| PtrUid | ptrUid () const |
| boost::shared_ptr< T > | asSharedPtr () |
| T & | asT () const |
| T * | operator-> () const |
| T & | operator* () const |
| bool | unique () const |
| GenericObject * | asGenericObject () const |
| void | reset () |
| unsigned | use_count () const |
| void | checkT () |
| Check tha value actually has the T interface. More... | |
| detail::ManagedObjectPtr | managedObjectPtr () |
| Object (GenericObject *go) | |
| Object (T *ptr) | |
| Object (GenericObject *go, boost::function< void(GenericObject *)> deleter) | |
| Object (T *ptr, boost::function< void(T *)> deleter) | |
Public Member Functions inherited from qi::detail::GenericObjectBounce< Object< T > > | |
| const MetaObject & | metaObject () const |
| qi::Future< AnyReference > | metaCall (unsigned int method, const GenericFunctionParameters ¶ms, MetaCallType callType=MetaCallType_Auto, Signature returnSignature=Signature()) const |
| qi::Future< AnyReference > | metaCall (const std::string &nameWithOptionalSignature, const GenericFunctionParameters ¶ms, MetaCallType callType=MetaCallType_Auto, Signature returnSignature=Signature()) const |
| int | findMethod (const std::string &name, const GenericFunctionParameters ¶meters) const |
| void | metaPost (unsigned int event, const GenericFunctionParameters ¶ms) const |
| void | metaPost (const std::string &nameWithOptionalSignature, const GenericFunctionParameters &in) const |
| void | post (const std::string &eventName, Args &&...args) const |
| qi::FutureSync< SignalLink > | connect (const std::string &eventName, FUNCTOR_TYPE callback, MetaCallType threadingModel=MetaCallType_Auto) const |
| qi::FutureSync< SignalLink > | connect (const std::string &name, const SignalSubscriber &functor) const |
| qi::FutureSync< SignalLink > | connect (unsigned int signal, const SignalSubscriber &subscriber) const |
| qi::FutureSync< SignalLink > | connect (unsigned int signal, AnyObject target, unsigned int slot) const |
| qi::FutureSync< void > | disconnect (SignalLink linkId) const |
| qi::FutureSync< T > | property (const std::string &name) const |
| qi::FutureSync< AnyValue > | property (unsigned int id) const |
| qi::FutureSync< void > | setProperty (const std::string &name, const T &val) const |
| qi::FutureSync< void > | setProperty (unsigned int id, const AnyValue &val) const |
| ExecutionContext * | executionContext () const |
| bool | isStatsEnabled () const |
| void | enableStats (bool enable) const |
| ObjectStatistics | stats () const |
| void | clearStats () const |
| bool | isTraceEnabled () const |
| void | enableTrace (bool enable) |
| void | forceExecutionContext (boost::shared_ptr< qi::ExecutionContext > ec) |
| qi::Future< R > | async (const std::string &methodName, Args &&...args) const |
| R | call (const std::string &methodName, Args &&...args) const |
Static Public Member Functions | |
| static ObjectTypeInterface * | interface () |
| static void | keepManagedObjectPtr (detail::ManagedObjectPtr) |
| static void | noDeleteT (T *) |
| static void | noDelete (GenericObject *) |
| static void | deleteGenericObjectOnly (GenericObject *obj) |
| static void | deleteCustomDeleter (GenericObject *obj, boost::function< void(T *)> deleter) |
Friends | |
| class | GenericObject |
| template<typename > | |
| class | Object |
| template<typename > | |
| class | WeakObject |
Type erased object that has a known interface T.
In case T is unknown, you can use qi::AnyObject which aliases to Object<qi::Empty>.
You can then use the object with type-erasure or call the object directly using the operator ->.
Definition at line 243 of file object.hxx.
| using qi::Object< T >::MaybeAnyObject = typename boost::mpl::if_<typename boost::is_same<T, Empty>::type, None, Object<Empty>>::type |
Definition at line 262 of file object.hxx.
|
inline |
Definition at line 377 of file object.hxx.
Definition at line 381 of file object.hxx.
|
inline |
Definition at line 411 of file object.hxx.
|
inline |
Definition at line 536 of file object.hxx.
|
inline |
Definition at line 543 of file object.hxx.
|
inline |
These constructors take ownership of the underlying pointers. If a callback is given, it will be called instead of the default behavior of deleting the stored GenericObject and the underlying T object.
Definition at line 426 of file object.hxx.
|
inline |
Definition at line 522 of file object.hxx.
|
inline |
Definition at line 430 of file object.hxx.
|
inline |
Definition at line 527 of file object.hxx.
| qi::Object< T >::Object | ( | GenericObject< T > * | go, |
| boost::shared_ptr< U > | other | ||
| ) |
Shares ref counter with other, which must handle the destruction of go.
Definition at line 434 of file object.hxx.
Definition at line 516 of file object.hxx.
| GenericObject * qi::Object< T >::asGenericObject | ( | ) | const |
Definition at line 652 of file object.hxx.
|
inline |
Definition at line 551 of file object.hxx.
| T & qi::Object< T >::asT | ( | ) | const |
Definition at line 635 of file object.hxx.
| void qi::Object< T >::checkT | ( | ) |
Check tha value actually has the T interface.
Definition at line 604 of file object.hxx.
|
inlinestatic |
Definition at line 318 of file object.hxx.
|
inlinestatic |
Definition at line 316 of file object.hxx.
|
inlinestatic |
Definition at line 363 of file object.hxx.
| bool qi::Object< T >::isValid | ( | ) | const |
Definition at line 591 of file object.hxx.
| qi::Object< T >::KA_GENERATE_REGULAR_OP_GREATER | ( | Object< T > | ) | const |
The unique identifier of the object qi::Object's instance is refering to. Won't change if that instance travels through the network.
|
inlinestatic |
Definition at line 312 of file object.hxx.
|
inline |
Definition at line 324 of file object.hxx.
|
inlinestatic |
Definition at line 314 of file object.hxx.
|
inlinestatic |
Definition at line 313 of file object.hxx.
|
explicit |
Definition at line 597 of file object.hxx.
| qi::Object< T >::operator Object< Empty > | ( | ) | const |
Definition at line 602 of file object.hxx.
| T & qi::Object< T >::operator* | ( | ) | const |
Definition at line 644 of file object.hxx.
| T * qi::Object< T >::operator-> | ( | ) | const |
Definition at line 640 of file object.hxx.
|
inline |
Definition at line 401 of file object.hxx.
|
inline |
Definition at line 416 of file object.hxx.
|
inline |
Definition at line 296 of file object.hxx.
| void qi::Object< T >::reset | ( | ) |
Definition at line 656 of file object.hxx.
| bool qi::Object< T >::unique | ( | ) | const |
Definition at line 648 of file object.hxx.
|
inline |
Definition at line 306 of file object.hxx.
Definition at line 328 of file object.hxx.
|
friend |
Definition at line 326 of file object.hxx.
Definition at line 329 of file object.hxx.