ug4
ug::bridge::ParameterInfo Class Reference

a stack holding parameter infos about a parameter stack More...

#include <parameter_stack.h>

+ Inheritance diagram for ug::bridge::ParameterInfo:

Classes

struct  EntryType
 structure to store a data entry with additional information More...
 
struct  PushType
 
struct  PushType< bool >
 
struct  PushType< const char * >
 
struct  PushType< const std::string & >
 
struct  PushType< const std::vector< bool > & >
 
struct  PushType< const std::vector< const char * > & >
 
struct  PushType< const std::vector< const TClass * > & >
 
struct  PushType< const std::vector< ConstSmartPtr< TClass > > & >
 
struct  PushType< const std::vector< double > & >
 
struct  PushType< const std::vector< float > & >
 
struct  PushType< const std::vector< int > & >
 
struct  PushType< const std::vector< size_t > & >
 
struct  PushType< const std::vector< SmartPtr< TClass > > & >
 
struct  PushType< const std::vector< std::string > & >
 
struct  PushType< const std::vector< TClass * > & >
 
struct  PushType< const TClass & >
 
struct  PushType< const TClass * >
 
struct  PushType< ConstSmartPtr< TClass > >
 
struct  PushType< double >
 
struct  PushType< float >
 
struct  PushType< int >
 
struct  PushType< size_t >
 
struct  PushType< SmartPtr< TClass > >
 
struct  PushType< std::string >
 
struct  PushType< std::vector< bool > >
 
struct  PushType< std::vector< const char * > >
 
struct  PushType< std::vector< const TClass * > >
 
struct  PushType< std::vector< ConstSmartPtr< TClass > > >
 
struct  PushType< std::vector< double > >
 
struct  PushType< std::vector< float > >
 
struct  PushType< std::vector< int > >
 
struct  PushType< std::vector< size_t > >
 
struct  PushType< std::vector< SmartPtr< TClass > > >
 
struct  PushType< std::vector< std::string > >
 
struct  PushType< std::vector< TClass * > >
 
struct  PushType< TClass & >
 
struct  PushType< TClass * >
 

Public Member Functions

const char * class_name (int index) const
 returns the class name for an element in the param stack More...
 
const ClassNameNodeclass_name_node (int index) const
 returns the class name node for an element in the param stack More...
 
bool is_vector (int index) const
 returns if index is a std::vector More...
 
bool parameter_named (int index) const
 returns true if a parameter of the stack has been named by user More...
 
 ParameterInfo ()
 default constructor More...
 
template<typename T >
void push_type ()
 pushes a type to the parameter stack More...
 
int size () const
 returns number of parameters in the param stack More...
 
Variant::Type type (int index) const
 returns ParameterType enum of data type for a stack entry More...
 

Protected Member Functions

template<typename TType , typename TNode >
void _push_type ()
 
template<typename TNative >
void _push_type ()
 
template<typename TType , typename TNode >
void _push_vector_type ()
 
template<typename TNative >
void _push_vector_type ()
 

Static Protected Member Functions

static int ARRAY_INDEX_TO_STACK_INDEX (int index, int stackSize)
 help function to compute correct parameter index More...
 

Protected Attributes

int m_numEntries
 number of currently stored entries More...
 
EntryType m_vEntryType [PARAMETER_STACK_MAX_SIZE]
 

Static Protected Attributes

static const int PARAMETER_STACK_MAX_SIZE = UG_REGISTRY_MAX_NUM_ARGS
 maximal number of parameter in a parameter list More...
 

Detailed Description

a stack holding parameter infos about a parameter stack

This class is used to store type informations about the entries in a parameter list.

Note that the maximal number of parameters is specified by the constant PARAMETER_STACK_MAX_SIZE. Please note, that this value should not be unnecessarily high. The appropriate choice is UG_REGISTRY_MAX_NUM_ARGS, since the template-method-wrappers can't take any more parameters.

Supported types are bool, integer, number, const char*, std::string, reference, pointer and smart-pointer. References and pointers are stored in a void*. The user is responsible to associate the correct types.

Constructor & Destructor Documentation

◆ ParameterInfo()

