VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Attributes
vrfLua::DtScriptRepository Class Reference

Script Repository for storing Lua scripts. More...

List of all members.

Public Member Functions

 DtScriptRepository ()
 constructor
virtual ~DtScriptRepository ()
 destructor
 DtScriptRepository (const DtScriptRepository &orig)
 copy constructor
DtScriptRepositoryoperator= (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< DtStringgetStringList ()
 Get the entire list of strings available.

Protected Attributes

std::map< DtString, DtStringmyScripts

Detailed Description

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 & Destructor Documentation

constructor

destructor

copy constructor


Member Function Documentation

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.

Returns:
True if both scripts match, false otherwise.
virtual std::list<DtString> vrfLua::DtScriptRepository::getStringList ( ) [virtual]

Get the entire list of strings available.


Member Data Documentation


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)