// 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 test.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ #ifndef FAST_DDS_GENERATED__TEST_HPP #define FAST_DDS_GENERATED__TEST_HPP #include <cstdint> #include <map> #include <string> #include <utility> #include <vector> #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(TEST_SOURCE) #define TEST_DllAPI __declspec( dllexport ) #else #define TEST_DllAPI __declspec( dllimport ) #endif // TEST_SOURCE #else #define TEST_DllAPI #endif // EPROSIMA_USER_DLL_EXPORT #else #define TEST_DllAPI #endif // _WIN32 /*! * @brief This class represents the structure HelloSecurity defined by the user in the IDL file. * @ingroup test */ class HelloSecurity { public: /*! * @brief Default constructor. */ eProsima_user_DllExport HelloSecurity() { } /*! * @brief Default destructor. */ eProsima_user_DllExport ~HelloSecurity() { } /*! * @brief Copy constructor. * @param x Reference to the object HelloSecurity that will be copied. */ eProsima_user_DllExport HelloSecurity( const HelloSecurity& x) { m_securityData = x.m_securityData; } /*! * @brief Move constructor. * @param x Reference to the object HelloSecurity that will be copied. */ eProsima_user_DllExport HelloSecurity( HelloSecurity&& x) noexcept { m_securityData = std::move(x.m_securityData); } /*! * @brief Copy assignment. * @param x Reference to the object HelloSecurity that will be copied. */ eProsima_user_DllExport HelloSecurity& operator =( const HelloSecurity& x) { m_securityData = x.m_securityData; return *this; } /*! * @brief Move assignment. * @param x Reference to the object HelloSecurity that will be copied. */ eProsima_user_DllExport HelloSecurity& operator =( HelloSecurity&& x) noexcept { m_securityData = std::move(x.m_securityData); return *this; } /*! * @brief Comparison operator. * @param x HelloSecurity object to compare. */ eProsima_user_DllExport bool operator ==( const HelloSecurity& x) const { return (m_securityData == x.m_securityData); } /*! * @brief Comparison operator. * @param x HelloSecurity object to compare. */ eProsima_user_DllExport bool operator !=( const HelloSecurity& x) const { return !(*this == x); } /*! * @brief This function copies the value in member securityData * @param _securityData New value to be copied in member securityData */ eProsima_user_DllExport void securityData( const std::string& _securityData) { m_securityData = _securityData; } /*! * @brief This function moves the value in member securityData * @param _securityData New value to be moved in member securityData */ eProsima_user_DllExport void securityData( std::string&& _securityData) { m_securityData = std::move(_securityData); } /*! * @brief This function returns a constant reference to member securityData * @return Constant reference to member securityData */ eProsima_user_DllExport const std::string& securityData() const { return m_securityData; } /*! * @brief This function returns a reference to member securityData * @return Reference to member securityData */ eProsima_user_DllExport std::string& securityData() { return m_securityData; } private: std::string m_securityData; }; /*! * @brief This class represents the structure OneMessage defined by the user in the IDL file. * @ingroup test */ class OneMessage { public: /*! * @brief Default constructor. */ eProsima_user_DllExport OneMessage() { } /*! * @brief Default destructor. */ eProsima_user_DllExport ~OneMessage() { } /*! * @brief Copy constructor. * @param x Reference to the object OneMessage that will be copied. */ eProsima_user_DllExport OneMessage( const OneMessage& x) { m_a = x.m_a; m_b = x.m_b; m_sequenceTest = x.m_sequenceTest; } /*! * @brief Move constructor. * @param x Reference to the object OneMessage that will be copied. */ eProsima_user_DllExport OneMessage( OneMessage&& x) noexcept { m_a = x.m_a; m_b = x.m_b; m_sequenceTest = std::move(x.m_sequenceTest); } /*! * @brief Copy assignment. * @param x Reference to the object OneMessage that will be copied. */ eProsima_user_DllExport OneMessage& operator =( const OneMessage& x) { m_a = x.m_a; m_b = x.m_b; m_sequenceTest = x.m_sequenceTest; return *this; } /*! * @brief Move assignment. * @param x Reference to the object OneMessage that will be copied. */ eProsima_user_DllExport OneMessage& operator =( OneMessage&& x) noexcept { m_a = x.m_a; m_b = x.m_b; m_sequenceTest = std::move(x.m_sequenceTest); return *this; } /*! * @brief Comparison operator. * @param x OneMessage object to compare. */ eProsima_user_DllExport bool operator ==( const OneMessage& x) const { return (m_a == x.m_a && m_b == x.m_b && m_sequenceTest == x.m_sequenceTest); } /*! * @brief Comparison operator. * @param x OneMessage object to compare. */ eProsima_user_DllExport bool operator !=( const OneMessage& x) const { return !(*this == x); } /*! * @brief This function sets a value in member a * @param _a New value for member a */ eProsima_user_DllExport void a( int16_t _a) { m_a = _a; } /*! * @brief This function returns the value of member a * @return Value of member a */ eProsima_user_DllExport int16_t a() const { return m_a; } /*! * @brief This function returns a reference to member a * @return Reference to member a */ eProsima_user_DllExport int16_t& a() { return m_a; } /*! * @brief This function sets a value in member b * @param _b New value for member b */ eProsima_user_DllExport void b( float _b) { m_b = _b; } /*! * @brief This function returns the value of member b * @return Value of member b */ eProsima_user_DllExport float b() const { return m_b; } /*! * @brief This function returns a reference to member b * @return Reference to member b */ eProsima_user_DllExport float& b() { return m_b; } /*! * @brief This function copies the value in member sequenceTest * @param _sequenceTest New value to be copied in member sequenceTest */ eProsima_user_DllExport void sequenceTest( const std::vector<int16_t>& _sequenceTest) { m_sequenceTest = _sequenceTest; } /*! * @brief This function moves the value in member sequenceTest * @param _sequenceTest New value to be moved in member sequenceTest */ eProsima_user_DllExport void sequenceTest( std::vector<int16_t>&& _sequenceTest) { m_sequenceTest = std::move(_sequenceTest); } /*! * @brief This function returns a constant reference to member sequenceTest * @return Constant reference to member sequenceTest */ eProsima_user_DllExport const std::vector<int16_t>& sequenceTest() const { return m_sequenceTest; } /*! * @brief This function returns a reference to member sequenceTest * @return Reference to member sequenceTest */ eProsima_user_DllExport std::vector<int16_t>& sequenceTest() { return m_sequenceTest; } private: int16_t m_a{0}; float m_b{0.0}; std::vector<int16_t> m_sequenceTest; }; /*! * @brief This class represents the structure TwoMessage defined by the user in the IDL file. * @ingroup test */ class TwoMessage { public: /*! * @brief Default constructor. */ eProsima_user_DllExport TwoMessage() { } /*! * @brief Default destructor. */ eProsima_user_DllExport ~TwoMessage() { } /*! * @brief Copy constructor. * @param x Reference to the object TwoMessage that will be copied. */ eProsima_user_DllExport TwoMessage( const TwoMessage& x) { m_sequenceTest = x.m_sequenceTest; m_mapTest = x.m_mapTest; } /*! * @brief Move constructor. * @param x Reference to the object TwoMessage that will be copied. */ eProsima_user_DllExport TwoMessage( TwoMessage&& x) noexcept { m_sequenceTest = std::move(x.m_sequenceTest); m_mapTest = std::move(x.m_mapTest); } /*! * @brief Copy assignment. * @param x Reference to the object TwoMessage that will be copied. */ eProsima_user_DllExport TwoMessage& operator =( const TwoMessage& x) { m_sequenceTest = x.m_sequenceTest; m_mapTest = x.m_mapTest; return *this; } /*! * @brief Move assignment. * @param x Reference to the object TwoMessage that will be copied. */ eProsima_user_DllExport TwoMessage& operator =( TwoMessage&& x) noexcept { m_sequenceTest = std::move(x.m_sequenceTest); m_mapTest = std::move(x.m_mapTest); return *this; } /*! * @brief Comparison operator. * @param x TwoMessage object to compare. */ eProsima_user_DllExport bool operator ==( const TwoMessage& x) const { return (m_sequenceTest == x.m_sequenceTest && m_mapTest == x.m_mapTest); } /*! * @brief Comparison operator. * @param x TwoMessage object to compare. */ eProsima_user_DllExport bool operator !=( const TwoMessage& x) const { return !(*this == x); } /*! * @brief This function copies the value in member sequenceTest * @param _sequenceTest New value to be copied in member sequenceTest */ eProsima_user_DllExport void sequenceTest( const std::vector<int16_t>& _sequenceTest) { m_sequenceTest = _sequenceTest; } /*! * @brief This function moves the value in member sequenceTest * @param _sequenceTest New value to be moved in member sequenceTest */ eProsima_user_DllExport void sequenceTest( std::vector<int16_t>&& _sequenceTest) { m_sequenceTest = std::move(_sequenceTest); } /*! * @brief This function returns a constant reference to member sequenceTest * @return Constant reference to member sequenceTest */ eProsima_user_DllExport const std::vector<int16_t>& sequenceTest() const { return m_sequenceTest; } /*! * @brief This function returns a reference to member sequenceTest * @return Reference to member sequenceTest */ eProsima_user_DllExport std::vector<int16_t>& sequenceTest() { return m_sequenceTest; } /*! * @brief This function copies the value in member mapTest * @param _mapTest New value to be copied in member mapTest */ eProsima_user_DllExport void mapTest( const std::map<char, uint64_t>& _mapTest) { m_mapTest = _mapTest; } /*! * @brief This function moves the value in member mapTest * @param _mapTest New value to be moved in member mapTest */ eProsima_user_DllExport void mapTest( std::map<char, uint64_t>&& _mapTest) { m_mapTest = std::move(_mapTest); } /*! * @brief This function returns a constant reference to member mapTest * @return Constant reference to member mapTest */ eProsima_user_DllExport const std::map<char, uint64_t>& mapTest() const { return m_mapTest; } /*! * @brief This function returns a reference to member mapTest * @return Reference to member mapTest */ eProsima_user_DllExport std::map<char, uint64_t>& mapTest() { return m_mapTest; } private: std::vector<int16_t> m_sequenceTest; std::map<char, uint64_t> m_mapTest; }; #endif // _FAST_DDS_GENERATED_TEST_HPP_