ug4
ug::bridge::ExportedClassBaseImpl Class Reference

A base implementation with non-template methods. More...

#include <class.h>

+ Inheritance diagram for ug::bridge::ExportedClassBaseImpl:

Classes

struct  ConstructorOverload
 

Public Member Functions

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 ExportedMethodGroupget_const_exported_method_group (const std::string &name) const
 
virtual const ExportedMethodget_const_method (size_t i) const
 returns the first overload of an exported const function More...
 
virtual const ExportedMethodGroupget_const_method_group (size_t ind) const
 returns the i-th method group (all overloads of the i-th function) More...
 
virtual const ExportedMethodget_const_overload (size_t funcInd, size_t oInd) const
 returns the i-th overload of a const method More...
 
virtual const ExportedConstructorget_constructor (size_t i) const
 get exported constructor More...
 
virtual const ExportedMethodGroupget_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 ExportedMethodget_method (size_t i) const
 returns the first overload of an exported function More...
 
virtual const ExportedMethodGroupget_method_group (size_t ind) const
 returns the i-th method group (all overloads of the i-th function) More...
 
virtual const ExportedMethodget_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 const ClassNameNodeclass_name_node () const =0
 name node of class More...
 
virtual const std::vector< const char * > * class_names () const =0
 name-list of class hierarchy More...
 
virtual DeleteFunction get_delete_function () const =0
 returns a function which will call delete on the object More...
 
virtual const std::string & group () const =0
 get groups More...
 
virtual bool is_json_constructible () const =0
 get constructor for construction from json More...
 
virtual const std::string & name () const =0
 name of class More...
 
virtual ~IExportedClass ()
 virtual destructor More...
 

Protected Types

typedef void(* DestructorFunc) (void *)
 

Protected Member Functions

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...
 
ExportedMethodGroupget_const_exported_method_group (const std::string &name)
 
ExportedMethodGroupget_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

bool m_constructAsSmartPtr
 
DestructorFunc m_destructor
 
std::string m_tooltip
 
std::vector< ExportedMethodGroup * > m_vConstMethod
 
std::vector< ConstructorOverloadm_vConstructor
 
std::vector< ExportedMethodGroup * > m_vMethod
 

Private Member Functions

 ExportedClassBaseImpl ()
 
 ExportedClassBaseImpl (const ExportedClassBaseImpl &other)
 

Additional Inherited Members

- Public Types inherited from ug::bridge::IExportedClass
typedef void(* DeleteFunction) (const void *)
 

Detailed Description

A base implementation with non-template methods.

Speeds up compilation times.

Member Typedef Documentation

◆ DestructorFunc

typedef void(* ug::bridge::ExportedClassBaseImpl::DestructorFunc) (void *)
protected

Constructor & Destructor Documentation

◆ ExportedClassBaseImpl() [1/3]

ug::bridge::ExportedClassBaseImpl::ExportedClassBaseImpl ( )
private

◆ ExportedClassBaseImpl() [2/3]

ug::bridge::ExportedClassBaseImpl::ExportedClassBaseImpl ( const ExportedClassBaseImpl other)
private

◆ ExportedClassBaseImpl() [3/3]

ug::bridge::ExportedClassBaseImpl::ExportedClassBaseImpl ( const std::string &  tooltip)

◆ ~ExportedClassBaseImpl()

ug::bridge::ExportedClassBaseImpl::~ExportedClassBaseImpl ( )
virtual

destructor

References m_vConstMethod, m_vConstructor, and m_vMethod.

Member Function Documentation

◆ constmethodname_registered()

bool ug::bridge::ExportedClassBaseImpl::constmethodname_registered ( const std::string &  name)
protected

returns true if methodname is already used by a method in this class

References m_vConstMethod, and ug::bridge::IExportedClass::name().

◆ construct_as_smart_pointer()

bool ug::bridge::ExportedClassBaseImpl::construct_as_smart_pointer ( ) const
virtual

returns whether the class shall be wrapped in a SmartPtr on construction

Implements ug::bridge::IExportedClass.

References m_constructAsSmartPtr.

◆ constructor_type_id_registered()

bool ug::bridge::ExportedClassBaseImpl::constructor_type_id_registered ( size_t  typeID)
protected

returns if a constructor overload is registered

References m_vConstructor.

Referenced by ug::bridge::ExportedClass< TClass >::add_constructor().

◆ destroy()

void ug::bridge::ExportedClassBaseImpl::destroy ( void *  obj) const
virtual

destructur for object

Implements ug::bridge::IExportedClass.

References m_destructor.

◆ get_const_exported_method_group() [1/2]

ExportedMethodGroup * ug::bridge::ExportedClassBaseImpl::get_const_exported_method_group ( const std::string &  name)
protected

◆ get_const_exported_method_group() [2/2]

const ExportedMethodGroup * ug::bridge::ExportedClassBaseImpl::get_const_exported_method_group ( const std::string &  name) const
virtual

◆ get_const_method()

const ExportedMethod & ug::bridge::ExportedClassBaseImpl::get_const_method ( size_t  i) const
virtual

