MinitScript  0.9.31 PRE-BETA
Library.cpp
Go to the documentation of this file.
2 
3 #include <memory>
4 #include <string>
5 
9 
10 using std::make_unique;
11 using std::string;
12 
16 
18  this->context = context;
19 }
20 
22 }
23 
24 MinitScript* _Library::loadScript(const string& pathName, const string& fileName, const string& basePathName) {
25  _Console::printLine("Library::loadScript(): " + pathName + "/" + fileName + (basePathName.empty() == false?"@" + basePathName:""));
26  auto script = make_unique<MinitScript>();
27  script->setContext(context);
28  script->setLibrary(this);
29  script->parseScript((basePathName.empty() == false?basePathName + "/":"") + pathName, fileName);
30  return script.release();
31 }
virtual ~Library()
Destructor.
Definition: Library.cpp:21
virtual MinitScript * loadScript(const string &pathName, const string &fileName, const string &basePathName=string())
Load script from library.
Definition: Library.cpp:24
Library(_Context *context)
Public constructor.
Definition: Library.cpp:17
static void printLine()
Print newline to console.
Definition: Console.cpp:66