This builder is used to register C++ objects to the type system.
Global Classes
class qi::ObjectTypeBuilder
To use it, instanciate it, register all the members of your class and call
registerType.
qi::ObjectTypeBuilder<MyClass> builder;
builder.advertise("doSomething", &MyClass::doSomething);
builder.advertise("signal", &MyClass::signal);
builder.advertise("property", &MyClass::property);
builder.registerType();
Look at the type registering guide for a more complete example, and support for overloaded functions.
ObjectTypeBuilder(bool autoRegister)inherits()advertiseMethod(const std::string& name, FUNCTION_TYPE function, MetaCallType threadingModel, int id)advertiseMethod(MetaMethodBuilder& name, FUNCTION_TYPE function, MetaCallType threadingModel, int id)registerType()object(T* ptr, boost::function<void(GenericObject*)> onDestroy)qi::ObjectTypeBuilder<T>::ObjectTypeBuilder(bool autoRegister = true)¶qi::ObjectTypeBuilder<T>::inherits()¶Declare that T inherits from U.
qi::ObjectTypeBuilder<T>::advertiseMethod(const std::string& name, FUNCTION_TYPE function, MetaCallType threadingModel = MetaCallType_Auto, int id = -1)¶qi::ObjectTypeBuilder<T>::advertiseMethod(MetaMethodBuilder& name, FUNCTION_TYPE function, MetaCallType threadingModel = MetaCallType_Auto, int id = -1)¶qi::ObjectTypeBuilder<T>::registerType()¶Register type to typeOf<T>, to avoid both TypeImpl<T> and type() being present.
qi::ObjectTypeBuilder<T>::object(T* ptr, boost::function<void(GenericObject*)> onDestroy = boost::function< void(GenericObject *)¶