ug4
|
This template class represents real c++ classes in the registry. More...
#include <class.h>
Public Member Functions | |
template<typename T > | |
ExportedClass< TClass > & | add_ (T t) |
ExportedClass< TClass > & | add_constructor () |
Make default constructor accessible. More... | |
template<typename TFunc > | |
ExportedClass< TClass > & | add_constructor (std::string paramInfos="", std::string tooltip="", std::string help="", std::string options="") |
constructor registration More... | |
template<typename TMethod > | |
ExportedClass< TClass > & | add_method (std::string methodName, TMethod func, std::string retValInfos="", std::string paramInfos="", std::string tooltip="", std::string help="") |
Method registration. More... | |
virtual const ClassNameNode & | class_name_node () const |
name node of class More... | |
virtual const std::vector< const char * > * | class_names () const |
class-hierarchy More... | |
ExportedClass (const std::string &name, const std::string &group, const std::string &tooltip) | |
virtual DeleteFunction | get_delete_function () const |
return pointer to the delete method More... | |
virtual const std::string & | group () const |
get groups More... | |
virtual bool | is_json_constructible () const |
is json constructible More... | |
virtual const std::string & | name () const |
name of class More... | |
virtual | ~ExportedClass () |
destructor More... | |
Public Member Functions inherited from ug::bridge::ExportedClassBaseImpl | |
virtual bool | construct_as_smart_pointer () const |
returns whether the class shall be wrapped in a SmartPtr on construction More... | |
virtual void | destroy (void *obj) const |
destructur for object More... | |
ExportedClassBaseImpl (const std::string &tooltip) | |
virtual const ExportedMethodGroup * | get_const_exported_method_group (const std::string &name) const |
virtual const ExportedMethod & | get_const_method (size_t i) const |
returns the first overload of an exported const function More... | |
virtual const ExportedMethodGroup & | get_const_method_group (size_t ind) const |
returns the i-th method group (all overloads of the i-th function) More... | |
virtual const ExportedMethod & | get_const_overload (size_t funcInd, size_t oInd) const |
returns the i-th overload of a const method More... | |
virtual const ExportedConstructor & | get_constructor (size_t i) const |
get exported constructor More... | |
virtual const ExportedMethodGroup * | get_exported_method_group (const std::string &name) const |
virtual const boost::optional< ExportedConstructor & > | get_json_constructor () const |
get constructor for construction from json More... | |
virtual const ExportedMethod & | get_method (size_t i) const |
returns the first overload of an exported function More... | |
virtual const ExportedMethodGroup & | get_method_group (size_t ind) const |
returns the i-th method group (all overloads of the i-th function) More... | |
virtual const ExportedMethod & | get_overload (size_t funcInd, size_t oInd) const |
returns the i-th overload of a method More... | |
virtual bool | is_instantiable () const |
is instantiable More... | |
virtual size_t | num_const_methods () const |
number of registered const-methods (overloads are not counted) More... | |
virtual size_t | num_const_overloads (size_t funcInd) const |
returns the number of overloads of a const method More... | |
virtual size_t | num_constructors () const |
number of registered constructors More... | |
virtual size_t | num_methods () const |
number of registered methods (overloads are not counted) More... | |
virtual size_t | num_overloads (size_t funcInd) const |
returns the number of overloads of a method More... | |
virtual void | set_construct_as_smart_pointer (bool enable) |
sets whether the class shall be wrapped in a SmartPtr More... | |
virtual const std::string & | tooltip () const |
tooltip More... | |
virtual | ~ExportedClassBaseImpl () |
destructor More... | |
Public Member Functions inherited from ug::bridge::IExportedClass | |
virtual bool | check_consistency () const |
returns false is consistency-check failed More... | |
virtual | ~IExportedClass () |
virtual destructor More... | |
Private Member Functions | |
ExportedClass () | |
ExportedClass (const ExportedClass &other) | |
Additional Inherited Members | |
Public Types inherited from ug::bridge::IExportedClass | |
typedef void(* | DeleteFunction) (const void *) |
Protected Types inherited from ug::bridge::ExportedClassBaseImpl | |
typedef void(* | DestructorFunc) (void *) |
Protected Member Functions inherited from ug::bridge::ExportedClassBaseImpl | |
bool | constmethodname_registered (const std::string &name) |
returns true if methodname is already used by a method in this class More... | |
bool | constructor_type_id_registered (size_t typeID) |
returns if a constructor overload is registered More... | |
ExportedMethodGroup * | get_const_exported_method_group (const std::string &name) |
ExportedMethodGroup * | get_exported_method_group (const std::string &name) |
bool | methodname_registered (const std::string &name) |
returns true if methodname is already used by a method in this class More... | |
Protected Attributes inherited from ug::bridge::ExportedClassBaseImpl | |
bool | m_constructAsSmartPtr |
DestructorFunc | m_destructor |
std::string | m_tooltip |
std::vector< ExportedMethodGroup * > | m_vConstMethod |
std::vector< ConstructorOverload > | m_vConstructor |
std::vector< ExportedMethodGroup * > | m_vMethod |
This template class represents real c++ classes in the registry.
|
inlineprivate |
|
private |
|
inline |
|
inlinevirtual |
destructor
|
inline |
|
inline |
Make default constructor accessible.
References ug::bridge::ExportedClassBaseImpl::m_destructor.
|
inline |
constructor registration
paramInfos | string documenting the parameters of the function seperate parameters with an # e.g. "x#y#z" (don't specify the type of the values) (optional) |
toolTip | small documentation for the function (optional) |
help | help string for the function |
options | style option of the constructor itself (for visualisation) |
References ug::bridge::ExportedClassBaseImpl::constructor_type_id_registered(), ug::bridge::ExportedConstructor::create_parameter_stack(), ug::bridge::ExportedClassBaseImpl::m_vConstructor, ug::bridge::ExportedClass< TClass >::name(), ug::bridge::ExportedClassBaseImpl::tooltip(), and UG_THROW_REGISTRY_ERROR.
|
inline |
Method registration.
methodName | the name of the method to appear in the registry |
func | pointer to the member function (e.g. &MyClass::my_method) |
retValInfos | string documenting what the function returns (optional) |
paramInfos | string documenting the parameters of the function seperate parameters with an # e.g. "x#y#z" (don't specify the type of the values) (optional) |
toolTip | small documentation for the function (optional) |
help | help string for the function |
References ug::bridge::ExportedMethodGroup::add_overload(), func(), ug::bridge::ExportedClassBaseImpl::get_const_exported_method_group(), ug::bridge::ExportedClassBaseImpl::get_exported_method_group(), ug::GetRegistryIdentifierMessage(), ug::IsValidRegistryIdentifier(), ug::bridge::ExportedClassBaseImpl::m_vConstMethod, ug::bridge::ExportedClassBaseImpl::m_vMethod, ug::bridge::ExportedClass< TClass >::name(), ug::bridge::ExportedClassBaseImpl::tooltip(), ug::TrimString(), and UG_THROW_REGISTRY_ERROR.
|
inlinevirtual |
name node of class
Implements ug::bridge::IExportedClass.
References ug::bridge::ClassNameProvider< TClass >::class_name_node().
|
inlinevirtual |
class-hierarchy
Implements ug::bridge::IExportedClass.
References ug::bridge::ClassNameProvider< TClass >::names().
|
inlinevirtual |
return pointer to the delete method
Implements ug::bridge::IExportedClass.
|
inlinevirtual |
get groups
Implements ug::bridge::IExportedClass.
References ug::bridge::ClassNameProvider< TClass >::group().
Referenced by ug::bridge::ExportedClass< TClass >::ExportedClass().
|
inlinevirtual |
is json constructible
Implements ug::bridge::IExportedClass.
|
inlinevirtual |
name of class
Implements ug::bridge::IExportedClass.
References ug::bridge::ClassNameProvider< TClass >::name().
Referenced by ug::bridge::ExportedClass< TClass >::add_constructor(), ug::bridge::ExportedClass< TClass >::add_method(), and ug::bridge::ExportedClass< TClass >::ExportedClass().