![]() |
VR-Forces 4.0.4 Class Documentation
|
Script Repository for storing Lua scripts. More...
Public Member Functions | |
| DtScriptRepository () | |
| constructor | |
| virtual | ~DtScriptRepository () |
| destructor | |
| DtScriptRepository (const DtScriptRepository &orig) | |
| copy constructor | |
| DtScriptRepository & | operator= (const DtScriptRepository &orig) |
| assignment operator | |
| virtual bool | saveScripts (const DtFilename &filename) |
| Saves all the scripts to a file. All the scripts together will be saved. | |
| virtual bool | loadScripts (const DtFilename &filename) |
| Load all the scripts from a file. | |
| virtual DtString | getScript (const DtString &scriptName) |
| Get a loaded script by name if a script does not exits, returns the empty string. | |
| virtual bool | putScript (const DtString &scriptName, const DtString &script) |
| Add an individual script to the stored list. | |
| virtual bool | putScript (const DtString &scriptName, const DtFilename &filename) |
| Add an individual script to the stored list from a file. | |
| virtual bool | removeScript (const DtString &scriptName) |
| Remove an individual script from the stored list. | |
| virtual bool | existsScript (const DtString &scriptName) |
| Check if a script already exists in the list. | |
| virtual bool | compareScript (const DtString &scriptToCompare, const DtString &scriptName) |
| Compare a script with a stored script of a specific name. | |
| virtual std::list< DtString > | getStringList () |
| Get the entire list of strings available. | |
Protected Attributes | |
| std::map< DtString, DtString > | myScripts |
Script Repository for storing Lua scripts.
This controller provides the ability to manage Lua scripts inside an exercise. It compartamentalizes the scripts so that different scenarios do not
constructor
| virtual vrfLua::DtScriptRepository::~DtScriptRepository | ( | ) | [virtual] |
destructor
| vrfLua::DtScriptRepository::DtScriptRepository | ( | const DtScriptRepository & | orig | ) |
copy constructor
| DtScriptRepository& vrfLua::DtScriptRepository::operator= | ( | const DtScriptRepository & | orig | ) |
assignment operator
| virtual bool vrfLua::DtScriptRepository::saveScripts | ( | const DtFilename & | filename | ) | [virtual] |
Saves all the scripts to a file. All the scripts together will be saved.
| virtual bool vrfLua::DtScriptRepository::loadScripts | ( | const DtFilename & | filename | ) | [virtual] |
Load all the scripts from a file.
| virtual DtString vrfLua::DtScriptRepository::getScript | ( | const DtString & | scriptName | ) | [virtual] |
Get a loaded script by name if a script does not exits, returns the empty string.
| virtual bool vrfLua::DtScriptRepository::putScript | ( | const DtString & | scriptName, |
| const DtString & | script | ||
| ) | [virtual] |
Add an individual script to the stored list.
| virtual bool vrfLua::DtScriptRepository::putScript | ( | const DtString & | scriptName, |
| const DtFilename & | filename | ||
| ) | [virtual] |
Add an individual script to the stored list from a file.
| virtual bool vrfLua::DtScriptRepository::removeScript | ( | const DtString & | scriptName | ) | [virtual] |
Remove an individual script from the stored list.
| virtual bool vrfLua::DtScriptRepository::existsScript | ( | const DtString & | scriptName | ) | [virtual] |
Check if a script already exists in the list.
| virtual bool vrfLua::DtScriptRepository::compareScript | ( | const DtString & | scriptToCompare, |
| const DtString & | scriptName | ||
| ) | [virtual] |
Compare a script with a stored script of a specific name.
| virtual std::list<DtString> vrfLua::DtScriptRepository::getStringList | ( | ) | [virtual] |
Get the entire list of strings available.
std::map<DtString, DtString> vrfLua::DtScriptRepository::myScripts [protected] |