JsonData.cpp
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 Simon Ottenhaus (simon dot ottenhaus at kit dot edu)
17
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
18
* GNU General Public License
19
*/
20
21
#include "
JsonData.h
"
22
23
namespace
armarx
24
{
25
JsonData::JsonData
() : lexerStartOffset(-1, -1, -1), lexerEndOffset(-1, -1, -1)
26
{
27
}
28
29
std::string
30
JsonData::toJsonString
(
int
indenting,
const
std::string indentChars,
bool
jsStyleKeys)
31
{
32
JsonWriterPtr
writer(
new
JsonWriter
(indenting, indentChars, jsStyleKeys));
33
writeJson
(writer);
34
return
writer->toString();
35
}
36
37
void
38
JsonData::setLexerStartOffset
(
LexerInfo
lexerStartOffset)
39
{
40
this->lexerStartOffset = lexerStartOffset;
41
}
42
43
void
44
JsonData::setLexerEndOffset
(
LexerInfo
lexerEndOffset)
45
{
46
this->lexerEndOffset = lexerEndOffset;
47
}
48
49
LexerInfo
50
JsonData::getLexerStartOffset
()
51
{
52
return
lexerStartOffset;
53
}
54
55
LexerInfo
56
JsonData::getLexerEndOffset
()
57
{
58
return
lexerEndOffset;
59
}
60
}
// namespace armarx
JsonData.h
armarx::JsonData::setLexerEndOffset
void setLexerEndOffset(LexerInfo lexerEndOffset)
Definition:
JsonData.cpp:44
armarx::JsonData::getLexerEndOffset
LexerInfo getLexerEndOffset()
Definition:
JsonData.cpp:56
armarx::JsonData::setLexerStartOffset
void setLexerStartOffset(LexerInfo lexerStartOffset)
Definition:
JsonData.cpp:38
armarx::JsonWriterPtr
std::shared_ptr< JsonWriter > JsonWriterPtr
Definition:
JsonWriter.h:30
armarx::JsonData::writeJson
virtual void writeJson(const JsonWriterPtr &writer)=0
armarx::JsonData::JsonData
JsonData()
Definition:
JsonData.cpp:25
armarx::JsonData::getLexerStartOffset
LexerInfo getLexerStartOffset()
Definition:
JsonData.cpp:50
armarx::JsonWriter
Definition:
JsonWriter.h:32
armarx::LexerInfo
Definition:
LexerInfo.h:30
armarx::JsonData::toJsonString
std::string toJsonString(int indenting=0, const std::string indentChars=" ", bool jsStyleKeys=false)
Definition:
JsonData.cpp:30
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:27
ArmarXGui
libraries
StructuralJson
JsonData.cpp
Generated by
1.8.17