summaryrefslogtreecommitdiff
path: root/src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp
diff options
context:
space:
mode:
authorJürgen Gehring <juergen.gehring@bmw.de>2015-06-17 05:12:07 -0700
committerJürgen Gehring <juergen.gehring@bmw.de>2015-06-17 05:12:07 -0700
commit49d0b428ca19852d49965f35328a314f22d88807 (patch)
tree4b8d945f29cac4b4b599f79a872cc5029288f5c5 /src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp
parent54982071a99484488207ad3bd5e9391a15bffe02 (diff)
downloadgenivi-common-api-dbus-runtime-49d0b428ca19852d49965f35328a314f22d88807.tar.gz
CommonAPI 3.1.23.1.2
Diffstat (limited to 'src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp')
-rw-r--r--src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp434
1 files changed, 434 insertions, 0 deletions
diff --git a/src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp b/src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp
new file mode 100644
index 0000000..70675c4
--- /dev/null
+++ b/src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp
@@ -0,0 +1,434 @@
+/*
+* This file was generated by the CommonAPI Generators.
+* Used org.genivi.commonapi.core 3.1.2.v201506150834.
+* Used org.franca.core 0.9.1.201412191134.
+*
+* 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/.
+*/
+#ifndef COMMONAPI_TESTS_Derived_Type_Collection_HPP_
+#define COMMONAPI_TESTS_Derived_Type_Collection_HPP_
+
+
+#include <commonapi/tests/PredefinedTypeCollection.hpp>
+
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#define COMMONAPI_INTERNAL_COMPILATION
+#endif
+
+#include <CommonAPI/Deployment.hpp>
+#include <CommonAPI/InputStream.hpp>
+#include <CommonAPI/OutputStream.hpp>
+#include <CommonAPI/Struct.hpp>
+#include <CommonAPI/Types.hpp>
+#include <cstdint>
+#include <string>
+#include <unordered_map>
+#include <vector>
+
+#undef COMMONAPI_INTERNAL_COMPILATION
+
+namespace commonapi {
+namespace tests {
+
+struct DerivedTypeCollection {
+ struct TestStruct : CommonAPI::Struct<::commonapi::tests::PredefinedTypeCollection::TestString, uint16_t> {
+
+ TestStruct() {
+ }
+ TestStruct(const ::commonapi::tests::PredefinedTypeCollection::TestString &_testString, const uint16_t &_uintValue)
+ {
+ std::get<0>(values_) = _testString;
+ std::get<1>(values_) = _uintValue;
+ }
+ /**
+ * description: the name of the property
+ */
+ inline const ::commonapi::tests::PredefinedTypeCollection::TestString &getTestString() const { return std::get<0>(values_); }
+ inline void setTestString(const ::commonapi::tests::PredefinedTypeCollection::TestString &_value) { std::get<0>(values_) = _value; }
+ /**
+ * description: the actual value
+ */
+ inline const uint16_t &getUintValue() const { return std::get<1>(values_); }
+ inline void setUintValue(const uint16_t &_value) { std::get<1>(values_) = _value; }
+ bool operator==(const TestStruct &_other) const;
+ inline bool operator!=(const TestStruct &_other) const {
+ return !((*this) == _other);
+ }
+
+ };
+ typedef std::vector<TestStruct> TestArrayTestStruct;
+ typedef std::unordered_map<uint32_t, TestArrayTestStruct> TestMap;
+ /**
+ * description: Common errors.
+ */
+
+ struct TestEnum : CommonAPI::Enumeration<int32_t> {
+ enum Literal : int32_t {
+ E_UNKNOWN = 0,
+ E_OK = 1,
+ E_OUT_OF_RANGE = 2,
+ E_NOT_USED = 3
+ };
+
+ TestEnum() = default;
+ TestEnum(const Literal &_value)
+ : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_value)) {}
+
+ inline bool operator==(const TestEnum &_other) const { return (value_ == _other.value_); }
+ inline bool operator!=(const TestEnum &_other) const { return (value_ != _other.value_); }
+ inline bool operator<=(const TestEnum &_other) const { return (value_ <= _other.value_); }
+ inline bool operator>=(const TestEnum &_other) const { return (value_ >= _other.value_); }
+ inline bool operator<(const TestEnum &_other) const { return (value_ < _other.value_); }
+ inline bool operator>(const TestEnum &_other) const { return (value_ > _other.value_); }
+
+ inline bool operator==(const Literal &_value) const { return (value_ == static_cast<int32_t>(_value)); }
+ inline bool operator!=(const Literal &_value) const { return (value_ != static_cast<int32_t>(_value)); }
+ inline bool operator<=(const Literal &_value) const { return (value_ <= static_cast<int32_t>(_value)); }
+ inline bool operator>=(const Literal &_value) const { return (value_ >= static_cast<int32_t>(_value)); }
+ inline bool operator<(const Literal &_value) const { return (value_ < static_cast<int32_t>(_value)); }
+ inline bool operator>(const Literal &_value) const { return (value_ > static_cast<int32_t>(_value)); }
+ };
+
+ struct TestEnumExtended : TestEnum {
+ enum Literal : int32_t {
+ E_NEW = 4
+ };
+
+ TestEnumExtended() = default;
+ TestEnumExtended(const Literal &_value)
+ : TestEnum(static_cast<TestEnum::Literal>(_value)) {}
+ TestEnumExtended &operator=(const TestEnum::Literal &_value) {
+ value_ = static_cast<int32_t>(_value);
+ return (*this);
+ }
+
+ inline bool operator==(const TestEnumExtended &_other) const { return (value_ == _other.value_); }
+ inline bool operator!=(const TestEnumExtended &_other) const { return (value_ != _other.value_); }
+ inline bool operator<=(const TestEnumExtended &_other) const { return (value_ <= _other.value_); }
+ inline bool operator>=(const TestEnumExtended &_other) const { return (value_ >= _other.value_); }
+ inline bool operator<(const TestEnumExtended &_other) const { return (value_ < _other.value_); }
+ inline bool operator>(const TestEnumExtended &_other) const { return (value_ > _other.value_); }
+
+ inline bool operator==(const Literal &_value) const { return (value_ == static_cast<int32_t>(_value)); }
+ inline bool operator!=(const Literal &_value) const { return (value_ != static_cast<int32_t>(_value)); }
+ inline bool operator<=(const Literal &_value) const { return (value_ <= static_cast<int32_t>(_value)); }
+ inline bool operator>=(const Literal &_value) const { return (value_ >= static_cast<int32_t>(_value)); }
+ inline bool operator<(const Literal &_value) const { return (value_ < static_cast<int32_t>(_value)); }
+ inline bool operator>(const Literal &_value) const { return (value_ > static_cast<int32_t>(_value)); }
+ };
+
+ struct TestEnumExtended2 : TestEnumExtended {
+ enum Literal : int32_t {
+ E_NEW2 = 5
+ };
+
+ TestEnumExtended2() = default;
+ TestEnumExtended2(const Literal &_value)
+ : TestEnumExtended(static_cast<TestEnumExtended::Literal>(_value)) {}
+ TestEnumExtended2 &operator=(const TestEnumExtended::Literal &_value) {
+ value_ = static_cast<int32_t>(_value);
+ return (*this);
+ }
+ TestEnumExtended &operator=(const TestEnum::Literal &_value) {
+ value_ = static_cast<int32_t>(_value);
+ return (*this);
+ }
+
+ inline bool operator==(const TestEnumExtended2 &_other) const { return (value_ == _other.value_); }
+ inline bool operator!=(const TestEnumExtended2 &_other) const { return (value_ != _other.value_); }
+ inline bool operator<=(const TestEnumExtended2 &_other) const { return (value_ <= _other.value_); }
+ inline bool operator>=(const TestEnumExtended2 &_other) const { return (value_ >= _other.value_); }
+ inline bool operator<(const TestEnumExtended2 &_other) const { return (value_ < _other.value_); }
+ inline bool operator>(const TestEnumExtended2 &_other) const { return (value_ > _other.value_); }
+
+ inline bool operator==(const Literal &_value) const { return (value_ == static_cast<int32_t>(_value)); }
+ inline bool operator!=(const Literal &_value) const { return (value_ != static_cast<int32_t>(_value)); }
+ inline bool operator<=(const Literal &_value) const { return (value_ <= static_cast<int32_t>(_value)); }
+ inline bool operator>=(const Literal &_value) const { return (value_ >= static_cast<int32_t>(_value)); }
+ inline bool operator<(const Literal &_value) const { return (value_ < static_cast<int32_t>(_value)); }
+ inline bool operator>(const Literal &_value) const { return (value_ > static_cast<int32_t>(_value)); }
+ };
+ struct TestStructExtended : CommonAPI::Struct<::commonapi::tests::PredefinedTypeCollection::TestString, uint16_t, TestEnumExtended2> {
+
+ TestStructExtended() {
+ }
+ TestStructExtended(const ::commonapi::tests::PredefinedTypeCollection::TestString &_testString, const uint16_t &_uintValue, const TestEnumExtended2 &_testEnumExtended2)
+ {
+ std::get<0>(values_) = _testString;
+ std::get<1>(values_) = _uintValue;
+ std::get<2>(values_) = _testEnumExtended2;
+ }
+ /**
+ * description: the name of the property
+ */
+ inline const ::commonapi::tests::PredefinedTypeCollection::TestString &getTestString() const { return std::get<0>(values_); }
+ inline void setTestString(const ::commonapi::tests::PredefinedTypeCollection::TestString &_value) { std::get<0>(values_) = _value; }
+ /**
+ * description: the actual value
+ */
+ inline const uint16_t &getUintValue() const { return std::get<1>(values_); }
+ inline void setUintValue(const uint16_t &_value) { std::get<1>(values_) = _value; }
+ inline const TestEnumExtended2 &getTestEnumExtended2() const { return std::get<2>(values_); }
+ inline void setTestEnumExtended2(const TestEnumExtended2 &_value) { std::get<2>(values_) = _value; }
+ bool operator==(const TestStructExtended &_other) const;
+ inline bool operator!=(const TestStructExtended &_other) const {
+ return !((*this) == _other);
+ }
+
+ };
+ typedef std::unordered_map<TestEnum, std::string, CommonAPI::EnumHasher<TestEnum>> TestEnumMap;
+
+ struct TestEnumMissingValue : CommonAPI::Enumeration<int32_t> {
+ enum Literal : int32_t {
+ E1 = 0,
+ E2 = 1,
+ E3 = 2
+ };
+
+ TestEnumMissingValue() = default;
+ TestEnumMissingValue(const Literal &_value)
+ : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_value)) {}
+
+ inline bool operator==(const TestEnumMissingValue &_other) const { return (value_ == _other.value_); }
+ inline bool operator!=(const TestEnumMissingValue &_other) const { return (value_ != _other.value_); }
+ inline bool operator<=(const TestEnumMissingValue &_other) const { return (value_ <= _other.value_); }
+ inline bool operator>=(const TestEnumMissingValue &_other) const { return (value_ >= _other.value_); }
+ inline bool operator<(const TestEnumMissingValue &_other) const { return (value_ < _other.value_); }
+ inline bool operator>(const TestEnumMissingValue &_other) const { return (value_ > _other.value_); }
+
+ inline bool operator==(const Literal &_value) const { return (value_ == static_cast<int32_t>(_value)); }
+ inline bool operator!=(const Literal &_value) const { return (value_ != static_cast<int32_t>(_value)); }
+ inline bool operator<=(const Literal &_value) const { return (value_ <= static_cast<int32_t>(_value)); }
+ inline bool operator>=(const Literal &_value) const { return (value_ >= static_cast<int32_t>(_value)); }
+ inline bool operator<(const Literal &_value) const { return (value_ < static_cast<int32_t>(_value)); }
+ inline bool operator>(const Literal &_value) const { return (value_ > static_cast<int32_t>(_value)); }
+ };
+ typedef std::vector<uint64_t> TestArrayUInt64;
+ static const CommonAPI::Serial TESTPOLYMORPHICSTRUCT_SERIAL = 0x8F51A326;
+ static const CommonAPI::Serial TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL = 0xA49310F2;
+
+ struct TestPolymorphicStruct : CommonAPI::PolymorphicStruct {
+ static std::shared_ptr<TestPolymorphicStruct> create(CommonAPI::Serial _serial);
+ const CommonAPI::Serial getSerial() const { return TESTPOLYMORPHICSTRUCT_SERIAL; }
+
+ TestPolymorphicStruct() {
+ }
+ TestPolymorphicStruct(const ::commonapi::tests::PredefinedTypeCollection::TestString &_testString, const uint16_t &_uintValue)
+ {
+ std::get<0>(values_) = _testString;
+ std::get<1>(values_) = _uintValue;
+ }
+ template<class _Input>
+ void readValue(CommonAPI::InputStream<_Input> &_input, const CommonAPI::EmptyDeployment *_depl) {
+ _input.template readValue<CommonAPI::EmptyDeployment>(std::get<0>(values_));
+ _input.template readValue<CommonAPI::EmptyDeployment>(std::get<1>(values_));
+ switch (getSerial()) {
+ case TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL:
+ static_cast<TestExtendedPolymorphicStruct *>(this)->template readValue<_Input>(_input, _depl);
+ break;
+ default:
+ break;
+ }
+ }
+
+ template<class _Input, class _Deployment>
+ void readValue(CommonAPI::InputStream<_Input> &_input, const _Deployment *_depl) {
+ _input.template readValue<>(std::get<0>(values_), std::get<0>(_depl->values_));
+ _input.template readValue<>(std::get<1>(values_), std::get<1>(_depl->values_));
+ switch (getSerial()) {
+ case TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL:
+ static_cast<TestExtendedPolymorphicStruct *>(this)->template readValue<>(_input, _depl);
+ break;
+ default:
+ break;
+ }
+ }
+
+ template<class _Output>
+ void writeType(CommonAPI::TypeOutputStream<_Output> &_output) {
+ _output.writeType(std::get<0>(values_));
+ _output.writeType(std::get<1>(values_));
+ switch (getSerial()) {
+ case TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL:
+ static_cast<TestExtendedPolymorphicStruct *>(this)->template writeType<_Output>(_output);
+ break;
+ default:
+ break;
+ }
+ }
+
+ template<class _Output>
+ void writeValue(CommonAPI::OutputStream<_Output> &_output, const CommonAPI::EmptyDeployment *_depl) {
+ _output.template writeValue<CommonAPI::EmptyDeployment>(std::get<0>(values_));
+ _output.template writeValue<CommonAPI::EmptyDeployment>(std::get<1>(values_));
+ switch (getSerial()) {
+ case TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL:
+ static_cast<TestExtendedPolymorphicStruct *>(this)->template writeValue<_Output>(_output, _depl);
+ break;
+ default:
+ break;
+ }
+ }
+
+ template<class _Output, class _Deployment>
+ void writeValue(CommonAPI::OutputStream<_Output> &_output, const _Deployment *_depl) {
+ _output.template writeValue<>(std::get<0>(values_), _depl, std::get<0>(_depl->values_));
+ _output.template writeValue<>(std::get<1>(values_), _depl, std::get<1>(_depl->values_));
+ switch (getSerial()) {
+ case TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL:
+ static_cast<TestExtendedPolymorphicStruct *>(this)->template writeValue<>(_output, _depl);
+ break;
+ default:
+ break;
+ }
+ }
+ /**
+ * description: the name of the property
+ */
+ inline const ::commonapi::tests::PredefinedTypeCollection::TestString &getTestString() const { return std::get<0>(values_); }
+ inline void setTestString(const ::commonapi::tests::PredefinedTypeCollection::TestString &_value) { std::get<0>(values_) = _value; }
+ /**
+ * description: the actual value
+ */
+ inline const uint16_t &getUintValue() const { return std::get<1>(values_); }
+ inline void setUintValue(const uint16_t &_value) { std::get<1>(values_) = _value; }
+
+ std::tuple<::commonapi::tests::PredefinedTypeCollection::TestString, uint16_t> values_;
+ bool operator==(const TestPolymorphicStruct &_other) const;
+ inline bool operator!=(const TestPolymorphicStruct &_other) const {
+ return !((*this) == _other);
+ }
+
+ };
+ struct TestExtendedPolymorphicStruct : TestPolymorphicStruct {
+ const CommonAPI::Serial getSerial() const { return TESTEXTENDEDPOLYMORPHICSTRUCT_SERIAL; }
+
+ TestExtendedPolymorphicStruct() {
+ }
+ TestExtendedPolymorphicStruct(const ::commonapi::tests::PredefinedTypeCollection::TestString &_testString, const uint16_t &_uintValue, const uint32_t &_additionalValue)
+ : TestPolymorphicStruct(_testString, _uintValue)
+ {
+ std::get<0>(values_) = _additionalValue;
+ }
+ template<class _Input>
+ void readValue(CommonAPI::InputStream<_Input> &_input, const CommonAPI::EmptyDeployment *_depl) {
+ _input.template readValue<CommonAPI::EmptyDeployment>(std::get<0>(values_));
+ }
+
+ template<class _Input, class _Deployment>
+ void readValue(CommonAPI::InputStream<_Input> &_input, const _Deployment *_depl) {
+ _input.template readValue<>(std::get<0>(values_), std::get<2>(_depl->values_));
+ }
+
+ template<class _Output>
+ void writeType(CommonAPI::TypeOutputStream<_Output> &_output) {
+ _output.writeType(std::get<0>(values_));
+ }
+
+ template<class _Output>
+ void writeValue(CommonAPI::OutputStream<_Output> &_output, const CommonAPI::EmptyDeployment *_depl) {
+ _output.template writeValue<CommonAPI::EmptyDeployment>(std::get<0>(values_));
+ }
+
+ template<class _Output, class _Deployment>
+ void writeValue(CommonAPI::OutputStream<_Output> &_output, const _Deployment *_depl) {
+ _output.template writeValue<>(std::get<0>(values_), _depl, std::get<2>(_depl->values_));
+ }
+ inline const uint32_t &getAdditionalValue() const { return std::get<0>(values_); }
+ inline void setAdditionalValue(const uint32_t &_value) { std::get<0>(values_) = _value; }
+
+ std::tuple<uint32_t> values_;
+ bool operator==(const TestExtendedPolymorphicStruct &_other) const;
+ inline bool operator!=(const TestExtendedPolymorphicStruct &_other) const {
+ return !((*this) == _other);
+ }
+
+ };
+ typedef std::unordered_map<uint8_t, std::shared_ptr<TestPolymorphicStruct>> MapIntToPolymorphic;
+ struct StructWithPolymorphicMember : CommonAPI::Struct<uint32_t, std::shared_ptr<TestPolymorphicStruct>> {
+
+ StructWithPolymorphicMember() {
+ }
+ StructWithPolymorphicMember(const uint32_t &_numberValue, const std::shared_ptr<TestPolymorphicStruct> &_polymorphicMember)
+ {
+ std::get<0>(values_) = _numberValue;
+ std::get<1>(values_) = _polymorphicMember;
+ }
+ inline const uint32_t &getNumberValue() const { return std::get<0>(values_); }
+ inline void setNumberValue(const uint32_t &_value) { std::get<0>(values_) = _value; }
+ inline const std::shared_ptr<TestPolymorphicStruct> &getPolymorphicMember() const { return std::get<1>(values_); }
+ inline void setPolymorphicMember(const std::shared_ptr<TestPolymorphicStruct> &_value) { std::get<1>(values_) = _value; }
+ bool operator==(const StructWithPolymorphicMember &_other) const;
+ inline bool operator!=(const StructWithPolymorphicMember &_other) const {
+ return !((*this) == _other);
+ }
+
+ };
+ struct StructWithEnumKeyMap : CommonAPI::Struct<TestEnumMap> {
+
+ StructWithEnumKeyMap() {
+ }
+ StructWithEnumKeyMap(const TestEnumMap &_testMap)
+ {
+ std::get<0>(values_) = _testMap;
+ }
+ inline const TestEnumMap &getTestMap() const { return std::get<0>(values_); }
+ inline void setTestMap(const TestEnumMap &_value) { std::get<0>(values_) = _value; }
+ bool operator==(const StructWithEnumKeyMap &_other) const;
+ inline bool operator!=(const StructWithEnumKeyMap &_other) const {
+ return !((*this) == _other);
+ }
+
+ };
+
+
+
+static inline const char* getTypeCollectionName() {
+ static const char* typeCollectionName = "commonapi.tests.DerivedTypeCollection";
+ return typeCollectionName;
+}
+
+
+}; // struct DerivedTypeCollection
+
+} // namespace tests
+} // namespace commonapi
+
+namespace CommonAPI {
+}
+
+
+namespace std {
+ //Hash for TestEnum
+ template<>
+ struct hash<::commonapi::tests::DerivedTypeCollection::TestEnum> {
+ inline size_t operator()(const ::commonapi::tests::DerivedTypeCollection::TestEnum& testEnum) const {
+ return static_cast<int32_t>(testEnum);
+ }
+ };
+ //Hash for TestEnumExtended2
+ template<>
+ struct hash<::commonapi::tests::DerivedTypeCollection::TestEnumExtended2> {
+ inline size_t operator()(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended2& testEnumExtended2) const {
+ return static_cast<int32_t>(testEnumExtended2);
+ }
+ };
+ //Hash for TestEnumMissingValue
+ template<>
+ struct hash<::commonapi::tests::DerivedTypeCollection::TestEnumMissingValue> {
+ inline size_t operator()(const ::commonapi::tests::DerivedTypeCollection::TestEnumMissingValue& testEnumMissingValue) const {
+ return static_cast<int32_t>(testEnumMissingValue);
+ }
+ };
+ //Hash for TestEnumExtended
+ template<>
+ struct hash<::commonapi::tests::DerivedTypeCollection::TestEnumExtended> {
+ inline size_t operator()(const ::commonapi::tests::DerivedTypeCollection::TestEnumExtended& testEnumExtended) const {
+ return static_cast<int32_t>(testEnumExtended);
+ }
+ };
+}
+
+#endif // COMMONAPI_TESTS_Derived_Type_Collection_HPP_