Implementation of Serice object into structure.
This commit is contained in:
1 parent
a2526dd3ed
commit
2cb1e3e2f2
23 files changed
+278
-293
No files matched your search
+39
-17
@@ -5,26 +5,48 @@
|
||||
#include "Command.h"
|
||||
|
||||
namespace core {
|
||||
|
||||
class CommandList : public Command {
|
||||
|
||||
public:
|
||||
CommandList();
|
||||
~CommandList();
|
||||
|
||||
void add(Command &command, std::string name = "");
|
||||
|
||||
void remove(Command &command);
|
||||
|
||||
bool processRequest(std::string request, Session *session);
|
||||
///
|
||||
/// CommandList
|
||||
///
|
||||
/// This object organizes Command objects into a list that is used
|
||||
/// to parse an input and run the process associated with the
|
||||
/// selected command.
|
||||
///
|
||||
|
||||
class CommandList : public Command {
|
||||
|
||||
public:
|
||||
|
||||
///
|
||||
/// The constructor for the object.
|
||||
///
|
||||
|
||||
CommandList();
|
||||
|
||||
///
|
||||
/// The destructor for the object.
|
||||
///
|
||||
|
||||
~CommandList();
|
||||
|
||||
///
|
||||
/// Add a new command to the command list and assign a default search value.
|
||||
///
|
||||
|
||||
void add(Command &command, std::string name = "");
|
||||
|
||||
void remove(Command &command);
|
||||
|
||||
bool processRequest(std::string request, Session *session);
|
||||
|
||||
int processCommand(std::string request, Session *session) override;
|
||||
|
||||
private:
|
||||
std::vector<Command *> commands;
|
||||
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
std::vector<Command *> commands;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user