aboutsummaryrefslogtreecommitdiff
path: root/src/CommandParser.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/CommandParser.hh')
-rw-r--r--src/CommandParser.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/CommandParser.hh b/src/CommandParser.hh
index 5501345..1bc3094 100644
--- a/src/CommandParser.hh
+++ b/src/CommandParser.hh
@@ -41,7 +41,8 @@ public:
41 CommandFactory(); 41 CommandFactory();
42 virtual ~CommandFactory(); 42 virtual ~CommandFactory();
43 virtual FbTk::Command *stringToCommand(const std::string &command, 43 virtual FbTk::Command *stringToCommand(const std::string &command,
44 const std::string &arguments) = 0; 44 const std::string &arguments,
45 bool trusted) = 0;
45protected: 46protected:
46 void addCommand(const std::string &value); 47 void addCommand(const std::string &value);
47}; 48};
@@ -52,7 +53,7 @@ public:
52 typedef std::map<std::string, CommandFactory *> CommandFactoryMap; 53 typedef std::map<std::string, CommandFactory *> CommandFactoryMap;
53 54
54 /// @return parses and returns a command matching the line 55 /// @return parses and returns a command matching the line
55 FbTk::Command *parseLine(const std::string &line); 56 FbTk::Command *parseLine(const std::string &line, bool trusted = true);
56 57
57 CommandParser(); 58 CommandParser();
58 59
@@ -70,7 +71,7 @@ private:
70 71
71 /// search for a command in our command factory map 72 /// search for a command in our command factory map
72 FbTk::Command *toCommand(const std::string &command, 73 FbTk::Command *toCommand(const std::string &command,
73 const std::string &arguments); 74 const std::string &arguments, bool trusted);
74 75
75 CommandFactoryMap m_commandfactorys; ///< a string to factory map 76 CommandFactoryMap m_commandfactorys; ///< a string to factory map
76 77