Planeshift
|
class handling autoexecution of commands at the startup. More...
#include <autoexec.h>
Public Member Functions | |
void | addCommand (csString name, csString cmd) |
Adds commands to the autoexec list. | |
Autoexec () | |
Constructor. | |
void | execute () |
Triggers the autoexec to run the commands. | |
csString | getCommands (csString name) |
Gets commands of one character name. | |
bool | GetEnabled () |
Gets if the autoexec is enabled and will trigger. | |
void | LoadDefault () |
Overrides the current autoexec data with default. | |
void | SaveCommands () |
Save all the autoexec data to file. | |
void | SetEnabled (const bool en) |
Sets if the autoexec is enabled and will trigger. | |
~Autoexec () | |
Destructor. | |
Protected Member Functions | |
void | LoadCommands (const char *fileName) |
Loads the autoexec data with the provided file name. | |
Protected Attributes | |
csArray< AutoexecCommand > | cmds |
Stores all the commands which are in the data file. | |
bool | enabled |
Stores if the autoexec functionality is enabled. |
class handling autoexecution of commands at the startup.
Definition at line 36 of file autoexec.h.
Autoexec::Autoexec | ( | ) |
Constructor.
Autoexec::~Autoexec | ( | ) |
Destructor.
void Autoexec::addCommand | ( | csString | name, |
csString | cmd | ||
) |
Adds commands to the autoexec list.
name | The character name for which the cmd string will be executed. |
cmd | The string of commands to execute automatically. |
void Autoexec::execute | ( | ) |
Triggers the autoexec to run the commands.
csString Autoexec::getCommands | ( | csString | name | ) |
Gets commands of one character name.
name | The name for which to search for the commands. An empty string for the general ones. |
bool Autoexec::GetEnabled | ( | ) | [inline] |
Gets if the autoexec is enabled and will trigger.
Definition at line 45 of file autoexec.h.
void Autoexec::LoadCommands | ( | const char * | fileName | ) | [protected] |
Loads the autoexec data with the provided file name.
fileName | The vfs filename where to find the command list |
void Autoexec::LoadDefault | ( | ) |
Overrides the current autoexec data with default.
void Autoexec::SaveCommands | ( | ) |
Save all the autoexec data to file.
void Autoexec::SetEnabled | ( | const bool | en | ) | [inline] |
Sets if the autoexec is enabled and will trigger.
en | Set this true if you want to activate the autoexec functionality. |
Definition at line 49 of file autoexec.h.
csArray<AutoexecCommand> Autoexec::cmds [protected] |
Stores all the commands which are in the data file.
Definition at line 69 of file autoexec.h.
bool Autoexec::enabled [protected] |
Stores if the autoexec functionality is enabled.
Definition at line 68 of file autoexec.h.