2016-01-28 14:52:40 +01:00
|
|
|
/** @file
|
|
|
|
|
*
|
|
|
|
|
* @par History
|
|
|
|
|
*/
|
2016-02-11 22:54:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "execmodl.h"
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
2018-01-29 21:55:48 +01:00
|
|
|
#include "executor.h"
|
|
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
namespace Pol
|
|
|
|
|
{
|
|
|
|
|
namespace Bscript
|
|
|
|
|
{
|
|
|
|
|
ExecutorModule::ExecutorModule( const char* moduleName, Executor& iExec )
|
|
|
|
|
: exec( iExec ), moduleName( moduleName )
|
|
|
|
|
{
|
|
|
|
|
}
|
2016-02-11 22:54:43 +01:00
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
BObjectImp* ExecutorModule::getParamImp( unsigned param )
|
|
|
|
|
{
|
|
|
|
|
return exec.getParamImp( param );
|
|
|
|
|
}
|
|
|
|
|
BObjectImp* ExecutorModule::getParamImp( unsigned param, BObjectImp::BObjectType type )
|
|
|
|
|
{
|
|
|
|
|
return exec.getParamImp( param, type );
|
|
|
|
|
}
|
|
|
|
|
bool ExecutorModule::getParamImp( unsigned param, BObjectImp*& imp )
|
|
|
|
|
{
|
|
|
|
|
imp = exec.getParamImp( param );
|
|
|
|
|
return imp != nullptr;
|
|
|
|
|
}
|
2016-02-11 22:54:43 +01:00
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
const String* ExecutorModule::getStringParam( unsigned param )
|
|
|
|
|
{
|
|
|
|
|
return exec.getStringParam( param );
|
|
|
|
|
}
|
|
|
|
|
void* ExecutorModule::getApplicPtrParam( unsigned param, const BApplicObjType* pointer_type )
|
|
|
|
|
{
|
|
|
|
|
return exec.getApplicPtrParam( param, pointer_type );
|
|
|
|
|
}
|
|
|
|
|
BApplicObjBase* ExecutorModule::getApplicObjParam( unsigned param,
|
|
|
|
|
const BApplicObjType* object_type )
|
|
|
|
|
{
|
|
|
|
|
return exec.getApplicObjParam( param, object_type );
|
|
|
|
|
}
|
|
|
|
|
bool ExecutorModule::getStringParam( unsigned param, const String*& pstr )
|
|
|
|
|
{
|
|
|
|
|
return exec.getStringParam( param, pstr );
|
|
|
|
|
}
|
2018-12-31 12:22:06 +01:00
|
|
|
bool ExecutorModule::getUnicodeStringParam( unsigned param, const String*& pstr )
|
|
|
|
|
{
|
|
|
|
|
return exec.getUnicodeStringParam( param, pstr );
|
|
|
|
|
}
|
2016-02-19 19:26:35 +01:00
|
|
|
bool ExecutorModule::getRealParam( unsigned param, double& value )
|
|
|
|
|
{
|
|
|
|
|
return exec.getRealParam( param, value );
|
|
|
|
|
}
|
|
|
|
|
bool ExecutorModule::getObjArrayParam( unsigned param, ObjArray*& pobjarr )
|
|
|
|
|
{
|
|
|
|
|
return exec.getObjArrayParam( param, pobjarr );
|
|
|
|
|
}
|
2016-02-11 22:54:43 +01:00
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
bool ExecutorModule::getParam( unsigned param, int& value )
|
|
|
|
|
{
|
|
|
|
|
return exec.getParam( param, value );
|
|
|
|
|
}
|
|
|
|
|
bool ExecutorModule::getParam( unsigned param, int& value, int maxval )
|
|
|
|
|
{
|
|
|
|
|
return exec.getParam( param, value, maxval );
|
|
|
|
|
}
|
|
|
|
|
bool ExecutorModule::getParam( unsigned param, int& value, int minval, int maxval )
|
|
|
|
|
{
|
|
|
|
|
return exec.getParam( param, value, minval, maxval );
|
|
|
|
|
}
|
2016-02-11 22:54:43 +01:00
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
bool ExecutorModule::getParam( unsigned param, unsigned& value )
|
|
|
|
|
{
|
|
|
|
|
return exec.getParam( param, value );
|
|
|
|
|
}
|
2016-02-11 22:54:43 +01:00
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
bool ExecutorModule::getParam( unsigned param, short& value )
|
|
|
|
|
{
|
|
|
|
|
return exec.getParam( param, value );
|
|
|
|
|
}
|
|
|
|
|
bool ExecutorModule::getParam( unsigned param, short& value, short maxval )
|
|
|
|
|
{
|
|
|
|
|
return exec.getParam( param, value, maxval );
|
|
|
|
|
}
|
|
|
|
|
bool ExecutorModule::getParam( unsigned param, short& value, short minval, short maxval )
|
|
|
|
|
{
|
|
|
|
|
return exec.getParam( param, value, minval, maxval );
|
|
|
|
|
}
|
2016-02-11 22:54:43 +01:00
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
bool ExecutorModule::getParam( unsigned param, unsigned short& value )
|
|
|
|
|
{
|
|
|
|
|
return exec.getParam( param, value );
|
|
|
|
|
}
|
|
|
|
|
bool ExecutorModule::getParam( unsigned param, unsigned short& value, unsigned short maxval )
|
|
|
|
|
{
|
|
|
|
|
return exec.getParam( param, value, maxval );
|
|
|
|
|
}
|
|
|
|
|
bool ExecutorModule::getParam( unsigned param, unsigned short& value, unsigned short minval,
|
|
|
|
|
unsigned short maxval )
|
|
|
|
|
{
|
|
|
|
|
return exec.getParam( param, value, minval, maxval );
|
|
|
|
|
}
|
2016-02-11 22:54:43 +01:00
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
const std::string& ExecutorModule::scriptname() const
|
|
|
|
|
{
|
|
|
|
|
return exec.prog_->name;
|
|
|
|
|
}
|
2019-02-01 23:18:43 +01:00
|
|
|
|
|
|
|
|
size_t ExecutorModule::sizeEstimate() const
|
|
|
|
|
{
|
|
|
|
|
return sizeof( *this );
|
2016-02-19 19:26:35 +01:00
|
|
|
}
|
2018-12-31 12:22:06 +01:00
|
|
|
} // namespace Bscript
|
|
|
|
|
} // namespace Pol
|