summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLutz Bichler <Lutz.Bichler@bmw.de>2015-02-13 10:31:43 +0100
committerLutz Bichler <Lutz.Bichler@bmw.de>2015-02-13 10:31:43 +0100
commite2fa19841b7137da3e8cad959a9cde167ddf608b (patch)
treec73c91bcf6f23023f38724eec3023ae8e9f4cd4d
parentdd5767c0f43c955ca76edfd8c2b14d3d26ca937c (diff)
parent35bec9782256302c10b991ab5323db127f723d68 (diff)
downloadgenivi-common-api-runtime-e2fa19841b7137da3e8cad959a9cde167ddf608b.tar.gz
Merge remote-tracking branch 'origin/pu/serialization' into pu/pre-3.0
-rw-r--r--src/CommonAPI/Deployment.cpp13
-rw-r--r--src/CommonAPI/Deployment.h22
2 files changed, 22 insertions, 13 deletions
diff --git a/src/CommonAPI/Deployment.cpp b/src/CommonAPI/Deployment.cpp
new file mode 100644
index 0000000..19bba27
--- /dev/null
+++ b/src/CommonAPI/Deployment.cpp
@@ -0,0 +1,13 @@
+/* Copyright (C) 2014 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.h>
+
+namespace CommonAPI {
+
+EmptyDeployment empty;
+
+} // namespace CommonAPI
diff --git a/src/CommonAPI/Deployment.h b/src/CommonAPI/Deployment.h
index 8edbb11..a31678e 100644
--- a/src/CommonAPI/Deployment.h
+++ b/src/CommonAPI/Deployment.h
@@ -53,19 +53,9 @@ struct Deployment {
std::tuple<_Types...> values_;
};
-template<typename _TypeDepl, typename... _Types>
-struct VariantDeployment : Deployment<_Types...> {
- VariantDeployment(_TypeDepl *_typeDepl, _Types... _values)
- : Deployment<_Types...>(_values...),
- typeDepl_(_typeDepl) {
- }
-
- _TypeDepl *typeDepl_;
-};
-
template<typename _ElementDepl>
struct ArrayDeployment {
- ArrayDeployment(const _ElementDepl *_elementDepl)
+ ArrayDeployment(_ElementDepl *_elementDepl)
: elementDepl_(_elementDepl) {}
_ElementDepl *elementDepl_;
@@ -76,8 +66,8 @@ struct MapDeployment {
MapDeployment(_KeyDepl *_key, _ValueDepl *_value)
: key_(_key), value_(_value) {}
- _KeyDepl *key_;
- _ValueDepl *value_;
+ const _KeyDepl *key_;
+ const _ValueDepl *value_;
};
/*
@@ -85,6 +75,12 @@ struct MapDeployment {
*/
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_H_