- 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 Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
qi::MetaObject Class Reference

Description of the signals and methods accessible on an ObjectTypeInterface. More...

`#include <metaobject.hpp>`

## Public Types
using | MethodMap = std::map< unsigned int, MetaMethod >
using | SignalMap = std::map< unsigned int, MetaSignal >
using | PropertyMap = std::map< unsigned int, MetaProperty >
using | CompatibleMethod = std::pair< MetaMethod, float >

## Public Member Functions
| MetaObject ()
| MetaObject (const MetaObject &other)
MetaObject & | operator= (const MetaObject &other)
| ~MetaObject ()
int | methodId (const std::string &nameWithSignature) const
int | signalId (const std::string &name) const
int | propertyId (const std::string &name) const
MethodMap | methodMap () const
SignalMap | signalMap () const
PropertyMap | propertyMap () const
MetaMethod * | method (unsigned int id)
const MetaMethod * | method (unsigned int id) const
MetaSignal * | signal (unsigned int id)
const MetaSignal * | signal (unsigned int id) const
const MetaSignal * | signal (const std::string &name) const
MetaProperty * | property (unsigned int id)
const MetaProperty * | property (unsigned int id) const
int | findMethod (const std::string &nameWithOptionalSignature, const GenericFunctionParameters &args, bool *canCache=0) const
std::vector< MetaMethod > | findMethod (const std::string &name) const
std::vector< CompatibleMethod > | findCompatibleMethod (const std::string &nameOrSignature) const
std::string | description () const
| MetaObject (const MethodMap &methodMap, const SignalMap &signalMap, const PropertyMap &propertyMap, const std::string &description)

## Static Public Member Functions
static bool | isPrivateMember (const std::string &name, unsigned int uid)
static qi::MetaObject | merge (const qi::MetaObject &source, const qi::MetaObject &dest)

## Public Attributes
MetaObjectPrivate * | _p

## Detailed Description

Description of the signals and methods accessible on an ObjectTypeInterface.

Definition at line 25 of file metaobject.hpp.

## Member Typedef Documentation

using qi::MetaObject::CompatibleMethod = std::pair<MetaMethod, float>

Definition at line 112 of file metaobject.hpp.

using qi::MetaObject::MethodMap = std::map<unsigned int, MetaMethod>

Definition at line 48 of file metaobject.hpp.

using qi::MetaObject::PropertyMap = std::map<unsigned int, MetaProperty>

Definition at line 61 of file metaobject.hpp.

using qi::MetaObject::SignalMap = std::map<unsigned int, MetaSignal>

Definition at line 55 of file metaobject.hpp.

## Constructor & Destructor Documentation

qi::MetaObject::MetaObject | ( |  | ) |

qi::MetaObject::MetaObject | ( | const MetaObject & | other | ) |

qi::MetaObject::~MetaObject | ( |  | ) |

qi::MetaObject::MetaObject | ( | const MethodMap & | methodMap,
|  | const SignalMap & | signalMap,
|  | const PropertyMap & | propertyMap,
|  | const std::string & | description
| ) |  |

## Member Function Documentation

std::string qi::MetaObject::description | ( |  | ) | const

Returns
  The object's description.

std::vector<CompatibleMethod> qi::MetaObject::findCompatibleMethod | ( | const std::string & | nameOrSignature | ) | const

Find all the methods compatible with nameOrSignature. If no signature is specified, the method relies on findMethod.

Parameters

  nameOrSignature | Either the name or the signature of the method.

Returns
  A vector containing all the compatible method and their associated compatibility's score.

int qi::MetaObject::findMethod | ( | const std::string & | nameWithOptionalSignature,
|  | const GenericFunctionParameters & | args,
|  | bool * | canCache = `0`
| ) |  | const

Find a method matching nameWithOptionalSignature that can be called with arguments args.

Returns
  The mathing method id, or -1 if none or an ambiguous set was found.

Warning
  This method optimises for speed at the expense of possible false positive: It returns a match as soon as there is only one possible candidate remaining, even though this candidate can prove later on to be incompatible with the arguments.

Parameters

  nameWithOptionalSignature | The method's name or its full signature.
  args | The parameters' type of the method.
  canCache | If set, will be filled with true if the returned method can be cached regardless of the arguments types (but not argument count), and false otherwise.

std::vector<MetaMethod> qi::MetaObject::findMethod | ( | const std::string & | name | ) | const

Parameters

  name | The exact method's name.

Returns
  A vector containing all the overloaded version of the method.

static bool qi::MetaObject::isPrivateMember | ( | const std::string & | name,
|  | unsigned int | uid
| ) |  |
| static

Parameters

  name | The member's name.
  uid | The uid's name.

Returns
  True if the member is considered internal, and should not be listed.

static qi::MetaObject qi::MetaObject::merge | ( | const qi::MetaObject & | source,
|  | const qi::MetaObject & | dest
| ) |  |
| static

Merge two MetaObject. Dest method and signal ids will be incremented by offset.

Parameters

  source | The source object.
  dest | The destination object.

Returns
  The merge's result of the two objects.

MetaMethod* qi::MetaObject::method | ( | unsigned int | id | ) |

Parameters

  id | The method's id.

Returns
  The desired method or null if the id is invalid.

const MetaMethod* qi::MetaObject::method | ( | unsigned int | id | ) | const

int qi::MetaObject::methodId | ( | const std::string & | nameWithSignature | ) | const

Parameters

  nameWithSignature | The complete full signature (name::signature) for example myMethod::(s).

Returns
  The method's id or -1 if the method wasn't found.

MethodMap qi::MetaObject::methodMap | ( |  | ) | const

Returns
  The map of all the methods.

MetaObject& qi::MetaObject::operator= | ( | const MetaObject & | other | ) |

MetaProperty* qi::MetaObject::property | ( | unsigned int | id | ) |

Parameters

  id | The property's id.

Returns
  The desired property of null if the id is invalid.

const MetaProperty* qi::MetaObject::property | ( | unsigned int | id | ) | const

int qi::MetaObject::propertyId | ( | const std::string & | name | ) | const

Parameters

  name | The property's name.

Returns
  The property's id or -1 if the property wasn't found.

PropertyMap qi::MetaObject::propertyMap | ( |  | ) | const

Returns
  The map of all the properties.

MetaSignal* qi::MetaObject::signal | ( | unsigned int | id | ) |

Parameters

  id | The signal's id.

Returns
  The desired signal or null if the id is invalid.

const MetaSignal* qi::MetaObject::signal | ( | unsigned int | id | ) | const

const MetaSignal* qi::MetaObject::signal | ( | const std::string & | name | ) | const

Parameters

  name | The name of the signal or its full signature.

Returns
  The desired signal or null if the signal wasn't found.

int qi::MetaObject::signalId | ( | const std::string & | name | ) | const

Parameters

  name | The name of the signal or its full signature.

Returns
  The signal's id or -1 if the signal wasn't found.

SignalMap qi::MetaObject::signalMap | ( |  | ) | const

Returns
  The map of all the signals.

## Member Data Documentation

MetaObjectPrivate* qi::MetaObject::_p

Definition at line 141 of file metaobject.hpp.

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

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