@startuml ' TODO: ' - state snapshots (memento) ' - send commands from GUI !theme plain skinparam Linetype ortho skinparam ClassAttributeIconSize 0 skinparam ClassFontStyle bold skinparam DefaultFontName Inter skinparam DefaultFontSize 14 skinparam MaxMessageSize 200 ' skinparam Nodesep 25 skinparam Padding 2 ' skinparam Ranksep 50 skinparam RoundCorner 0 skinparam PackageStyle rectangle hide <> stereotype hide <> members class main as "main()" hide main circle hide main members exception Exception { + Exception(const char* fmt, ...) + what() : const char* # error : char* # va_format(va_list args, const char* fmt) } class FileReader <> { +open(url) : File& } interface File { # open(string url) + close() + read() : string # clone() const : File* } class LocalFile { - instance : LocalFile <> } class HTTPFile { - instance : HTTPFile <> } class Canvas { + get_tile(x, y) + set_tile(x, y) - data : CanvasData - tiles : Tile[] } class People { - artists : Artist[] } class Museum { + load : - artists : People - canvas : Canvas } ' TODO color : Color? class Tile { + data : TileData } struct TileData { + type : string } class TileAppearance { + color : Color } class TileBehavior class GrayTileBehavior class RedTileBehavior class BlueTileBehavior class YellowTileBehavior class Artist { - data : ArtistData } struct ArtistData { + x : float + y : float + vx : float + vy : float } struct CanvasData { + rows : unsigned int + columns : unsigned int } class Deserializer class PeopleDeserializer { + set_target(People &) -- + add_artist(float, float, float, float) } class CanvasDeserializer { + set_target(Canvas &) -- + set_rows(unsigned int) + set_meta_cols(unsigned int) + add_meta_type(string, Color, unsigned int) + add_tile(unsigned int, unsigned int, string) } struct Color { red : unsigned int green : unsigned int blue : unsigned int } package CPR { class Response <> class Url <> } package SDL2 { } interface Parser { + parse(File) + heuristic(File) : unsigned int } class CSVParser class XMLParser class TXTParser File <|.. LocalFile File <|.. HTTPFile File <. FileReader File .> FileReader TileBehavior <|-- GrayTileBehavior TileBehavior <|-- RedTileBehavior TileBehavior <|-- BlueTileBehavior TileBehavior <|-- YellowTileBehavior Parser <|-- CSVParser Parser <|-- TXTParser Parser <|-- XMLParser Deserializer <|-- PeopleDeserializer Deserializer <|-- CanvasDeserializer HTTPFile --> CPR.Response CPR.Response - CPR.Url PeopleDeserializer <... People CanvasDeserializer <... Canvas Museum --> People Museum --> Canvas Canvas "1" --> "*" Tile People "1" --> "*" Artist Tile --> TileData Artist --> ArtistData Canvas --> CanvasData CanvasDeserializer .r Color File <.. Parser ' LAYOUT PeopleDeserializer -r[hidden] CanvasDeserializer @enduml