blob: 865ebaed4d7df56a39f909b7524b4a8c1ddd2e9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 2.1.0.qualifier.
* Used org.franca.core 0.8.9.201308271211.
*
* 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 "DerivedTypeCollection.h"
namespace commonapi {
namespace tests {
namespace DerivedTypeCollection {
TestStructExtended::TestStructExtended(const PredefinedTypeCollection::TestString& testStringValue, const uint16_t& uintValueValue, const TestEnumExtended2& testEnumExtended2Value):
TestStruct(testStringValue, uintValueValue),
testEnumExtended2(testEnumExtended2Value)
{
}
bool operator==(const TestStructExtended& lhs, const TestStructExtended& rhs) {
if (&lhs == &rhs)
return true;
return
static_cast<TestStructExtended::TestStruct>(lhs) == static_cast<TestStructExtended::TestStruct>(rhs) &&
lhs.testEnumExtended2 == rhs.testEnumExtended2
;
}
void TestStructExtended::readFromInputStream(CommonAPI::InputStream& inputStream) {
TestStruct::readFromInputStream(inputStream);
inputStream >> testEnumExtended2;
}
void TestStructExtended::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
TestStruct::writeToOutputStream(outputStream);
outputStream << testEnumExtended2;
}
TestStruct::TestStruct(const PredefinedTypeCollection::TestString& testStringValue, const uint16_t& uintValueValue):
testString(testStringValue),
uintValue(uintValueValue)
{
}
bool operator==(const TestStruct& lhs, const TestStruct& rhs) {
if (&lhs == &rhs)
return true;
return
lhs.testString == rhs.testString &&
lhs.uintValue == rhs.uintValue
;
}
void TestStruct::readFromInputStream(CommonAPI::InputStream& inputStream) {
inputStream >> testString;
inputStream >> uintValue;
}
void TestStruct::writeToOutputStream(CommonAPI::OutputStream& outputStream) const {
outputStream << testString;
outputStream << uintValue;
}
} // namespace DerivedTypeCollection
} // namespace tests
} // namespace commonapi
|