Debian Codegraph @

plugins/script/ScriptCommand.cpp

raw
1 #include "ScriptCommand.h"
2
3 #include "icommandsystem.h"
4
5 namespace script
6 {
7
8 ScriptCommand::ScriptCommand(const std::string& name,
9 const std::string& displayName,
10 const std::string& scriptFilename) :
11 _name(name),
12 _displayName(displayName),
13 _scriptFilename(scriptFilename)
14 {
15 // Register this with the command system
16 GlobalCommandSystem().addStatement(_name, "RunScriptCommand '" + _name + "'", false);
17 }
18
19 ScriptCommand::~ScriptCommand()
20 {
21 GlobalCommandSystem().removeCommand(_name);
22 }
23
24 } // namespace script