-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Examples commited from previous year
- Loading branch information
1 parent
e8b28a7
commit 49f30b8
Showing
10 changed files
with
96 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
project(Visitor) | ||
set(SOURCES main.cpp rooms/ElementRoom.cpp rooms/ElementRoom.h workers/Visitor.h workers/Visitor.cpp rooms/Kitchen.cpp rooms/Kitchen.h rooms/LivingRoom.cpp rooms/LivingRoom.h rooms/BathRoom.cpp rooms/BathRoom.h workers/Tiler.cpp workers/Tiler.h workers/Painter.cpp workers/Painter.h) | ||
set(SOURCES main.cpp rooms/ElementRoom.cpp rooms/ElementRoom.h workers/Visitor.h workers/Visitor.cpp rooms/Kitchen.cpp rooms/Kitchen.h rooms/LivingRoom.cpp rooms/LivingRoom.h rooms/BathRoom.cpp rooms/BathRoom.h workers/Tiler.cpp workers/Tiler.h workers/Painter.cpp workers/Painter.h workers/Windower.cpp workers/Windower.h workers/SanTech.cpp workers/SanTech.h) | ||
|
||
add_executable(${PROJECT_NAME} ${SOURCES} main.cpp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// Created by Pavel Akhtyamov on 2019-04-24. | ||
// | ||
|
||
#include "SanTech.h" | ||
#include "../rooms/Kitchen.h" | ||
#include "../rooms/LivingRoom.h" | ||
#include "../rooms/BathRoom.h" | ||
|
||
|
||
void SanTech::visit(Kitchen *kitchen) { | ||
kitchen->wall.material = "sink"; | ||
} | ||
|
||
void SanTech::visit(LivingRoom *living_room) { | ||
|
||
} | ||
|
||
void SanTech::visit(BathRoom *bath_room) { | ||
bath_room->wall.material = "bath"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// Created by Pavel Akhtyamov on 2019-04-24. | ||
// | ||
|
||
#pragma once | ||
|
||
#include "Visitor.h" | ||
|
||
class SanTech : public Visitor { | ||
public: | ||
void visit(Kitchen *kitchen) override; | ||
void visit(LivingRoom *living_room) override; | ||
void visit(BathRoom *bath_room) override; | ||
|
||
}; | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// Created by Pavel Akhtyamov on 2019-04-23. | ||
// | ||
|
||
#include "Windower.h" | ||
#include "../rooms/Kitchen.h" | ||
#include "../rooms/BathRoom.h" | ||
#include "../rooms/LivingRoom.h" | ||
|
||
|
||
void Windower::visit(Kitchen *kitchen) { | ||
kitchen->wall.material = "window"; | ||
} | ||
|
||
void Windower::visit(LivingRoom *living_room) { | ||
living_room->wall.material = "window"; | ||
living_room->wall.color = "black"; | ||
} | ||
|
||
void Windower::visit(BathRoom *bath_room) { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// Created by Pavel Akhtyamov on 2019-04-23. | ||
// | ||
|
||
#pragma once | ||
|
||
#include "Visitor.h" | ||
class Windower : public Visitor { | ||
public: | ||
void visit(Kitchen *kitchen) override; | ||
void visit(LivingRoom *living_room) override; | ||
void visit(BathRoom *bath_room) override; | ||
|
||
}; | ||
|
||
|
||
|