qi::MetaObject, qi::MetaMethod, qi::MetaSignal, qi::MetaProperty

Reference

qi::MetaObject Class Reference

Introduction

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

Public Members

MetaObjectPrivate* _p

Public 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) 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)

Public Static Functions

bool isPrivateMember(const std::string& name, unsigned int uid)
qi::MetaObject merge(const qi::MetaObject& source, const qi::MetaObject& dest)

Types

typedef std::map< unsigned int, MetaMethod > MethodMap
typedef std::map< unsigned int, MetaSignal > SignalMap
typedef std::map< unsigned int, MetaProperty > PropertyMap
typedef std::pair< MetaMethod, float > CompatibleMethod

Detailed Description

Description of the signals and methods accessible on an ObjectTypeInterface.

Members Documentation

MetaObjectPrivate* qi::MetaObject::_p

Function Documentation

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

Brief:

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)

Brief:

Parameters:
  • source – The source object.
  • dest – The destination object.
Returns:

The merge’s result of the two objects.

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

qi::MetaObject::MetaObject()
qi::MetaObject::MetaObject(const MetaObject& other)
MetaObject& qi::MetaObject::operator=(const MetaObject& other)
qi::MetaObject::~MetaObject()
int qi::MetaObject::methodId(const std::string& nameWithSignature) const

Brief:

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.

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

Brief:

Parameters:
  • name – The name of the signal or its full signature.
Returns:

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

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

Brief:

Parameters:
  • name – The property’s name.
Returns:

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

MethodMap qi::MetaObject::methodMap() const

Brief:

Returns:The map of all the methods.
SignalMap qi::MetaObject::signalMap() const

Brief:

Returns:The map of all the signals.
PropertyMap qi::MetaObject::propertyMap() const

Brief:

Returns:The map of all the properties.
MetaMethod* qi::MetaObject::method(unsigned int id)

Brief:

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
MetaSignal* qi::MetaObject::signal(unsigned int id)

Brief:

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

Brief:

Parameters:
  • name – The name of the signal or its full signature.
Returns:

The desired signal or null if the signal wasn’t found.

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

Brief:

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::findMethod(const std::string& nameWithOptionalSignature, const GenericFunctionParameters& args, bool* canCache = 0) const

Brief:

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.
Returns:

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

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

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

Brief:

Parameters:
  • name – The exact method’s name.
Returns:

A vector containing all the overloaded version of the method.

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

Brief:

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.

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

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

Brief:

Returns:The object’s description.
qi::MetaObject::MetaObject(const MethodMap& methodMap, const SignalMap& signalMap, const PropertyMap& propertyMap, const std::string& description)

qi::MetaMethod Class Reference

Introduction

Representation of a method in an GenericObject. More...

Public Members

boost::shared_ptr<MetaMethodPrivate> _p

Public Functions

MetaMethod()
MetaMethod(unsigned int newUid, const MetaMethod& other)
unsigned int uid() const
const std::string& name() const
std::string toString() const
const Signature& parametersSignature() const
const Signature& returnSignature() const
std::string description() const
MetaMethodParameterVector parameters() const
std::string returnDescription() const
bool isPrivate() const
MetaMethod(unsigned int uid, const qi::Signature& returnSignature, const std::string& name, const qi::Signature& parametersSignature, const std::string& description, const MetaMethodParameterVector& parameters, const std::string& returnDescription)

Detailed Description

Representation of a method in an GenericObject.

Members Documentation

boost::shared_ptr<MetaMethodPrivate> qi::MetaMethod::_p

Function Documentation

qi::MetaMethod::MetaMethod()
qi::MetaMethod::MetaMethod(unsigned int newUid, const MetaMethod& other)
unsigned int qi::MetaMethod::uid() const
const std::string& qi::MetaMethod::name() const
std::string qi::MetaMethod::toString() const
const Signature& qi::MetaMethod::parametersSignature() const
const Signature& qi::MetaMethod::returnSignature() const
std::string qi::MetaMethod::description() const
MetaMethodParameterVector qi::MetaMethod::parameters() const
std::string qi::MetaMethod::returnDescription() const
bool qi::MetaMethod::isPrivate() const

return true if method is considered internal, and should not be listed

qi::MetaMethod::MetaMethod(unsigned int uid, const qi::Signature& returnSignature, const std::string& name, const qi::Signature& parametersSignature, const std::string& description, const MetaMethodParameterVector& parameters, const std::string& returnDescription)

qi::MetaSignal Class Reference

Introduction

Representation of a Signal in an GenericObject. More...

Public Functions

MetaSignal(unsigned int uid, const std::string& name, const qi::Signature& sig)
MetaSignal()
~MetaSignal()
const std::string& name() const
std::string toString() const
const Signature& parametersSignature() const
unsigned int uid() const
bool isPrivate() const

Detailed Description

Representation of a Signal in an GenericObject.

Function Documentation

qi::MetaSignal::MetaSignal(unsigned int uid, const std::string& name, const qi::Signature& sig)
qi::MetaSignal::MetaSignal()
qi::MetaSignal::~MetaSignal()
const std::string& qi::MetaSignal::name() const
std::string qi::MetaSignal::toString() const
const Signature& qi::MetaSignal::parametersSignature() const
unsigned int qi::MetaSignal::uid() const
bool qi::MetaSignal::isPrivate() const

return true if signal is considered internal, and should not be listed

qi::MetaProperty Class Reference

Introduction

More...

Public Functions

MetaProperty(unsigned int uid, const std::string& name, const qi::Signature& sig)
MetaProperty()
const std::string& name() const
const qi::Signature& signature() const
std::string toString() const
unsigned int uid() const
bool isPrivate() const

Detailed Description

Function Documentation

qi::MetaProperty::MetaProperty(unsigned int uid, const std::string& name, const qi::Signature& sig)
qi::MetaProperty::MetaProperty()
const std::string& qi::MetaProperty::name() const
const qi::Signature& qi::MetaProperty::signature() const
std::string qi::MetaProperty::toString() const
unsigned int qi::MetaProperty::uid() const
bool qi::MetaProperty::isPrivate() const

return true if property is considered internal, and should not be listed