|
| 1 | +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +/*! |
| 16 | + * @file calculator.hpp |
| 17 | + * This header file contains the declaration of the described types in the IDL file. |
| 18 | + * |
| 19 | + * This file was generated by the tool fastddsgen (version: 4.1.0). |
| 20 | + */ |
| 21 | + |
| 22 | +#ifndef FAST_DDS_GENERATED__CALCULATOR_HPP |
| 23 | +#define FAST_DDS_GENERATED__CALCULATOR_HPP |
| 24 | + |
| 25 | +#include <cstdint> |
| 26 | +#include <memory> |
| 27 | +#include <string> |
| 28 | +#include <utility> |
| 29 | +#include <fastcdr/cdr/fixed_size_string.hpp> |
| 30 | +#include <fastcdr/xcdr/optional.hpp> |
| 31 | +#include <fastdds/dds/rpc/exceptions/RpcOperationError.hpp> |
| 32 | +#include <fastdds/dds/rpc/interfaces/RpcClientReader.hpp> |
| 33 | +#include <fastdds/dds/rpc/interfaces/RpcClientWriter.hpp> |
| 34 | +#include <fastdds/dds/rpc/interfaces/RpcFuture.hpp> |
| 35 | + |
| 36 | + |
| 37 | +#if defined(_WIN32) |
| 38 | +#if defined(EPROSIMA_USER_DLL_EXPORT) |
| 39 | +#define eProsima_user_DllExport __declspec( dllexport ) |
| 40 | +#else |
| 41 | +#define eProsima_user_DllExport |
| 42 | +#endif // EPROSIMA_USER_DLL_EXPORT |
| 43 | +#else |
| 44 | +#define eProsima_user_DllExport |
| 45 | +#endif // _WIN32 |
| 46 | + |
| 47 | +#if defined(_WIN32) |
| 48 | +#if defined(EPROSIMA_USER_DLL_EXPORT) |
| 49 | +#if defined(CALCULATOR_SOURCE) |
| 50 | +#define CALCULATOR_DllAPI __declspec( dllexport ) |
| 51 | +#else |
| 52 | +#define CALCULATOR_DllAPI __declspec( dllimport ) |
| 53 | +#endif // CALCULATOR_SOURCE |
| 54 | +#else |
| 55 | +#define CALCULATOR_DllAPI |
| 56 | +#endif // EPROSIMA_USER_DLL_EXPORT |
| 57 | +#else |
| 58 | +#define CALCULATOR_DllAPI |
| 59 | +#endif // _WIN32 |
| 60 | + |
| 61 | +namespace calculator_base { |
| 62 | + |
| 63 | +/*! |
| 64 | + * @brief This class implements the user exception calculator_base::OverflowException |
| 65 | + * @ingroup calculator |
| 66 | + */ |
| 67 | +class eProsima_user_DllExport OverflowException : public eprosima::fastdds::dds::rpc::RpcOperationError |
| 68 | +{ |
| 69 | +public: |
| 70 | + |
| 71 | + /** |
| 72 | + * Default constructor. |
| 73 | + */ |
| 74 | + OverflowException() |
| 75 | + : OverflowException("OverflowException") |
| 76 | + { |
| 77 | + } |
| 78 | + |
| 79 | + /** |
| 80 | + * Constructor. |
| 81 | + */ |
| 82 | + OverflowException( |
| 83 | + const std::string& message) |
| 84 | + : eprosima::fastdds::dds::rpc::RpcOperationError(message) |
| 85 | + { |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * Constructor. |
| 90 | + */ |
| 91 | + OverflowException( |
| 92 | + const char* message) |
| 93 | + : eprosima::fastdds::dds::rpc::RpcOperationError(message) |
| 94 | + { |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * Copy constructor. |
| 99 | + */ |
| 100 | + OverflowException( |
| 101 | + const OverflowException& other) noexcept = default; |
| 102 | + |
| 103 | + /** |
| 104 | + * Copy assignment. |
| 105 | + */ |
| 106 | + OverflowException& operator =( |
| 107 | + const OverflowException& other) noexcept = default; |
| 108 | + |
| 109 | + /** |
| 110 | + * Destructor. |
| 111 | + */ |
| 112 | + virtual ~OverflowException() noexcept = default; |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | +private: |
| 117 | + |
| 118 | + |
| 119 | +}; |
| 120 | + |
| 121 | +/*! |
| 122 | + * @brief This class represents the interface Adder defined by the user in the IDL file. |
| 123 | + * @ingroup calculator |
| 124 | + */ |
| 125 | +class eProsima_user_DllExport Adder |
| 126 | +{ |
| 127 | +public: |
| 128 | + virtual ~Adder() = default; |
| 129 | + |
| 130 | + virtual eprosima::fastdds::dds::rpc::RpcFuture<int32_t> addition( |
| 131 | + /*in*/ int32_t value1, |
| 132 | + /*in*/ int32_t value2) = 0; |
| 133 | + |
| 134 | +}; |
| 135 | +/*! |
| 136 | + * @brief This class represents the interface Subtractor defined by the user in the IDL file. |
| 137 | + * @ingroup calculator |
| 138 | + */ |
| 139 | +class eProsima_user_DllExport Subtractor |
| 140 | +{ |
| 141 | +public: |
| 142 | + virtual ~Subtractor() = default; |
| 143 | + |
| 144 | + virtual eprosima::fastdds::dds::rpc::RpcFuture<int32_t> subtraction( |
| 145 | + /*in*/ int32_t value1, |
| 146 | + /*in*/ int32_t value2) = 0; |
| 147 | + |
| 148 | +}; |
| 149 | +/*! |
| 150 | + * @brief This class represents the interface BasicCalculator defined by the user in the IDL file. |
| 151 | + * @ingroup calculator |
| 152 | + */ |
| 153 | +class eProsima_user_DllExport BasicCalculator : public calculator_base::Adder, public calculator_base::Subtractor |
| 154 | +{ |
| 155 | +public: |
| 156 | + virtual ~BasicCalculator() = default; |
| 157 | + |
| 158 | + virtual eprosima::fastdds::dds::rpc::RpcFuture<void> representation_limits( |
| 159 | + /*out*/ int32_t& min_value, |
| 160 | + /*out*/ int32_t& max_value) = 0; |
| 161 | + |
| 162 | +}; |
| 163 | + |
| 164 | +} // namespace calculator_base |
| 165 | +/*! |
| 166 | + * @brief This class represents the interface Calculator defined by the user in the IDL file. |
| 167 | + * @ingroup calculator |
| 168 | + */ |
| 169 | +class eProsima_user_DllExport Calculator : public calculator_base::BasicCalculator |
| 170 | +{ |
| 171 | +public: |
| 172 | + virtual ~Calculator() = default; |
| 173 | + |
| 174 | + virtual std::shared_ptr<eprosima::fastdds::dds::rpc::RpcClientReader<int32_t> > fibonacci_seq( |
| 175 | + /*in*/ uint32_t n_results) = 0; |
| 176 | + |
| 177 | + virtual eprosima::fastdds::dds::rpc::RpcFuture<int32_t> sum_all( |
| 178 | + /*in*/ std::shared_ptr<eprosima::fastdds::dds::rpc::RpcClientWriter<int32_t>>& value) = 0; |
| 179 | + |
| 180 | + virtual std::shared_ptr<eprosima::fastdds::dds::rpc::RpcClientReader<int32_t> > accumulator( |
| 181 | + /*in*/ std::shared_ptr<eprosima::fastdds::dds::rpc::RpcClientWriter<int32_t>>& value) = 0; |
| 182 | + |
| 183 | +}; |
| 184 | + |
| 185 | +#endif // _FAST_DDS_GENERATED_CALCULATOR_HPP_ |
| 186 | + |
| 187 | + |
0 commit comments