diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-02 14:40:35 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-02 14:40:35 +0200 |
commit | e92dba9f9798dc1eadec40f6cfc2a309bca754c0 (patch) | |
tree | 06d387f31b6f37808c67b7aaecc92f89ff73fe7f /docs | |
parent | b21fa63c33e5a3b5923b94d93c25df0817a36b6f (diff) | |
parent | 9577412d9ea70d02aa212b27d89567e41d7ce8f5 (diff) |
fix merge conflicts
Diffstat (limited to 'docs')
-rw-r--r-- | docs/class-diag.puml | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/docs/class-diag.puml b/docs/class-diag.puml index 16b53a4..fb77035 100644 --- a/docs/class-diag.puml +++ b/docs/class-diag.puml @@ -16,15 +16,30 @@ 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 <<Factory>> { + +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) @@ -44,6 +59,7 @@ class YellowTileBehavior class Artist +class Deserializer class ArtistDeserializer class CanvasDeserializer @@ -51,15 +67,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 @@ -70,9 +88,12 @@ Parser <|-- CSVParser Parser <|-- TXTParser Parser <|-- XMLParser +Deserializer <|-- ArtistDeserializer +Deserializer <|-- CanvasDeserializer + HTTPFile ..> CPR -TileFactory --> Tile : create +TileFactory --> Tile |