aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-27 19:34:23 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-27 19:34:23 +0100
commit07a919befbdff9d7da8db95a890c2f647396cd23 (patch)
treeb299c4aa160f0d0a5522d75b50a153346ea25c31
parente4ec06b02288dbf3c9898e3d7c029b1fe3fc3e27 (diff)
more WIP design
-rw-r--r--design.tex16
-rw-r--r--img/class-savemgr.puml13
-rw-r--r--reqs.toml20
3 files changed, 48 insertions, 1 deletions
diff --git a/design.tex b/design.tex
index a3da41c..761658c 100644
--- a/design.tex
+++ b/design.tex
@@ -206,9 +206,23 @@ requirements were also set:\noparbreak
\begin{itemize}
\item Prevent data loss in the case of crashes (\cref{req:savemgr:journalling})
\item Handle opening/closing/flushing of the underlying file automatically
- % (\cref{req:savemgr:???})
+ (\cref{req:savemgr:file-manage})
+ \item Save file variables are uniquely identified (\cref{req:savemgr:var-key})
\end{itemize}
+% \subsubsection{Architecture}
+% \label{sec:savemgr:architecture}
+%
+% \begin{figure}
+% \centering
+% \includepumldiag{img/class-savemgr.puml}
+% \caption{Save manager class diagram}
+% \label{fig:class-savemgr}
+% \end{figure}
+%
+% In order to realize \cref{req:savemgr:journalling,req:savemgr:var-key}, a third-party
+% key-value database library is used.
+
% \subsection{Input}
% \subsection{Physics}
diff --git a/img/class-savemgr.puml b/img/class-savemgr.puml
new file mode 100644
index 0000000..30bcd08
--- /dev/null
+++ b/img/class-savemgr.puml
@@ -0,0 +1,13 @@
+@startuml
+!include theme.ipuml
+skinparam Linetype ortho
+
+class SaveManager {
+
+}
+
+class ValueBroker {
+
+}
+
+@enduml
diff --git a/reqs.toml b/reqs.toml
index 8cf9bca..9ad0a86 100644
--- a/reqs.toml
+++ b/reqs.toml
@@ -162,3 +162,23 @@ description = '''
The save manager can load multiple different save files.
'''
+[savemgr:file-manage]
+type = 'system'
+priority = 'must'
+description = '''
+The save manager manages opening/closing the underlying file, and flushing
+in-memory data to the file.
+'''
+done = '''
+The game programmer is able to use the save manager without explicit
+(de)initialization.
+'''
+
+[savemgr:var-key]
+type = 'system'
+priority = 'must'
+description = '''
+The save manager provides access to variables uniquely identified by a key
+string.
+'''
+