aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/class-diag.puml43
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