NlohmannJSONReaderWithoutTypeCheck.h
Go to the documentation of this file.
1/*
2* This file is part of ArmarX.
3*
4* ArmarX is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License version 2 as
6* published by the Free Software Foundation.
7*
8* ArmarX is distributed in the hope that it will be useful, but
9* WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
12*
13* You should have received a copy of the GNU General Public License
14* along with this program. If not, see <http://www.gnu.org/licenses/>.
15*
16* @author Fabian Peller (fabian dot peller at kit dot edu)
17* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
18* GNU General Public License
19*/
20
21#pragma once
22
23// STD/STL
24#include <memory>
25#include <stack>
26
27// Simox
28#include <SimoxUtility/json.h>
29
30// BaseClass
32
34{
35 class NlohmannJSONReaderWithoutTypeCheck : public ReaderInterface<const nlohmann::json>
36 {
38
39 public:
40 // constructors
42
44
45 using Base::readBool;
46 using Base::readDict;
47 using Base::readDouble;
48 using Base::readFloat;
49 using Base::readInt;
50 using Base::readList;
51 using Base::readLong;
53 using Base::readString;
54
55 void readList(InputType& input, std::vector<InputTypeNonConst>& elements, Path& p) override;
56 void readDict(InputType& input,
57 std::map<std::string, InputTypeNonConst>& elements,
58 Path& p) override;
59
60 void readNDArray(InputType& input,
61 std::vector<int>& shape,
62 std::string& typeAsString,
63 std::vector<unsigned char>& data,
64 Path& p) override;
65
66 void readInt(InputType& input, int& i, Path& p) override;
67 void readLong(InputType& input, long& i, Path& p) override;
68 void readFloat(InputType& input, float& i, Path& p) override;
69 void readDouble(InputType& input, double& i, Path& p) override;
70 void readString(InputType& input, std::string& i, Path& p) override;
71 void readBool(InputType& input, bool& i, Path& p) override;
72 };
73} // namespace armarx::aron::data::reader
The Path class.
Definition Path.h:36
virtual void readInt(InputType &input, int &i, Path &)=0
virtual void readFloat(InputType &input, float &i, Path &)=0
virtual void readDict(InputType &input, std::map< std::string, InputTypeNonConst > &elements, Path &)=0
virtual void readString(InputType &input, std::string &s, Path &)=0
virtual void readNDArray(InputType &input, std::vector< int > &shape, std::string &typeAsString, std::vector< unsigned char > &data, Path &)=0
virtual void readList(InputType &input, std::vector< InputTypeNonConst > &elements, Path &)=0
virtual void readDouble(InputType &input, double &i, Path &)=0
virtual void readLong(InputType &input, long &i, Path &)=0
virtual void readBool(InputType &input, bool &i, Path &)=0
void readNDArray(InputType &input, std::vector< int > &shape, std::string &typeAsString, std::vector< unsigned char > &data, Path &p) override
void readList(InputType &input, std::vector< InputTypeNonConst > &elements, Path &p) override
void readString(InputType &input, std::string &i, Path &p) override
void readDict(InputType &input, std::map< std::string, InputTypeNonConst > &elements, Path &p) override
A convenience header to include all aron files (full include, not forward declared)