aboutsummaryrefslogtreecommitdiff
path: root/src/serialization/json_archive.h
diff options
context:
space:
mode:
authorjebes <psteidelprogramming@gmail.com>2014-10-13 16:00:09 -0400
committerjebes <psteidelprogramming@gmail.com>2014-10-13 16:00:09 -0400
commitb032619a9cb1850dcbb1381b1e77ca1d7c2a00a7 (patch)
tree5e13ac793a68ab974ff173b4d9892386f40267c2 /src/serialization/json_archive.h
parentMerge pull request #175 (diff)
downloadmonero-b032619a9cb1850dcbb1381b1e77ca1d7c2a00a7.tar.xz
Commented most of src/serialization/ going to read up more on variant's and finish off the job/add last touchs next
Diffstat (limited to '')
-rw-r--r--src/serialization/json_archive.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/serialization/json_archive.h b/src/serialization/json_archive.h
index 7a040a126..bd8b16130 100644
--- a/src/serialization/json_archive.h
+++ b/src/serialization/json_archive.h
@@ -28,9 +28,10 @@
//
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
-/* json_archive.h
+/*! \file json_archive.h
*
- * JSON archive */
+ * \brief JSON archive
+ */
#pragma once
@@ -39,6 +40,12 @@
#include <iostream>
#include <iomanip>
+/*! \struct json_archive_base
+ *
+ * \brief the base class of json archive type
+ *
+ * \detailed contains the basic logic for serializing a json archive
+ */
template <class Stream, bool IsSaving>
struct json_archive_base
{
@@ -48,7 +55,8 @@ struct json_archive_base
typedef const char *variant_tag_type;
- json_archive_base(stream_type &s, bool indent = false) : stream_(s), indent_(indent), object_begin(false), depth_(0) { }
+ json_archive_base(stream_type &s, bool indent = false)
+ : stream_(s), indent_(indent), object_begin(false), depth_(0) { }
void tag(const char *tag) {
if (!object_begin)
@@ -92,6 +100,13 @@ protected:
size_t depth_;
};
+
+/*! \struct json_archive
+ *
+ * \brief a archive using the JSON standard
+ *
+ * \detailed only supports being written to
+ */
template <bool W>
struct json_archive;