aboutsummaryrefslogtreecommitdiff
path: root/docs/class-diag.puml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/class-diag.puml')
-rw-r--r--docs/class-diag.puml72
1 files changed, 33 insertions, 39 deletions
diff --git a/docs/class-diag.puml b/docs/class-diag.puml
index 56a334f..273e9f1 100644
--- a/docs/class-diag.puml
+++ b/docs/class-diag.puml
@@ -17,10 +17,9 @@ exception Exception {
# va_format(va_list args, const char* fmt)
}
-together { /' LAYOUT '/
rectangle Group_FileReading as "File reading" <<group>> {
class FileReaderFactory <<Factory>> {
- +open(url) : FileReader&
+ + open(url) : FileReader&
}
interface FileReader {
+ read() : string
@@ -92,9 +91,7 @@ rectangle Group_ParsingDeserialization as "Parsing & deserialization" <<group>>
CSVParser -r[hidden] TXTParser
TXTParser -r[hidden] XMLParser
}
-} /' LAYOUT '/
-together { /' LAYOUT '/
rectangle Group_Algorithms as "Algorithms" <<group>> {
class Pathfinding {
+ Pathfinding(Museum &)
@@ -149,7 +146,6 @@ rectangle Group_Model as "Model" <<group>> {
+ set_data(TileData &)
+ set_type(type : const string &)
+ update()
- + step(Artist *)
+ get_neighbor(dx, dy) : Tile *
--
- museum : Museum &
@@ -179,52 +175,31 @@ rectangle Group_Model as "Model" <<group>> {
+ columns : unsigned int
}
- Museum --> People
- Museum --> Canvas
-
- Canvas --> Tile
- People --> Artist
-
- Tile -> TileData
- Artist -l> ArtistData
- Canvas -> CanvasData
-
- ' LAYOUT
- Artist -r[hidden] Tile
-}
-rectangle Group_TileAppearance as "Tile appearance" <<group>> {
struct Color {
red : unsigned int
green : unsigned int
blue : unsigned int
}
- class TileColorFactory {
+ class TileColorFactory <<singleton>> {
+ get_color(string) : Color <<static>>
+ register_color(string, Color) <<static>>
}
- Tile --> Color
-
- Color <.. TileColorFactory
-}
-rectangle Group_TileBehavior as "Tile behavior" <<group>> {
interface TileBehavior {
+ step(Artist *)
+ update(Tile &)
- + clone(Museum &) : uniq<TileBehavior>
--
- # TileBehavior(type : string)
- # TileBehavior()
+ # TileBehavior(Museum &)
--
# interactions : unsigned int
- # museum : Museum *
+ # museum : Museum &
}
class TileBehaviorFactory {
- + get_strategy(string) : TileBehavior & <<static>>
- + register_strategy(string, TileBehavior *) <<static>>
+ + TileBehaviorFactory(Museum &)
+ + create(string) : uniq<TileBehavior>
--
- - get_collection() : TileBehaviorCollection & <<static>>
+ - museum : Museum &
}
together {
@@ -250,18 +225,42 @@ rectangle Group_TileBehavior as "Tile behavior" <<group>> {
}
}
+ Museum --> People
+ Museum --> Canvas
+
+ Canvas --> Tile
+ People --> Artist
+
+ Tile -> TileData
+ Artist -l> ArtistData
+ Canvas -> CanvasData
+
+ Tile --> "state" Color
+ Tile .[norank].> TileColorFactory
+
+ TileColorFactory .> Color
+
TileBehavior <|.. NullTileBehavior
TileBehavior <|.. StepTileBehavior
TileBehavior <|.. DeleteArtistTileBehavior
TileBehavior <|.. SetNeighborTileBehavior
TileBehavior <|.. CreateArtistTileBehavior
- Tile --> "state" TileBehaviorFactory
+ TileBehaviorFactory --> NullTileBehavior
+ TileBehaviorFactory --> StepTileBehavior
+ TileBehaviorFactory --> DeleteArtistTileBehavior
+ TileBehaviorFactory --> SetNeighborTileBehavior
+ TileBehaviorFactory --> CreateArtistTileBehavior
+
+ Tile --> "state" TileBehavior
+ Tile .[norank].> TileBehaviorFactory
TileBehaviorFactory .l> TileBehavior
TileBehaviorFactory <. TileBehavior
+
+ ' LAYOUT
+ Artist -r[hidden] Tile
}
-} /' LAYOUT '/
together { /' LAYOUT '/
rectangle Group_Visualization as "Visualization" <<group>> {
@@ -372,10 +371,5 @@ main -u-> LoadFilesCommand
main -[norank]> View
main .r> Exception
-' LAYOUT
-Group_TileBehavior -r[hidden] Group_TileAppearance
-Group_ParsingDeserialization -r[hidden] Group_Model
-' Collision -r[hidden] People
-
@enduml