diff options
Diffstat (limited to 'src/test/commonapi/tests/TestFreedesktopInterfaceProxy.h')
-rw-r--r-- | src/test/commonapi/tests/TestFreedesktopInterfaceProxy.h | 280 |
1 files changed, 0 insertions, 280 deletions
diff --git a/src/test/commonapi/tests/TestFreedesktopInterfaceProxy.h b/src/test/commonapi/tests/TestFreedesktopInterfaceProxy.h deleted file mode 100644 index 0b4ce8d..0000000 --- a/src/test/commonapi/tests/TestFreedesktopInterfaceProxy.h +++ /dev/null @@ -1,280 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* Used org.genivi.commonapi.core 2.1.5.qualifier. -* Used org.franca.core 0.8.10.201309262002. -* -* 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_Test_Freedesktop_Interface_PROXY_H_ -#define COMMONAPI_TESTS_Test_Freedesktop_Interface_PROXY_H_ - -#include "TestFreedesktopInterfaceProxyBase.h" - - -#if !defined (COMMONAPI_INTERNAL_COMPILATION) -#define COMMONAPI_INTERNAL_COMPILATION -#endif - -#include <CommonAPI/AttributeExtension.h> -#include <CommonAPI/Factory.h> - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace commonapi { -namespace tests { - -template <typename ... _AttributeExtensions> -class TestFreedesktopInterfaceProxy: virtual public TestFreedesktopInterface, virtual public TestFreedesktopInterfaceProxyBase -, public _AttributeExtensions... { -public: - TestFreedesktopInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate); - ~TestFreedesktopInterfaceProxy(); - - typedef TestFreedesktopInterface InterfaceType; - - - /** - * Returns the wrapper class that provides access to the attribute TestPredefinedTypeAttribute. - */ - virtual TestPredefinedTypeAttributeAttribute& getTestPredefinedTypeAttributeAttribute() { - return delegate_->getTestPredefinedTypeAttributeAttribute(); - } - /** - * Returns the wrapper class that provides access to the attribute TestReadonlyAttribute. - */ - virtual TestReadonlyAttributeAttribute& getTestReadonlyAttributeAttribute() { - return delegate_->getTestReadonlyAttributeAttribute(); - } - /** - * Returns the wrapper class that provides access to the attribute TestDerivedStructAttribute. - */ - virtual TestDerivedStructAttributeAttribute& getTestDerivedStructAttributeAttribute() { - return delegate_->getTestDerivedStructAttributeAttribute(); - } - /** - * Returns the wrapper class that provides access to the attribute TestDerivedArrayAttribute. - */ - virtual TestDerivedArrayAttributeAttribute& getTestDerivedArrayAttributeAttribute() { - return delegate_->getTestDerivedArrayAttributeAttribute(); - } - - - - - /** - * Returns the CommonAPI address of the remote partner this proxy communicates with. - */ - virtual std::string getAddress() const; - - /** - * Returns the domain of the remote partner this proxy communicates with. - */ - virtual const std::string& getDomain() const; - - /** - * Returns the service ID of the remote partner this proxy communicates with. - */ - virtual const std::string& getServiceId() const; - - /** - * Returns the instance ID of the remote partner this proxy communicates with. - */ - virtual const std::string& getInstanceId() const; - - /** - * Returns true if the remote partner for this proxy is currently known to be available. - */ - virtual bool isAvailable() const; - - /** - * Returns true if the remote partner for this proxy is available. - */ - virtual bool isAvailableBlocking() const; - - /** - * Returns the wrapper class that is used to (de-)register for notifications about - * the availability of the remote partner of this proxy. - */ - virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent(); - - /** - * Returns the wrapper class that is used to access version information of the remote - * partner of this proxy. - */ - virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute(); - - private: - std::shared_ptr<TestFreedesktopInterfaceProxyBase> delegate_; -}; - -#ifdef WIN32 - typedef TestFreedesktopInterfaceProxy<CommonAPI::WINDummyAttributeExtension<CommonAPI::WINDummyAttribute>> TestFreedesktopInterfaceProxyDefault; -#else - typedef TestFreedesktopInterfaceProxy<> TestFreedesktopInterfaceProxyDefault; -#endif - -namespace TestFreedesktopInterfaceExtensions { - template <template <typename > class _ExtensionType> - class TestPredefinedTypeAttributeAttributeExtension { - public: - typedef _ExtensionType<TestFreedesktopInterfaceProxyBase::TestPredefinedTypeAttributeAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopInterfaceProxyBase::TestPredefinedTypeAttributeAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - #ifdef WIN32 - TestPredefinedTypeAttributeAttributeExtension() {} - #endif - - TestPredefinedTypeAttributeAttributeExtension(TestFreedesktopInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestPredefinedTypeAttributeAttribute()) { - } - - inline extension_type& getTestPredefinedTypeAttributeAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - - template <template <typename > class _ExtensionType> - class TestReadonlyAttributeAttributeExtension { - public: - typedef _ExtensionType<TestFreedesktopInterfaceProxyBase::TestReadonlyAttributeAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopInterfaceProxyBase::TestReadonlyAttributeAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - #ifdef WIN32 - TestReadonlyAttributeAttributeExtension() {} - #endif - - TestReadonlyAttributeAttributeExtension(TestFreedesktopInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestReadonlyAttributeAttribute()) { - } - - inline extension_type& getTestReadonlyAttributeAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - - template <template <typename > class _ExtensionType> - class TestDerivedStructAttributeAttributeExtension { - public: - typedef _ExtensionType<TestFreedesktopInterfaceProxyBase::TestDerivedStructAttributeAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopInterfaceProxyBase::TestDerivedStructAttributeAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - #ifdef WIN32 - TestDerivedStructAttributeAttributeExtension() {} - #endif - - TestDerivedStructAttributeAttributeExtension(TestFreedesktopInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestDerivedStructAttributeAttribute()) { - } - - inline extension_type& getTestDerivedStructAttributeAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - - template <template <typename > class _ExtensionType> - class TestDerivedArrayAttributeAttributeExtension { - public: - typedef _ExtensionType<TestFreedesktopInterfaceProxyBase::TestDerivedArrayAttributeAttribute> extension_type; - - static_assert(std::is_base_of<typename CommonAPI::AttributeExtension<TestFreedesktopInterfaceProxyBase::TestDerivedArrayAttributeAttribute>, extension_type>::value, - "Not CommonAPI Attribute Extension!"); - #ifdef WIN32 - TestDerivedArrayAttributeAttributeExtension() {} - #endif - - TestDerivedArrayAttributeAttributeExtension(TestFreedesktopInterfaceProxyBase& proxy): attributeExtension_(proxy.getTestDerivedArrayAttributeAttribute()) { - } - - inline extension_type& getTestDerivedArrayAttributeAttributeExtension() { - return attributeExtension_; - } - - private: - extension_type attributeExtension_; - }; - -} // namespace TestFreedesktopInterfaceExtensions - -// -// TestFreedesktopInterfaceProxy Implementation -// -template <typename ... _AttributeExtensions> -TestFreedesktopInterfaceProxy<_AttributeExtensions...>::TestFreedesktopInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate): - _AttributeExtensions(*(std::dynamic_pointer_cast<TestFreedesktopInterfaceProxyBase>(delegate)))..., - delegate_(std::dynamic_pointer_cast<TestFreedesktopInterfaceProxyBase>(delegate)) { -} - -template <typename ... _AttributeExtensions> -TestFreedesktopInterfaceProxy<_AttributeExtensions...>::~TestFreedesktopInterfaceProxy() { -} - - -template <typename ... _AttributeExtensions> -std::string TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getAddress() const { - return delegate_->getAddress(); -} - -template <typename ... _AttributeExtensions> -const std::string& TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getDomain() const { - return delegate_->getDomain(); -} - -template <typename ... _AttributeExtensions> -const std::string& TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getServiceId() const { - return delegate_->getServiceId(); -} - -template <typename ... _AttributeExtensions> -const std::string& TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getInstanceId() const { - return delegate_->getInstanceId(); -} - -template <typename ... _AttributeExtensions> -bool TestFreedesktopInterfaceProxy<_AttributeExtensions...>::isAvailable() const { - return delegate_->isAvailable(); -} - -template <typename ... _AttributeExtensions> -bool TestFreedesktopInterfaceProxy<_AttributeExtensions...>::isAvailableBlocking() const { - return delegate_->isAvailableBlocking(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::ProxyStatusEvent& TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getProxyStatusEvent() { - return delegate_->getProxyStatusEvent(); -} - -template <typename ... _AttributeExtensions> -CommonAPI::InterfaceVersionAttribute& TestFreedesktopInterfaceProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() { - return delegate_->getInterfaceVersionAttribute(); -} - - -} // namespace tests -} // namespace commonapi - -namespace CommonAPI { -template<template<typename > class _AttributeExtension> -struct DefaultAttributeProxyFactoryHelper<commonapi::tests::TestFreedesktopInterfaceProxy, - _AttributeExtension> { - typedef typename commonapi::tests::TestFreedesktopInterfaceProxy< - commonapi::tests::TestFreedesktopInterfaceExtensions::TestPredefinedTypeAttributeAttributeExtension<_AttributeExtension>, - commonapi::tests::TestFreedesktopInterfaceExtensions::TestReadonlyAttributeAttributeExtension<_AttributeExtension>, - commonapi::tests::TestFreedesktopInterfaceExtensions::TestDerivedStructAttributeAttributeExtension<_AttributeExtension>, - commonapi::tests::TestFreedesktopInterfaceExtensions::TestDerivedArrayAttributeAttributeExtension<_AttributeExtension> - > class_t; -}; -} - -#endif // COMMONAPI_TESTS_Test_Freedesktop_Interface_PROXY_H_ |