|
| 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 Benchmark.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. |
| 20 | + */ |
| 21 | + |
| 22 | +#ifndef FAST_DDS_GENERATED__BENCHMARK_HPP |
| 23 | +#define FAST_DDS_GENERATED__BENCHMARK_HPP |
| 24 | + |
| 25 | +#include <cstdint> |
| 26 | +#include <utility> |
| 27 | + |
| 28 | +#if defined(_WIN32) |
| 29 | +#if defined(EPROSIMA_USER_DLL_EXPORT) |
| 30 | +#define eProsima_user_DllExport __declspec( dllexport ) |
| 31 | +#else |
| 32 | +#define eProsima_user_DllExport |
| 33 | +#endif // EPROSIMA_USER_DLL_EXPORT |
| 34 | +#else |
| 35 | +#define eProsima_user_DllExport |
| 36 | +#endif // _WIN32 |
| 37 | + |
| 38 | +#if defined(_WIN32) |
| 39 | +#if defined(EPROSIMA_USER_DLL_EXPORT) |
| 40 | +#if defined(BENCHMARK_SOURCE) |
| 41 | +#define BENCHMARK_DllAPI __declspec( dllexport ) |
| 42 | +#else |
| 43 | +#define BENCHMARK_DllAPI __declspec( dllimport ) |
| 44 | +#endif // BENCHMARK_SOURCE |
| 45 | +#else |
| 46 | +#define BENCHMARK_DllAPI |
| 47 | +#endif // EPROSIMA_USER_DLL_EXPORT |
| 48 | +#else |
| 49 | +#define BENCHMARK_DllAPI |
| 50 | +#endif // _WIN32 |
| 51 | + |
| 52 | +/*! |
| 53 | + * @brief This class represents the structure BenchMark defined by the user in the IDL file. |
| 54 | + * @ingroup Benchmark |
| 55 | + */ |
| 56 | +class BenchMark |
| 57 | +{ |
| 58 | +public: |
| 59 | + |
| 60 | + /*! |
| 61 | + * @brief Default constructor. |
| 62 | + */ |
| 63 | + eProsima_user_DllExport BenchMark() |
| 64 | + { |
| 65 | + } |
| 66 | + |
| 67 | + /*! |
| 68 | + * @brief Default destructor. |
| 69 | + */ |
| 70 | + eProsima_user_DllExport ~BenchMark() |
| 71 | + { |
| 72 | + } |
| 73 | + |
| 74 | + /*! |
| 75 | + * @brief Copy constructor. |
| 76 | + * @param x Reference to the object BenchMark that will be copied. |
| 77 | + */ |
| 78 | + eProsima_user_DllExport BenchMark( |
| 79 | + const BenchMark& x) |
| 80 | + { |
| 81 | + m_index = x.m_index; |
| 82 | + |
| 83 | + } |
| 84 | + |
| 85 | + /*! |
| 86 | + * @brief Move constructor. |
| 87 | + * @param x Reference to the object BenchMark that will be copied. |
| 88 | + */ |
| 89 | + eProsima_user_DllExport BenchMark( |
| 90 | + BenchMark&& x) noexcept |
| 91 | + { |
| 92 | + m_index = x.m_index; |
| 93 | + } |
| 94 | + |
| 95 | + /*! |
| 96 | + * @brief Copy assignment. |
| 97 | + * @param x Reference to the object BenchMark that will be copied. |
| 98 | + */ |
| 99 | + eProsima_user_DllExport BenchMark& operator =( |
| 100 | + const BenchMark& x) |
| 101 | + { |
| 102 | + |
| 103 | + m_index = x.m_index; |
| 104 | + |
| 105 | + return *this; |
| 106 | + } |
| 107 | + |
| 108 | + /*! |
| 109 | + * @brief Move assignment. |
| 110 | + * @param x Reference to the object BenchMark that will be copied. |
| 111 | + */ |
| 112 | + eProsima_user_DllExport BenchMark& operator =( |
| 113 | + BenchMark&& x) noexcept |
| 114 | + { |
| 115 | + |
| 116 | + m_index = x.m_index; |
| 117 | + return *this; |
| 118 | + } |
| 119 | + |
| 120 | + /*! |
| 121 | + * @brief Comparison operator. |
| 122 | + * @param x BenchMark object to compare. |
| 123 | + */ |
| 124 | + eProsima_user_DllExport bool operator ==( |
| 125 | + const BenchMark& x) const |
| 126 | + { |
| 127 | + return (m_index == x.m_index); |
| 128 | + } |
| 129 | + |
| 130 | + /*! |
| 131 | + * @brief Comparison operator. |
| 132 | + * @param x BenchMark object to compare. |
| 133 | + */ |
| 134 | + eProsima_user_DllExport bool operator !=( |
| 135 | + const BenchMark& x) const |
| 136 | + { |
| 137 | + return !(*this == x); |
| 138 | + } |
| 139 | + |
| 140 | + /*! |
| 141 | + * @brief This function sets a value in member index |
| 142 | + * @param _index New value for member index |
| 143 | + */ |
| 144 | + eProsima_user_DllExport void index( |
| 145 | + uint32_t _index) |
| 146 | + { |
| 147 | + m_index = _index; |
| 148 | + } |
| 149 | + |
| 150 | + /*! |
| 151 | + * @brief This function returns the value of member index |
| 152 | + * @return Value of member index |
| 153 | + */ |
| 154 | + eProsima_user_DllExport uint32_t index() const |
| 155 | + { |
| 156 | + return m_index; |
| 157 | + } |
| 158 | + |
| 159 | + /*! |
| 160 | + * @brief This function returns a reference to member index |
| 161 | + * @return Reference to member index |
| 162 | + */ |
| 163 | + eProsima_user_DllExport uint32_t& index() |
| 164 | + { |
| 165 | + return m_index; |
| 166 | + } |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | +private: |
| 171 | + |
| 172 | + uint32_t m_index{0}; |
| 173 | + |
| 174 | +}; |
| 175 | + |
| 176 | +#endif // _FAST_DDS_GENERATED_BENCHMARK_HPP_ |
| 177 | + |
| 178 | + |
0 commit comments