diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-09-23 10:27:07 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-09-23 10:27:07 +0200 |
commit | 9577412d9ea70d02aa212b27d89567e41d7ce8f5 (patch) | |
tree | b0777e83a2b0da9b2684915c6ae4f9d9a8f7411f /docs | |
parent | d90cecc758d3c348f3aedf9c6e45a13ba6a0b0c3 (diff) |
update
Diffstat (limited to 'docs')
-rw-r--r-- | docs/class-diag.puml | 46 |
1 files changed, 34 insertions, 12 deletions
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 <<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) @@ -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 |