summaryrefslogtreecommitdiff
path: root/lib/jsonParse-persistance.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-04-30 01:03:42 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-11-07 16:41:37 +0000
commita31858d29048735b812d385f75db4ed6a6a94556 (patch)
treefffd08d958c4970be617b3ad36905b54f2445bad /lib/jsonParse-persistance.cpp
parentImplement shared_ptr support (diff)
downloadilt-a31858d29048735b812d385f75db4ed6a6a94556.tar.bz2
ilt-a31858d29048735b812d385f75db4ed6a6a94556.tar.xz
ilt-a31858d29048735b812d385f75db4ed6a6a94556.zip
Fix the fact I've been spelling persistence wrong this whole time
Diffstat (limited to 'lib/jsonParse-persistance.cpp')
-rw-r--r--lib/jsonParse-persistance.cpp84
1 files changed, 0 insertions, 84 deletions
diff --git a/lib/jsonParse-persistance.cpp b/lib/jsonParse-persistance.cpp
deleted file mode 100644
index 100fa5c..0000000
--- a/lib/jsonParse-persistance.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-#include "jsonParse-persistance.h"
-
-namespace Persistanace {
- void
- JsonParsePersistance::loadState(std::istream & in)
- {
- this->switch_streams(&in, nullptr);
- yy_push_state(0);
- yylex();
- }
-
- void
- JsonParsePersistance::beginObject()
- {
- current()->beforeValue(stk);
- current()->beginObject(stk);
- }
-
- void
- JsonParsePersistance::beginArray()
- {
- current()->beforeValue(stk);
- current()->beginArray(stk);
- }
-
- void
- JsonParsePersistance::pushBoolean(bool value)
- {
- pushValue(value);
- }
-
- void
- JsonParsePersistance::pushNumber(float value)
- {
- pushValue(value);
- }
-
- void
- JsonParsePersistance::pushNull()
- {
- pushValue(nullptr);
- }
-
- void
- JsonParsePersistance::pushText(std::string && value)
- {
- pushValue(value);
- }
-
- void
- JsonParsePersistance::pushKey(std::string && k)
- {
- stk.push(current()->select(k));
- }
-
- void
- JsonParsePersistance::endArray()
- {
- stk.pop();
- stk.pop();
- }
-
- void
- JsonParsePersistance::endObject()
- {
- current()->endObject(stk);
- current()->endObject(stk);
- }
-
- template<typename T>
- inline void
- JsonParsePersistance::pushValue(T && value)
- {
- current()->beforeValue(stk);
- current()->setValue(value);
- stk.pop();
- }
-
- inline SelectionPtr &
- JsonParsePersistance::current()
- {
- return stk.top();
- }
-}