increased version number to 2.1.5 and regenerated code for test fidl
[profile/ivi/common-api-dbus-runtime.git] / src / test / commonapi / tests / managed / LeafInterface.h
1 /*
2 * This file was generated by the CommonAPI Generators.
3 * Used org.genivi.commonapi.core 2.1.5.qualifier.
4 * Used org.franca.core 0.8.10.201309262002.
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
7 * If a copy of the MPL was not distributed with this file, You can obtain one at
8 * http://mozilla.org/MPL/2.0/.
9 */
10 #ifndef COMMONAPI_TESTS_MANAGED_Leaf_Interface_H_
11 #define COMMONAPI_TESTS_MANAGED_Leaf_Interface_H_
12
13
14
15
16 #if !defined (COMMONAPI_INTERNAL_COMPILATION)
17 #define COMMONAPI_INTERNAL_COMPILATION
18 #endif
19
20 #include <CommonAPI/InputStream.h>
21 #include <CommonAPI/OutputStream.h>
22 #include <CommonAPI/types.h>
23
24 #undef COMMONAPI_INTERNAL_COMPILATION
25
26 namespace commonapi {
27 namespace tests {
28 namespace managed {
29
30 class LeafInterface {
31  public:
32     virtual ~LeafInterface() { }
33
34     static inline const char* getInterfaceId();
35     static inline CommonAPI::Version getInterfaceVersion();
36     enum class testLeafMethodError: int32_t {
37         OK,
38         NOTOK
39     };
40     
41     // Definition of a comparator still is necessary for GCC 4.4.1, topic is fixed since 4.5.1
42     struct testLeafMethodErrorComparator;
43 };
44
45 const char* LeafInterface::getInterfaceId() {
46     static const char* interfaceId = "commonapi.tests.managed.LeafInterface";
47     return interfaceId;
48 }
49
50 CommonAPI::Version LeafInterface::getInterfaceVersion() {
51     return CommonAPI::Version(1, 0);
52 }
53
54 inline CommonAPI::InputStream& operator>>(CommonAPI::InputStream& inputStream, LeafInterface::testLeafMethodError& enumValue) {
55     return inputStream.readEnumValue<int32_t>(enumValue);
56 }
57
58 inline CommonAPI::OutputStream& operator<<(CommonAPI::OutputStream& outputStream, const LeafInterface::testLeafMethodError& enumValue) {
59     return outputStream.writeEnumValue(static_cast<int32_t>(enumValue));
60 }
61
62 struct LeafInterface::testLeafMethodErrorComparator {
63     inline bool operator()(const testLeafMethodError& lhs, const testLeafMethodError& rhs) const {
64         return static_cast<int32_t>(lhs) < static_cast<int32_t>(rhs);
65     }
66 };
67
68
69 } // namespace managed
70 } // namespace tests
71 } // namespace commonapi
72
73 namespace CommonAPI {
74
75 }
76
77
78 namespace std {
79     //hashes for types
80
81     //hashes for error types
82     //Hash for testLeafMethodError
83     template<>
84     struct hash<commonapi::tests::managed::LeafInterface::testLeafMethodError> {
85         inline size_t operator()(const commonapi::tests::managed::LeafInterface::testLeafMethodError& testLeafMethodError) const {
86             return static_cast<int32_t>(testLeafMethodError);
87         }
88     };
89 }
90
91 #endif // COMMONAPI_TESTS_MANAGED_Leaf_Interface_H_