MRPT
2.0.4
CSchemeArchive.cpp
Go to the documentation of this file.
1
/* +------------------------------------------------------------------------+
2
| Mobile Robot Programming Toolkit (MRPT) |
3
| https://www.mrpt.org/ |
4
| |
5
| Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6
| See: https://www.mrpt.org/Authors - All rights reserved. |
7
| Released under BSD License. See: https://www.mrpt.org/License |
8
+------------------------------------------------------------------------+ */
9
10
#include "
serialization-precomp.h
"
// Precompiled headers
11
12
#include <
mrpt/core/exceptions.h
>
13
#include <
mrpt/serialization/CSchemeArchive.h
>
14
15
// Check if we have jsoncpp to enable those tests:
16
#include <mrpt/config.h>
17
#if MRPT_HAS_JSONCPP
18
#include <json/json.h>
19
#endif
20
21
using namespace
mrpt::serialization
;
22
23
CSchemeArchiveBase
mrpt::serialization::archiveJSON
()
24
{
25
#if MRPT_HAS_JSONCPP
26
return
mrpt::serialization::CSchemeArchiveBase
(
27
std::make_unique<
CSchemeArchive<Json::Value>
>());
28
#else
29
THROW_EXCEPTION
(
"archiveJSON() requires building MRPT against jsoncpp"
);
30
#endif
31
}
exceptions.h
CSchemeArchive.h
mrpt::serialization::CSchemeArchive
Base template class for schema-capable "archives", e.g.
Definition:
CSchemeArchive.h:28
mrpt::serialization::CSchemeArchiveBase
Virtual base class for "schematic archives" (JSON, XML,...)
Definition:
CSchemeArchiveBase.h:75
THROW_EXCEPTION
#define THROW_EXCEPTION(msg)
Definition:
exceptions.h:67
serialization-precomp.h
mrpt::serialization
Definition:
aligned_serialization.h:13
mrpt::serialization::archiveJSON
CSchemeArchiveBase archiveJSON()
Returns an archive for reading/writing in JSON format.
Definition:
CSchemeArchive.cpp:23
Page generated by
Doxygen 1.8.17
for MRPT 2.0.4 at Fri Jul 17 08:43:33 UTC 2020