Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
RobotAPI
Commits
58286857
Commit
58286857
authored
3 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into 79-fix-easy-json-export-with-untyped-data
parents
99635aa0
64eb9906
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!221
Resolve "Fix easy JSON export with untyped data"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/libraries/aron/core/codegenerator/codewriter/cpp/generator/Generator.cpp
+4
-16
4 additions, 16 deletions
...core/codegenerator/codewriter/cpp/generator/Generator.cpp
with
4 additions
and
16 deletions
source/RobotAPI/libraries/aron/core/codegenerator/codewriter/cpp/generator/Generator.cpp
+
4
−
16
View file @
58286857
...
...
@@ -211,7 +211,7 @@ namespace armarx::aron::codegenerator::cpp
CppMethodPtr
m
=
CppMethodPtr
(
new
CppMethod
(
"template<class WriterT>
\n
static typename WriterT::ReturnType writeType(WriterT& "
+
ARON_WRITER_ACCESSOR
+
", std::vector<std::string> "
+
ARON_TEMPLATE_INSTANTIATIONS_ACCESSOR
+
" = {}, armarx::aron::type::Maybe "
+
ARON_MAYBE_TYPE_ACCESSOR
+
" = armarx::aron::type::Maybe::eNone, const armarx::aron::Path& "
+
ARON_PATH_ACCESSOR
+
" = armarx::aron::Path())"
,
doc
.
str
()));
CppBlockPtr
b
=
std
::
make_shared
<
CppBlock
>
();
b
->
addLine
(
"using T = typename WriterT::ReturnType;"
);
b
->
addLine
(
"using T
[[maybe_unused]]
= typename WriterT::ReturnType;"
);
std
::
string
dummy
;
b
->
appendBlock
(
this
->
getWriteTypeBlock
(
""
,
""
,
Path
(),
dummy
));
...
...
@@ -228,7 +228,7 @@ namespace armarx::aron::codegenerator::cpp
CppMethodPtr
m
=
CppMethodPtr
(
new
CppMethod
(
"template<class WriterT>
\n
typename WriterT::ReturnType write(WriterT& "
+
ARON_WRITER_ACCESSOR
+
", const armarx::aron::Path& "
+
ARON_PATH_ACCESSOR
+
" = armarx::aron::Path()) const"
,
doc
.
str
()));
CppBlockPtr
b
=
std
::
make_shared
<
CppBlock
>
();
b
->
addLine
(
"using T = typename WriterT::ReturnType;"
);
b
->
addLine
(
"using T
[[maybe_unused]]
= typename WriterT::ReturnType;"
);
std
::
string
dummy
;
b
->
appendBlock
(
this
->
getWriteBlock
(
""
,
Path
(),
dummy
));
...
...
@@ -245,20 +245,8 @@ namespace armarx::aron::codegenerator::cpp
CppMethodPtr
m
=
CppMethodPtr
(
new
CppMethod
(
"template<class ReaderT>
\n
void read(ReaderT& "
+
ARON_READER_ACCESSOR
+
", typename ReaderT::InputType& input)"
,
doc
.
str
()));
CppBlockPtr
b
=
std
::
make_shared
<
CppBlock
>
();
b
->
addLine
(
"using T = typename ReaderT::InputType;"
);
b
->
addLine
(
"using TNonConst = typename ReaderT::InputTypeNonConst;"
);
// TODO: Remove me and make nice
auto
makeSuppressUnusedBlock
=
[]()
{
auto
block
=
std
::
make_shared
<
CppBlock
>
();
block
->
addLine
(
"const T* _suppressUnusedWarning1;"
);
block
->
addLine
(
"const TNonConst* _suppressUnusedWarning2;"
);
block
->
addLine
(
"(void) _suppressUnusedWarning1;"
);
block
->
addLine
(
"(void) _suppressUnusedWarning2;"
);
return
block
;
};
b
->
addBlock
(
makeSuppressUnusedBlock
());
b
->
addLine
(
"using T [[maybe_unused]] = typename ReaderT::InputType;"
);
b
->
addLine
(
"using TNonConst [[maybe_unused]] = typename ReaderT::InputTypeNonConst;"
);
b
->
addLine
(
"this->resetSoft();"
);
b
->
addLine
(
"if ("
+
ARON_READER_ACCESSOR
+
".readNull(input))"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment