diff options
Diffstat (limited to 'src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp')
-rw-r--r-- | src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp | 114 |
1 files changed, 65 insertions, 49 deletions
diff --git a/src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp b/src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp index 201d486..3a8ade3 100644 --- a/src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp +++ b/src/test/src-gen/core/commonapi/tests/DerivedTypeCollection.hpp @@ -1,6 +1,6 @@ /* * This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 3.1.4.v201511201311. +* Used org.genivi.commonapi.core 3.1.5.v201512091035. * 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. @@ -52,7 +52,9 @@ struct DerivedTypeCollection { */ 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 (getTestString() == _other.getTestString() && getUintValue() == _other.getUintValue()); + } inline bool operator!=(const TestStruct &_other) const { return !((*this) == _other); } @@ -69,19 +71,17 @@ struct DerivedTypeCollection { E_NOT_USED = 3 }; - TestEnum() + TestEnum() : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(Literal::E_UNKNOWN)) {} - TestEnum(const Literal &_value) - : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_value)) {} - TestEnum(const int32_t &_value) - : CommonAPI::Enumeration<int32_t>(_value) {} + TestEnum(Literal _literal) + : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_literal)) {} inline bool validate() const { switch (value_) { - case static_cast<int32_t>(Literal::E_UNKNOWN): - case static_cast<int32_t>(Literal::E_OK): - case static_cast<int32_t>(Literal::E_OUT_OF_RANGE): - case static_cast<int32_t>(Literal::E_NOT_USED): + case static_cast<int32_t>(Literal::E_UNKNOWN): + case static_cast<int32_t>(Literal::E_OK): + case static_cast<int32_t>(Literal::E_OUT_OF_RANGE): + case static_cast<int32_t>(Literal::E_NOT_USED): return true; default: return false; @@ -103,19 +103,19 @@ struct DerivedTypeCollection { inline bool operator>(const Literal &_value) const { return (value_ > static_cast<int32_t>(_value)); } }; - struct TestEnumExtended : TestEnum { + struct TestEnumExtended : CommonAPI::Enumeration<int32_t> { enum Literal : int32_t { + E_UNKNOWN = 0, + E_OK = 1, + E_OUT_OF_RANGE = 2, + E_NOT_USED = 3, E_NEW = 4 }; - TestEnumExtended() - : TestEnum(static_cast<TestEnum::Literal>(Literal::E_NEW)) {} - TestEnumExtended(const Literal &_value) - : TestEnum(static_cast<int32_t>(_value)) {} - TestEnumExtended(const int32_t &_value) - : TestEnum(_value) {} - TestEnumExtended(const TestEnum::Literal &_value) - : TestEnum(_value) {} + TestEnumExtended() + : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(Literal::E_UNKNOWN)) {} + TestEnumExtended(Literal _literal) + : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_literal)) {} TestEnumExtended &operator=(const TestEnum::Literal &_value) { value_ = static_cast<int32_t>(_value); return (*this); @@ -123,10 +123,14 @@ struct DerivedTypeCollection { inline bool validate() const { switch (value_) { - case static_cast<int32_t>(Literal::E_NEW): + case static_cast<int32_t>(Literal::E_UNKNOWN): + case static_cast<int32_t>(Literal::E_OK): + case static_cast<int32_t>(Literal::E_OUT_OF_RANGE): + case static_cast<int32_t>(Literal::E_NOT_USED): + case static_cast<int32_t>(Literal::E_NEW): return true; default: - return TestEnum::validate(); + return false; } } @@ -145,36 +149,40 @@ struct DerivedTypeCollection { inline bool operator>(const Literal &_value) const { return (value_ > static_cast<int32_t>(_value)); } }; - struct TestEnumExtended2 : TestEnumExtended { + struct TestEnumExtended2 : CommonAPI::Enumeration<int32_t> { enum Literal : int32_t { + E_UNKNOWN = 0, + E_OK = 1, + E_OUT_OF_RANGE = 2, + E_NOT_USED = 3, + E_NEW = 4, E_NEW2 = 5 }; - TestEnumExtended2() - : TestEnumExtended(static_cast<TestEnumExtended::Literal>(Literal::E_NEW2)) {} - TestEnumExtended2(const Literal &_value) - : TestEnumExtended(static_cast<int32_t>(_value)) {} - TestEnumExtended2(const int32_t &_value) - : TestEnumExtended(_value) {} - TestEnumExtended2(const TestEnum::Literal &_value) - : TestEnumExtended(_value) {} - TestEnumExtended2(const TestEnumExtended::Literal &_value) - : TestEnumExtended(_value) {} + TestEnumExtended2() + : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(Literal::E_UNKNOWN)) {} + TestEnumExtended2(Literal _literal) + : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_literal)) {} TestEnumExtended2 &operator=(const TestEnumExtended::Literal &_value) { value_ = static_cast<int32_t>(_value); return (*this); } - TestEnumExtended &operator=(const TestEnum::Literal &_value) { + TestEnumExtended2 &operator=(const TestEnum::Literal &_value) { value_ = static_cast<int32_t>(_value); return (*this); } inline bool validate() const { switch (value_) { - case static_cast<int32_t>(Literal::E_NEW2): + case static_cast<int32_t>(Literal::E_UNKNOWN): + case static_cast<int32_t>(Literal::E_OK): + case static_cast<int32_t>(Literal::E_OUT_OF_RANGE): + case static_cast<int32_t>(Literal::E_NOT_USED): + case static_cast<int32_t>(Literal::E_NEW): + case static_cast<int32_t>(Literal::E_NEW2): return true; default: - return TestEnumExtended::validate(); + return false; } } @@ -214,7 +222,9 @@ struct DerivedTypeCollection { 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 (getTestString() == _other.getTestString() && getUintValue() == _other.getUintValue() && getTestEnumExtended2() == _other.getTestEnumExtended2()); + } inline bool operator!=(const TestStructExtended &_other) const { return !((*this) == _other); } @@ -229,18 +239,16 @@ struct DerivedTypeCollection { E3 = 2 }; - TestEnumMissingValue() + TestEnumMissingValue() : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(Literal::E1)) {} - TestEnumMissingValue(const Literal &_value) - : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_value)) {} - TestEnumMissingValue(const int32_t &_value) - : CommonAPI::Enumeration<int32_t>(_value) {} + TestEnumMissingValue(Literal _literal) + : CommonAPI::Enumeration<int32_t>(static_cast<int32_t>(_literal)) {} inline bool validate() const { switch (value_) { - case static_cast<int32_t>(Literal::E1): - case static_cast<int32_t>(Literal::E2): - case static_cast<int32_t>(Literal::E3): + case static_cast<int32_t>(Literal::E1): + case static_cast<int32_t>(Literal::E2): + case static_cast<int32_t>(Literal::E3): return true; default: return false; @@ -363,7 +371,9 @@ struct DerivedTypeCollection { 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 (getTestString() == _other.getTestString() && getUintValue() == _other.getUintValue()); + } inline bool operator!=(const TestPolymorphicStruct &_other) const { return !((*this) == _other); } @@ -412,7 +422,9 @@ struct DerivedTypeCollection { 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 (getTestString() == _other.getTestString() && getUintValue() == _other.getUintValue() && getAdditionalValue() == _other.getAdditionalValue()); + } inline bool operator!=(const TestExtendedPolymorphicStruct &_other) const { return !((*this) == _other); } @@ -432,7 +444,9 @@ struct DerivedTypeCollection { 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 (getNumberValue() == _other.getNumberValue() && getPolymorphicMember() == _other.getPolymorphicMember()); + } inline bool operator!=(const StructWithPolymorphicMember &_other) const { return !((*this) == _other); } @@ -448,7 +462,9 @@ struct DerivedTypeCollection { } 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 (getTestMap() == _other.getTestMap()); + } inline bool operator!=(const StructWithEnumKeyMap &_other) const { return !((*this) == _other); } |