diff options
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 |