libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
qi::ObjectTypeBuilder< T > Class Template Reference

#include <objecttypebuilder.hpp>

Public Member Functions

 ObjectTypeBuilder (bool autoRegister=true)
 
template<typename U >
void inherits ()
 
template<typename FUNCTION_TYPE >
unsigned int advertiseMethod (const std::string &name, FUNCTION_TYPE function, MetaCallType threadingModel=MetaCallType_Auto, int id=-1)
 
template<typename FUNCTION_TYPE >
unsigned int advertiseMethod (MetaMethodBuilder &name, FUNCTION_TYPE function, MetaCallType threadingModel=MetaCallType_Auto, int id=-1)
 
virtual void registerType ()
 Register type to typeOf<T>, to avoid both TypeImpl<T> and type() being present. More...
 
AnyObject object (T *ptr, boost::function< void(GenericObject *)> onDestroy=boost::function< void(GenericObject *)>())
 
- Public Member Functions inherited from qi::ObjectTypeBuilderBase
 ObjectTypeBuilderBase ()
 
 ~ObjectTypeBuilderBase ()
 
void setDescription (const std::string &description)
 Sets a description for the type to build. More...
 
template<typename T >
void buildFor (bool autoRegister=true)
 Declare the class type for which this StaticBuilder is. More...
 
template<typename FUNCTION_TYPE >
unsigned int advertiseMethod (const std::string &name, FUNCTION_TYPE function, MetaCallType threadingModel=MetaCallType_Auto, int id=-1)
 
template<typename FUNCTION_TYPE >
unsigned int advertiseMethod (MetaMethodBuilder &name, FUNCTION_TYPE function, MetaCallType threadingModel=MetaCallType_Auto, int id=-1)
 
template<typename A >
unsigned int advertiseSignal (const std::string &eventName, A accessor, int id=-1, bool isSignalProperty=false)
 
template<typename T >
unsigned int advertiseSignal (const std::string &name, SignalMemberGetter getter, int id=-1, bool isSignalProperty=false)
 
template<typename A >
unsigned int advertiseProperty (const std::string &propertyName, A accessor)
 
template<typename T >
unsigned int advertiseProperty (const std::string &eventName, PropertyMemberGetter getter)
 
template<typename T , typename... Args>
unsigned int advertiseFactory (const std::string &name)
 
template<typename P >
void inherits (std::ptrdiff_t offset)
 
template<typename T >
ObjectTypeBuilderBaseadvertise (const std::string &name, T element)
 
template<typename T >
unsigned int advertiseId (const std::string &name, T element)
 
unsigned int xAdvertiseMethod (MetaMethodBuilder &builder, AnyFunction func, MetaCallType threadingModel=MetaCallType_Auto, int id=-1)
 
unsigned int xAdvertiseSignal (const std::string &name, const qi::Signature &signature, SignalMemberGetter getter, int id=-1, bool isSignalProperty=false)
 
unsigned int xAdvertiseProperty (const std::string &name, const qi::Signature &signature, PropertyMemberGetter getter, int id=-1)
 
void xBuildFor (TypeInterface *type, bool autoRegister, qi::AnyFunction strandAccessor)
 
void inherits (TypeInterface *parentType, std::ptrdiff_t offset)
 
void setThreadingModel (ObjectThreadingModel model)
 
const MetaObjectmetaObject ()
 
AnyObject object (void *ptr, boost::function< void(GenericObject *)> onDestroy=boost::function< void(GenericObject *)>())
 
ObjectTypeInterfacetype ()
 
const detail::ObjectTypeDatatypeData ()
 

Additional Inherited Members

- Public Types inherited from qi::ObjectTypeBuilderBase
using SignalMemberGetter = boost::function< SignalBase *(void *)>
 
using PropertyMemberGetter = boost::function< PropertyBase *(void *)>
 

Detailed Description

template<typename T>
class qi::ObjectTypeBuilder< T >

Definition at line 115 of file objecttypebuilder.hpp.

Constructor & Destructor Documentation

template<typename T>
qi::ObjectTypeBuilder< T >::ObjectTypeBuilder ( bool  autoRegister = true)
inline

Definition at line 118 of file objecttypebuilder.hpp.

Member Function Documentation

template<typename T >
template<typename FUNCTION_TYPE >
unsigned int qi::ObjectTypeBuilder< T >::advertiseMethod ( const std::string &  name,
FUNCTION_TYPE  function,
MetaCallType  threadingModel = MetaCallType_Auto,
int  id = -1 
)
inline

Definition at line 121 of file objecttypebuilder.hxx.

template<typename T >
template<typename FUNCTION_TYPE >
unsigned int qi::ObjectTypeBuilder< T >::advertiseMethod ( MetaMethodBuilder name,
FUNCTION_TYPE  function,
MetaCallType  threadingModel = MetaCallType_Auto,
int  id = -1 
)
inline

Definition at line 136 of file objecttypebuilder.hxx.

template<typename T >
template<typename U >
void qi::ObjectTypeBuilder< T >::inherits ( )

Declare that T inherits from U.

Warning
If type U has registered methods,signals, properties, then inherits() must be called before registering anything on type T.

Definition at line 93 of file objecttypebuilder.hxx.

template<typename T >
AnyObject qi::ObjectTypeBuilder< T >::object ( T *  ptr,
boost::function< void(GenericObject *)>  onDestroy = boost::function<void (GenericObject*)>() 
)
inline

Definition at line 150 of file objecttypebuilder.hxx.

template<typename T >
void qi::ObjectTypeBuilder< T >::registerType ( )
inlinevirtual

Register type to typeOf<T>, to avoid both TypeImpl<T> and type() being present.

Reimplemented from qi::ObjectTypeBuilderBase.

Definition at line 157 of file objecttypebuilder.hxx.


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