|
libqi-api
release-2.5.3-2016-11-18
|
#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 | operator< (const Object &b) const |
| template<typename U > | |
| bool | operator!= (const Object< U > &b) const |
| template<typename U > | |
| bool | operator== (const Object< U > &b) const |
| operator bool () const | |
| operator Object< Empty > () 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 |
| ObjectTypeInterface * | interface () |
| 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 void | keepManagedObjectPtr (detail::ManagedObjectPtr ptr) |
| template<typename U > | |
| static void | keepReference (GenericObject *obj, boost::shared_ptr< U > ptr) |
| static void | noDeleteT (T *) |
| static void | noDelete (GenericObject *) |
| static void | deleteGenericObjectOnly (GenericObject *obj) |
| template<typename U > | |
| static void | deleteGenericObjectOnlyAndKeep (GenericObject *obj, U) |
| 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 221 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 240 of file object.hxx.
|
inline |
Definition at line 348 of file object.hxx.
Definition at line 352 of file object.hxx.
|
inline |
Definition at line 382 of file object.hxx.
|
inline |
Definition at line 445 of file object.hxx.
|
inline |
Definition at line 452 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 397 of file object.hxx.
|
inline |
Definition at line 431 of file object.hxx.
|
inline |
Definition at line 401 of file object.hxx.
|
inline |
Definition at line 436 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 405 of file object.hxx.
Definition at line 426 of file object.hxx.
| GenericObject * qi::Object< T >::asGenericObject | ( | ) | const |
Definition at line 530 of file object.hxx.
|
inline |
Definition at line 460 of file object.hxx.
| T & qi::Object< T >::asT | ( | ) | const |
Definition at line 513 of file object.hxx.
| void qi::Object< T >::checkT | ( | ) |
Check tha value actually has the T interface.
Definition at line 487 of file object.hxx.
|
inlinestatic |
Definition at line 289 of file object.hxx.
|
inlinestatic |
Definition at line 286 of file object.hxx.
|
inlinestatic |
Definition at line 288 of file object.hxx.
|
inline |
Definition at line 334 of file object.hxx.
|
inlinestatic |
Definition at line 280 of file object.hxx.
|
inlinestatic |
Definition at line 282 of file object.hxx.
|
inline |
Definition at line 295 of file object.hxx.
|
inlinestatic |
Definition at line 284 of file object.hxx.
|
inlinestatic |
Definition at line 283 of file object.hxx.
| qi::Object< T >::operator bool | ( | ) | const |
Definition at line 483 of file object.hxx.
| qi::Object< T >::operator Object< Empty > | ( | ) | const |
Definition at line 485 of file object.hxx.
| bool qi::Object< T >::operator!= | ( | const Object< U > & | b | ) | const |
Definition at line 475 of file object.hxx.
| T & qi::Object< T >::operator* | ( | ) | const |
Definition at line 522 of file object.hxx.
| T * qi::Object< T >::operator-> | ( | ) | const |
Definition at line 518 of file object.hxx.
|
inline |
Definition at line 474 of file object.hxx.
|
inline |
Definition at line 372 of file object.hxx.
|
inline |
Definition at line 387 of file object.hxx.
| bool qi::Object< T >::operator== | ( | const Object< U > & | b | ) | const |
Definition at line 479 of file object.hxx.
| void qi::Object< T >::reset | ( | ) |
Definition at line 534 of file object.hxx.
| bool qi::Object< T >::unique | ( | ) | const |
Definition at line 526 of file object.hxx.
|
inline |
Definition at line 274 of file object.hxx.
Definition at line 299 of file object.hxx.
|
friend |
Definition at line 297 of file object.hxx.
Definition at line 300 of file object.hxx.