From 9577412d9ea70d02aa212b27d89567e41d7ce8f5 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Mon, 23 Sep 2024 10:27:07 +0200 Subject: update --- docs/class-diag.puml | 46 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) (limited to 'docs') diff --git a/docs/class-diag.puml b/docs/class-diag.puml index 6de5851..7f537ea 100644 --- a/docs/class-diag.puml +++ b/docs/class-diag.puml @@ -3,21 +3,37 @@ !theme plain skinparam linetype ortho skinparam classAttributeIconSize 0 -' skinparam packageStyle rectangle +skinparam roundCorner 0 +skinparam packageStyle rectangle class main as "main()" hide main circle hide main members -class FileReader { - + open(path) - + read() - + close() - - protocol +exception Exception { + Exception(const char* fmt, ...) + +what() : const char* + #error : char* + #va_format(va_list args, const char* fmt) } -class LocalFile -class HTTPFile +class FileReader <> { + +open(url) : File& +} + +interface File { + #open(string url) + +close() + +read() : string + #clone() const : File* +} + +class LocalFile { + -static instance : LocalFile +} +class HTTPFile { + -static instance : HTTPFile +} class Canvas { + get_tile(x, y) @@ -37,6 +53,7 @@ class YellowTileBehavior class Artist +class Deserializer class ArtistDeserializer class CanvasDeserializer @@ -44,15 +61,17 @@ package CPR { } package SDL2 { } interface Parser { - + parse(f: FileReader) + +parse(File) } class CSVParser class XMLParser class TXTParser -FileReader <|-- LocalFile -FileReader <|-- HTTPFile +File <|.. LocalFile +File <|.. HTTPFile +File <. FileReader +File .> FileReader Canvas "1" -> "*" Tile TileBehavior <|-- GrayTileBehavior TileBehavior <|-- RedTileBehavior @@ -63,9 +82,12 @@ Parser <|-- CSVParser Parser <|-- TXTParser Parser <|-- XMLParser +Deserializer <|-- ArtistDeserializer +Deserializer <|-- CanvasDeserializer + HTTPFile ..> CPR -TileFactory --> Tile : create +TileFactory --> Tile -- cgit v1.2.3