Skip to content

Commit e0c4d26

Browse files
chore: change visibility of abstract command constructor
1 parent 99f72a3 commit e0c4d26

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

  • room_control_unit/src/app/model/command

room_control_unit/src/app/model/command/Command.h

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,11 @@ class Command {
4444
virtual Room getRoom() = 0;
4545
};
4646

47-
47+
/*
48+
Abstract implementation of command.
49+
*/
4850
class 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;

0 commit comments

Comments
 (0)