From 07a919befbdff9d7da8db95a890c2f647396cd23 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sun, 27 Oct 2024 19:34:23 +0100 Subject: more WIP design --- design.tex | 16 +++++++++++++++- img/class-savemgr.puml | 13 +++++++++++++ reqs.toml | 20 ++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 img/class-savemgr.puml 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. +''' + -- cgit v1.2.3