File tree Expand file tree Collapse file tree
room_control_unit/src/app/model/command Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,17 +44,11 @@ class Command {
4444 virtual Room getRoom () = 0;
4545};
4646
47-
47+ /*
48+ Abstract implementation of command.
49+ */
4850class AbstractCommand : public Command {
4951 public:
50- /*
51- Constructor.
52-
53- @param commandType the type of the command.
54- @param dstRoom the room to which the command is destinated.
55- */
56- AbstractCommand (const CommandType commandType, const Room dstRoom): commandType(commandType), dstRoom(dstRoom) {}
57-
5852 CommandType getCommandType () {
5953 return this ->commandType ;
6054 }
@@ -63,6 +57,15 @@ class AbstractCommand: public Command {
6357 return this ->dstRoom ;
6458 }
6559
60+ protected:
61+ /*
62+ Constructor.
63+
64+ @param commandType the type of the command.
65+ @param dstRoom the room to which the command is destinated.
66+ */
67+ AbstractCommand (const CommandType commandType, const Room dstRoom): commandType(commandType), dstRoom(dstRoom) {}
68+
6669 private:
6770 const CommandType commandType;
6871 const Room dstRoom;
You can’t perform that action at this time.
0 commit comments