8 #ifndef BSCRIPT_EXECMODL_H 9 #define BSCRIPT_EXECMODL_H 11 #ifndef BSCRIPT_BOBJECT_H 19 #include "../clib/boostutils.h" 20 #include "../clib/compilerspecifics.h" 21 #include "../clib/maputil.h" 48 bool getParamImp(
unsigned param,
BObjectImp*& imp );
50 const String* getStringParam(
unsigned param );
51 void* getApplicPtrParam(
unsigned param,
const BApplicObjType* pointer_type );
53 bool getStringParam(
unsigned param,
const String*& pstr );
54 bool getRealParam(
unsigned param,
double& value );
55 bool getObjArrayParam(
unsigned param,
ObjArray*& pobjarr );
57 bool getParam(
unsigned param,
int& value );
58 bool getParam(
unsigned param,
int& value,
int maxval );
59 bool getParam(
unsigned param,
int& value,
int minval,
int maxval );
61 bool getParam(
unsigned param,
unsigned& value );
63 bool getParam(
unsigned param,
short& value );
64 bool getParam(
unsigned param,
short& value,
short maxval );
65 bool getParam(
unsigned param,
short& value,
short minval,
short maxval );
67 bool getParam(
unsigned param,
unsigned short& value );
68 bool getParam(
unsigned param,
unsigned short& value,
unsigned short maxval );
69 bool getParam(
unsigned param,
unsigned short& value,
unsigned short minval,
70 unsigned short maxval );
72 const std::string& scriptname()
const;
82 virtual int functionIndex(
const std::string& funcname ) = 0;
83 virtual BObjectImp* execFunc(
unsigned idx ) = 0;
84 virtual std::string functionName(
unsigned idx ) = 0;
112 using FunctionTable = std::vector<FunctionDef>;
119 virtual int functionIndex(
const std::string& funcname )
POL_OVERRIDE;
121 virtual std::string functionName(
unsigned idx )
POL_OVERRIDE;
156 T* derived =
static_cast<T*
>( this );
BObject *(ExecutorModule::* ExecutorModuleFn)()
static bool _func_map_init
virtual BObjectImp * execFunc(unsigned idx) POL_OVERRIDE
static FunctionTable function_table
BObjectImp *(T::* fptr)()
static std::map< std::string, int, Clib::ci_cmp_pred > _func_idx_map
TmplExecutorModule(const char *modname, Executor &exec)
virtual std::string functionName(unsigned idx) POL_OVERRIDE
virtual int functionIndex(const std::string &funcname) POL_OVERRIDE
BApplicObjBase * getApplicObjParam(unsigned param, const BApplicObjType *object_type)
boost_utils::function_name_flystring moduleName
TmplExecutorModule< AttributeExecutorModule >::FunctionTable function_table
BApplicObj< T > * getApplicObjParam(ExecutorModule &ex, unsigned param, const BApplicObjType *object_type)
boost::flyweight< std::string, boost::flyweights::tag< function_name_tag >, FLYWEIGHT_HASH_FACTORY > function_name_flystring