summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLutz Bichler <Lutz.Bichler@bmw.de>2015-02-27 09:37:43 +0100
committerLutz Bichler <Lutz.Bichler@bmw.de>2015-02-27 09:37:43 +0100
commitbb896e17508570752848e628e4487074fe3f9978 (patch)
tree538c7d34797539572dd6f66f82931e920b246818
parentb33eb52895b3233d5361c3d93a36b3a458900220 (diff)
downloadgenivi-common-api-runtime-bb896e17508570752848e628e4487074fe3f9978.tar.gz
Adaptations after completing the SOME/IP code generation (the first
usage of the deployment infrastructure).
-rw-r--r--include/CommonAPI/Deployment.hpp8
-rw-r--r--include/CommonAPI/Struct.hpp8
-rw-r--r--include/CommonAPI/Variant.hpp4
-rw-r--r--src/CommonAPI/Deployment.cpp13
4 files changed, 8 insertions, 25 deletions
diff --git a/include/CommonAPI/Deployment.hpp b/include/CommonAPI/Deployment.hpp
index df88250..c4f8550 100644
--- a/include/CommonAPI/Deployment.hpp
+++ b/include/CommonAPI/Deployment.hpp
@@ -46,9 +46,9 @@ namespace CommonAPI {
// > itsDeployment(<PARAMS);
template<typename... _Types>
struct Deployment {
- Deployment(_Types... _values) : values_(_values...) {}
+ Deployment(_Types*... _values) : values_(_values...) {}
- std::tuple<_Types...> values_;
+ std::tuple<_Types*...> values_;
};
template<typename _ElementDepl>
@@ -71,10 +71,6 @@ struct MapDeployment {
// Convenience definition of an empty deployment.
typedef Deployment<> EmptyDeployment;
-// The general purpose empty deployment. Use this whenever
-// you need to provide a reference to an empty deployment.
-extern EmptyDeployment empty;
-
} // namespace CommonAPI
#endif // COMMONAPI_DEPLOYABLE_HPP_
diff --git a/include/CommonAPI/Struct.hpp b/include/CommonAPI/Struct.hpp
index 86f50af..a0bd42c 100644
--- a/include/CommonAPI/Struct.hpp
+++ b/include/CommonAPI/Struct.hpp
@@ -39,7 +39,7 @@ struct StructReader<_Index, _Input, _V<_Values...>, _D<_Depls...>> {
_V<_Values...> &_values,
const _D<_Depls...> *_depls) {
StructReader<_Index-1, _Input, _V<_Values...>, _D<_Depls...>>{}(_input, _values, _depls);
- _input.template readValue<>(std::get<_Index>(_values.values_), &std::get<_Index>(_depls->values_));
+ _input.template readValue<>(std::get<_Index>(_values.values_), std::get<_Index>(_depls->values_));
}
};
@@ -63,7 +63,7 @@ struct StructReader<0, _Input, _V<_Values...>, _D<_Depls...>> {
void operator()(InputStream<_Input> &_input,
_V<_Values...> &_values,
const _D<_Depls...> *_depls) {
- _input.template readValue<>(std::get<0>(_values.values_), &std::get<0>(_depls->values_));
+ _input.template readValue<>(std::get<0>(_values.values_), std::get<0>(_depls->values_));
}
};
@@ -91,7 +91,7 @@ struct StructWriter<_Index, _Output, _V<_Values...>, _D<_Depls...>> {
const _V<_Values...> &_values,
const _D<_Depls...> *_depls) {
StructWriter<_Index-1, _Output, _V<_Values...>, _D<_Depls...>>{}(_output, _values, _depls);
- _output.template writeValue<>(std::get<_Index>(_values.values_), &std::get<_Index>(_depls->values_));
+ _output.template writeValue<>(std::get<_Index>(_values.values_), std::get<_Index>(_depls->values_));
}
};
@@ -115,7 +115,7 @@ struct StructWriter<0, _Output, _V<_Values...>, _D<_Depls...>> {
void operator()(OutputStream<_Output> &_output,
const _V<_Values...> &_values,
const _D<_Depls...> *_depls) {
- _output.template writeValue<>(std::get<0>(_values.values_), &std::get<0>(_depls->values_));
+ _output.template writeValue<>(std::get<0>(_values.values_), std::get<0>(_depls->values_));
}
};
diff --git a/include/CommonAPI/Variant.hpp b/include/CommonAPI/Variant.hpp
index 9f3d5ea..c04030b 100644
--- a/include/CommonAPI/Variant.hpp
+++ b/include/CommonAPI/Variant.hpp
@@ -358,7 +358,7 @@ struct ApplyStreamVisitor<_Visitor, _Variant, _Deployment, _Type, _Types...> {
static void visit(_Visitor &_visitor, _Variant &_variant, const _Deployment *_depl) {
if (_variant.getValueType() == index) {
_visitor(_variant.template get<_Type>(),
- &std::get<std::tuple_size<decltype(_depl->values_)>::value-index>(_depl->values_));
+ std::get<std::tuple_size<decltype(_depl->values_)>::value-index>(_depl->values_));
} else {
ApplyStreamVisitor<
_Visitor, _Variant, _Deployment, _Types...
@@ -369,7 +369,7 @@ struct ApplyStreamVisitor<_Visitor, _Variant, _Deployment, _Type, _Types...> {
static void visit(_Visitor &_visitor, const _Variant &_variant, const _Deployment *_depl) {
if (_variant.getValueType() == index) {
_visitor(_variant.template get<_Type>(),
- &std::get<std::tuple_size<decltype(_depl->values_)>::value-index>(_depl->values_));
+ std::get<std::tuple_size<decltype(_depl->values_)>::value-index>(_depl->values_));
} else {
ApplyStreamVisitor<
_Visitor, _Variant, _Deployment, _Types...
diff --git a/src/CommonAPI/Deployment.cpp b/src/CommonAPI/Deployment.cpp
deleted file mode 100644
index 261cac8..0000000
--- a/src/CommonAPI/Deployment.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (C) 2015 BMW Group
-// Author: Lutz Bichler (lutz.bichler@bmw.de)
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#include<CommonAPI/Deployment.hpp>
-
-namespace CommonAPI {
-
-EmptyDeployment empty;
-
-} // namespace CommonAPI