MinitScript  0.9.31 PRE-BETA
Library.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
7 
8 using std::string;
9 
12 
13 /**
14  * Script library
15  * @author Andreas Drewke
16  */
18 {
19 protected:
20  _Context* context { nullptr };
21 
22 public:
23  // forbid class copy
25 
26  /**
27  * Public constructor
28  * @param context context or nullptr
29  */
31 
32  /**
33  * @return context
34  */
35  inline _Context* getContext() {
36  return context;
37  }
38 
39  /**
40  * Set context
41  * @param context context
42  */
43  inline void setContext(_Context* context) {
44  this->context = context;
45  }
46 
47  /**
48  * Destructor
49  */
50  virtual ~Library();
51 
52  /**
53  * Load script from library
54  * @param pathName path name
55  * @param fileName file name
56  * @param basePathName base path name
57  * @return MinitScript script from library
58  */
59  virtual MinitScript* loadScript(const string& pathName, const string& fileName, const string& basePathName = string());
60 
61 };
void setContext(_Context *context)
Set context.
Definition: Library.h:43
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
#define _FORBID_CLASS_COPY(CLASS)
Definition: minitscript.h:9