summaryrefslogtreecommitdiff
path: root/implementation/compat/message/src/message_impl.cpp
diff options
context:
space:
mode:
authorLutz Bichler <Lutz.Bichler@bmw.de>2020-02-12 13:04:15 +0100
committerLutz Bichler <Lutz.Bichler@bmw.de>2020-02-12 13:04:15 +0100
commit8371cdca9463a75220c4de92b47c8df9d3bbe346 (patch)
tree16b4bf73c284b026b0ac032171110dafd1752196 /implementation/compat/message/src/message_impl.cpp
parentee44d19e0a3773adcda3bace073c66e334a3e6a7 (diff)
downloadvSomeIP-3.1.7.1.tar.gz
vsomeip 3.1.7.13.1.7.1
Diffstat (limited to 'implementation/compat/message/src/message_impl.cpp')
-rw-r--r--implementation/compat/message/src/message_impl.cpp56
1 files changed, 56 insertions, 0 deletions
diff --git a/implementation/compat/message/src/message_impl.cpp b/implementation/compat/message/src/message_impl.cpp
new file mode 100644
index 0000000..e7e7af1
--- /dev/null
+++ b/implementation/compat/message/src/message_impl.cpp
@@ -0,0 +1,56 @@
+// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// 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 <vsomeip/internal/logger.hpp>
+
+#include "../include/message_impl.hpp"
+#include "../include/payload_impl.hpp"
+#include "../../../message/include/message_impl.hpp"
+
+namespace vsomeip {
+
+message_impl::message_impl(const std::shared_ptr<vsomeip_v3::message> &_impl)
+ : message_base_impl(_impl) {
+}
+
+message_impl::~message_impl() {
+}
+
+std::shared_ptr< payload >
+message_impl::get_payload() const {
+
+ return std::make_shared<payload_impl>(impl_->get_payload());
+}
+
+void
+message_impl::set_payload(std::shared_ptr< payload > _payload) {
+
+ if (_payload) {
+ auto its_payload = std::dynamic_pointer_cast<payload_impl>(_payload);
+ impl_->set_payload(its_payload->get_impl());
+ } else {
+ impl_->set_payload(nullptr);
+ }
+}
+
+bool
+message_impl::serialize(serializer *_to) const {
+
+ (void)_to;
+ VSOMEIP_ERROR << "message_impl::" << __func__
+ << ": Must not be called from compatibility layer.";
+ return false;
+}
+
+bool
+message_impl::deserialize(deserializer *_from) {
+
+ (void)_from;
+ VSOMEIP_ERROR << "message_impl::" << __func__
+ << ": Must not be called from compatibility layer.";
+ return false;
+}
+
+} // namespace vsomeip