|
libqi-api
2.4.3.28
|
#include <object.hxx>
Public Types | |
| typedef boost::mpl::if_ < typename boost::is_same< T, Empty >::type, None, Object < Empty > >::type | MaybeAnyObject |
Public Member Functions | |
| Object () | |
| template<typename U > | |
| Object (const Object< U > &o) | |
| template<typename U > | |
| void | operator= (const Object< U > &o) |
| Object (const Object &o) | |
| void | 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 & | asT () const |
| T * | operator-> () |
| const T * | operator-> () 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, 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()) 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) |
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 210 of file object.hxx.
| typedef boost::mpl::if_<typename boost::is_same<T, Empty>::type, None, Object<Empty> >::type qi::Object< T >::MaybeAnyObject |
Definition at line 229 of file object.hxx.
|
inline |
Definition at line 341 of file object.hxx.
Definition at line 345 of file object.hxx.
|
inline |
Definition at line 373 of file object.hxx.
|
inline |
Definition at line 431 of file object.hxx.
|
inline |
Definition at line 438 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 383 of file object.hxx.
|
inline |
Definition at line 417 of file object.hxx.
|
inline |
Definition at line 387 of file object.hxx.
|
inline |
Definition at line 422 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 391 of file object.hxx.
Definition at line 412 of file object.hxx.
| GenericObject * qi::Object< T >::asGenericObject | ( | ) | const |
Definition at line 523 of file object.hxx.
|
inline |
Definition at line 446 of file object.hxx.
| T & qi::Object< T >::asT | ( | ) |
Definition at line 493 of file object.hxx.
| const T & qi::Object< T >::asT | ( | ) | const |
Definition at line 498 of file object.hxx.
| void qi::Object< T >::checkT | ( | ) |
Check tha value actually has the T interface.
Definition at line 473 of file object.hxx.
|
inlinestatic |
Definition at line 282 of file object.hxx.
|
inlinestatic |
Definition at line 279 of file object.hxx.
|
inlinestatic |
Definition at line 281 of file object.hxx.
|
inline |
Definition at line 327 of file object.hxx.
|
inlinestatic |
Definition at line 273 of file object.hxx.
|
inlinestatic |
Definition at line 275 of file object.hxx.
|
inline |
Definition at line 288 of file object.hxx.
|
inlinestatic |
Definition at line 277 of file object.hxx.
|
inlinestatic |
Definition at line 276 of file object.hxx.
| qi::Object< T >::operator bool | ( | ) | const |
Definition at line 469 of file object.hxx.
| qi::Object< T >::operator Object< Empty > | ( | ) | const |
Definition at line 471 of file object.hxx.
| bool qi::Object< T >::operator!= | ( | const Object< U > & | b | ) | const |
Definition at line 461 of file object.hxx.
| T & qi::Object< T >::operator* | ( | ) |
Definition at line 511 of file object.hxx.
| const T & qi::Object< T >::operator* | ( | ) | const |
Definition at line 515 of file object.hxx.
| T * qi::Object< T >::operator-> | ( | ) |
Definition at line 503 of file object.hxx.
| const T * qi::Object< T >::operator-> | ( | ) | const |
Definition at line 507 of file object.hxx.
|
inline |
Definition at line 460 of file object.hxx.
|
inline |
Definition at line 365 of file object.hxx.
|
inline |
Definition at line 378 of file object.hxx.
| bool qi::Object< T >::operator== | ( | const Object< U > & | b | ) | const |
Definition at line 465 of file object.hxx.
| void qi::Object< T >::reset | ( | ) |
Definition at line 527 of file object.hxx.
| bool qi::Object< T >::unique | ( | ) | const |
Definition at line 519 of file object.hxx.
|
inline |
Definition at line 267 of file object.hxx.
Definition at line 292 of file object.hxx.
|
friend |
Definition at line 290 of file object.hxx.
Definition at line 293 of file object.hxx.