38 #include <boost/lexical_cast.hpp>
41 #define WF_RUNTIME_ENVIRONMENT(DESCRIPTION,CONFIG_SECTION,CONFIG_TITLE,CLASSDEF,CONFIGDEF,INITFUNCTION) \
43 class RuntimeEnvConstructor\
44 :public _Wolframe::module::RuntimeEnvironmentConstructor\
47 RuntimeEnvConstructor(){}\
48 virtual ~RuntimeEnvConstructor(){}\
49 virtual CLASSDEF* object( const _Wolframe::config::NamedConfiguration& cfgi)\
51 const CONFIGDEF* cfg = dynamic_cast<const CONFIGDEF*>(&cfgi);\
52 if (!cfg) throw std::logic_error( "internal: wrong configuration interface passed to runtime environment constructor " CONFIG_TITLE);\
53 CLASSDEF* rt = new CLASSDEF( cfg);\
56 virtual const char* objectClassName() const\
58 return CONFIG_TITLE "RuntimeEnvironment";\
60 virtual bool checkReferences( const _Wolframe::config::NamedConfiguration&, const _Wolframe::proc::ProcessorProviderInterface*) const\
65 class RuntimeEnvBuilder\
66 :public _Wolframe::module::ConfiguredBuilder\
70 :_Wolframe::module::ConfiguredBuilder( DESCRIPTION, CONFIG_SECTION, CONFIG_TITLE, CONFIG_TITLE "RuntimeEnvironment")\
73 if (0!=(err=INITFUNCTION())) throw std::runtime_error(std::string("failed to initialize runtime environment (error code ") + boost::lexical_cast<std::string>(err) + ")");\
75 virtual ~RuntimeEnvBuilder(){}\
76 virtual _Wolframe::ObjectConstructorBase::ObjectType objectType() const\
78 return _Wolframe::ObjectConstructorBase::RUNTIME_ENVIRONMENT_OBJECT;\
80 virtual _Wolframe::config::NamedConfiguration* configuration( const char* logPrefix)\
82 return new CONFIGDEF( CONFIG_TITLE "RuntimeEnvironment", m_title, logPrefix, m_keyword);\
84 virtual _Wolframe::ObjectConstructorBase* constructor()\
86 return new RuntimeEnvConstructor();\
91 static _Wolframe::module::BuilderBase* impl()\
93 return new RuntimeEnvBuilder();\
96 (*this)(&Constructor ::impl);\
Basic interface classes that to build objects and the Wolframe module interface.
Interface to processor provider for language bindings and database.
Interface to constructors of runtime environment for executing functions that need it...