File: ShapeType.hpp

package info (click to toggle)
fastdds 3.3.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 60,540 kB
  • sloc: cpp: 793,735; xml: 15,283; python: 5,902; sh: 219; makefile: 95; ansic: 12
file content (301 lines) | stat: -rw-r--r-- 6,898 bytes parent folder | download
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file ShapeType.hpp
 * This header file contains the declaration of the described types in the IDL file.
 *
 * This file was generated by the tool fastddsgen (version: 4.1.0).
 */

#ifndef FAST_DDS_GENERATED__SHAPETYPE_HPP
#define FAST_DDS_GENERATED__SHAPETYPE_HPP

#include <cstdint>
#include <string>
#include <utility>
#include <fastcdr/cdr/fixed_size_string.hpp>

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec( dllexport )
#else
#define eProsima_user_DllExport
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define eProsima_user_DllExport
#endif  // _WIN32

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#if defined(SHAPETYPE_SOURCE)
#define SHAPETYPE_DllAPI __declspec( dllexport )
#else
#define SHAPETYPE_DllAPI __declspec( dllimport )
#endif // SHAPETYPE_SOURCE
#else
#define SHAPETYPE_DllAPI
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define SHAPETYPE_DllAPI
#endif // _WIN32

/*!
 * @brief This class represents the structure ShapeType defined by the user in the IDL file.
 * @ingroup ShapeType
 */
class ShapeType
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport ShapeType()
    {
    }

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~ShapeType()
    {
    }

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object ShapeType that will be copied.
     */
    eProsima_user_DllExport ShapeType(
            const ShapeType& x)
    {
                    m_color = x.m_color;

                    m_x = x.m_x;

                    m_y = x.m_y;

                    m_shapesize = x.m_shapesize;

    }

    /*!
     * @brief Move constructor.
     * @param x Reference to the object ShapeType that will be copied.
     */
    eProsima_user_DllExport ShapeType(
            ShapeType&& x) noexcept
    {
        m_color = std::move(x.m_color);
        m_x = x.m_x;
        m_y = x.m_y;
        m_shapesize = x.m_shapesize;
    }

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object ShapeType that will be copied.
     */
    eProsima_user_DllExport ShapeType& operator =(
            const ShapeType& x)
    {

                    m_color = x.m_color;

                    m_x = x.m_x;

                    m_y = x.m_y;

                    m_shapesize = x.m_shapesize;

        return *this;
    }

    /*!
     * @brief Move assignment.
     * @param x Reference to the object ShapeType that will be copied.
     */
    eProsima_user_DllExport ShapeType& operator =(
            ShapeType&& x) noexcept
    {

        m_color = std::move(x.m_color);
        m_x = x.m_x;
        m_y = x.m_y;
        m_shapesize = x.m_shapesize;
        return *this;
    }

    /*!
     * @brief Comparison operator.
     * @param x ShapeType object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const ShapeType& x) const
    {
        return (m_color == x.m_color &&
           m_x == x.m_x &&
           m_y == x.m_y &&
           m_shapesize == x.m_shapesize);
    }

    /*!
     * @brief Comparison operator.
     * @param x ShapeType object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const ShapeType& x) const
    {
        return !(*this == x);
    }

    /*!
     * @brief This function copies the value in member color
     * @param _color New value to be copied in member color
     */
    eProsima_user_DllExport void color(
            const std::string& _color)
    {
        m_color = _color;
    }

    /*!
     * @brief This function moves the value in member color
     * @param _color New value to be moved in member color
     */
    eProsima_user_DllExport void color(
            std::string&& _color)
    {
        m_color = std::move(_color);
    }

    /*!
     * @brief This function returns a constant reference to member color
     * @return Constant reference to member color
     */
    eProsima_user_DllExport const std::string& color() const
    {
        return m_color;
    }

    /*!
     * @brief This function returns a reference to member color
     * @return Reference to member color
     */
    eProsima_user_DllExport std::string& color()
    {
        return m_color;
    }


    /*!
     * @brief This function sets a value in member x
     * @param _x New value for member x
     */
    eProsima_user_DllExport void x(
            int32_t _x)
    {
        m_x = _x;
    }

    /*!
     * @brief This function returns the value of member x
     * @return Value of member x
     */
    eProsima_user_DllExport int32_t x() const
    {
        return m_x;
    }

    /*!
     * @brief This function returns a reference to member x
     * @return Reference to member x
     */
    eProsima_user_DllExport int32_t& x()
    {
        return m_x;
    }


    /*!
     * @brief This function sets a value in member y
     * @param _y New value for member y
     */
    eProsima_user_DllExport void y(
            int32_t _y)
    {
        m_y = _y;
    }

    /*!
     * @brief This function returns the value of member y
     * @return Value of member y
     */
    eProsima_user_DllExport int32_t y() const
    {
        return m_y;
    }

    /*!
     * @brief This function returns a reference to member y
     * @return Reference to member y
     */
    eProsima_user_DllExport int32_t& y()
    {
        return m_y;
    }


    /*!
     * @brief This function sets a value in member shapesize
     * @param _shapesize New value for member shapesize
     */
    eProsima_user_DllExport void shapesize(
            int32_t _shapesize)
    {
        m_shapesize = _shapesize;
    }

    /*!
     * @brief This function returns the value of member shapesize
     * @return Value of member shapesize
     */
    eProsima_user_DllExport int32_t shapesize() const
    {
        return m_shapesize;
    }

    /*!
     * @brief This function returns a reference to member shapesize
     * @return Reference to member shapesize
     */
    eProsima_user_DllExport int32_t& shapesize()
    {
        return m_shapesize;
    }



private:

    std::string m_color;
    int32_t m_x{0};
    int32_t m_y{0};
    int32_t m_shapesize{0};

};

#endif // _FAST_DDS_GENERATED_SHAPETYPE_HPP_