ug::bridge::ParameterInfo::ParameterInfo ( )
inline

default constructor

Member Function Documentation

◆ _push_type() [1/2]

◆ _push_type() [2/2]

template<typename TNative >
void ug::bridge::ParameterInfo::_push_type ( )
inlineprotected

◆ _push_vector_type() [1/2]

template<typename TType , typename TNode >
void ug::bridge::ParameterInfo::_push_vector_type ( )
inlineprotected

References ug::bridge::ParameterInfo::EntryType::bVector, ug::bridge::ClassNameProvider< TClass >::class_name_node(), m_numEntries, m_vEntryType, ug::bridge::ParameterInfo::EntryType::pClassNameNode, and ug::bridge::ParameterInfo::EntryType::type.

Referenced by ug::bridge::ParameterInfo::PushType< std::vector< bool > >::push(), ug::bridge::ParameterInfo::PushType< std::vector< int > >::push(), ug::bridge::ParameterInfo::PushType< std::vector< size_t > >::push(), ug::bridge::ParameterInfo::PushType< std::vector< float > >::push(), ug::bridge::ParameterInfo::PushType< std::vector< double > >::push(), ug::bridge::ParameterInfo::PushType< std::vector< const char * > >::push(), ug::bridge::ParameterInfo::PushType< std::vector< std::string > >::push(), ug::bridge::ParameterInfo::PushType< const std::vector< bool > & >::push(), ug::bridge::ParameterInfo::PushType< const std::vector< int > & >::push(), ug::bridge::ParameterInfo::PushType< const std::vector< size_t > & >::push(), ug::bridge::ParameterInfo::PushType< const std::vector< float > & >::push(), ug::bridge::ParameterInfo::PushType< const std::vector< double > & >::push(), ug::bridge::ParameterInfo::PushType< const std::vector< const char * > & >::push(), ug::bridge::ParameterInfo::PushType< const std::vector< std::string > & >::push(), ug::bridge::ParameterInfo::PushType< std::vector< TClass * > >::push(), ug::bridge::ParameterInfo::PushType< const std::vector< TClass * > & >::push(), ug::bridge::ParameterInfo::PushType< std::vector< const TClass * > >::push(), ug::bridge::ParameterInfo::PushType< const std::vector< const TClass * > & >::push(), ug::bridge::ParameterInfo::PushType< std::vector< SmartPtr< TClass > > >::push(), ug::bridge::ParameterInfo::PushType< const std::vector< SmartPtr< TClass > > & >::push(), ug::bridge::ParameterInfo::PushType< std::vector< ConstSmartPtr< TClass > > >::push(), and ug::bridge::ParameterInfo::PushType< const std::vector< ConstSmartPtr< TClass > > & >::push().

◆ _push_vector_type() [2/2]

template<typename TNative >
void ug::bridge::ParameterInfo::_push_vector_type ( )
inlineprotected

◆ ARRAY_INDEX_TO_STACK_INDEX()

static int ug::bridge::ParameterInfo::ARRAY_INDEX_TO_STACK_INDEX ( int  index,
int  stackSize 
)
inlinestaticprotected

◆ class_name()

◆ class_name_node()

const ClassNameNode* ug::bridge::ParameterInfo::class_name_node ( int  index) const
inline

◆ is_vector()

◆ parameter_named()

bool ug::bridge::ParameterInfo::parameter_named ( int  index) const
inline

returns true if a parameter of the stack has been named by user

References class_name_node(), and ug::bridge::ClassNameNode::named().

Referenced by ug::bridge::ExportedConstructor::check_consistency(), and ug::bridge::ExportedFunctionBase::check_consistency().

◆ push_type()

template<typename T >
void ug::bridge::ParameterInfo::push_type ( )
inline

◆ size()

◆ type()

Member Data Documentation

◆ m_numEntries

◆ m_vEntryType

◆ PARAMETER_STACK_MAX_SIZE

const int ug::bridge::ParameterInfo::PARAMETER_STACK_MAX_SIZE = UG_REGISTRY_MAX_NUM_ARGS
staticprotected

maximal number of parameter in a parameter list


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