From 375652641509b75e93a284deea44f6f1be13e7b3 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 20 Feb 2023 18:24:54 +0000 Subject: Swap @ prefix for p. prefix for special value names --- lib/persistence.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/persistence.cpp') diff --git a/lib/persistence.cpp b/lib/persistence.cpp index 239e425..543f2fd 100644 --- a/lib/persistence.cpp +++ b/lib/persistence.cpp @@ -81,12 +81,12 @@ namespace Persistence { void PersistenceWrite::setType(const std::string_view tn, const Persistable * p) { - out.pushKey("@typeid"); + out.pushKey("p.typeid"); out.pushValue(tn); first = false; if (shared) { out.nextValue(); - out.pushKey("@id"); + out.pushKey("p.id"); out.pushValue(p->getId()); } } -- cgit v1.2.3 From 17ac090dd1dd245cf1e24b62b7333ba9be571bde Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 2 Mar 2023 18:36:34 +0000 Subject: Add ParseBase Acts as a base class for persistence parser, encompasses the parse stack and manages shared objects --- lib/persistence.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/persistence.cpp') diff --git a/lib/persistence.cpp b/lib/persistence.cpp index 543f2fd..8c7c6a4 100644 --- a/lib/persistence.cpp +++ b/lib/persistence.cpp @@ -157,4 +157,9 @@ namespace Persistence { throw std::logic_error("Default write op shouldn't ever get called"); } /// LCOV_EXCL_STOP + + ParseBase::ParseBase() : sharedObjectsInstance {std::make_shared()} + { + sharedObjects = sharedObjectsInstance; + } } -- cgit v1.2.3