- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
qi::DynamicObject Class Reference

`#include <dynamicobject.hpp>`

## Public Member Functions
| DynamicObject ()
virtual | ~DynamicObject ()
virtual void | setMetaObject (const MetaObject &mo)
| You must call DynamicObject::setMetaObject() if you overload this method. More...
MetaObject & | metaObject ()
void | setMethod (unsigned int id, AnyFunction callable, MetaCallType threadingModel=MetaCallType_Auto)
void | setSignal (unsigned int id, SignalBase *signal)
void | setProperty (unsigned int id, PropertyBase *property)
const AnyFunction & | method (unsigned int id) const
SignalBase * | signal (unsigned int id) const
PropertyBase * | property (unsigned int) const
boost::optional< ObjectUid > | uid () const
void | setUid (boost::optional< ObjectUid > newUid)
virtual qi::Future< AnyReference > | metaCall (AnyObject context, unsigned int method, const GenericFunctionParameters &params, MetaCallType callType=MetaCallType_Auto, Signature returnSignature=Signature())
virtual void | metaPost (AnyObject context, unsigned int event, const GenericFunctionParameters &params)
virtual qi::Future< SignalLink > | metaConnect (unsigned int event, const SignalSubscriber &subscriber)
| Calls given functor when event is fired. Takes ownership of functor. More...
virtual qi::Future< void > | metaDisconnect (SignalLink linkId)
| Disconnect an event link. Returns if disconnection was successful. More...
virtual qi::Future< AnyValue > | metaProperty (AnyObject context, unsigned int id)
virtual qi::Future< void > | metaSetProperty (AnyObject context, unsigned int id, AnyValue val)
void | setThreadingModel (ObjectThreadingModel model)
ObjectThreadingModel | threadingModel () const
void | setManageable (Manageable *m)

## Public Attributes
boost::shared_ptr < DynamicObjectPrivate > | _p

## Detailed Description

A Dynamic object is an object that handles all signal/method operation itself.

Signal handling: The default implementation is creating a SignalBase for each MetaSignal in the MetaObject, and bounces metaPost(), connect() and disconnect() to it.

Method handling: The default implementation holds a method list that the user must populate with setMethod()

Definition at line 36 of file dynamicobject.hpp.

## Constructor & Destructor Documentation

qi::DynamicObject::DynamicObject | ( |  | ) |

virtual qi::DynamicObject::~DynamicObject | ( |  | ) |
| virtual

## Member Function Documentation

virtual qi::Future<AnyReference> qi::DynamicObject::metaCall | ( | AnyObject | context,
|  | unsigned int | method,
|  | const GenericFunctionParameters & | params,
|  | MetaCallType | callType = `MetaCallType_Auto`,
|  | Signature | returnSignature = `Signature()`
| ) |  |
| virtual

virtual qi::Future<SignalLink> qi::DynamicObject::metaConnect | ( | unsigned int | event,
|  | const SignalSubscriber & | subscriber
| ) |  |
| virtual

Calls given functor when event is fired. Takes ownership of functor.

virtual qi::Future<void> qi::DynamicObject::metaDisconnect | ( | SignalLink | linkId | ) |
| virtual

Disconnect an event link. Returns if disconnection was successful.

MetaObject& qi::DynamicObject::metaObject | ( |  | ) |

virtual void qi::DynamicObject::metaPost | ( | AnyObject | context,
|  | unsigned int | event,
|  | const GenericFunctionParameters & | params
| ) |  |
| virtual

virtual qi::Future<AnyValue> qi::DynamicObject::metaProperty | ( | AnyObject | context,
|  | unsigned int | id
| ) |  |
| virtual

virtual qi::Future<void> qi::DynamicObject::metaSetProperty | ( | AnyObject | context,
|  | unsigned int | id,
|  | AnyValue | val
| ) |  |
| virtual

const AnyFunction& qi::DynamicObject::method | ( | unsigned int | id | ) | const

PropertyBase* qi::DynamicObject::property | ( | unsigned | int | ) | const

void qi::DynamicObject::setManageable | ( | Manageable * | m | ) |

virtual void qi::DynamicObject::setMetaObject | ( | const MetaObject & | mo | ) |
| virtual

You must call DynamicObject::setMetaObject() if you overload this method.

void qi::DynamicObject::setMethod | ( | unsigned int | id,
|  | AnyFunction | callable,
|  | MetaCallType | threadingModel = `MetaCallType_Auto`
| ) |  |

void qi::DynamicObject::setProperty | ( | unsigned int | id,
|  | PropertyBase * | property
| ) |  |

void qi::DynamicObject::setSignal | ( | unsigned int | id,
|  | SignalBase * | signal
| ) |  |

void qi::DynamicObject::setThreadingModel | ( | ObjectThreadingModel | model | ) |

void qi::DynamicObject::setUid | ( | boost::optional< ObjectUid > | newUid | ) |

SignalBase* qi::DynamicObject::signal | ( | unsigned int | id | ) | const

ObjectThreadingModel qi::DynamicObject::threadingModel | ( |  | ) | const

boost::optional<ObjectUid> qi::DynamicObject::uid | ( |  | ) | const

## Member Data Documentation

boost::shared_ptr<DynamicObjectPrivate> qi::DynamicObject::_p

Definition at line 73 of file dynamicobject.hpp.

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

- /home/opennao/work/release-2.8/sdk/libqi/qi/type/dynamicobject.hpp