2 #ifndef UGDK_SCRIPT_LANGWRAPPER_H_
3 #define UGDK_SCRIPT_LANGWRAPPER_H_
37 virtual void ExecuteCode(
const std::string& code) = 0;
42 const std::string&
lang_name()
const {
return lang_name_; }
48 template <
class loader_t>
51 const std::string file_extension_;
53 const std::string lang_name_;
56 file_extension_(file_extension),
88 template <
class loader_t>
89 class InheritableLangWrapper :
public LangWrapper {
98 if (module.
name().empty())
virtual VirtualData::Ptr NewData()=0
LangID lang_id()
Definition: langwrapper.h:41
Definition: animation.h:11
std::shared_ptr< VirtualData > Ptr
Definition: virtualdata.h:46
bool RegisterModule(const Module< loader_t > &module)
Definition: langwrapper.h:97
virtual VirtualObj LoadModule(const std::string &name)=0
const std::string & file_extension()
Definition: langwrapper.h:23
const std::string & name() const
Definition: module.h:15
std::vector< Module< loader_t > > modules_
Definition: langwrapper.h:107
virtual ~LangWrapper()
Definition: langwrapper.h:21
size_t LangID
Type used for script languages' IDs.
Definition: defs.h:26
virtual bool Initialize()=0
Initializes the LangWrapper.
const std::string & lang_name() const
Definition: langwrapper.h:42
Definition: langwrapper.h:17
A proxy class wich represents virtual objects from scripting languages.
Definition: virtualobj.h:30
virtual void Finalize()=0
Finalizes the LangWrapper, finalizing any language specific stuff.
InheritableLangWrapper(const std::string &file_extension, const LangID id, const std::string &name)
Definition: langwrapper.h:109
virtual void ExecuteCode(const std::string &code)=0
Wraps a scripting language.
Definition: script.h:15