returns the first overload of an exported const function

Implements ug::bridge::IExportedClass.

References m_vConstMethod.

◆ get_const_method_group()

const ExportedMethodGroup & ug::bridge::ExportedClassBaseImpl::get_const_method_group ( size_t  ind) const
virtual

returns the i-th method group (all overloads of the i-th function)

Implements ug::bridge::IExportedClass.

References m_vConstMethod.

◆ get_const_overload()

const ExportedMethod & ug::bridge::ExportedClassBaseImpl::get_const_overload ( size_t  funcInd,
size_t  oInd 
) const
virtual

returns the i-th overload of a const method

Implements ug::bridge::IExportedClass.

References m_vConstMethod.

◆ get_constructor()

const ExportedConstructor & ug::bridge::ExportedClassBaseImpl::get_constructor ( size_t  i) const
virtual

get exported constructor

Implements ug::bridge::IExportedClass.

References m_vConstructor.

◆ get_exported_method_group() [1/2]

ExportedMethodGroup * ug::bridge::ExportedClassBaseImpl::get_exported_method_group ( const std::string &  name)
protected

◆ get_exported_method_group() [2/2]

const ExportedMethodGroup * ug::bridge::ExportedClassBaseImpl::get_exported_method_group ( const std::string &  name) const
virtual

◆ get_json_constructor()

const boost::optional< ExportedConstructor & > ug::bridge::ExportedClassBaseImpl::get_json_constructor ( ) const
virtual

get constructor for construction from json

Implements ug::bridge::IExportedClass.

References ug::GetUniqueTypeID(), ug::bridge::IExportedClass::is_json_constructible(), and m_vConstructor.

◆ get_method()

const ExportedMethod & ug::bridge::ExportedClassBaseImpl::get_method ( size_t  i) const
virtual

returns the first overload of an exported function

Implements ug::bridge::IExportedClass.

References m_vMethod.

◆ get_method_group()

const ExportedMethodGroup & ug::bridge::ExportedClassBaseImpl::get_method_group ( size_t  ind) const
virtual

returns the i-th method group (all overloads of the i-th function)

Implements ug::bridge::IExportedClass.

References m_vMethod.

◆ get_overload()

const ExportedMethod & ug::bridge::ExportedClassBaseImpl::get_overload ( size_t  funcInd,
size_t  oInd 
) const
virtual

returns the i-th overload of a method

Implements ug::bridge::IExportedClass.

References m_vMethod.

◆ is_instantiable()

bool ug::bridge::ExportedClassBaseImpl::is_instantiable ( ) const
virtual

is instantiable

Implements ug::bridge::IExportedClass.

References m_vConstructor.

◆ methodname_registered()

bool ug::bridge::ExportedClassBaseImpl::methodname_registered ( const std::string &  name)
protected

returns true if methodname is already used by a method in this class

References m_vMethod, and ug::bridge::IExportedClass::name().

◆ num_const_methods()

size_t ug::bridge::ExportedClassBaseImpl::num_const_methods ( ) const
virtual

number of registered const-methods (overloads are not counted)

Implements ug::bridge::IExportedClass.

References m_vConstMethod.

◆ num_const_overloads()

size_t ug::bridge::ExportedClassBaseImpl::num_const_overloads ( size_t  funcInd) const
virtual

returns the number of overloads of a const method

Implements ug::bridge::IExportedClass.

References m_vConstMethod.

◆ num_constructors()

size_t ug::bridge::ExportedClassBaseImpl::num_constructors ( ) const
virtual

number of registered constructors

Implements ug::bridge::IExportedClass.

References m_vConstructor.

◆ num_methods()

size_t ug::bridge::ExportedClassBaseImpl::num_methods ( ) const
virtual

number of registered methods (overloads are not counted)

Implements ug::bridge::IExportedClass.

References m_vMethod.

◆ num_overloads()

size_t ug::bridge::ExportedClassBaseImpl::num_overloads ( size_t  funcInd) const
virtual

returns the number of overloads of a method

Implements ug::bridge::IExportedClass.

References m_vMethod.

◆ set_construct_as_smart_pointer()

void ug::bridge::ExportedClassBaseImpl::set_construct_as_smart_pointer ( bool  enable)
virtual

sets whether the class shall be wrapped in a SmartPtr

Returns a reference to this, so that it can be used in a chained call.

References m_constructAsSmartPtr.

◆ tooltip()

const std::string & ug::bridge::ExportedClassBaseImpl::tooltip ( ) const
virtual

Member Data Documentation

◆ m_constructAsSmartPtr

bool ug::bridge::ExportedClassBaseImpl::m_constructAsSmartPtr
protected

◆ m_destructor

DestructorFunc ug::bridge::ExportedClassBaseImpl::m_destructor
protected

◆ m_tooltip

std::string ug::bridge::ExportedClassBaseImpl::m_tooltip
protected

Referenced by tooltip().

◆ m_vConstMethod

◆ m_vConstructor

◆ m_vMethod


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