diff --git a/fastdds_python/test/types/CMakeLists.txt b/fastdds_python/test/types/CMakeLists.txt index ab11ef44..c2bc96f9 100644 --- a/fastdds_python/test/types/CMakeLists.txt +++ b/fastdds_python/test/types/CMakeLists.txt @@ -118,218 +118,3 @@ install(TARGETS ${${PROJECT_NAME}_MODULE} DESTINATION ${PYTHON_MODULE_PATH}/epro get_property(support_files TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_SUPPORT_FILES) install(FILES ${support_files} DESTINATION ${PYTHON_MODULE_PATH}/eprosima/test) -############################################################################### -# Library for types defined in test_included_modules IDL -############################################################################### - -message(STATUS "Configuring python wrapper for types in test_included_modules...") - -############################################################################### -# Type library on C++ - -project(test_included_modules) - -find_package(fastcdr REQUIRED) -find_package(fastrtps REQUIRED) - - -set(${PROJECT_NAME}_FILES - test_included_modules.cxx - test_included_modulesPubSubTypes.cxx - ) - -include_directories() - -set(CMAKE_POSITION_INDEPENDENT_CODE ON) - -#Create library for C++ types -add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_FILES}) -if(WIN32) - target_compile_definitions(${PROJECT_NAME} PRIVATE EPROSIMA_USER_DLL_EXPORT) -endif(WIN32) -target_link_libraries(${PROJECT_NAME} PUBLIC fastcdr fastrtps) - -############################################################################### -# Python bindings for type - -find_package(SWIG REQUIRED) -include(${SWIG_USE_FILE}) -set(CMAKE_SWIG_FLAGS "") - -find_package(Python3 COMPONENTS Interpreter Development REQUIRED) -set(PYTHON_INCLUDE_PATH ${Python3_INCLUDE_DIRS}) -set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) -set(PYTHON_LIBRARIES ${Python3_LIBRARIES}) - -include_directories(${PYTHON_INCLUDE_PATH}) - -set(${PROJECT_NAME}_MODULE - test_included_modulesWrapper - ) - -set(${PROJECT_NAME}_MODULE_FILES - ${PROJECT_NAME}.i - ) - -SET_SOURCE_FILES_PROPERTIES( - ${${PROJECT_NAME}_MODULE_FILES} - PROPERTIES CPLUSPLUS ON - USE_TARGET_INCLUDE_DIRECTORIES TRUE - ) - -include_directories( - ${PROJECT_SOURCE_DIR} - ) - -set_property(SOURCE ${PROJECT_NAME}.i PROPERTY OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/eprosima/test2") - -SWIG_ADD_LIBRARY(${${PROJECT_NAME}_MODULE} - TYPE SHARED - LANGUAGE python - SOURCES ${${PROJECT_NAME}_MODULE_FILES}) - -if(UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 8) - set_property(TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_COMPILE_DEFINITIONS SWIGWORDSIZE64) -endif() - -target_link_libraries(${${PROJECT_NAME}_MODULE} - Python3::Module - fastrtps - ${PROJECT_NAME} - ) - -set_target_properties(${${PROJECT_NAME}_MODULE} - PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/eprosima/test2" - ) - - -# Find the installation path -execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print(sysconfig.get_python_lib(plat_specific=True, prefix='${CMAKE_INSTALL_PREFIX}'))" - OUTPUT_VARIABLE _ABS_PYTHON_MODULE_PATH - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - -get_filename_component (_ABS_PYTHON_MODULE_PATH ${_ABS_PYTHON_MODULE_PATH} ABSOLUTE) -file (RELATIVE_PATH _REL_PYTHON_MODULE_PATH ${CMAKE_INSTALL_PREFIX} ${_ABS_PYTHON_MODULE_PATH}) -SET (PYTHON_MODULE_PATH - ${_REL_PYTHON_MODULE_PATH} - ) - -# Install -install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION bin/ - LIBRARY DESTINATION lib/ - ARCHIVE DESTINATION lib/ - ) -install(TARGETS ${${PROJECT_NAME}_MODULE} DESTINATION ${PYTHON_MODULE_PATH}/eprosima/test2) -get_property(support_files TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_SUPPORT_FILES) -install(FILES ${support_files} DESTINATION ${PYTHON_MODULE_PATH}/eprosima/test2) - -############################################################################### -# Library for types defined in test_complete IDL -############################################################################### - -message(STATUS "Configuring python wrapper for types in test_complete...") - -############################################################################### -# Type library on C++ - -project(test_complete) - -find_package(fastcdr REQUIRED) -find_package(fastrtps REQUIRED) - - -set(${PROJECT_NAME}_FILES - test_complete.cxx - test_completePubSubTypes.cxx - ) - -include_directories() - -set(CMAKE_POSITION_INDEPENDENT_CODE ON) - -#Create library for C++ types -add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_FILES}) -if(WIN32) - target_compile_definitions(${PROJECT_NAME} PRIVATE EPROSIMA_USER_DLL_EXPORT) -endif(WIN32) -target_link_libraries(${PROJECT_NAME} PUBLIC fastcdr fastrtps) - -############################################################################### -# Python bindings for type - -find_package(SWIG REQUIRED) -include(${SWIG_USE_FILE}) -set(CMAKE_SWIG_FLAGS "") - -find_package(Python3 COMPONENTS Interpreter Development REQUIRED) -set(PYTHON_INCLUDE_PATH ${Python3_INCLUDE_DIRS}) -set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) -set(PYTHON_LIBRARIES ${Python3_LIBRARIES}) - -include_directories(${PYTHON_INCLUDE_PATH}) - -set(${PROJECT_NAME}_MODULE - test_completeWrapper - ) - -set(${PROJECT_NAME}_MODULE_FILES - ${PROJECT_NAME}.i - ) - -SET_SOURCE_FILES_PROPERTIES( - ${${PROJECT_NAME}_MODULE_FILES} - PROPERTIES CPLUSPLUS ON - USE_TARGET_INCLUDE_DIRECTORIES TRUE - ) - -include_directories( - ${PROJECT_SOURCE_DIR} - ) - -set_property(SOURCE ${PROJECT_NAME}.i PROPERTY OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/") - -SWIG_ADD_LIBRARY(${${PROJECT_NAME}_MODULE} - TYPE SHARED - LANGUAGE python - SOURCES ${${PROJECT_NAME}_MODULE_FILES}) - -if(UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 8) - set_property(TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_COMPILE_DEFINITIONS SWIGWORDSIZE64) -endif() - -target_link_libraries(${${PROJECT_NAME}_MODULE} - Python3::Module - fastrtps - ${PROJECT_NAME} - test_included_modules - ) - -set_target_properties(${${PROJECT_NAME}_MODULE} - PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/" - ) - - -# Find the installation path -execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print(sysconfig.get_python_lib(plat_specific=True, prefix='${CMAKE_INSTALL_PREFIX}'))" - OUTPUT_VARIABLE _ABS_PYTHON_MODULE_PATH - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - -get_filename_component (_ABS_PYTHON_MODULE_PATH ${_ABS_PYTHON_MODULE_PATH} ABSOLUTE) -file (RELATIVE_PATH _REL_PYTHON_MODULE_PATH ${CMAKE_INSTALL_PREFIX} ${_ABS_PYTHON_MODULE_PATH}) -SET (PYTHON_MODULE_PATH - ${_REL_PYTHON_MODULE_PATH} - ) - -# Install -install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION bin/ - LIBRARY DESTINATION lib/ - ARCHIVE DESTINATION lib/ - ) -install(TARGETS ${${PROJECT_NAME}_MODULE} DESTINATION ${PYTHON_MODULE_PATH}/) -get_property(support_files TARGET ${${PROJECT_NAME}_MODULE} PROPERTY SWIG_SUPPORT_FILES) -install(FILES ${support_files} DESTINATION ${PYTHON_MODULE_PATH}/) - diff --git a/fastdds_python/test/types/test_complete.cxx b/fastdds_python/test/types/test_complete.cxx index ea4312e2..6b0c374e 100644 --- a/fastdds_python/test/types/test_complete.cxx +++ b/fastdds_python/test/types/test_complete.cxx @@ -14,9 +14,9 @@ /*! * @file test_complete.cpp - * This source file contains the definition of the described types in the IDL file. + * This source file contains the implementation of the described types in the IDL file. * - * This file was generated by the tool gen. + * This file was generated by the tool fastddsgen. */ #ifdef _WIN32 @@ -29,82 +29,20 @@ char dummy; #include "test_complete.h" #include + #include using namespace eprosima::fastcdr::exception; #include -#define CompleteTestType_max_cdr_typesize 75752ULL; - -#define StructType_max_cdr_typesize 640ULL; -#define eprosima_test2_StructType2_max_cdr_typesize 320ULL; - - -#define KeyedCompleteTestType_max_cdr_typesize 75760ULL; - -#define CompleteTestType_max_key_cdr_typesize 0ULL; - -#define StructType_max_key_cdr_typesize 0ULL; -#define eprosima_test2_StructType2_max_key_cdr_typesize 0ULL; - - -#define KeyedCompleteTestType_max_key_cdr_typesize 4ULL; - - - StructType::StructType() { - // char m_char_field - m_char_field = 0; - // octet m_uint8_field - m_uint8_field = 0; - // short m_int16_field - m_int16_field = 0; - // unsigned short m_uint16_field - m_uint16_field = 0; - // long m_int32_field - m_int32_field = 0; - // unsigned long m_uint32_field - m_uint32_field = 0; - // long long m_int64_field - m_int64_field = 0; - // unsigned long long m_uint64_field - m_uint64_field = 0; - // float m_float_field - m_float_field = 0.0; - // double m_double_field - m_double_field = 0.0; - // boolean m_bool_field - m_bool_field = false; - // string m_string_field - m_string_field =""; - // Color m_enum_field - m_enum_field = ::RED; - // Material m_enum2_field - m_enum2_field = ::WOOD; - // eprosima::test2::StructType2 m_included_module_struct - } StructType::~StructType() { - - - - - - - - - - - - - - - } StructType::StructType( @@ -128,7 +66,7 @@ StructType::StructType( } StructType::StructType( - StructType&& x) noexcept + StructType&& x) noexcept { m_char_field = x.m_char_field; m_uint8_field = x.m_uint8_field; @@ -196,8 +134,21 @@ StructType& StructType::operator =( bool StructType::operator ==( const StructType& x) const { - - return (m_char_field == x.m_char_field && m_uint8_field == x.m_uint8_field && m_int16_field == x.m_int16_field && m_uint16_field == x.m_uint16_field && m_int32_field == x.m_int32_field && m_uint32_field == x.m_uint32_field && m_int64_field == x.m_int64_field && m_uint64_field == x.m_uint64_field && m_float_field == x.m_float_field && m_double_field == x.m_double_field && m_bool_field == x.m_bool_field && m_string_field == x.m_string_field && m_enum_field == x.m_enum_field && m_enum2_field == x.m_enum2_field && m_included_module_struct == x.m_included_module_struct); + return (m_char_field == x.m_char_field && + m_uint8_field == x.m_uint8_field && + m_int16_field == x.m_int16_field && + m_uint16_field == x.m_uint16_field && + m_int32_field == x.m_int32_field && + m_uint32_field == x.m_uint32_field && + m_int64_field == x.m_int64_field && + m_uint64_field == x.m_uint64_field && + m_float_field == x.m_float_field && + m_double_field == x.m_double_field && + m_bool_field == x.m_bool_field && + m_string_field == x.m_string_field && + m_enum_field == x.m_enum_field && + m_enum2_field == x.m_enum2_field && + m_included_module_struct == x.m_included_module_struct); } bool StructType::operator !=( @@ -206,120 +157,6 @@ bool StructType::operator !=( return !(*this == x); } -size_t StructType::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return StructType_max_cdr_typesize; -} - -size_t StructType::getCdrSerializedSize( - const StructType& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.string_field().size() + 1; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += eprosima::test2::StructType2::getCdrSerializedSize(data.included_module_struct(), current_alignment); - - return current_alignment - initial_alignment; -} - -void StructType::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - - scdr << m_char_field; - scdr << m_uint8_field; - scdr << m_int16_field; - scdr << m_uint16_field; - scdr << m_int32_field; - scdr << m_uint32_field; - scdr << m_int64_field; - scdr << m_uint64_field; - scdr << m_float_field; - scdr << m_double_field; - scdr << m_bool_field; - scdr << m_string_field.c_str(); - scdr << (uint32_t)m_enum_field; - scdr << (uint32_t)m_enum2_field; - scdr << m_included_module_struct; - -} - -void StructType::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_char_field; - dcdr >> m_uint8_field; - dcdr >> m_int16_field; - dcdr >> m_uint16_field; - dcdr >> m_int32_field; - dcdr >> m_uint32_field; - dcdr >> m_int64_field; - dcdr >> m_uint64_field; - dcdr >> m_float_field; - dcdr >> m_double_field; - dcdr >> m_bool_field; - dcdr >> m_string_field; - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum_field = (Color)enum_value; - } - - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum2_field = (Material)enum_value; - } - - dcdr >> m_included_module_struct; -} - /*! * @brief This function sets a value in member char_field * @param _char_field New value for member char_field @@ -348,6 +185,7 @@ char& StructType::char_field() return m_char_field; } + /*! * @brief This function sets a value in member uint8_field * @param _uint8_field New value for member uint8_field @@ -376,6 +214,7 @@ uint8_t& StructType::uint8_field() return m_uint8_field; } + /*! * @brief This function sets a value in member int16_field * @param _int16_field New value for member int16_field @@ -404,6 +243,7 @@ int16_t& StructType::int16_field() return m_int16_field; } + /*! * @brief This function sets a value in member uint16_field * @param _uint16_field New value for member uint16_field @@ -432,6 +272,7 @@ uint16_t& StructType::uint16_field() return m_uint16_field; } + /*! * @brief This function sets a value in member int32_field * @param _int32_field New value for member int32_field @@ -460,6 +301,7 @@ int32_t& StructType::int32_field() return m_int32_field; } + /*! * @brief This function sets a value in member uint32_field * @param _uint32_field New value for member uint32_field @@ -488,6 +330,7 @@ uint32_t& StructType::uint32_field() return m_uint32_field; } + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -516,6 +359,7 @@ int64_t& StructType::int64_field() return m_int64_field; } + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -544,6 +388,7 @@ uint64_t& StructType::uint64_field() return m_uint64_field; } + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -572,6 +417,7 @@ float& StructType::float_field() return m_float_field; } + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -600,6 +446,7 @@ double& StructType::double_field() return m_double_field; } + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -628,6 +475,7 @@ bool& StructType::bool_field() return m_bool_field; } + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -665,6 +513,8 @@ std::string& StructType::string_field() { return m_string_field; } + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -693,6 +543,7 @@ Color& StructType::enum_field() return m_enum_field; } + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -721,6 +572,7 @@ Material& StructType::enum2_field() return m_enum2_field; } + /*! * @brief This function copies the value in member included_module_struct * @param _included_module_struct New value to be copied in member included_module_struct @@ -760,205 +612,15 @@ eprosima::test2::StructType2& StructType::included_module_struct() } -size_t StructType::getKeyMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return StructType_max_key_cdr_typesize; -} - -bool StructType::isKeyDefined() -{ - return false; -} - -void StructType::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - - CompleteTestType::CompleteTestType() { - // char m_char_field - m_char_field = 0; - // octet m_uint8_field - m_uint8_field = 0; - // short m_int16_field - m_int16_field = 0; - // unsigned short m_uint16_field - m_uint16_field = 0; - // long m_int32_field - m_int32_field = 0; - // unsigned long m_uint32_field - m_uint32_field = 0; - // long long m_int64_field - m_int64_field = 0; - // unsigned long long m_uint64_field - m_uint64_field = 0; - // float m_float_field - m_float_field = 0.0; - // double m_double_field - m_double_field = 0.0; - // boolean m_bool_field - m_bool_field = false; - // string m_string_field - m_string_field =""; - // Color m_enum_field - m_enum_field = ::RED; - // Material m_enum2_field - m_enum2_field = ::WOOD; - // StructType m_struct_field - - // char m_array_char_field - memset(&m_array_char_field, 0, (3) * 1); - // octet m_array_uint8_field - memset(&m_array_uint8_field, 0, (3) * 1); - // short m_array_int16_field - memset(&m_array_int16_field, 0, (3) * 2); - // unsigned short m_array_uint16_field - memset(&m_array_uint16_field, 0, (3) * 2); - // long m_array_int32_field - memset(&m_array_int32_field, 0, (3) * 4); - // unsigned long m_array_uint32_field - memset(&m_array_uint32_field, 0, (3) * 4); - // long long m_array_int64_field - memset(&m_array_int64_field, 0, (3) * 8); - // unsigned long long m_array_uint64_field - memset(&m_array_uint64_field, 0, (3) * 8); - // float m_array_float_field - memset(&m_array_float_field, 0, (3) * 4); - // double m_array_double_field - memset(&m_array_double_field, 0, (3) * 8); - // boolean m_array_bool_field - memset(&m_array_bool_field, 0, (3) * 1); - // Color m_array_enum_field - memset(&m_array_enum_field, 0, (3) * 4); - // Material m_array_enum2_field - memset(&m_array_enum2_field, 0, (3) * 4); - // StructType m_array_struct_field - - // sequence m_bounded_sequence_char_field - - // sequence m_bounded_sequence_uint8_field - - // sequence m_bounded_sequence_int16_field - - // sequence m_bounded_sequence_uint16_field - - // sequence m_bounded_sequence_int32_field - - // sequence m_bounded_sequence_uint32_field - - // sequence m_bounded_sequence_int64_field - - // sequence m_bounded_sequence_uint64_field - - // sequence m_bounded_sequence_float_field - - // sequence m_bounded_sequence_double_field - - // sequence m_bounded_sequence_bool_field - - // sequence m_bounded_sequence_enum_field - - // sequence m_bounded_sequence_enum2_field - - // sequence m_bounded_sequence_struct_field - - // sequence m_unbounded_sequence_char_field - - // sequence m_unbounded_sequence_uint8_field - - // sequence m_unbounded_sequence_int16_field - - // sequence m_unbounded_sequence_uint16_field - - // sequence m_unbounded_sequence_int32_field - - // sequence m_unbounded_sequence_uint32_field - - // sequence m_unbounded_sequence_int64_field - - // sequence m_unbounded_sequence_uint64_field - - // sequence m_unbounded_sequence_float_field - - // sequence m_unbounded_sequence_double_field - - // sequence m_unbounded_sequence_bool_field - - // sequence m_unbounded_sequence_enum_field - - // sequence m_unbounded_sequence_enum2_field - - // sequence m_unbounded_sequence_struct_field - } CompleteTestType::~CompleteTestType() { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } CompleteTestType::CompleteTestType( @@ -1024,7 +686,7 @@ CompleteTestType::CompleteTestType( } CompleteTestType::CompleteTestType( - CompleteTestType&& x) noexcept + CompleteTestType&& x) noexcept { m_char_field = x.m_char_field; m_uint8_field = x.m_uint8_field; @@ -1218,8 +880,63 @@ CompleteTestType& CompleteTestType::operator =( bool CompleteTestType::operator ==( const CompleteTestType& x) const { - - return (m_char_field == x.m_char_field && m_uint8_field == x.m_uint8_field && m_int16_field == x.m_int16_field && m_uint16_field == x.m_uint16_field && m_int32_field == x.m_int32_field && m_uint32_field == x.m_uint32_field && m_int64_field == x.m_int64_field && m_uint64_field == x.m_uint64_field && m_float_field == x.m_float_field && m_double_field == x.m_double_field && m_bool_field == x.m_bool_field && m_string_field == x.m_string_field && m_enum_field == x.m_enum_field && m_enum2_field == x.m_enum2_field && m_struct_field == x.m_struct_field && m_array_char_field == x.m_array_char_field && m_array_uint8_field == x.m_array_uint8_field && m_array_int16_field == x.m_array_int16_field && m_array_uint16_field == x.m_array_uint16_field && m_array_int32_field == x.m_array_int32_field && m_array_uint32_field == x.m_array_uint32_field && m_array_int64_field == x.m_array_int64_field && m_array_uint64_field == x.m_array_uint64_field && m_array_float_field == x.m_array_float_field && m_array_double_field == x.m_array_double_field && m_array_bool_field == x.m_array_bool_field && m_array_enum_field == x.m_array_enum_field && m_array_enum2_field == x.m_array_enum2_field && m_array_struct_field == x.m_array_struct_field && m_bounded_sequence_char_field == x.m_bounded_sequence_char_field && m_bounded_sequence_uint8_field == x.m_bounded_sequence_uint8_field && m_bounded_sequence_int16_field == x.m_bounded_sequence_int16_field && m_bounded_sequence_uint16_field == x.m_bounded_sequence_uint16_field && m_bounded_sequence_int32_field == x.m_bounded_sequence_int32_field && m_bounded_sequence_uint32_field == x.m_bounded_sequence_uint32_field && m_bounded_sequence_int64_field == x.m_bounded_sequence_int64_field && m_bounded_sequence_uint64_field == x.m_bounded_sequence_uint64_field && m_bounded_sequence_float_field == x.m_bounded_sequence_float_field && m_bounded_sequence_double_field == x.m_bounded_sequence_double_field && m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && m_bounded_sequence_enum_field == x.m_bounded_sequence_enum_field && m_bounded_sequence_enum2_field == x.m_bounded_sequence_enum2_field && m_bounded_sequence_struct_field == x.m_bounded_sequence_struct_field && m_unbounded_sequence_char_field == x.m_unbounded_sequence_char_field && m_unbounded_sequence_uint8_field == x.m_unbounded_sequence_uint8_field && m_unbounded_sequence_int16_field == x.m_unbounded_sequence_int16_field && m_unbounded_sequence_uint16_field == x.m_unbounded_sequence_uint16_field && m_unbounded_sequence_int32_field == x.m_unbounded_sequence_int32_field && m_unbounded_sequence_uint32_field == x.m_unbounded_sequence_uint32_field && m_unbounded_sequence_int64_field == x.m_unbounded_sequence_int64_field && m_unbounded_sequence_uint64_field == x.m_unbounded_sequence_uint64_field && m_unbounded_sequence_float_field == x.m_unbounded_sequence_float_field && m_unbounded_sequence_double_field == x.m_unbounded_sequence_double_field && m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && m_unbounded_sequence_enum_field == x.m_unbounded_sequence_enum_field && m_unbounded_sequence_enum2_field == x.m_unbounded_sequence_enum2_field && m_unbounded_sequence_struct_field == x.m_unbounded_sequence_struct_field); + return (m_char_field == x.m_char_field && + m_uint8_field == x.m_uint8_field && + m_int16_field == x.m_int16_field && + m_uint16_field == x.m_uint16_field && + m_int32_field == x.m_int32_field && + m_uint32_field == x.m_uint32_field && + m_int64_field == x.m_int64_field && + m_uint64_field == x.m_uint64_field && + m_float_field == x.m_float_field && + m_double_field == x.m_double_field && + m_bool_field == x.m_bool_field && + m_string_field == x.m_string_field && + m_enum_field == x.m_enum_field && + m_enum2_field == x.m_enum2_field && + m_struct_field == x.m_struct_field && + m_array_char_field == x.m_array_char_field && + m_array_uint8_field == x.m_array_uint8_field && + m_array_int16_field == x.m_array_int16_field && + m_array_uint16_field == x.m_array_uint16_field && + m_array_int32_field == x.m_array_int32_field && + m_array_uint32_field == x.m_array_uint32_field && + m_array_int64_field == x.m_array_int64_field && + m_array_uint64_field == x.m_array_uint64_field && + m_array_float_field == x.m_array_float_field && + m_array_double_field == x.m_array_double_field && + m_array_bool_field == x.m_array_bool_field && + m_array_enum_field == x.m_array_enum_field && + m_array_enum2_field == x.m_array_enum2_field && + m_array_struct_field == x.m_array_struct_field && + m_bounded_sequence_char_field == x.m_bounded_sequence_char_field && + m_bounded_sequence_uint8_field == x.m_bounded_sequence_uint8_field && + m_bounded_sequence_int16_field == x.m_bounded_sequence_int16_field && + m_bounded_sequence_uint16_field == x.m_bounded_sequence_uint16_field && + m_bounded_sequence_int32_field == x.m_bounded_sequence_int32_field && + m_bounded_sequence_uint32_field == x.m_bounded_sequence_uint32_field && + m_bounded_sequence_int64_field == x.m_bounded_sequence_int64_field && + m_bounded_sequence_uint64_field == x.m_bounded_sequence_uint64_field && + m_bounded_sequence_float_field == x.m_bounded_sequence_float_field && + m_bounded_sequence_double_field == x.m_bounded_sequence_double_field && + m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && + m_bounded_sequence_enum_field == x.m_bounded_sequence_enum_field && + m_bounded_sequence_enum2_field == x.m_bounded_sequence_enum2_field && + m_bounded_sequence_struct_field == x.m_bounded_sequence_struct_field && + m_unbounded_sequence_char_field == x.m_unbounded_sequence_char_field && + m_unbounded_sequence_uint8_field == x.m_unbounded_sequence_uint8_field && + m_unbounded_sequence_int16_field == x.m_unbounded_sequence_int16_field && + m_unbounded_sequence_uint16_field == x.m_unbounded_sequence_uint16_field && + m_unbounded_sequence_int32_field == x.m_unbounded_sequence_int32_field && + m_unbounded_sequence_uint32_field == x.m_unbounded_sequence_uint32_field && + m_unbounded_sequence_int64_field == x.m_unbounded_sequence_int64_field && + m_unbounded_sequence_uint64_field == x.m_unbounded_sequence_uint64_field && + m_unbounded_sequence_float_field == x.m_unbounded_sequence_float_field && + m_unbounded_sequence_double_field == x.m_unbounded_sequence_double_field && + m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && + m_unbounded_sequence_enum_field == x.m_unbounded_sequence_enum_field && + m_unbounded_sequence_enum2_field == x.m_unbounded_sequence_enum2_field && + m_unbounded_sequence_struct_field == x.m_unbounded_sequence_struct_field); } bool CompleteTestType::operator !=( @@ -1228,695 +945,159 @@ bool CompleteTestType::operator !=( return !(*this == x); } -size_t CompleteTestType::getMaxCdrSerializedSize( - size_t current_alignment) +/*! + * @brief This function sets a value in member char_field + * @param _char_field New value for member char_field + */ +void CompleteTestType::char_field( + char _char_field) { - static_cast(current_alignment); - return CompleteTestType_max_cdr_typesize; + m_char_field = _char_field; } -size_t CompleteTestType::getCdrSerializedSize( - const CompleteTestType& data, - size_t current_alignment) +/*! + * @brief This function returns the value of member char_field + * @return Value of member char_field + */ +char CompleteTestType::char_field() const { - (void)data; - size_t initial_alignment = current_alignment; - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); + return m_char_field; +} +/*! + * @brief This function returns a reference to member char_field + * @return Reference to member char_field + */ +char& CompleteTestType::char_field() +{ + return m_char_field; +} - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); +/*! + * @brief This function sets a value in member uint8_field + * @param _uint8_field New value for member uint8_field + */ +void CompleteTestType::uint8_field( + uint8_t _uint8_field) +{ + m_uint8_field = _uint8_field; +} - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); +/*! + * @brief This function returns the value of member uint8_field + * @return Value of member uint8_field + */ +uint8_t CompleteTestType::uint8_field() const +{ + return m_uint8_field; +} +/*! + * @brief This function returns a reference to member uint8_field + * @return Reference to member uint8_field + */ +uint8_t& CompleteTestType::uint8_field() +{ + return m_uint8_field; +} - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); +/*! + * @brief This function sets a value in member int16_field + * @param _int16_field New value for member int16_field + */ +void CompleteTestType::int16_field( + int16_t _int16_field) +{ + m_int16_field = _int16_field; +} - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); +/*! + * @brief This function returns the value of member int16_field + * @return Value of member int16_field + */ +int16_t CompleteTestType::int16_field() const +{ + return m_int16_field; +} - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.string_field().size() + 1; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += StructType::getCdrSerializedSize(data.struct_field(), current_alignment); - current_alignment += ((3) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += ((3) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += ((3) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - current_alignment += ((3) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - current_alignment += ((3) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - current_alignment += ((3) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.array_struct_field().size(); ++a) - { - current_alignment += StructType::getCdrSerializedSize(data.array_struct_field().at(a), current_alignment); - } - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_char_field().size() > 0) - { - current_alignment += (data.bounded_sequence_char_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint8_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint8_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_int16_field().size() > 0) - { - current_alignment += (data.bounded_sequence_int16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint16_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_int32_field().size() > 0) - { - current_alignment += (data.bounded_sequence_int32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint32_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_int64_field().size() > 0) - { - current_alignment += (data.bounded_sequence_int64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint64_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_float_field().size() > 0) - { - current_alignment += (data.bounded_sequence_float_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_double_field().size() > 0) - { - current_alignment += (data.bounded_sequence_double_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_bool_field().size() > 0) - { - current_alignment += (data.bounded_sequence_bool_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_enum_field().size() > 0) - { - current_alignment += (data.bounded_sequence_enum_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_enum2_field().size() > 0) - { - current_alignment += (data.bounded_sequence_enum2_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.bounded_sequence_struct_field().size(); ++a) - { - current_alignment += StructType::getCdrSerializedSize(data.bounded_sequence_struct_field().at(a), current_alignment);} - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_char_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_char_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint8_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint8_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_int16_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_int16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint16_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_int32_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_int32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint32_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_int64_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_int64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint64_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_float_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_float_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_double_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_double_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_bool_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_bool_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_enum_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_enum_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_enum2_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_enum2_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.unbounded_sequence_struct_field().size(); ++a) - { - current_alignment += StructType::getCdrSerializedSize(data.unbounded_sequence_struct_field().at(a), current_alignment);} - - - return current_alignment - initial_alignment; -} - -void CompleteTestType::serialize( - eprosima::fastcdr::Cdr& scdr) const +/*! + * @brief This function returns a reference to member int16_field + * @return Reference to member int16_field + */ +int16_t& CompleteTestType::int16_field() { - - scdr << m_char_field; - scdr << m_uint8_field; - scdr << m_int16_field; - scdr << m_uint16_field; - scdr << m_int32_field; - scdr << m_uint32_field; - scdr << m_int64_field; - scdr << m_uint64_field; - scdr << m_float_field; - scdr << m_double_field; - scdr << m_bool_field; - scdr << m_string_field.c_str(); - scdr << (uint32_t)m_enum_field; - scdr << (uint32_t)m_enum2_field; - scdr << m_struct_field; - scdr << m_array_char_field; - - scdr << m_array_uint8_field; - - scdr << m_array_int16_field; - - scdr << m_array_uint16_field; - - scdr << m_array_int32_field; - - scdr << m_array_uint32_field; - - scdr << m_array_int64_field; - - scdr << m_array_uint64_field; - - scdr << m_array_float_field; - - scdr << m_array_double_field; - - scdr << m_array_bool_field; - - scdr.serializeArray(reinterpret_cast(m_array_enum_field.data()), m_array_enum_field.size()); - - - scdr.serializeArray(reinterpret_cast(m_array_enum2_field.data()), m_array_enum2_field.size()); - - - scdr << m_array_struct_field; - - scdr << m_bounded_sequence_char_field; - scdr << m_bounded_sequence_uint8_field; - scdr << m_bounded_sequence_int16_field; - scdr << m_bounded_sequence_uint16_field; - scdr << m_bounded_sequence_int32_field; - scdr << m_bounded_sequence_uint32_field; - scdr << m_bounded_sequence_int64_field; - scdr << m_bounded_sequence_uint64_field; - scdr << m_bounded_sequence_float_field; - scdr << m_bounded_sequence_double_field; - scdr << m_bounded_sequence_bool_field; - scdr << static_cast(m_bounded_sequence_enum_field.size()); - scdr.serializeArray(reinterpret_cast(m_bounded_sequence_enum_field.data()), m_bounded_sequence_enum_field.size()); - - scdr << static_cast(m_bounded_sequence_enum2_field.size()); - scdr.serializeArray(reinterpret_cast(m_bounded_sequence_enum2_field.data()), m_bounded_sequence_enum2_field.size()); - - scdr << m_bounded_sequence_struct_field; - scdr << m_unbounded_sequence_char_field; - scdr << m_unbounded_sequence_uint8_field; - scdr << m_unbounded_sequence_int16_field; - scdr << m_unbounded_sequence_uint16_field; - scdr << m_unbounded_sequence_int32_field; - scdr << m_unbounded_sequence_uint32_field; - scdr << m_unbounded_sequence_int64_field; - scdr << m_unbounded_sequence_uint64_field; - scdr << m_unbounded_sequence_float_field; - scdr << m_unbounded_sequence_double_field; - scdr << m_unbounded_sequence_bool_field; - scdr << static_cast(m_unbounded_sequence_enum_field.size()); - scdr.serializeArray(reinterpret_cast(m_unbounded_sequence_enum_field.data()), m_unbounded_sequence_enum_field.size()); - - scdr << static_cast(m_unbounded_sequence_enum2_field.size()); - scdr.serializeArray(reinterpret_cast(m_unbounded_sequence_enum2_field.data()), m_unbounded_sequence_enum2_field.size()); - - scdr << m_unbounded_sequence_struct_field; - + return m_int16_field; } -void CompleteTestType::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_char_field; - dcdr >> m_uint8_field; - dcdr >> m_int16_field; - dcdr >> m_uint16_field; - dcdr >> m_int32_field; - dcdr >> m_uint32_field; - dcdr >> m_int64_field; - dcdr >> m_uint64_field; - dcdr >> m_float_field; - dcdr >> m_double_field; - dcdr >> m_bool_field; - dcdr >> m_string_field; - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum_field = (Color)enum_value; - } - - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum2_field = (Material)enum_value; - } - - dcdr >> m_struct_field; - dcdr >> m_array_char_field; - - dcdr >> m_array_uint8_field; - - dcdr >> m_array_int16_field; - - dcdr >> m_array_uint16_field; - - dcdr >> m_array_int32_field; - - dcdr >> m_array_uint32_field; - - dcdr >> m_array_int64_field; - - dcdr >> m_array_uint64_field; - - dcdr >> m_array_float_field; - - dcdr >> m_array_double_field; - - dcdr >> m_array_bool_field; - - dcdr.deserializeArray(reinterpret_cast(m_array_enum_field.data()), m_array_enum_field.size()); - - - dcdr.deserializeArray(reinterpret_cast(m_array_enum2_field.data()), m_array_enum2_field.size()); - - - dcdr >> m_array_struct_field; - - dcdr >> m_bounded_sequence_char_field; - dcdr >> m_bounded_sequence_uint8_field; - dcdr >> m_bounded_sequence_int16_field; - dcdr >> m_bounded_sequence_uint16_field; - dcdr >> m_bounded_sequence_int32_field; - dcdr >> m_bounded_sequence_uint32_field; - dcdr >> m_bounded_sequence_int64_field; - dcdr >> m_bounded_sequence_uint64_field; - dcdr >> m_bounded_sequence_float_field; - dcdr >> m_bounded_sequence_double_field; - dcdr >> m_bounded_sequence_bool_field; - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_bounded_sequence_enum_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_bounded_sequence_enum_field.data()), seq_length); - } - - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_bounded_sequence_enum2_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_bounded_sequence_enum2_field.data()), seq_length); - } - - dcdr >> m_bounded_sequence_struct_field; - dcdr >> m_unbounded_sequence_char_field; - dcdr >> m_unbounded_sequence_uint8_field; - dcdr >> m_unbounded_sequence_int16_field; - dcdr >> m_unbounded_sequence_uint16_field; - dcdr >> m_unbounded_sequence_int32_field; - dcdr >> m_unbounded_sequence_uint32_field; - dcdr >> m_unbounded_sequence_int64_field; - dcdr >> m_unbounded_sequence_uint64_field; - dcdr >> m_unbounded_sequence_float_field; - dcdr >> m_unbounded_sequence_double_field; - dcdr >> m_unbounded_sequence_bool_field; - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_unbounded_sequence_enum_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_unbounded_sequence_enum_field.data()), seq_length); - } - - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_unbounded_sequence_enum2_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_unbounded_sequence_enum2_field.data()), seq_length); - } - - dcdr >> m_unbounded_sequence_struct_field; -} /*! - * @brief This function sets a value in member char_field - * @param _char_field New value for member char_field + * @brief This function sets a value in member uint16_field + * @param _uint16_field New value for member uint16_field */ -void CompleteTestType::char_field( - char _char_field) +void CompleteTestType::uint16_field( + uint16_t _uint16_field) { - m_char_field = _char_field; + m_uint16_field = _uint16_field; } /*! - * @brief This function returns the value of member char_field - * @return Value of member char_field + * @brief This function returns the value of member uint16_field + * @return Value of member uint16_field */ -char CompleteTestType::char_field() const +uint16_t CompleteTestType::uint16_field() const { - return m_char_field; + return m_uint16_field; } /*! - * @brief This function returns a reference to member char_field - * @return Reference to member char_field + * @brief This function returns a reference to member uint16_field + * @return Reference to member uint16_field */ -char& CompleteTestType::char_field() +uint16_t& CompleteTestType::uint16_field() { - return m_char_field; + return m_uint16_field; } + /*! - * @brief This function sets a value in member uint8_field - * @param _uint8_field New value for member uint8_field + * @brief This function sets a value in member int32_field + * @param _int32_field New value for member int32_field */ -void CompleteTestType::uint8_field( - uint8_t _uint8_field) +void CompleteTestType::int32_field( + int32_t _int32_field) { - m_uint8_field = _uint8_field; + m_int32_field = _int32_field; } /*! - * @brief This function returns the value of member uint8_field - * @return Value of member uint8_field + * @brief This function returns the value of member int32_field + * @return Value of member int32_field */ -uint8_t CompleteTestType::uint8_field() const +int32_t CompleteTestType::int32_field() const { - return m_uint8_field; + return m_int32_field; } /*! - * @brief This function returns a reference to member uint8_field - * @return Reference to member uint8_field + * @brief This function returns a reference to member int32_field + * @return Reference to member int32_field */ -uint8_t& CompleteTestType::uint8_field() +int32_t& CompleteTestType::int32_field() { - return m_uint8_field; + return m_int32_field; } + /*! - * @brief This function sets a value in member int16_field - * @param _int16_field New value for member int16_field + * @brief This function sets a value in member uint32_field + * @param _uint32_field New value for member uint32_field */ -void CompleteTestType::int16_field( - int16_t _int16_field) +void CompleteTestType::uint32_field( + uint32_t _uint32_field) { - m_int16_field = _int16_field; -} - -/*! - * @brief This function returns the value of member int16_field - * @return Value of member int16_field - */ -int16_t CompleteTestType::int16_field() const -{ - return m_int16_field; -} - -/*! - * @brief This function returns a reference to member int16_field - * @return Reference to member int16_field - */ -int16_t& CompleteTestType::int16_field() -{ - return m_int16_field; -} - -/*! - * @brief This function sets a value in member uint16_field - * @param _uint16_field New value for member uint16_field - */ -void CompleteTestType::uint16_field( - uint16_t _uint16_field) -{ - m_uint16_field = _uint16_field; -} - -/*! - * @brief This function returns the value of member uint16_field - * @return Value of member uint16_field - */ -uint16_t CompleteTestType::uint16_field() const -{ - return m_uint16_field; -} - -/*! - * @brief This function returns a reference to member uint16_field - * @return Reference to member uint16_field - */ -uint16_t& CompleteTestType::uint16_field() -{ - return m_uint16_field; -} - -/*! - * @brief This function sets a value in member int32_field - * @param _int32_field New value for member int32_field - */ -void CompleteTestType::int32_field( - int32_t _int32_field) -{ - m_int32_field = _int32_field; -} - -/*! - * @brief This function returns the value of member int32_field - * @return Value of member int32_field - */ -int32_t CompleteTestType::int32_field() const -{ - return m_int32_field; -} - -/*! - * @brief This function returns a reference to member int32_field - * @return Reference to member int32_field - */ -int32_t& CompleteTestType::int32_field() -{ - return m_int32_field; -} - -/*! - * @brief This function sets a value in member uint32_field - * @param _uint32_field New value for member uint32_field - */ -void CompleteTestType::uint32_field( - uint32_t _uint32_field) -{ - m_uint32_field = _uint32_field; + m_uint32_field = _uint32_field; } /*! @@ -1937,6 +1118,7 @@ uint32_t& CompleteTestType::uint32_field() return m_uint32_field; } + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -1965,6 +1147,7 @@ int64_t& CompleteTestType::int64_field() return m_int64_field; } + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -1993,6 +1176,7 @@ uint64_t& CompleteTestType::uint64_field() return m_uint64_field; } + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -2021,6 +1205,7 @@ float& CompleteTestType::float_field() return m_float_field; } + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -2049,6 +1234,7 @@ double& CompleteTestType::double_field() return m_double_field; } + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -2077,6 +1263,7 @@ bool& CompleteTestType::bool_field() return m_bool_field; } + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -2114,6 +1301,8 @@ std::string& CompleteTestType::string_field() { return m_string_field; } + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -2142,6 +1331,7 @@ Color& CompleteTestType::enum_field() return m_enum_field; } + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -2170,6 +1360,7 @@ Material& CompleteTestType::enum2_field() return m_enum2_field; } + /*! * @brief This function copies the value in member struct_field * @param _struct_field New value to be copied in member struct_field @@ -2207,6 +1398,8 @@ StructType& CompleteTestType::struct_field() { return m_struct_field; } + + /*! * @brief This function copies the value in member array_char_field * @param _array_char_field New value to be copied in member array_char_field @@ -2244,6 +1437,8 @@ std::array& CompleteTestType::array_char_field() { return m_array_char_field; } + + /*! * @brief This function copies the value in member array_uint8_field * @param _array_uint8_field New value to be copied in member array_uint8_field @@ -2281,6 +1476,8 @@ std::array& CompleteTestType::array_uint8_field() { return m_array_uint8_field; } + + /*! * @brief This function copies the value in member array_int16_field * @param _array_int16_field New value to be copied in member array_int16_field @@ -2318,6 +1515,8 @@ std::array& CompleteTestType::array_int16_field() { return m_array_int16_field; } + + /*! * @brief This function copies the value in member array_uint16_field * @param _array_uint16_field New value to be copied in member array_uint16_field @@ -2355,6 +1554,8 @@ std::array& CompleteTestType::array_uint16_field() { return m_array_uint16_field; } + + /*! * @brief This function copies the value in member array_int32_field * @param _array_int32_field New value to be copied in member array_int32_field @@ -2392,6 +1593,8 @@ std::array& CompleteTestType::array_int32_field() { return m_array_int32_field; } + + /*! * @brief This function copies the value in member array_uint32_field * @param _array_uint32_field New value to be copied in member array_uint32_field @@ -2429,6 +1632,8 @@ std::array& CompleteTestType::array_uint32_field() { return m_array_uint32_field; } + + /*! * @brief This function copies the value in member array_int64_field * @param _array_int64_field New value to be copied in member array_int64_field @@ -2466,6 +1671,8 @@ std::array& CompleteTestType::array_int64_field() { return m_array_int64_field; } + + /*! * @brief This function copies the value in member array_uint64_field * @param _array_uint64_field New value to be copied in member array_uint64_field @@ -2503,6 +1710,8 @@ std::array& CompleteTestType::array_uint64_field() { return m_array_uint64_field; } + + /*! * @brief This function copies the value in member array_float_field * @param _array_float_field New value to be copied in member array_float_field @@ -2540,6 +1749,8 @@ std::array& CompleteTestType::array_float_field() { return m_array_float_field; } + + /*! * @brief This function copies the value in member array_double_field * @param _array_double_field New value to be copied in member array_double_field @@ -2577,6 +1788,8 @@ std::array& CompleteTestType::array_double_field() { return m_array_double_field; } + + /*! * @brief This function copies the value in member array_bool_field * @param _array_bool_field New value to be copied in member array_bool_field @@ -2614,6 +1827,8 @@ std::array& CompleteTestType::array_bool_field() { return m_array_bool_field; } + + /*! * @brief This function copies the value in member array_enum_field * @param _array_enum_field New value to be copied in member array_enum_field @@ -2651,6 +1866,8 @@ std::array& CompleteTestType::array_enum_field() { return m_array_enum_field; } + + /*! * @brief This function copies the value in member array_enum2_field * @param _array_enum2_field New value to be copied in member array_enum2_field @@ -2688,6 +1905,8 @@ std::array& CompleteTestType::array_enum2_field() { return m_array_enum2_field; } + + /*! * @brief This function copies the value in member array_struct_field * @param _array_struct_field New value to be copied in member array_struct_field @@ -2725,6 +1944,8 @@ std::array& CompleteTestType::array_struct_field() { return m_array_struct_field; } + + /*! * @brief This function copies the value in member bounded_sequence_char_field * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field @@ -2762,6 +1983,8 @@ std::vector& CompleteTestType::bounded_sequence_char_field() { return m_bounded_sequence_char_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint8_field * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field @@ -2799,6 +2022,8 @@ std::vector& CompleteTestType::bounded_sequence_uint8_field() { return m_bounded_sequence_uint8_field; } + + /*! * @brief This function copies the value in member bounded_sequence_int16_field * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field @@ -2836,6 +2061,8 @@ std::vector& CompleteTestType::bounded_sequence_int16_field() { return m_bounded_sequence_int16_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint16_field * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field @@ -2873,6 +2100,8 @@ std::vector& CompleteTestType::bounded_sequence_uint16_field() { return m_bounded_sequence_uint16_field; } + + /*! * @brief This function copies the value in member bounded_sequence_int32_field * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field @@ -2910,6 +2139,8 @@ std::vector& CompleteTestType::bounded_sequence_int32_field() { return m_bounded_sequence_int32_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint32_field * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field @@ -2947,6 +2178,8 @@ std::vector& CompleteTestType::bounded_sequence_uint32_field() { return m_bounded_sequence_uint32_field; } + + /*! * @brief This function copies the value in member bounded_sequence_int64_field * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field @@ -2984,6 +2217,8 @@ std::vector& CompleteTestType::bounded_sequence_int64_field() { return m_bounded_sequence_int64_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint64_field * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field @@ -3021,6 +2256,8 @@ std::vector& CompleteTestType::bounded_sequence_uint64_field() { return m_bounded_sequence_uint64_field; } + + /*! * @brief This function copies the value in member bounded_sequence_float_field * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field @@ -3058,6 +2295,8 @@ std::vector& CompleteTestType::bounded_sequence_float_field() { return m_bounded_sequence_float_field; } + + /*! * @brief This function copies the value in member bounded_sequence_double_field * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field @@ -3095,6 +2334,8 @@ std::vector& CompleteTestType::bounded_sequence_double_field() { return m_bounded_sequence_double_field; } + + /*! * @brief This function copies the value in member bounded_sequence_bool_field * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field @@ -3132,6 +2373,8 @@ std::vector& CompleteTestType::bounded_sequence_bool_field() { return m_bounded_sequence_bool_field; } + + /*! * @brief This function copies the value in member bounded_sequence_enum_field * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field @@ -3169,6 +2412,8 @@ std::vector& CompleteTestType::bounded_sequence_enum_field() { return m_bounded_sequence_enum_field; } + + /*! * @brief This function copies the value in member bounded_sequence_enum2_field * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field @@ -3206,6 +2451,8 @@ std::vector& CompleteTestType::bounded_sequence_enum2_field() { return m_bounded_sequence_enum2_field; } + + /*! * @brief This function copies the value in member bounded_sequence_struct_field * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field @@ -3243,6 +2490,8 @@ std::vector& CompleteTestType::bounded_sequence_struct_field() { return m_bounded_sequence_struct_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_char_field * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field @@ -3280,6 +2529,8 @@ std::vector& CompleteTestType::unbounded_sequence_char_field() { return m_unbounded_sequence_char_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint8_field * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field @@ -3317,6 +2568,8 @@ std::vector& CompleteTestType::unbounded_sequence_uint8_field() { return m_unbounded_sequence_uint8_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_int16_field * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field @@ -3354,6 +2607,8 @@ std::vector& CompleteTestType::unbounded_sequence_int16_field() { return m_unbounded_sequence_int16_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint16_field * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field @@ -3391,6 +2646,8 @@ std::vector& CompleteTestType::unbounded_sequence_uint16_field() { return m_unbounded_sequence_uint16_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_int32_field * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field @@ -3428,6 +2685,8 @@ std::vector& CompleteTestType::unbounded_sequence_int32_field() { return m_unbounded_sequence_int32_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint32_field * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field @@ -3465,6 +2724,8 @@ std::vector& CompleteTestType::unbounded_sequence_uint32_field() { return m_unbounded_sequence_uint32_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_int64_field * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field @@ -3502,6 +2763,8 @@ std::vector& CompleteTestType::unbounded_sequence_int64_field() { return m_unbounded_sequence_int64_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint64_field * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field @@ -3539,6 +2802,8 @@ std::vector& CompleteTestType::unbounded_sequence_uint64_field() { return m_unbounded_sequence_uint64_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_float_field * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field @@ -3576,6 +2841,8 @@ std::vector& CompleteTestType::unbounded_sequence_float_field() { return m_unbounded_sequence_float_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_double_field * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field @@ -3613,6 +2880,8 @@ std::vector& CompleteTestType::unbounded_sequence_double_field() { return m_unbounded_sequence_double_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_bool_field * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field @@ -3650,6 +2919,8 @@ std::vector& CompleteTestType::unbounded_sequence_bool_field() { return m_unbounded_sequence_bool_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_enum_field * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field @@ -3687,6 +2958,8 @@ std::vector& CompleteTestType::unbounded_sequence_enum_field() { return m_unbounded_sequence_enum_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_enum2_field * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field @@ -3724,6 +2997,8 @@ std::vector& CompleteTestType::unbounded_sequence_enum2_field() { return m_unbounded_sequence_enum2_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_struct_field * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field @@ -3737,364 +3012,44 @@ void CompleteTestType::unbounded_sequence_struct_field( /*! * @brief This function moves the value in member unbounded_sequence_struct_field * @param _unbounded_sequence_struct_field New value to be moved in member unbounded_sequence_struct_field - */ -void CompleteTestType::unbounded_sequence_struct_field( - std::vector&& _unbounded_sequence_struct_field) -{ - m_unbounded_sequence_struct_field = std::move(_unbounded_sequence_struct_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_struct_field - * @return Constant reference to member unbounded_sequence_struct_field - */ -const std::vector& CompleteTestType::unbounded_sequence_struct_field() const -{ - return m_unbounded_sequence_struct_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_struct_field - * @return Reference to member unbounded_sequence_struct_field - */ -std::vector& CompleteTestType::unbounded_sequence_struct_field() -{ - return m_unbounded_sequence_struct_field; -} - - -size_t CompleteTestType::getKeyMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return CompleteTestType_max_key_cdr_typesize; -} - -bool CompleteTestType::isKeyDefined() -{ - return false; -} - -void CompleteTestType::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - - -KeyedCompleteTestType::KeyedCompleteTestType() -{ - // long m_id - m_id = 0; - // char m_char_field - m_char_field = 0; - // octet m_uint8_field - m_uint8_field = 0; - // short m_int16_field - m_int16_field = 0; - // unsigned short m_uint16_field - m_uint16_field = 0; - // long m_int32_field - m_int32_field = 0; - // unsigned long m_uint32_field - m_uint32_field = 0; - // long long m_int64_field - m_int64_field = 0; - // unsigned long long m_uint64_field - m_uint64_field = 0; - // float m_float_field - m_float_field = 0.0; - // double m_double_field - m_double_field = 0.0; - // boolean m_bool_field - m_bool_field = false; - // string m_string_field - m_string_field =""; - // Color m_enum_field - m_enum_field = ::RED; - // Material m_enum2_field - m_enum2_field = ::WOOD; - // StructType m_struct_field - - // char m_array_char_field - memset(&m_array_char_field, 0, (3) * 1); - // octet m_array_uint8_field - memset(&m_array_uint8_field, 0, (3) * 1); - // short m_array_int16_field - memset(&m_array_int16_field, 0, (3) * 2); - // unsigned short m_array_uint16_field - memset(&m_array_uint16_field, 0, (3) * 2); - // long m_array_int32_field - memset(&m_array_int32_field, 0, (3) * 4); - // unsigned long m_array_uint32_field - memset(&m_array_uint32_field, 0, (3) * 4); - // long long m_array_int64_field - memset(&m_array_int64_field, 0, (3) * 8); - // unsigned long long m_array_uint64_field - memset(&m_array_uint64_field, 0, (3) * 8); - // float m_array_float_field - memset(&m_array_float_field, 0, (3) * 4); - // double m_array_double_field - memset(&m_array_double_field, 0, (3) * 8); - // boolean m_array_bool_field - memset(&m_array_bool_field, 0, (3) * 1); - // Color m_array_enum_field - memset(&m_array_enum_field, 0, (3) * 4); - // Material m_array_enum2_field - memset(&m_array_enum2_field, 0, (3) * 4); - // StructType m_array_struct_field - - // sequence m_bounded_sequence_char_field - - // sequence m_bounded_sequence_uint8_field - - // sequence m_bounded_sequence_int16_field - - // sequence m_bounded_sequence_uint16_field - - // sequence m_bounded_sequence_int32_field - - // sequence m_bounded_sequence_uint32_field - - // sequence m_bounded_sequence_int64_field - - // sequence m_bounded_sequence_uint64_field - - // sequence m_bounded_sequence_float_field - - // sequence m_bounded_sequence_double_field - - // sequence m_bounded_sequence_bool_field - - // sequence m_bounded_sequence_enum_field - - // sequence m_bounded_sequence_enum2_field - - // sequence m_bounded_sequence_struct_field - - // sequence m_unbounded_sequence_char_field - - // sequence m_unbounded_sequence_uint8_field - - // sequence m_unbounded_sequence_int16_field - - // sequence m_unbounded_sequence_uint16_field - - // sequence m_unbounded_sequence_int32_field - - // sequence m_unbounded_sequence_uint32_field - - // sequence m_unbounded_sequence_int64_field - - // sequence m_unbounded_sequence_uint64_field - - // sequence m_unbounded_sequence_float_field - - // sequence m_unbounded_sequence_double_field - - // sequence m_unbounded_sequence_bool_field - - // sequence m_unbounded_sequence_enum_field - - // sequence m_unbounded_sequence_enum2_field - - // sequence m_unbounded_sequence_struct_field - - -} - -KeyedCompleteTestType::~KeyedCompleteTestType() -{ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -KeyedCompleteTestType::KeyedCompleteTestType( - const KeyedCompleteTestType& x) -{ - m_id = x.m_id; - m_char_field = x.m_char_field; - m_uint8_field = x.m_uint8_field; - m_int16_field = x.m_int16_field; - m_uint16_field = x.m_uint16_field; - m_int32_field = x.m_int32_field; - m_uint32_field = x.m_uint32_field; - m_int64_field = x.m_int64_field; - m_uint64_field = x.m_uint64_field; - m_float_field = x.m_float_field; - m_double_field = x.m_double_field; - m_bool_field = x.m_bool_field; - m_string_field = x.m_string_field; - m_enum_field = x.m_enum_field; - m_enum2_field = x.m_enum2_field; - m_struct_field = x.m_struct_field; - m_array_char_field = x.m_array_char_field; - m_array_uint8_field = x.m_array_uint8_field; - m_array_int16_field = x.m_array_int16_field; - m_array_uint16_field = x.m_array_uint16_field; - m_array_int32_field = x.m_array_int32_field; - m_array_uint32_field = x.m_array_uint32_field; - m_array_int64_field = x.m_array_int64_field; - m_array_uint64_field = x.m_array_uint64_field; - m_array_float_field = x.m_array_float_field; - m_array_double_field = x.m_array_double_field; - m_array_bool_field = x.m_array_bool_field; - m_array_enum_field = x.m_array_enum_field; - m_array_enum2_field = x.m_array_enum2_field; - m_array_struct_field = x.m_array_struct_field; - m_bounded_sequence_char_field = x.m_bounded_sequence_char_field; - m_bounded_sequence_uint8_field = x.m_bounded_sequence_uint8_field; - m_bounded_sequence_int16_field = x.m_bounded_sequence_int16_field; - m_bounded_sequence_uint16_field = x.m_bounded_sequence_uint16_field; - m_bounded_sequence_int32_field = x.m_bounded_sequence_int32_field; - m_bounded_sequence_uint32_field = x.m_bounded_sequence_uint32_field; - m_bounded_sequence_int64_field = x.m_bounded_sequence_int64_field; - m_bounded_sequence_uint64_field = x.m_bounded_sequence_uint64_field; - m_bounded_sequence_float_field = x.m_bounded_sequence_float_field; - m_bounded_sequence_double_field = x.m_bounded_sequence_double_field; - m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; - m_bounded_sequence_enum_field = x.m_bounded_sequence_enum_field; - m_bounded_sequence_enum2_field = x.m_bounded_sequence_enum2_field; - m_bounded_sequence_struct_field = x.m_bounded_sequence_struct_field; - m_unbounded_sequence_char_field = x.m_unbounded_sequence_char_field; - m_unbounded_sequence_uint8_field = x.m_unbounded_sequence_uint8_field; - m_unbounded_sequence_int16_field = x.m_unbounded_sequence_int16_field; - m_unbounded_sequence_uint16_field = x.m_unbounded_sequence_uint16_field; - m_unbounded_sequence_int32_field = x.m_unbounded_sequence_int32_field; - m_unbounded_sequence_uint32_field = x.m_unbounded_sequence_uint32_field; - m_unbounded_sequence_int64_field = x.m_unbounded_sequence_int64_field; - m_unbounded_sequence_uint64_field = x.m_unbounded_sequence_uint64_field; - m_unbounded_sequence_float_field = x.m_unbounded_sequence_float_field; - m_unbounded_sequence_double_field = x.m_unbounded_sequence_double_field; - m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; - m_unbounded_sequence_enum_field = x.m_unbounded_sequence_enum_field; - m_unbounded_sequence_enum2_field = x.m_unbounded_sequence_enum2_field; - m_unbounded_sequence_struct_field = x.m_unbounded_sequence_struct_field; -} - -KeyedCompleteTestType::KeyedCompleteTestType( - KeyedCompleteTestType&& x) noexcept -{ - m_id = x.m_id; - m_char_field = x.m_char_field; - m_uint8_field = x.m_uint8_field; - m_int16_field = x.m_int16_field; - m_uint16_field = x.m_uint16_field; - m_int32_field = x.m_int32_field; - m_uint32_field = x.m_uint32_field; - m_int64_field = x.m_int64_field; - m_uint64_field = x.m_uint64_field; - m_float_field = x.m_float_field; - m_double_field = x.m_double_field; - m_bool_field = x.m_bool_field; - m_string_field = std::move(x.m_string_field); - m_enum_field = x.m_enum_field; - m_enum2_field = x.m_enum2_field; - m_struct_field = std::move(x.m_struct_field); - m_array_char_field = std::move(x.m_array_char_field); - m_array_uint8_field = std::move(x.m_array_uint8_field); - m_array_int16_field = std::move(x.m_array_int16_field); - m_array_uint16_field = std::move(x.m_array_uint16_field); - m_array_int32_field = std::move(x.m_array_int32_field); - m_array_uint32_field = std::move(x.m_array_uint32_field); - m_array_int64_field = std::move(x.m_array_int64_field); - m_array_uint64_field = std::move(x.m_array_uint64_field); - m_array_float_field = std::move(x.m_array_float_field); - m_array_double_field = std::move(x.m_array_double_field); - m_array_bool_field = std::move(x.m_array_bool_field); - m_array_enum_field = std::move(x.m_array_enum_field); - m_array_enum2_field = std::move(x.m_array_enum2_field); - m_array_struct_field = std::move(x.m_array_struct_field); - m_bounded_sequence_char_field = std::move(x.m_bounded_sequence_char_field); - m_bounded_sequence_uint8_field = std::move(x.m_bounded_sequence_uint8_field); - m_bounded_sequence_int16_field = std::move(x.m_bounded_sequence_int16_field); - m_bounded_sequence_uint16_field = std::move(x.m_bounded_sequence_uint16_field); - m_bounded_sequence_int32_field = std::move(x.m_bounded_sequence_int32_field); - m_bounded_sequence_uint32_field = std::move(x.m_bounded_sequence_uint32_field); - m_bounded_sequence_int64_field = std::move(x.m_bounded_sequence_int64_field); - m_bounded_sequence_uint64_field = std::move(x.m_bounded_sequence_uint64_field); - m_bounded_sequence_float_field = std::move(x.m_bounded_sequence_float_field); - m_bounded_sequence_double_field = std::move(x.m_bounded_sequence_double_field); - m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); - m_bounded_sequence_enum_field = std::move(x.m_bounded_sequence_enum_field); - m_bounded_sequence_enum2_field = std::move(x.m_bounded_sequence_enum2_field); - m_bounded_sequence_struct_field = std::move(x.m_bounded_sequence_struct_field); - m_unbounded_sequence_char_field = std::move(x.m_unbounded_sequence_char_field); - m_unbounded_sequence_uint8_field = std::move(x.m_unbounded_sequence_uint8_field); - m_unbounded_sequence_int16_field = std::move(x.m_unbounded_sequence_int16_field); - m_unbounded_sequence_uint16_field = std::move(x.m_unbounded_sequence_uint16_field); - m_unbounded_sequence_int32_field = std::move(x.m_unbounded_sequence_int32_field); - m_unbounded_sequence_uint32_field = std::move(x.m_unbounded_sequence_uint32_field); - m_unbounded_sequence_int64_field = std::move(x.m_unbounded_sequence_int64_field); - m_unbounded_sequence_uint64_field = std::move(x.m_unbounded_sequence_uint64_field); - m_unbounded_sequence_float_field = std::move(x.m_unbounded_sequence_float_field); - m_unbounded_sequence_double_field = std::move(x.m_unbounded_sequence_double_field); - m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); - m_unbounded_sequence_enum_field = std::move(x.m_unbounded_sequence_enum_field); - m_unbounded_sequence_enum2_field = std::move(x.m_unbounded_sequence_enum2_field); - m_unbounded_sequence_struct_field = std::move(x.m_unbounded_sequence_struct_field); + */ +void CompleteTestType::unbounded_sequence_struct_field( + std::vector&& _unbounded_sequence_struct_field) +{ + m_unbounded_sequence_struct_field = std::move(_unbounded_sequence_struct_field); } -KeyedCompleteTestType& KeyedCompleteTestType::operator =( - const KeyedCompleteTestType& x) +/*! + * @brief This function returns a constant reference to member unbounded_sequence_struct_field + * @return Constant reference to member unbounded_sequence_struct_field + */ +const std::vector& CompleteTestType::unbounded_sequence_struct_field() const +{ + return m_unbounded_sequence_struct_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_struct_field + * @return Reference to member unbounded_sequence_struct_field + */ +std::vector& CompleteTestType::unbounded_sequence_struct_field() +{ + return m_unbounded_sequence_struct_field; +} + + +KeyedCompleteTestType::KeyedCompleteTestType() +{ + +} + +KeyedCompleteTestType::~KeyedCompleteTestType() { +} +KeyedCompleteTestType::KeyedCompleteTestType( + const KeyedCompleteTestType& x) +{ m_id = x.m_id; m_char_field = x.m_char_field; m_uint8_field = x.m_uint8_field; @@ -4153,14 +3108,11 @@ KeyedCompleteTestType& KeyedCompleteTestType::operator =( m_unbounded_sequence_enum_field = x.m_unbounded_sequence_enum_field; m_unbounded_sequence_enum2_field = x.m_unbounded_sequence_enum2_field; m_unbounded_sequence_struct_field = x.m_unbounded_sequence_struct_field; - - return *this; } -KeyedCompleteTestType& KeyedCompleteTestType::operator =( +KeyedCompleteTestType::KeyedCompleteTestType( KeyedCompleteTestType&& x) noexcept { - m_id = x.m_id; m_char_field = x.m_char_field; m_uint8_field = x.m_uint8_field; @@ -4205,581 +3157,221 @@ KeyedCompleteTestType& KeyedCompleteTestType::operator =( m_bounded_sequence_enum_field = std::move(x.m_bounded_sequence_enum_field); m_bounded_sequence_enum2_field = std::move(x.m_bounded_sequence_enum2_field); m_bounded_sequence_struct_field = std::move(x.m_bounded_sequence_struct_field); - m_unbounded_sequence_char_field = std::move(x.m_unbounded_sequence_char_field); - m_unbounded_sequence_uint8_field = std::move(x.m_unbounded_sequence_uint8_field); - m_unbounded_sequence_int16_field = std::move(x.m_unbounded_sequence_int16_field); - m_unbounded_sequence_uint16_field = std::move(x.m_unbounded_sequence_uint16_field); - m_unbounded_sequence_int32_field = std::move(x.m_unbounded_sequence_int32_field); - m_unbounded_sequence_uint32_field = std::move(x.m_unbounded_sequence_uint32_field); - m_unbounded_sequence_int64_field = std::move(x.m_unbounded_sequence_int64_field); - m_unbounded_sequence_uint64_field = std::move(x.m_unbounded_sequence_uint64_field); - m_unbounded_sequence_float_field = std::move(x.m_unbounded_sequence_float_field); - m_unbounded_sequence_double_field = std::move(x.m_unbounded_sequence_double_field); - m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); - m_unbounded_sequence_enum_field = std::move(x.m_unbounded_sequence_enum_field); - m_unbounded_sequence_enum2_field = std::move(x.m_unbounded_sequence_enum2_field); - m_unbounded_sequence_struct_field = std::move(x.m_unbounded_sequence_struct_field); - - return *this; -} - -bool KeyedCompleteTestType::operator ==( - const KeyedCompleteTestType& x) const -{ - - return (m_id == x.m_id && m_char_field == x.m_char_field && m_uint8_field == x.m_uint8_field && m_int16_field == x.m_int16_field && m_uint16_field == x.m_uint16_field && m_int32_field == x.m_int32_field && m_uint32_field == x.m_uint32_field && m_int64_field == x.m_int64_field && m_uint64_field == x.m_uint64_field && m_float_field == x.m_float_field && m_double_field == x.m_double_field && m_bool_field == x.m_bool_field && m_string_field == x.m_string_field && m_enum_field == x.m_enum_field && m_enum2_field == x.m_enum2_field && m_struct_field == x.m_struct_field && m_array_char_field == x.m_array_char_field && m_array_uint8_field == x.m_array_uint8_field && m_array_int16_field == x.m_array_int16_field && m_array_uint16_field == x.m_array_uint16_field && m_array_int32_field == x.m_array_int32_field && m_array_uint32_field == x.m_array_uint32_field && m_array_int64_field == x.m_array_int64_field && m_array_uint64_field == x.m_array_uint64_field && m_array_float_field == x.m_array_float_field && m_array_double_field == x.m_array_double_field && m_array_bool_field == x.m_array_bool_field && m_array_enum_field == x.m_array_enum_field && m_array_enum2_field == x.m_array_enum2_field && m_array_struct_field == x.m_array_struct_field && m_bounded_sequence_char_field == x.m_bounded_sequence_char_field && m_bounded_sequence_uint8_field == x.m_bounded_sequence_uint8_field && m_bounded_sequence_int16_field == x.m_bounded_sequence_int16_field && m_bounded_sequence_uint16_field == x.m_bounded_sequence_uint16_field && m_bounded_sequence_int32_field == x.m_bounded_sequence_int32_field && m_bounded_sequence_uint32_field == x.m_bounded_sequence_uint32_field && m_bounded_sequence_int64_field == x.m_bounded_sequence_int64_field && m_bounded_sequence_uint64_field == x.m_bounded_sequence_uint64_field && m_bounded_sequence_float_field == x.m_bounded_sequence_float_field && m_bounded_sequence_double_field == x.m_bounded_sequence_double_field && m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && m_bounded_sequence_enum_field == x.m_bounded_sequence_enum_field && m_bounded_sequence_enum2_field == x.m_bounded_sequence_enum2_field && m_bounded_sequence_struct_field == x.m_bounded_sequence_struct_field && m_unbounded_sequence_char_field == x.m_unbounded_sequence_char_field && m_unbounded_sequence_uint8_field == x.m_unbounded_sequence_uint8_field && m_unbounded_sequence_int16_field == x.m_unbounded_sequence_int16_field && m_unbounded_sequence_uint16_field == x.m_unbounded_sequence_uint16_field && m_unbounded_sequence_int32_field == x.m_unbounded_sequence_int32_field && m_unbounded_sequence_uint32_field == x.m_unbounded_sequence_uint32_field && m_unbounded_sequence_int64_field == x.m_unbounded_sequence_int64_field && m_unbounded_sequence_uint64_field == x.m_unbounded_sequence_uint64_field && m_unbounded_sequence_float_field == x.m_unbounded_sequence_float_field && m_unbounded_sequence_double_field == x.m_unbounded_sequence_double_field && m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && m_unbounded_sequence_enum_field == x.m_unbounded_sequence_enum_field && m_unbounded_sequence_enum2_field == x.m_unbounded_sequence_enum2_field && m_unbounded_sequence_struct_field == x.m_unbounded_sequence_struct_field); -} - -bool KeyedCompleteTestType::operator !=( - const KeyedCompleteTestType& x) const -{ - return !(*this == x); -} - -size_t KeyedCompleteTestType::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return KeyedCompleteTestType_max_cdr_typesize; -} - -size_t KeyedCompleteTestType::getCdrSerializedSize( - const KeyedCompleteTestType& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.string_field().size() + 1; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += StructType::getCdrSerializedSize(data.struct_field(), current_alignment); - current_alignment += ((3) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += ((3) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += ((3) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - current_alignment += ((3) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - current_alignment += ((3) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - current_alignment += ((3) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.array_struct_field().size(); ++a) - { - current_alignment += StructType::getCdrSerializedSize(data.array_struct_field().at(a), current_alignment); - } - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_char_field().size() > 0) - { - current_alignment += (data.bounded_sequence_char_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint8_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint8_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_int16_field().size() > 0) - { - current_alignment += (data.bounded_sequence_int16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint16_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_int32_field().size() > 0) - { - current_alignment += (data.bounded_sequence_int32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint32_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_int64_field().size() > 0) - { - current_alignment += (data.bounded_sequence_int64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint64_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_float_field().size() > 0) - { - current_alignment += (data.bounded_sequence_float_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_double_field().size() > 0) - { - current_alignment += (data.bounded_sequence_double_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_bool_field().size() > 0) - { - current_alignment += (data.bounded_sequence_bool_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_enum_field().size() > 0) - { - current_alignment += (data.bounded_sequence_enum_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_enum2_field().size() > 0) - { - current_alignment += (data.bounded_sequence_enum2_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.bounded_sequence_struct_field().size(); ++a) - { - current_alignment += StructType::getCdrSerializedSize(data.bounded_sequence_struct_field().at(a), current_alignment);} - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_char_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_char_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint8_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint8_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_int16_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_int16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint16_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_int32_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_int32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint32_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_int64_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_int64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint64_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_float_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_float_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_double_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_double_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_bool_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_bool_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_enum_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_enum_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_enum2_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_enum2_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.unbounded_sequence_struct_field().size(); ++a) - { - current_alignment += StructType::getCdrSerializedSize(data.unbounded_sequence_struct_field().at(a), current_alignment);} - - - return current_alignment - initial_alignment; -} - -void KeyedCompleteTestType::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - - scdr << m_id; - scdr << m_char_field; - scdr << m_uint8_field; - scdr << m_int16_field; - scdr << m_uint16_field; - scdr << m_int32_field; - scdr << m_uint32_field; - scdr << m_int64_field; - scdr << m_uint64_field; - scdr << m_float_field; - scdr << m_double_field; - scdr << m_bool_field; - scdr << m_string_field.c_str(); - scdr << (uint32_t)m_enum_field; - scdr << (uint32_t)m_enum2_field; - scdr << m_struct_field; - scdr << m_array_char_field; - - scdr << m_array_uint8_field; - - scdr << m_array_int16_field; - - scdr << m_array_uint16_field; - - scdr << m_array_int32_field; - - scdr << m_array_uint32_field; - - scdr << m_array_int64_field; - - scdr << m_array_uint64_field; - - scdr << m_array_float_field; - - scdr << m_array_double_field; - - scdr << m_array_bool_field; - - scdr.serializeArray(reinterpret_cast(m_array_enum_field.data()), m_array_enum_field.size()); - - - scdr.serializeArray(reinterpret_cast(m_array_enum2_field.data()), m_array_enum2_field.size()); - - - scdr << m_array_struct_field; - - scdr << m_bounded_sequence_char_field; - scdr << m_bounded_sequence_uint8_field; - scdr << m_bounded_sequence_int16_field; - scdr << m_bounded_sequence_uint16_field; - scdr << m_bounded_sequence_int32_field; - scdr << m_bounded_sequence_uint32_field; - scdr << m_bounded_sequence_int64_field; - scdr << m_bounded_sequence_uint64_field; - scdr << m_bounded_sequence_float_field; - scdr << m_bounded_sequence_double_field; - scdr << m_bounded_sequence_bool_field; - scdr << static_cast(m_bounded_sequence_enum_field.size()); - scdr.serializeArray(reinterpret_cast(m_bounded_sequence_enum_field.data()), m_bounded_sequence_enum_field.size()); - - scdr << static_cast(m_bounded_sequence_enum2_field.size()); - scdr.serializeArray(reinterpret_cast(m_bounded_sequence_enum2_field.data()), m_bounded_sequence_enum2_field.size()); - - scdr << m_bounded_sequence_struct_field; - scdr << m_unbounded_sequence_char_field; - scdr << m_unbounded_sequence_uint8_field; - scdr << m_unbounded_sequence_int16_field; - scdr << m_unbounded_sequence_uint16_field; - scdr << m_unbounded_sequence_int32_field; - scdr << m_unbounded_sequence_uint32_field; - scdr << m_unbounded_sequence_int64_field; - scdr << m_unbounded_sequence_uint64_field; - scdr << m_unbounded_sequence_float_field; - scdr << m_unbounded_sequence_double_field; - scdr << m_unbounded_sequence_bool_field; - scdr << static_cast(m_unbounded_sequence_enum_field.size()); - scdr.serializeArray(reinterpret_cast(m_unbounded_sequence_enum_field.data()), m_unbounded_sequence_enum_field.size()); - - scdr << static_cast(m_unbounded_sequence_enum2_field.size()); - scdr.serializeArray(reinterpret_cast(m_unbounded_sequence_enum2_field.data()), m_unbounded_sequence_enum2_field.size()); - - scdr << m_unbounded_sequence_struct_field; - + m_unbounded_sequence_char_field = std::move(x.m_unbounded_sequence_char_field); + m_unbounded_sequence_uint8_field = std::move(x.m_unbounded_sequence_uint8_field); + m_unbounded_sequence_int16_field = std::move(x.m_unbounded_sequence_int16_field); + m_unbounded_sequence_uint16_field = std::move(x.m_unbounded_sequence_uint16_field); + m_unbounded_sequence_int32_field = std::move(x.m_unbounded_sequence_int32_field); + m_unbounded_sequence_uint32_field = std::move(x.m_unbounded_sequence_uint32_field); + m_unbounded_sequence_int64_field = std::move(x.m_unbounded_sequence_int64_field); + m_unbounded_sequence_uint64_field = std::move(x.m_unbounded_sequence_uint64_field); + m_unbounded_sequence_float_field = std::move(x.m_unbounded_sequence_float_field); + m_unbounded_sequence_double_field = std::move(x.m_unbounded_sequence_double_field); + m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); + m_unbounded_sequence_enum_field = std::move(x.m_unbounded_sequence_enum_field); + m_unbounded_sequence_enum2_field = std::move(x.m_unbounded_sequence_enum2_field); + m_unbounded_sequence_struct_field = std::move(x.m_unbounded_sequence_struct_field); } -void KeyedCompleteTestType::deserialize( - eprosima::fastcdr::Cdr& dcdr) +KeyedCompleteTestType& KeyedCompleteTestType::operator =( + const KeyedCompleteTestType& x) { - dcdr >> m_id; - dcdr >> m_char_field; - dcdr >> m_uint8_field; - dcdr >> m_int16_field; - dcdr >> m_uint16_field; - dcdr >> m_int32_field; - dcdr >> m_uint32_field; - dcdr >> m_int64_field; - dcdr >> m_uint64_field; - dcdr >> m_float_field; - dcdr >> m_double_field; - dcdr >> m_bool_field; - dcdr >> m_string_field; - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum_field = (Color)enum_value; - } - - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum2_field = (Material)enum_value; - } - - dcdr >> m_struct_field; - dcdr >> m_array_char_field; - - dcdr >> m_array_uint8_field; - - dcdr >> m_array_int16_field; - - dcdr >> m_array_uint16_field; - - dcdr >> m_array_int32_field; - - dcdr >> m_array_uint32_field; + m_id = x.m_id; + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = x.m_string_field; + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + m_struct_field = x.m_struct_field; + m_array_char_field = x.m_array_char_field; + m_array_uint8_field = x.m_array_uint8_field; + m_array_int16_field = x.m_array_int16_field; + m_array_uint16_field = x.m_array_uint16_field; + m_array_int32_field = x.m_array_int32_field; + m_array_uint32_field = x.m_array_uint32_field; + m_array_int64_field = x.m_array_int64_field; + m_array_uint64_field = x.m_array_uint64_field; + m_array_float_field = x.m_array_float_field; + m_array_double_field = x.m_array_double_field; + m_array_bool_field = x.m_array_bool_field; + m_array_enum_field = x.m_array_enum_field; + m_array_enum2_field = x.m_array_enum2_field; + m_array_struct_field = x.m_array_struct_field; + m_bounded_sequence_char_field = x.m_bounded_sequence_char_field; + m_bounded_sequence_uint8_field = x.m_bounded_sequence_uint8_field; + m_bounded_sequence_int16_field = x.m_bounded_sequence_int16_field; + m_bounded_sequence_uint16_field = x.m_bounded_sequence_uint16_field; + m_bounded_sequence_int32_field = x.m_bounded_sequence_int32_field; + m_bounded_sequence_uint32_field = x.m_bounded_sequence_uint32_field; + m_bounded_sequence_int64_field = x.m_bounded_sequence_int64_field; + m_bounded_sequence_uint64_field = x.m_bounded_sequence_uint64_field; + m_bounded_sequence_float_field = x.m_bounded_sequence_float_field; + m_bounded_sequence_double_field = x.m_bounded_sequence_double_field; + m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; + m_bounded_sequence_enum_field = x.m_bounded_sequence_enum_field; + m_bounded_sequence_enum2_field = x.m_bounded_sequence_enum2_field; + m_bounded_sequence_struct_field = x.m_bounded_sequence_struct_field; + m_unbounded_sequence_char_field = x.m_unbounded_sequence_char_field; + m_unbounded_sequence_uint8_field = x.m_unbounded_sequence_uint8_field; + m_unbounded_sequence_int16_field = x.m_unbounded_sequence_int16_field; + m_unbounded_sequence_uint16_field = x.m_unbounded_sequence_uint16_field; + m_unbounded_sequence_int32_field = x.m_unbounded_sequence_int32_field; + m_unbounded_sequence_uint32_field = x.m_unbounded_sequence_uint32_field; + m_unbounded_sequence_int64_field = x.m_unbounded_sequence_int64_field; + m_unbounded_sequence_uint64_field = x.m_unbounded_sequence_uint64_field; + m_unbounded_sequence_float_field = x.m_unbounded_sequence_float_field; + m_unbounded_sequence_double_field = x.m_unbounded_sequence_double_field; + m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; + m_unbounded_sequence_enum_field = x.m_unbounded_sequence_enum_field; + m_unbounded_sequence_enum2_field = x.m_unbounded_sequence_enum2_field; + m_unbounded_sequence_struct_field = x.m_unbounded_sequence_struct_field; - dcdr >> m_array_int64_field; + return *this; +} - dcdr >> m_array_uint64_field; +KeyedCompleteTestType& KeyedCompleteTestType::operator =( + KeyedCompleteTestType&& x) noexcept +{ - dcdr >> m_array_float_field; + m_id = x.m_id; + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = std::move(x.m_string_field); + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + m_struct_field = std::move(x.m_struct_field); + m_array_char_field = std::move(x.m_array_char_field); + m_array_uint8_field = std::move(x.m_array_uint8_field); + m_array_int16_field = std::move(x.m_array_int16_field); + m_array_uint16_field = std::move(x.m_array_uint16_field); + m_array_int32_field = std::move(x.m_array_int32_field); + m_array_uint32_field = std::move(x.m_array_uint32_field); + m_array_int64_field = std::move(x.m_array_int64_field); + m_array_uint64_field = std::move(x.m_array_uint64_field); + m_array_float_field = std::move(x.m_array_float_field); + m_array_double_field = std::move(x.m_array_double_field); + m_array_bool_field = std::move(x.m_array_bool_field); + m_array_enum_field = std::move(x.m_array_enum_field); + m_array_enum2_field = std::move(x.m_array_enum2_field); + m_array_struct_field = std::move(x.m_array_struct_field); + m_bounded_sequence_char_field = std::move(x.m_bounded_sequence_char_field); + m_bounded_sequence_uint8_field = std::move(x.m_bounded_sequence_uint8_field); + m_bounded_sequence_int16_field = std::move(x.m_bounded_sequence_int16_field); + m_bounded_sequence_uint16_field = std::move(x.m_bounded_sequence_uint16_field); + m_bounded_sequence_int32_field = std::move(x.m_bounded_sequence_int32_field); + m_bounded_sequence_uint32_field = std::move(x.m_bounded_sequence_uint32_field); + m_bounded_sequence_int64_field = std::move(x.m_bounded_sequence_int64_field); + m_bounded_sequence_uint64_field = std::move(x.m_bounded_sequence_uint64_field); + m_bounded_sequence_float_field = std::move(x.m_bounded_sequence_float_field); + m_bounded_sequence_double_field = std::move(x.m_bounded_sequence_double_field); + m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); + m_bounded_sequence_enum_field = std::move(x.m_bounded_sequence_enum_field); + m_bounded_sequence_enum2_field = std::move(x.m_bounded_sequence_enum2_field); + m_bounded_sequence_struct_field = std::move(x.m_bounded_sequence_struct_field); + m_unbounded_sequence_char_field = std::move(x.m_unbounded_sequence_char_field); + m_unbounded_sequence_uint8_field = std::move(x.m_unbounded_sequence_uint8_field); + m_unbounded_sequence_int16_field = std::move(x.m_unbounded_sequence_int16_field); + m_unbounded_sequence_uint16_field = std::move(x.m_unbounded_sequence_uint16_field); + m_unbounded_sequence_int32_field = std::move(x.m_unbounded_sequence_int32_field); + m_unbounded_sequence_uint32_field = std::move(x.m_unbounded_sequence_uint32_field); + m_unbounded_sequence_int64_field = std::move(x.m_unbounded_sequence_int64_field); + m_unbounded_sequence_uint64_field = std::move(x.m_unbounded_sequence_uint64_field); + m_unbounded_sequence_float_field = std::move(x.m_unbounded_sequence_float_field); + m_unbounded_sequence_double_field = std::move(x.m_unbounded_sequence_double_field); + m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); + m_unbounded_sequence_enum_field = std::move(x.m_unbounded_sequence_enum_field); + m_unbounded_sequence_enum2_field = std::move(x.m_unbounded_sequence_enum2_field); + m_unbounded_sequence_struct_field = std::move(x.m_unbounded_sequence_struct_field); - dcdr >> m_array_double_field; + return *this; +} - dcdr >> m_array_bool_field; - - dcdr.deserializeArray(reinterpret_cast(m_array_enum_field.data()), m_array_enum_field.size()); - - - dcdr.deserializeArray(reinterpret_cast(m_array_enum2_field.data()), m_array_enum2_field.size()); - - - dcdr >> m_array_struct_field; - - dcdr >> m_bounded_sequence_char_field; - dcdr >> m_bounded_sequence_uint8_field; - dcdr >> m_bounded_sequence_int16_field; - dcdr >> m_bounded_sequence_uint16_field; - dcdr >> m_bounded_sequence_int32_field; - dcdr >> m_bounded_sequence_uint32_field; - dcdr >> m_bounded_sequence_int64_field; - dcdr >> m_bounded_sequence_uint64_field; - dcdr >> m_bounded_sequence_float_field; - dcdr >> m_bounded_sequence_double_field; - dcdr >> m_bounded_sequence_bool_field; - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_bounded_sequence_enum_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_bounded_sequence_enum_field.data()), seq_length); - } - - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_bounded_sequence_enum2_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_bounded_sequence_enum2_field.data()), seq_length); - } +bool KeyedCompleteTestType::operator ==( + const KeyedCompleteTestType& x) const +{ + return (m_id == x.m_id && + m_char_field == x.m_char_field && + m_uint8_field == x.m_uint8_field && + m_int16_field == x.m_int16_field && + m_uint16_field == x.m_uint16_field && + m_int32_field == x.m_int32_field && + m_uint32_field == x.m_uint32_field && + m_int64_field == x.m_int64_field && + m_uint64_field == x.m_uint64_field && + m_float_field == x.m_float_field && + m_double_field == x.m_double_field && + m_bool_field == x.m_bool_field && + m_string_field == x.m_string_field && + m_enum_field == x.m_enum_field && + m_enum2_field == x.m_enum2_field && + m_struct_field == x.m_struct_field && + m_array_char_field == x.m_array_char_field && + m_array_uint8_field == x.m_array_uint8_field && + m_array_int16_field == x.m_array_int16_field && + m_array_uint16_field == x.m_array_uint16_field && + m_array_int32_field == x.m_array_int32_field && + m_array_uint32_field == x.m_array_uint32_field && + m_array_int64_field == x.m_array_int64_field && + m_array_uint64_field == x.m_array_uint64_field && + m_array_float_field == x.m_array_float_field && + m_array_double_field == x.m_array_double_field && + m_array_bool_field == x.m_array_bool_field && + m_array_enum_field == x.m_array_enum_field && + m_array_enum2_field == x.m_array_enum2_field && + m_array_struct_field == x.m_array_struct_field && + m_bounded_sequence_char_field == x.m_bounded_sequence_char_field && + m_bounded_sequence_uint8_field == x.m_bounded_sequence_uint8_field && + m_bounded_sequence_int16_field == x.m_bounded_sequence_int16_field && + m_bounded_sequence_uint16_field == x.m_bounded_sequence_uint16_field && + m_bounded_sequence_int32_field == x.m_bounded_sequence_int32_field && + m_bounded_sequence_uint32_field == x.m_bounded_sequence_uint32_field && + m_bounded_sequence_int64_field == x.m_bounded_sequence_int64_field && + m_bounded_sequence_uint64_field == x.m_bounded_sequence_uint64_field && + m_bounded_sequence_float_field == x.m_bounded_sequence_float_field && + m_bounded_sequence_double_field == x.m_bounded_sequence_double_field && + m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && + m_bounded_sequence_enum_field == x.m_bounded_sequence_enum_field && + m_bounded_sequence_enum2_field == x.m_bounded_sequence_enum2_field && + m_bounded_sequence_struct_field == x.m_bounded_sequence_struct_field && + m_unbounded_sequence_char_field == x.m_unbounded_sequence_char_field && + m_unbounded_sequence_uint8_field == x.m_unbounded_sequence_uint8_field && + m_unbounded_sequence_int16_field == x.m_unbounded_sequence_int16_field && + m_unbounded_sequence_uint16_field == x.m_unbounded_sequence_uint16_field && + m_unbounded_sequence_int32_field == x.m_unbounded_sequence_int32_field && + m_unbounded_sequence_uint32_field == x.m_unbounded_sequence_uint32_field && + m_unbounded_sequence_int64_field == x.m_unbounded_sequence_int64_field && + m_unbounded_sequence_uint64_field == x.m_unbounded_sequence_uint64_field && + m_unbounded_sequence_float_field == x.m_unbounded_sequence_float_field && + m_unbounded_sequence_double_field == x.m_unbounded_sequence_double_field && + m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && + m_unbounded_sequence_enum_field == x.m_unbounded_sequence_enum_field && + m_unbounded_sequence_enum2_field == x.m_unbounded_sequence_enum2_field && + m_unbounded_sequence_struct_field == x.m_unbounded_sequence_struct_field); +} - dcdr >> m_bounded_sequence_struct_field; - dcdr >> m_unbounded_sequence_char_field; - dcdr >> m_unbounded_sequence_uint8_field; - dcdr >> m_unbounded_sequence_int16_field; - dcdr >> m_unbounded_sequence_uint16_field; - dcdr >> m_unbounded_sequence_int32_field; - dcdr >> m_unbounded_sequence_uint32_field; - dcdr >> m_unbounded_sequence_int64_field; - dcdr >> m_unbounded_sequence_uint64_field; - dcdr >> m_unbounded_sequence_float_field; - dcdr >> m_unbounded_sequence_double_field; - dcdr >> m_unbounded_sequence_bool_field; - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_unbounded_sequence_enum_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_unbounded_sequence_enum_field.data()), seq_length); - } - - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_unbounded_sequence_enum2_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_unbounded_sequence_enum2_field.data()), seq_length); - } - - dcdr >> m_unbounded_sequence_struct_field; +bool KeyedCompleteTestType::operator !=( + const KeyedCompleteTestType& x) const +{ + return !(*this == x); } /*! @@ -4810,6 +3402,7 @@ int32_t& KeyedCompleteTestType::id() return m_id; } + /*! * @brief This function sets a value in member char_field * @param _char_field New value for member char_field @@ -4838,6 +3431,7 @@ char& KeyedCompleteTestType::char_field() return m_char_field; } + /*! * @brief This function sets a value in member uint8_field * @param _uint8_field New value for member uint8_field @@ -4866,6 +3460,7 @@ uint8_t& KeyedCompleteTestType::uint8_field() return m_uint8_field; } + /*! * @brief This function sets a value in member int16_field * @param _int16_field New value for member int16_field @@ -4894,6 +3489,7 @@ int16_t& KeyedCompleteTestType::int16_field() return m_int16_field; } + /*! * @brief This function sets a value in member uint16_field * @param _uint16_field New value for member uint16_field @@ -4922,6 +3518,7 @@ uint16_t& KeyedCompleteTestType::uint16_field() return m_uint16_field; } + /*! * @brief This function sets a value in member int32_field * @param _int32_field New value for member int32_field @@ -4950,6 +3547,7 @@ int32_t& KeyedCompleteTestType::int32_field() return m_int32_field; } + /*! * @brief This function sets a value in member uint32_field * @param _uint32_field New value for member uint32_field @@ -4978,6 +3576,7 @@ uint32_t& KeyedCompleteTestType::uint32_field() return m_uint32_field; } + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -5006,6 +3605,7 @@ int64_t& KeyedCompleteTestType::int64_field() return m_int64_field; } + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -5034,6 +3634,7 @@ uint64_t& KeyedCompleteTestType::uint64_field() return m_uint64_field; } + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -5062,6 +3663,7 @@ float& KeyedCompleteTestType::float_field() return m_float_field; } + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -5090,6 +3692,7 @@ double& KeyedCompleteTestType::double_field() return m_double_field; } + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -5118,6 +3721,7 @@ bool& KeyedCompleteTestType::bool_field() return m_bool_field; } + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -5155,6 +3759,8 @@ std::string& KeyedCompleteTestType::string_field() { return m_string_field; } + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -5183,6 +3789,7 @@ Color& KeyedCompleteTestType::enum_field() return m_enum_field; } + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -5211,6 +3818,7 @@ Material& KeyedCompleteTestType::enum2_field() return m_enum2_field; } + /*! * @brief This function copies the value in member struct_field * @param _struct_field New value to be copied in member struct_field @@ -5248,6 +3856,8 @@ StructType& KeyedCompleteTestType::struct_field() { return m_struct_field; } + + /*! * @brief This function copies the value in member array_char_field * @param _array_char_field New value to be copied in member array_char_field @@ -5285,6 +3895,8 @@ std::array& KeyedCompleteTestType::array_char_field() { return m_array_char_field; } + + /*! * @brief This function copies the value in member array_uint8_field * @param _array_uint8_field New value to be copied in member array_uint8_field @@ -5322,6 +3934,8 @@ std::array& KeyedCompleteTestType::array_uint8_field() { return m_array_uint8_field; } + + /*! * @brief This function copies the value in member array_int16_field * @param _array_int16_field New value to be copied in member array_int16_field @@ -5359,6 +3973,8 @@ std::array& KeyedCompleteTestType::array_int16_field() { return m_array_int16_field; } + + /*! * @brief This function copies the value in member array_uint16_field * @param _array_uint16_field New value to be copied in member array_uint16_field @@ -5396,6 +4012,8 @@ std::array& KeyedCompleteTestType::array_uint16_field() { return m_array_uint16_field; } + + /*! * @brief This function copies the value in member array_int32_field * @param _array_int32_field New value to be copied in member array_int32_field @@ -5433,6 +4051,8 @@ std::array& KeyedCompleteTestType::array_int32_field() { return m_array_int32_field; } + + /*! * @brief This function copies the value in member array_uint32_field * @param _array_uint32_field New value to be copied in member array_uint32_field @@ -5470,6 +4090,8 @@ std::array& KeyedCompleteTestType::array_uint32_field() { return m_array_uint32_field; } + + /*! * @brief This function copies the value in member array_int64_field * @param _array_int64_field New value to be copied in member array_int64_field @@ -5507,6 +4129,8 @@ std::array& KeyedCompleteTestType::array_int64_field() { return m_array_int64_field; } + + /*! * @brief This function copies the value in member array_uint64_field * @param _array_uint64_field New value to be copied in member array_uint64_field @@ -5544,6 +4168,8 @@ std::array& KeyedCompleteTestType::array_uint64_field() { return m_array_uint64_field; } + + /*! * @brief This function copies the value in member array_float_field * @param _array_float_field New value to be copied in member array_float_field @@ -5581,6 +4207,8 @@ std::array& KeyedCompleteTestType::array_float_field() { return m_array_float_field; } + + /*! * @brief This function copies the value in member array_double_field * @param _array_double_field New value to be copied in member array_double_field @@ -5618,6 +4246,8 @@ std::array& KeyedCompleteTestType::array_double_field() { return m_array_double_field; } + + /*! * @brief This function copies the value in member array_bool_field * @param _array_bool_field New value to be copied in member array_bool_field @@ -5655,6 +4285,8 @@ std::array& KeyedCompleteTestType::array_bool_field() { return m_array_bool_field; } + + /*! * @brief This function copies the value in member array_enum_field * @param _array_enum_field New value to be copied in member array_enum_field @@ -5692,6 +4324,8 @@ std::array& KeyedCompleteTestType::array_enum_field() { return m_array_enum_field; } + + /*! * @brief This function copies the value in member array_enum2_field * @param _array_enum2_field New value to be copied in member array_enum2_field @@ -5729,6 +4363,8 @@ std::array& KeyedCompleteTestType::array_enum2_field() { return m_array_enum2_field; } + + /*! * @brief This function copies the value in member array_struct_field * @param _array_struct_field New value to be copied in member array_struct_field @@ -5766,6 +4402,8 @@ std::array& KeyedCompleteTestType::array_struct_field() { return m_array_struct_field; } + + /*! * @brief This function copies the value in member bounded_sequence_char_field * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field @@ -5803,6 +4441,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_char_field() { return m_bounded_sequence_char_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint8_field * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field @@ -5840,6 +4480,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_uint8_field() { return m_bounded_sequence_uint8_field; } + + /*! * @brief This function copies the value in member bounded_sequence_int16_field * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field @@ -5877,6 +4519,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_int16_field() { return m_bounded_sequence_int16_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint16_field * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field @@ -5914,6 +4558,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_uint16_field() { return m_bounded_sequence_uint16_field; } + + /*! * @brief This function copies the value in member bounded_sequence_int32_field * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field @@ -5951,6 +4597,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_int32_field() { return m_bounded_sequence_int32_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint32_field * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field @@ -5988,6 +4636,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_uint32_field() { return m_bounded_sequence_uint32_field; } + + /*! * @brief This function copies the value in member bounded_sequence_int64_field * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field @@ -6025,6 +4675,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_int64_field() { return m_bounded_sequence_int64_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint64_field * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field @@ -6062,6 +4714,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_uint64_field() { return m_bounded_sequence_uint64_field; } + + /*! * @brief This function copies the value in member bounded_sequence_float_field * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field @@ -6099,6 +4753,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_float_field() { return m_bounded_sequence_float_field; } + + /*! * @brief This function copies the value in member bounded_sequence_double_field * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field @@ -6136,6 +4792,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_double_field() { return m_bounded_sequence_double_field; } + + /*! * @brief This function copies the value in member bounded_sequence_bool_field * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field @@ -6173,6 +4831,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_bool_field() { return m_bounded_sequence_bool_field; } + + /*! * @brief This function copies the value in member bounded_sequence_enum_field * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field @@ -6210,6 +4870,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_enum_field() { return m_bounded_sequence_enum_field; } + + /*! * @brief This function copies the value in member bounded_sequence_enum2_field * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field @@ -6247,6 +4909,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_enum2_field() { return m_bounded_sequence_enum2_field; } + + /*! * @brief This function copies the value in member bounded_sequence_struct_field * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field @@ -6284,6 +4948,8 @@ std::vector& KeyedCompleteTestType::bounded_sequence_struct_field() { return m_bounded_sequence_struct_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_char_field * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field @@ -6321,6 +4987,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_char_field() { return m_unbounded_sequence_char_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint8_field * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field @@ -6358,6 +5026,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_uint8_field() { return m_unbounded_sequence_uint8_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_int16_field * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field @@ -6395,6 +5065,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_int16_field() { return m_unbounded_sequence_int16_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint16_field * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field @@ -6432,6 +5104,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_uint16_field() { return m_unbounded_sequence_uint16_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_int32_field * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field @@ -6469,6 +5143,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_int32_field() { return m_unbounded_sequence_int32_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint32_field * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field @@ -6506,6 +5182,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_uint32_field() { return m_unbounded_sequence_uint32_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_int64_field * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field @@ -6543,6 +5221,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_int64_field() { return m_unbounded_sequence_int64_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint64_field * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field @@ -6580,6 +5260,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_uint64_field() { return m_unbounded_sequence_uint64_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_float_field * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field @@ -6617,6 +5299,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_float_field() { return m_unbounded_sequence_float_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_double_field * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field @@ -6654,6 +5338,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_double_field() { return m_unbounded_sequence_double_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_bool_field * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field @@ -6691,6 +5377,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_bool_field() { return m_unbounded_sequence_bool_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_enum_field * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field @@ -6728,6 +5416,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_enum_field() { return m_unbounded_sequence_enum_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_enum2_field * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field @@ -6765,6 +5455,8 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_enum2_field() { return m_unbounded_sequence_enum2_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_struct_field * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field @@ -6804,80 +5496,5 @@ std::vector& KeyedCompleteTestType::unbounded_sequence_struct_field( } -size_t KeyedCompleteTestType::getKeyMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return KeyedCompleteTestType_max_key_cdr_typesize; -} - -bool KeyedCompleteTestType::isKeyDefined() -{ - return true; -} - -void KeyedCompleteTestType::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - scdr << m_id; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - +// Include auxiliary functions like for serializing/deserializing. +#include "test_completeCdrAux.ipp" diff --git a/fastdds_python/test/types/test_complete.h b/fastdds_python/test/types/test_complete.h index 6b2ac6d1..fc2437c6 100644 --- a/fastdds_python/test/types/test_complete.h +++ b/fastdds_python/test/types/test_complete.h @@ -16,22 +16,24 @@ * @file test_complete.h * This header file contains the declaration of the described types in the IDL file. * - * This file was generated by the tool gen. + * This file was generated by the tool fastddsgen. */ #ifndef _FAST_DDS_GENERATED_TEST_COMPLETE_H_ #define _FAST_DDS_GENERATED_TEST_COMPLETE_H_ -#include "test_included_modules.h" - -#include - -#include #include +#include +#include +#include #include #include -#include -#include + +#include +#include + +#include "test_included_modules.h" + #if defined(_WIN32) #if defined(EPROSIMA_USER_DLL_EXPORT) @@ -60,10 +62,12 @@ namespace eprosima { namespace fastcdr { class Cdr; +class CdrSizeCalculator; } // namespace fastcdr } // namespace eprosima + /*! * @brief This class represents the enumeration Color defined by the user in the IDL file. * @ingroup test_complete @@ -167,6 +171,7 @@ class StructType */ eProsima_user_DllExport char& char_field(); + /*! * @brief This function sets a value in member uint8_field * @param _uint8_field New value for member uint8_field @@ -186,6 +191,7 @@ class StructType */ eProsima_user_DllExport uint8_t& uint8_field(); + /*! * @brief This function sets a value in member int16_field * @param _int16_field New value for member int16_field @@ -205,6 +211,7 @@ class StructType */ eProsima_user_DllExport int16_t& int16_field(); + /*! * @brief This function sets a value in member uint16_field * @param _uint16_field New value for member uint16_field @@ -224,6 +231,7 @@ class StructType */ eProsima_user_DllExport uint16_t& uint16_field(); + /*! * @brief This function sets a value in member int32_field * @param _int32_field New value for member int32_field @@ -243,6 +251,7 @@ class StructType */ eProsima_user_DllExport int32_t& int32_field(); + /*! * @brief This function sets a value in member uint32_field * @param _uint32_field New value for member uint32_field @@ -262,6 +271,7 @@ class StructType */ eProsima_user_DllExport uint32_t& uint32_field(); + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -281,6 +291,7 @@ class StructType */ eProsima_user_DllExport int64_t& int64_field(); + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -300,6 +311,7 @@ class StructType */ eProsima_user_DllExport uint64_t& uint64_field(); + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -319,6 +331,7 @@ class StructType */ eProsima_user_DllExport float& float_field(); + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -338,6 +351,7 @@ class StructType */ eProsima_user_DllExport double& double_field(); + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -357,6 +371,7 @@ class StructType */ eProsima_user_DllExport bool& bool_field(); + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -382,6 +397,8 @@ class StructType * @return Reference to member string_field */ eProsima_user_DllExport std::string& string_field(); + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -401,6 +418,7 @@ class StructType */ eProsima_user_DllExport Color& enum_field(); + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -420,6 +438,7 @@ class StructType */ eProsima_user_DllExport Material& enum2_field(); + /*! * @brief This function copies the value in member included_module_struct * @param _included_module_struct New value to be copied in member included_module_struct @@ -446,79 +465,22 @@ class StructType */ eProsima_user_DllExport eprosima::test2::StructType2& included_module_struct(); - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize( - const StructType& data, - size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize( - eprosima::fastcdr::Cdr& cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize( - eprosima::fastcdr::Cdr& cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey( - eprosima::fastcdr::Cdr& cdr) const; - private: - char m_char_field; - uint8_t m_uint8_field; - int16_t m_int16_field; - uint16_t m_uint16_field; - int32_t m_int32_field; - uint32_t m_uint32_field; - int64_t m_int64_field; - uint64_t m_uint64_field; - float m_float_field; - double m_double_field; - bool m_bool_field; + char m_char_field{0}; + uint8_t m_uint8_field{0}; + int16_t m_int16_field{0}; + uint16_t m_uint16_field{0}; + int32_t m_int32_field{0}; + uint32_t m_uint32_field{0}; + int64_t m_int64_field{0}; + uint64_t m_uint64_field{0}; + float m_float_field{0.0}; + double m_double_field{0.0}; + bool m_bool_field{false}; std::string m_string_field; - Color m_enum_field; - Material m_enum2_field; + Color m_enum_field{::RED}; + Material m_enum2_field{::WOOD}; eprosima::test2::StructType2 m_included_module_struct; }; @@ -603,6 +565,7 @@ class CompleteTestType */ eProsima_user_DllExport char& char_field(); + /*! * @brief This function sets a value in member uint8_field * @param _uint8_field New value for member uint8_field @@ -622,6 +585,7 @@ class CompleteTestType */ eProsima_user_DllExport uint8_t& uint8_field(); + /*! * @brief This function sets a value in member int16_field * @param _int16_field New value for member int16_field @@ -641,6 +605,7 @@ class CompleteTestType */ eProsima_user_DllExport int16_t& int16_field(); + /*! * @brief This function sets a value in member uint16_field * @param _uint16_field New value for member uint16_field @@ -660,6 +625,7 @@ class CompleteTestType */ eProsima_user_DllExport uint16_t& uint16_field(); + /*! * @brief This function sets a value in member int32_field * @param _int32_field New value for member int32_field @@ -679,6 +645,7 @@ class CompleteTestType */ eProsima_user_DllExport int32_t& int32_field(); + /*! * @brief This function sets a value in member uint32_field * @param _uint32_field New value for member uint32_field @@ -698,6 +665,7 @@ class CompleteTestType */ eProsima_user_DllExport uint32_t& uint32_field(); + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -717,6 +685,7 @@ class CompleteTestType */ eProsima_user_DllExport int64_t& int64_field(); + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -736,6 +705,7 @@ class CompleteTestType */ eProsima_user_DllExport uint64_t& uint64_field(); + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -755,6 +725,7 @@ class CompleteTestType */ eProsima_user_DllExport float& float_field(); + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -774,6 +745,7 @@ class CompleteTestType */ eProsima_user_DllExport double& double_field(); + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -793,6 +765,7 @@ class CompleteTestType */ eProsima_user_DllExport bool& bool_field(); + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -818,6 +791,8 @@ class CompleteTestType * @return Reference to member string_field */ eProsima_user_DllExport std::string& string_field(); + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -837,6 +812,7 @@ class CompleteTestType */ eProsima_user_DllExport Color& enum_field(); + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -856,6 +832,7 @@ class CompleteTestType */ eProsima_user_DllExport Material& enum2_field(); + /*! * @brief This function copies the value in member struct_field * @param _struct_field New value to be copied in member struct_field @@ -881,6 +858,8 @@ class CompleteTestType * @return Reference to member struct_field */ eProsima_user_DllExport StructType& struct_field(); + + /*! * @brief This function copies the value in member array_char_field * @param _array_char_field New value to be copied in member array_char_field @@ -906,6 +885,8 @@ class CompleteTestType * @return Reference to member array_char_field */ eProsima_user_DllExport std::array& array_char_field(); + + /*! * @brief This function copies the value in member array_uint8_field * @param _array_uint8_field New value to be copied in member array_uint8_field @@ -931,6 +912,8 @@ class CompleteTestType * @return Reference to member array_uint8_field */ eProsima_user_DllExport std::array& array_uint8_field(); + + /*! * @brief This function copies the value in member array_int16_field * @param _array_int16_field New value to be copied in member array_int16_field @@ -956,6 +939,8 @@ class CompleteTestType * @return Reference to member array_int16_field */ eProsima_user_DllExport std::array& array_int16_field(); + + /*! * @brief This function copies the value in member array_uint16_field * @param _array_uint16_field New value to be copied in member array_uint16_field @@ -981,6 +966,8 @@ class CompleteTestType * @return Reference to member array_uint16_field */ eProsima_user_DllExport std::array& array_uint16_field(); + + /*! * @brief This function copies the value in member array_int32_field * @param _array_int32_field New value to be copied in member array_int32_field @@ -1006,6 +993,8 @@ class CompleteTestType * @return Reference to member array_int32_field */ eProsima_user_DllExport std::array& array_int32_field(); + + /*! * @brief This function copies the value in member array_uint32_field * @param _array_uint32_field New value to be copied in member array_uint32_field @@ -1031,6 +1020,8 @@ class CompleteTestType * @return Reference to member array_uint32_field */ eProsima_user_DllExport std::array& array_uint32_field(); + + /*! * @brief This function copies the value in member array_int64_field * @param _array_int64_field New value to be copied in member array_int64_field @@ -1056,6 +1047,8 @@ class CompleteTestType * @return Reference to member array_int64_field */ eProsima_user_DllExport std::array& array_int64_field(); + + /*! * @brief This function copies the value in member array_uint64_field * @param _array_uint64_field New value to be copied in member array_uint64_field @@ -1081,6 +1074,8 @@ class CompleteTestType * @return Reference to member array_uint64_field */ eProsima_user_DllExport std::array& array_uint64_field(); + + /*! * @brief This function copies the value in member array_float_field * @param _array_float_field New value to be copied in member array_float_field @@ -1106,6 +1101,8 @@ class CompleteTestType * @return Reference to member array_float_field */ eProsima_user_DllExport std::array& array_float_field(); + + /*! * @brief This function copies the value in member array_double_field * @param _array_double_field New value to be copied in member array_double_field @@ -1131,6 +1128,8 @@ class CompleteTestType * @return Reference to member array_double_field */ eProsima_user_DllExport std::array& array_double_field(); + + /*! * @brief This function copies the value in member array_bool_field * @param _array_bool_field New value to be copied in member array_bool_field @@ -1156,6 +1155,8 @@ class CompleteTestType * @return Reference to member array_bool_field */ eProsima_user_DllExport std::array& array_bool_field(); + + /*! * @brief This function copies the value in member array_enum_field * @param _array_enum_field New value to be copied in member array_enum_field @@ -1181,6 +1182,8 @@ class CompleteTestType * @return Reference to member array_enum_field */ eProsima_user_DllExport std::array& array_enum_field(); + + /*! * @brief This function copies the value in member array_enum2_field * @param _array_enum2_field New value to be copied in member array_enum2_field @@ -1206,6 +1209,8 @@ class CompleteTestType * @return Reference to member array_enum2_field */ eProsima_user_DllExport std::array& array_enum2_field(); + + /*! * @brief This function copies the value in member array_struct_field * @param _array_struct_field New value to be copied in member array_struct_field @@ -1231,6 +1236,8 @@ class CompleteTestType * @return Reference to member array_struct_field */ eProsima_user_DllExport std::array& array_struct_field(); + + /*! * @brief This function copies the value in member bounded_sequence_char_field * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field @@ -1256,6 +1263,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_char_field */ eProsima_user_DllExport std::vector& bounded_sequence_char_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint8_field * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field @@ -1281,6 +1290,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_uint8_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint8_field(); + + /*! * @brief This function copies the value in member bounded_sequence_int16_field * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field @@ -1306,6 +1317,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_int16_field */ eProsima_user_DllExport std::vector& bounded_sequence_int16_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint16_field * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field @@ -1331,6 +1344,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_uint16_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint16_field(); + + /*! * @brief This function copies the value in member bounded_sequence_int32_field * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field @@ -1356,6 +1371,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_int32_field */ eProsima_user_DllExport std::vector& bounded_sequence_int32_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint32_field * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field @@ -1381,6 +1398,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_uint32_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint32_field(); + + /*! * @brief This function copies the value in member bounded_sequence_int64_field * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field @@ -1406,6 +1425,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_int64_field */ eProsima_user_DllExport std::vector& bounded_sequence_int64_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint64_field * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field @@ -1431,6 +1452,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_uint64_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint64_field(); + + /*! * @brief This function copies the value in member bounded_sequence_float_field * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field @@ -1456,6 +1479,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_float_field */ eProsima_user_DllExport std::vector& bounded_sequence_float_field(); + + /*! * @brief This function copies the value in member bounded_sequence_double_field * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field @@ -1481,6 +1506,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_double_field */ eProsima_user_DllExport std::vector& bounded_sequence_double_field(); + + /*! * @brief This function copies the value in member bounded_sequence_bool_field * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field @@ -1506,6 +1533,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_bool_field */ eProsima_user_DllExport std::vector& bounded_sequence_bool_field(); + + /*! * @brief This function copies the value in member bounded_sequence_enum_field * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field @@ -1531,6 +1560,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_enum_field */ eProsima_user_DllExport std::vector& bounded_sequence_enum_field(); + + /*! * @brief This function copies the value in member bounded_sequence_enum2_field * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field @@ -1556,6 +1587,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_enum2_field */ eProsima_user_DllExport std::vector& bounded_sequence_enum2_field(); + + /*! * @brief This function copies the value in member bounded_sequence_struct_field * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field @@ -1581,6 +1614,8 @@ class CompleteTestType * @return Reference to member bounded_sequence_struct_field */ eProsima_user_DllExport std::vector& bounded_sequence_struct_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_char_field * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field @@ -1606,6 +1641,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_char_field */ eProsima_user_DllExport std::vector& unbounded_sequence_char_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint8_field * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field @@ -1631,6 +1668,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_uint8_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint8_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_int16_field * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field @@ -1656,6 +1695,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_int16_field */ eProsima_user_DllExport std::vector& unbounded_sequence_int16_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint16_field * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field @@ -1681,6 +1722,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_uint16_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint16_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_int32_field * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field @@ -1706,6 +1749,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_int32_field */ eProsima_user_DllExport std::vector& unbounded_sequence_int32_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint32_field * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field @@ -1731,6 +1776,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_uint32_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint32_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_int64_field * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field @@ -1756,6 +1803,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_int64_field */ eProsima_user_DllExport std::vector& unbounded_sequence_int64_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint64_field * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field @@ -1781,6 +1830,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_uint64_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint64_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_float_field * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field @@ -1806,6 +1857,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_float_field */ eProsima_user_DllExport std::vector& unbounded_sequence_float_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_double_field * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field @@ -1831,6 +1884,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_double_field */ eProsima_user_DllExport std::vector& unbounded_sequence_double_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_bool_field * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field @@ -1856,6 +1911,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_bool_field */ eProsima_user_DllExport std::vector& unbounded_sequence_bool_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_enum_field * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field @@ -1881,6 +1938,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_enum_field */ eProsima_user_DllExport std::vector& unbounded_sequence_enum_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_enum2_field * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field @@ -1906,6 +1965,8 @@ class CompleteTestType * @return Reference to member unbounded_sequence_enum2_field */ eProsima_user_DllExport std::vector& unbounded_sequence_enum2_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_struct_field * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field @@ -1932,93 +1993,36 @@ class CompleteTestType */ eProsima_user_DllExport std::vector& unbounded_sequence_struct_field(); - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize( - const CompleteTestType& data, - size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize( - eprosima::fastcdr::Cdr& cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize( - eprosima::fastcdr::Cdr& cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey( - eprosima::fastcdr::Cdr& cdr) const; - private: - char m_char_field; - uint8_t m_uint8_field; - int16_t m_int16_field; - uint16_t m_uint16_field; - int32_t m_int32_field; - uint32_t m_uint32_field; - int64_t m_int64_field; - uint64_t m_uint64_field; - float m_float_field; - double m_double_field; - bool m_bool_field; + char m_char_field{0}; + uint8_t m_uint8_field{0}; + int16_t m_int16_field{0}; + uint16_t m_uint16_field{0}; + int32_t m_int32_field{0}; + uint32_t m_uint32_field{0}; + int64_t m_int64_field{0}; + uint64_t m_uint64_field{0}; + float m_float_field{0.0}; + double m_double_field{0.0}; + bool m_bool_field{false}; std::string m_string_field; - Color m_enum_field; - Material m_enum2_field; + Color m_enum_field{::RED}; + Material m_enum2_field{::WOOD}; StructType m_struct_field; - std::array m_array_char_field; - std::array m_array_uint8_field; - std::array m_array_int16_field; - std::array m_array_uint16_field; - std::array m_array_int32_field; - std::array m_array_uint32_field; - std::array m_array_int64_field; - std::array m_array_uint64_field; - std::array m_array_float_field; - std::array m_array_double_field; - std::array m_array_bool_field; - std::array m_array_enum_field; - std::array m_array_enum2_field; + std::array m_array_char_field{0}; + std::array m_array_uint8_field{0}; + std::array m_array_int16_field{0}; + std::array m_array_uint16_field{0}; + std::array m_array_int32_field{0}; + std::array m_array_uint32_field{0}; + std::array m_array_int64_field{0}; + std::array m_array_uint64_field{0}; + std::array m_array_float_field{0.0}; + std::array m_array_double_field{0.0}; + std::array m_array_bool_field{false}; + std::array m_array_enum_field{::RED}; + std::array m_array_enum2_field{::WOOD}; std::array m_array_struct_field; std::vector m_bounded_sequence_char_field; std::vector m_bounded_sequence_uint8_field; @@ -2129,6 +2133,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport int32_t& id(); + /*! * @brief This function sets a value in member char_field * @param _char_field New value for member char_field @@ -2148,6 +2153,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport char& char_field(); + /*! * @brief This function sets a value in member uint8_field * @param _uint8_field New value for member uint8_field @@ -2167,6 +2173,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport uint8_t& uint8_field(); + /*! * @brief This function sets a value in member int16_field * @param _int16_field New value for member int16_field @@ -2186,6 +2193,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport int16_t& int16_field(); + /*! * @brief This function sets a value in member uint16_field * @param _uint16_field New value for member uint16_field @@ -2205,6 +2213,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport uint16_t& uint16_field(); + /*! * @brief This function sets a value in member int32_field * @param _int32_field New value for member int32_field @@ -2224,6 +2233,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport int32_t& int32_field(); + /*! * @brief This function sets a value in member uint32_field * @param _uint32_field New value for member uint32_field @@ -2243,6 +2253,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport uint32_t& uint32_field(); + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -2262,6 +2273,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport int64_t& int64_field(); + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -2281,6 +2293,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport uint64_t& uint64_field(); + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -2300,6 +2313,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport float& float_field(); + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -2319,6 +2333,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport double& double_field(); + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -2338,6 +2353,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport bool& bool_field(); + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -2363,6 +2379,8 @@ class KeyedCompleteTestType * @return Reference to member string_field */ eProsima_user_DllExport std::string& string_field(); + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -2382,6 +2400,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport Color& enum_field(); + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -2401,6 +2420,7 @@ class KeyedCompleteTestType */ eProsima_user_DllExport Material& enum2_field(); + /*! * @brief This function copies the value in member struct_field * @param _struct_field New value to be copied in member struct_field @@ -2426,6 +2446,8 @@ class KeyedCompleteTestType * @return Reference to member struct_field */ eProsima_user_DllExport StructType& struct_field(); + + /*! * @brief This function copies the value in member array_char_field * @param _array_char_field New value to be copied in member array_char_field @@ -2451,6 +2473,8 @@ class KeyedCompleteTestType * @return Reference to member array_char_field */ eProsima_user_DllExport std::array& array_char_field(); + + /*! * @brief This function copies the value in member array_uint8_field * @param _array_uint8_field New value to be copied in member array_uint8_field @@ -2476,6 +2500,8 @@ class KeyedCompleteTestType * @return Reference to member array_uint8_field */ eProsima_user_DllExport std::array& array_uint8_field(); + + /*! * @brief This function copies the value in member array_int16_field * @param _array_int16_field New value to be copied in member array_int16_field @@ -2501,6 +2527,8 @@ class KeyedCompleteTestType * @return Reference to member array_int16_field */ eProsima_user_DllExport std::array& array_int16_field(); + + /*! * @brief This function copies the value in member array_uint16_field * @param _array_uint16_field New value to be copied in member array_uint16_field @@ -2526,6 +2554,8 @@ class KeyedCompleteTestType * @return Reference to member array_uint16_field */ eProsima_user_DllExport std::array& array_uint16_field(); + + /*! * @brief This function copies the value in member array_int32_field * @param _array_int32_field New value to be copied in member array_int32_field @@ -2551,6 +2581,8 @@ class KeyedCompleteTestType * @return Reference to member array_int32_field */ eProsima_user_DllExport std::array& array_int32_field(); + + /*! * @brief This function copies the value in member array_uint32_field * @param _array_uint32_field New value to be copied in member array_uint32_field @@ -2576,6 +2608,8 @@ class KeyedCompleteTestType * @return Reference to member array_uint32_field */ eProsima_user_DllExport std::array& array_uint32_field(); + + /*! * @brief This function copies the value in member array_int64_field * @param _array_int64_field New value to be copied in member array_int64_field @@ -2601,6 +2635,8 @@ class KeyedCompleteTestType * @return Reference to member array_int64_field */ eProsima_user_DllExport std::array& array_int64_field(); + + /*! * @brief This function copies the value in member array_uint64_field * @param _array_uint64_field New value to be copied in member array_uint64_field @@ -2626,6 +2662,8 @@ class KeyedCompleteTestType * @return Reference to member array_uint64_field */ eProsima_user_DllExport std::array& array_uint64_field(); + + /*! * @brief This function copies the value in member array_float_field * @param _array_float_field New value to be copied in member array_float_field @@ -2651,6 +2689,8 @@ class KeyedCompleteTestType * @return Reference to member array_float_field */ eProsima_user_DllExport std::array& array_float_field(); + + /*! * @brief This function copies the value in member array_double_field * @param _array_double_field New value to be copied in member array_double_field @@ -2676,6 +2716,8 @@ class KeyedCompleteTestType * @return Reference to member array_double_field */ eProsima_user_DllExport std::array& array_double_field(); + + /*! * @brief This function copies the value in member array_bool_field * @param _array_bool_field New value to be copied in member array_bool_field @@ -2701,6 +2743,8 @@ class KeyedCompleteTestType * @return Reference to member array_bool_field */ eProsima_user_DllExport std::array& array_bool_field(); + + /*! * @brief This function copies the value in member array_enum_field * @param _array_enum_field New value to be copied in member array_enum_field @@ -2726,6 +2770,8 @@ class KeyedCompleteTestType * @return Reference to member array_enum_field */ eProsima_user_DllExport std::array& array_enum_field(); + + /*! * @brief This function copies the value in member array_enum2_field * @param _array_enum2_field New value to be copied in member array_enum2_field @@ -2751,6 +2797,8 @@ class KeyedCompleteTestType * @return Reference to member array_enum2_field */ eProsima_user_DllExport std::array& array_enum2_field(); + + /*! * @brief This function copies the value in member array_struct_field * @param _array_struct_field New value to be copied in member array_struct_field @@ -2776,6 +2824,8 @@ class KeyedCompleteTestType * @return Reference to member array_struct_field */ eProsima_user_DllExport std::array& array_struct_field(); + + /*! * @brief This function copies the value in member bounded_sequence_char_field * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field @@ -2801,6 +2851,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_char_field */ eProsima_user_DllExport std::vector& bounded_sequence_char_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint8_field * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field @@ -2826,6 +2878,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_uint8_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint8_field(); + + /*! * @brief This function copies the value in member bounded_sequence_int16_field * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field @@ -2851,6 +2905,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_int16_field */ eProsima_user_DllExport std::vector& bounded_sequence_int16_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint16_field * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field @@ -2876,6 +2932,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_uint16_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint16_field(); + + /*! * @brief This function copies the value in member bounded_sequence_int32_field * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field @@ -2901,6 +2959,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_int32_field */ eProsima_user_DllExport std::vector& bounded_sequence_int32_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint32_field * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field @@ -2926,6 +2986,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_uint32_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint32_field(); + + /*! * @brief This function copies the value in member bounded_sequence_int64_field * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field @@ -2951,6 +3013,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_int64_field */ eProsima_user_DllExport std::vector& bounded_sequence_int64_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint64_field * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field @@ -2976,6 +3040,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_uint64_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint64_field(); + + /*! * @brief This function copies the value in member bounded_sequence_float_field * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field @@ -3001,6 +3067,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_float_field */ eProsima_user_DllExport std::vector& bounded_sequence_float_field(); + + /*! * @brief This function copies the value in member bounded_sequence_double_field * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field @@ -3026,6 +3094,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_double_field */ eProsima_user_DllExport std::vector& bounded_sequence_double_field(); + + /*! * @brief This function copies the value in member bounded_sequence_bool_field * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field @@ -3051,6 +3121,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_bool_field */ eProsima_user_DllExport std::vector& bounded_sequence_bool_field(); + + /*! * @brief This function copies the value in member bounded_sequence_enum_field * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field @@ -3076,6 +3148,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_enum_field */ eProsima_user_DllExport std::vector& bounded_sequence_enum_field(); + + /*! * @brief This function copies the value in member bounded_sequence_enum2_field * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field @@ -3101,6 +3175,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_enum2_field */ eProsima_user_DllExport std::vector& bounded_sequence_enum2_field(); + + /*! * @brief This function copies the value in member bounded_sequence_struct_field * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field @@ -3126,6 +3202,8 @@ class KeyedCompleteTestType * @return Reference to member bounded_sequence_struct_field */ eProsima_user_DllExport std::vector& bounded_sequence_struct_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_char_field * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field @@ -3151,6 +3229,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_char_field */ eProsima_user_DllExport std::vector& unbounded_sequence_char_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint8_field * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field @@ -3176,6 +3256,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_uint8_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint8_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_int16_field * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field @@ -3201,6 +3283,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_int16_field */ eProsima_user_DllExport std::vector& unbounded_sequence_int16_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint16_field * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field @@ -3226,6 +3310,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_uint16_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint16_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_int32_field * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field @@ -3251,6 +3337,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_int32_field */ eProsima_user_DllExport std::vector& unbounded_sequence_int32_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint32_field * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field @@ -3276,6 +3364,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_uint32_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint32_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_int64_field * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field @@ -3301,6 +3391,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_int64_field */ eProsima_user_DllExport std::vector& unbounded_sequence_int64_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint64_field * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field @@ -3326,6 +3418,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_uint64_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint64_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_float_field * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field @@ -3351,6 +3445,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_float_field */ eProsima_user_DllExport std::vector& unbounded_sequence_float_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_double_field * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field @@ -3376,6 +3472,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_double_field */ eProsima_user_DllExport std::vector& unbounded_sequence_double_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_bool_field * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field @@ -3401,6 +3499,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_bool_field */ eProsima_user_DllExport std::vector& unbounded_sequence_bool_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_enum_field * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field @@ -3426,6 +3526,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_enum_field */ eProsima_user_DllExport std::vector& unbounded_sequence_enum_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_enum2_field * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field @@ -3451,6 +3553,8 @@ class KeyedCompleteTestType * @return Reference to member unbounded_sequence_enum2_field */ eProsima_user_DllExport std::vector& unbounded_sequence_enum2_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_struct_field * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field @@ -3477,94 +3581,37 @@ class KeyedCompleteTestType */ eProsima_user_DllExport std::vector& unbounded_sequence_struct_field(); - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize( - const KeyedCompleteTestType& data, - size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize( - eprosima::fastcdr::Cdr& cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize( - eprosima::fastcdr::Cdr& cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey( - eprosima::fastcdr::Cdr& cdr) const; - private: - int32_t m_id; - char m_char_field; - uint8_t m_uint8_field; - int16_t m_int16_field; - uint16_t m_uint16_field; - int32_t m_int32_field; - uint32_t m_uint32_field; - int64_t m_int64_field; - uint64_t m_uint64_field; - float m_float_field; - double m_double_field; - bool m_bool_field; + int32_t m_id{0}; + char m_char_field{0}; + uint8_t m_uint8_field{0}; + int16_t m_int16_field{0}; + uint16_t m_uint16_field{0}; + int32_t m_int32_field{0}; + uint32_t m_uint32_field{0}; + int64_t m_int64_field{0}; + uint64_t m_uint64_field{0}; + float m_float_field{0.0}; + double m_double_field{0.0}; + bool m_bool_field{false}; std::string m_string_field; - Color m_enum_field; - Material m_enum2_field; + Color m_enum_field{::RED}; + Material m_enum2_field{::WOOD}; StructType m_struct_field; - std::array m_array_char_field; - std::array m_array_uint8_field; - std::array m_array_int16_field; - std::array m_array_uint16_field; - std::array m_array_int32_field; - std::array m_array_uint32_field; - std::array m_array_int64_field; - std::array m_array_uint64_field; - std::array m_array_float_field; - std::array m_array_double_field; - std::array m_array_bool_field; - std::array m_array_enum_field; - std::array m_array_enum2_field; + std::array m_array_char_field{0}; + std::array m_array_uint8_field{0}; + std::array m_array_int16_field{0}; + std::array m_array_uint16_field{0}; + std::array m_array_int32_field{0}; + std::array m_array_uint32_field{0}; + std::array m_array_int64_field{0}; + std::array m_array_uint64_field{0}; + std::array m_array_float_field{0.0}; + std::array m_array_double_field{0.0}; + std::array m_array_bool_field{false}; + std::array m_array_enum_field{::RED}; + std::array m_array_enum2_field{::WOOD}; std::array m_array_struct_field; std::vector m_bounded_sequence_char_field; std::vector m_bounded_sequence_uint8_field; diff --git a/fastdds_python/test/types/test_complete.i b/fastdds_python/test/types/test_complete.i index fc8ef843..79b3aa0e 100644 --- a/fastdds_python/test/types/test_complete.i +++ b/fastdds_python/test/types/test_complete.i @@ -16,17 +16,17 @@ * @file test_complete.i * This header file contains the SWIG interface of the described types in the IDL file. * - * This file was generated by the tool gen. + * This file was generated by the tool fastddsgen. */ %module test_complete // SWIG helper modules %include "stdint.i" -%include "std_string.i" -%include "std_vector.i" %include "std_array.i" %include "std_map.i" +%include "std_string.i" +%include "std_vector.i" %include "typemaps.i" // Assignemt operators are ignored, as there is no such thing in Python. @@ -50,8 +50,6 @@ %import(module="fastdds") "fastdds/dds/core/LoanableTypedCollection.hpp" %import(module="fastdds") "fastdds/dds/core/LoanableSequence.hpp" - - //////////////////////////////////////////////////////// // Binding for class StructType //////////////////////////////////////////////////////// @@ -70,6 +68,7 @@ %ignore StructType::char_field(); %rename("%s") StructType::char_field() const; + %ignore StructType::uint8_field(uint8_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -78,6 +77,7 @@ %ignore StructType::uint8_field(); %rename("%s") StructType::uint8_field() const; + %ignore StructType::int16_field(int16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -86,6 +86,7 @@ %ignore StructType::int16_field(); %rename("%s") StructType::int16_field() const; + %ignore StructType::uint16_field(uint16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -94,6 +95,7 @@ %ignore StructType::uint16_field(); %rename("%s") StructType::uint16_field() const; + %ignore StructType::int32_field(int32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -102,6 +104,7 @@ %ignore StructType::int32_field(); %rename("%s") StructType::int32_field() const; + %ignore StructType::uint32_field(uint32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -110,6 +113,7 @@ %ignore StructType::uint32_field(); %rename("%s") StructType::uint32_field() const; + %ignore StructType::int64_field(int64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -118,6 +122,7 @@ %ignore StructType::int64_field(); %rename("%s") StructType::int64_field() const; + %ignore StructType::uint64_field(uint64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -126,6 +131,7 @@ %ignore StructType::uint64_field(); %rename("%s") StructType::uint64_field() const; + %ignore StructType::float_field(float&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -134,6 +140,7 @@ %ignore StructType::float_field(); %rename("%s") StructType::float_field() const; + %ignore StructType::double_field(double&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -142,6 +149,7 @@ %ignore StructType::double_field(); %rename("%s") StructType::double_field() const; + %ignore StructType::bool_field(bool&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -150,6 +158,7 @@ %ignore StructType::bool_field(); %rename("%s") StructType::bool_field() const; + %ignore StructType::string_field(std::string&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -158,6 +167,7 @@ %ignore StructType::string_field(); %rename("%s") StructType::string_field() const; + %ignore StructType::enum_field(Color&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -166,6 +176,7 @@ %ignore StructType::enum_field(); %rename("%s") StructType::enum_field() const; + %ignore StructType::enum2_field(Material&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -174,6 +185,7 @@ %ignore StructType::enum2_field(); %rename("%s") StructType::enum2_field() const; + %ignore StructType::included_module_struct(eprosima::test2::StructType2&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -183,6 +195,7 @@ %rename("%s") StructType::included_module_struct() const; + %template(_StructTypeSeq) eprosima::fastdds::dds::LoanableTypedCollection; %template(StructTypeSeq) eprosima::fastdds::dds::LoanableSequence; %extend eprosima::fastdds::dds::LoanableSequence @@ -218,6 +231,7 @@ %ignore CompleteTestType::char_field(); %rename("%s") CompleteTestType::char_field() const; + %ignore CompleteTestType::uint8_field(uint8_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -226,6 +240,7 @@ %ignore CompleteTestType::uint8_field(); %rename("%s") CompleteTestType::uint8_field() const; + %ignore CompleteTestType::int16_field(int16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -234,6 +249,7 @@ %ignore CompleteTestType::int16_field(); %rename("%s") CompleteTestType::int16_field() const; + %ignore CompleteTestType::uint16_field(uint16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -242,6 +258,7 @@ %ignore CompleteTestType::uint16_field(); %rename("%s") CompleteTestType::uint16_field() const; + %ignore CompleteTestType::int32_field(int32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -250,6 +267,7 @@ %ignore CompleteTestType::int32_field(); %rename("%s") CompleteTestType::int32_field() const; + %ignore CompleteTestType::uint32_field(uint32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -258,6 +276,7 @@ %ignore CompleteTestType::uint32_field(); %rename("%s") CompleteTestType::uint32_field() const; + %ignore CompleteTestType::int64_field(int64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -266,6 +285,7 @@ %ignore CompleteTestType::int64_field(); %rename("%s") CompleteTestType::int64_field() const; + %ignore CompleteTestType::uint64_field(uint64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -274,6 +294,7 @@ %ignore CompleteTestType::uint64_field(); %rename("%s") CompleteTestType::uint64_field() const; + %ignore CompleteTestType::float_field(float&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -282,6 +303,7 @@ %ignore CompleteTestType::float_field(); %rename("%s") CompleteTestType::float_field() const; + %ignore CompleteTestType::double_field(double&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -290,6 +312,7 @@ %ignore CompleteTestType::double_field(); %rename("%s") CompleteTestType::double_field() const; + %ignore CompleteTestType::bool_field(bool&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -298,6 +321,7 @@ %ignore CompleteTestType::bool_field(); %rename("%s") CompleteTestType::bool_field() const; + %ignore CompleteTestType::string_field(std::string&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -306,6 +330,7 @@ %ignore CompleteTestType::string_field(); %rename("%s") CompleteTestType::string_field() const; + %ignore CompleteTestType::enum_field(Color&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -314,6 +339,7 @@ %ignore CompleteTestType::enum_field(); %rename("%s") CompleteTestType::enum_field() const; + %ignore CompleteTestType::enum2_field(Material&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -322,6 +348,7 @@ %ignore CompleteTestType::enum2_field(); %rename("%s") CompleteTestType::enum2_field() const; + %ignore CompleteTestType::struct_field(StructType&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -330,6 +357,7 @@ %ignore CompleteTestType::struct_field(); %rename("%s") CompleteTestType::struct_field() const; + %ignore CompleteTestType::array_char_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -344,6 +372,7 @@ return self->data(); } } + %ignore CompleteTestType::array_uint8_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -358,6 +387,7 @@ return self->data(); } } + %ignore CompleteTestType::array_int16_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -372,6 +402,7 @@ return self->data(); } } + %ignore CompleteTestType::array_uint16_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -386,6 +417,7 @@ return self->data(); } } + %ignore CompleteTestType::array_int32_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -400,6 +432,7 @@ return self->data(); } } + %ignore CompleteTestType::array_uint32_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -414,6 +447,7 @@ return self->data(); } } + %ignore CompleteTestType::array_int64_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -428,6 +462,7 @@ return self->data(); } } + %ignore CompleteTestType::array_uint64_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -442,6 +477,7 @@ return self->data(); } } + %ignore CompleteTestType::array_float_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -456,6 +492,7 @@ return self->data(); } } + %ignore CompleteTestType::array_double_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -470,6 +507,7 @@ return self->data(); } } + %ignore CompleteTestType::array_bool_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -484,6 +522,7 @@ return self->data(); } } + %ignore CompleteTestType::array_enum_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -498,6 +537,7 @@ return self->data(); } } + %ignore CompleteTestType::array_enum2_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -512,6 +552,7 @@ return self->data(); } } + %ignore CompleteTestType::array_struct_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -532,7 +573,11 @@ { return self->data(); } -}%template(char_vector) std::vector; +} + +%template( +char_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_uint8_field(std::vector&&); @@ -546,7 +591,11 @@ { return self->data(); } -}%template(uint8_t_vector) std::vector; +} + +%template( +uint8_t_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_int16_field(std::vector&&); @@ -560,7 +609,11 @@ { return self->data(); } -}%template(int16_t_vector) std::vector; +} + +%template( +int16_t_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_uint16_field(std::vector&&); @@ -574,7 +627,11 @@ { return self->data(); } -}%template(uint16_t_vector) std::vector; +} + +%template( +uint16_t_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_int32_field(std::vector&&); @@ -588,7 +645,11 @@ { return self->data(); } -}%template(int32_t_vector) std::vector; +} + +%template( +int32_t_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_uint32_field(std::vector&&); @@ -602,7 +663,11 @@ { return self->data(); } -}%template(uint32_t_vector) std::vector; +} + +%template( +uint32_t_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_int64_field(std::vector&&); @@ -616,7 +681,11 @@ { return self->data(); } -}%template(int64_t_vector) std::vector; +} + +%template( +int64_t_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_uint64_field(std::vector&&); @@ -630,7 +699,11 @@ { return self->data(); } -}%template(uint64_t_vector) std::vector; +} + +%template( +uint64_t_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_float_field(std::vector&&); @@ -644,7 +717,11 @@ { return self->data(); } -}%template(float_vector) std::vector; +} + +%template( +float_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_double_field(std::vector&&); @@ -658,7 +735,11 @@ { return self->data(); } -}%template(double_vector) std::vector; +} + +%template( +double_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_bool_field(std::vector&&); @@ -666,7 +747,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore CompleteTestType::bounded_sequence_bool_field() const; -%template(bool_vector) std::vector; +%template( +bool_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_enum_field(std::vector&&); @@ -680,7 +763,11 @@ { return self->data(); } -}%template(Color_vector) std::vector; +} + +%template( +Color_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_enum2_field(std::vector&&); @@ -694,7 +781,11 @@ { return self->data(); } -}%template(Material_vector) std::vector; +} + +%template( +Material_vector +) std::vector; %ignore CompleteTestType::bounded_sequence_struct_field(std::vector&&); @@ -702,7 +793,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore CompleteTestType::bounded_sequence_struct_field() const; -%template(StructType_vector) std::vector; +%template( +StructType_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_char_field(std::vector&&); @@ -716,7 +809,11 @@ { return self->data(); } -}%template(char_vector) std::vector; +} + +%template( +char_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_uint8_field(std::vector&&); @@ -730,7 +827,11 @@ { return self->data(); } -}%template(uint8_t_vector) std::vector; +} + +%template( +uint8_t_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_int16_field(std::vector&&); @@ -744,7 +845,11 @@ { return self->data(); } -}%template(int16_t_vector) std::vector; +} + +%template( +int16_t_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_uint16_field(std::vector&&); @@ -758,7 +863,11 @@ { return self->data(); } -}%template(uint16_t_vector) std::vector; +} + +%template( +uint16_t_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_int32_field(std::vector&&); @@ -772,7 +881,11 @@ { return self->data(); } -}%template(int32_t_vector) std::vector; +} + +%template( +int32_t_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_uint32_field(std::vector&&); @@ -786,7 +899,11 @@ { return self->data(); } -}%template(uint32_t_vector) std::vector; +} + +%template( +uint32_t_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_int64_field(std::vector&&); @@ -800,7 +917,11 @@ { return self->data(); } -}%template(int64_t_vector) std::vector; +} + +%template( +int64_t_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_uint64_field(std::vector&&); @@ -814,7 +935,11 @@ { return self->data(); } -}%template(uint64_t_vector) std::vector; +} + +%template( +uint64_t_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_float_field(std::vector&&); @@ -828,7 +953,11 @@ { return self->data(); } -}%template(float_vector) std::vector; +} + +%template( +float_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_double_field(std::vector&&); @@ -842,7 +971,11 @@ { return self->data(); } -}%template(double_vector) std::vector; +} + +%template( +double_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_bool_field(std::vector&&); @@ -850,7 +983,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore CompleteTestType::unbounded_sequence_bool_field() const; -%template(bool_vector) std::vector; +%template( +bool_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_enum_field(std::vector&&); @@ -864,7 +999,11 @@ { return self->data(); } -}%template(Color_vector) std::vector; +} + +%template( +Color_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_enum2_field(std::vector&&); @@ -878,7 +1017,11 @@ { return self->data(); } -}%template(Material_vector) std::vector; +} + +%template( +Material_vector +) std::vector; %ignore CompleteTestType::unbounded_sequence_struct_field(std::vector&&); @@ -886,7 +1029,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore CompleteTestType::unbounded_sequence_struct_field() const; -%template(StructType_vector) std::vector; +%template( +StructType_vector +) std::vector; %template(_CompleteTestTypeSeq) eprosima::fastdds::dds::LoanableTypedCollection; @@ -922,6 +1067,7 @@ %ignore KeyedCompleteTestType::id(); %rename("%s") KeyedCompleteTestType::id() const; + %ignore KeyedCompleteTestType::char_field(char&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -930,6 +1076,7 @@ %ignore KeyedCompleteTestType::char_field(); %rename("%s") KeyedCompleteTestType::char_field() const; + %ignore KeyedCompleteTestType::uint8_field(uint8_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -938,6 +1085,7 @@ %ignore KeyedCompleteTestType::uint8_field(); %rename("%s") KeyedCompleteTestType::uint8_field() const; + %ignore KeyedCompleteTestType::int16_field(int16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -946,6 +1094,7 @@ %ignore KeyedCompleteTestType::int16_field(); %rename("%s") KeyedCompleteTestType::int16_field() const; + %ignore KeyedCompleteTestType::uint16_field(uint16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -954,6 +1103,7 @@ %ignore KeyedCompleteTestType::uint16_field(); %rename("%s") KeyedCompleteTestType::uint16_field() const; + %ignore KeyedCompleteTestType::int32_field(int32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -962,6 +1112,7 @@ %ignore KeyedCompleteTestType::int32_field(); %rename("%s") KeyedCompleteTestType::int32_field() const; + %ignore KeyedCompleteTestType::uint32_field(uint32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -970,6 +1121,7 @@ %ignore KeyedCompleteTestType::uint32_field(); %rename("%s") KeyedCompleteTestType::uint32_field() const; + %ignore KeyedCompleteTestType::int64_field(int64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -978,6 +1130,7 @@ %ignore KeyedCompleteTestType::int64_field(); %rename("%s") KeyedCompleteTestType::int64_field() const; + %ignore KeyedCompleteTestType::uint64_field(uint64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -986,6 +1139,7 @@ %ignore KeyedCompleteTestType::uint64_field(); %rename("%s") KeyedCompleteTestType::uint64_field() const; + %ignore KeyedCompleteTestType::float_field(float&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -994,6 +1148,7 @@ %ignore KeyedCompleteTestType::float_field(); %rename("%s") KeyedCompleteTestType::float_field() const; + %ignore KeyedCompleteTestType::double_field(double&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1002,6 +1157,7 @@ %ignore KeyedCompleteTestType::double_field(); %rename("%s") KeyedCompleteTestType::double_field() const; + %ignore KeyedCompleteTestType::bool_field(bool&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1010,6 +1166,7 @@ %ignore KeyedCompleteTestType::bool_field(); %rename("%s") KeyedCompleteTestType::bool_field() const; + %ignore KeyedCompleteTestType::string_field(std::string&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1018,6 +1175,7 @@ %ignore KeyedCompleteTestType::string_field(); %rename("%s") KeyedCompleteTestType::string_field() const; + %ignore KeyedCompleteTestType::enum_field(Color&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1026,6 +1184,7 @@ %ignore KeyedCompleteTestType::enum_field(); %rename("%s") KeyedCompleteTestType::enum_field() const; + %ignore KeyedCompleteTestType::enum2_field(Material&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1034,6 +1193,7 @@ %ignore KeyedCompleteTestType::enum2_field(); %rename("%s") KeyedCompleteTestType::enum2_field() const; + %ignore KeyedCompleteTestType::struct_field(StructType&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1042,6 +1202,7 @@ %ignore KeyedCompleteTestType::struct_field(); %rename("%s") KeyedCompleteTestType::struct_field() const; + %ignore KeyedCompleteTestType::array_char_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1056,6 +1217,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_uint8_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1070,6 +1232,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_int16_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1084,6 +1247,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_uint16_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1098,6 +1262,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_int32_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1112,6 +1277,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_uint32_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1126,6 +1292,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_int64_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1140,6 +1307,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_uint64_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1154,6 +1322,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_float_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1168,6 +1337,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_double_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1182,6 +1352,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_bool_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1196,6 +1367,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_enum_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1210,6 +1382,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_enum2_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1224,6 +1397,7 @@ return self->data(); } } + %ignore KeyedCompleteTestType::array_struct_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1244,7 +1418,11 @@ { return self->data(); } -}%template(char_vector) std::vector; +} + +%template( +char_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_uint8_field(std::vector&&); @@ -1258,7 +1436,11 @@ { return self->data(); } -}%template(uint8_t_vector) std::vector; +} + +%template( +uint8_t_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_int16_field(std::vector&&); @@ -1272,7 +1454,11 @@ { return self->data(); } -}%template(int16_t_vector) std::vector; +} + +%template( +int16_t_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_uint16_field(std::vector&&); @@ -1286,7 +1472,11 @@ { return self->data(); } -}%template(uint16_t_vector) std::vector; +} + +%template( +uint16_t_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_int32_field(std::vector&&); @@ -1300,7 +1490,11 @@ { return self->data(); } -}%template(int32_t_vector) std::vector; +} + +%template( +int32_t_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_uint32_field(std::vector&&); @@ -1314,7 +1508,11 @@ { return self->data(); } -}%template(uint32_t_vector) std::vector; +} + +%template( +uint32_t_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_int64_field(std::vector&&); @@ -1328,7 +1526,11 @@ { return self->data(); } -}%template(int64_t_vector) std::vector; +} + +%template( +int64_t_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_uint64_field(std::vector&&); @@ -1342,7 +1544,11 @@ { return self->data(); } -}%template(uint64_t_vector) std::vector; +} + +%template( +uint64_t_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_float_field(std::vector&&); @@ -1356,7 +1562,11 @@ { return self->data(); } -}%template(float_vector) std::vector; +} + +%template( +float_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_double_field(std::vector&&); @@ -1370,7 +1580,11 @@ { return self->data(); } -}%template(double_vector) std::vector; +} + +%template( +double_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_bool_field(std::vector&&); @@ -1378,7 +1592,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore KeyedCompleteTestType::bounded_sequence_bool_field() const; -%template(bool_vector) std::vector; +%template( +bool_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_enum_field(std::vector&&); @@ -1392,7 +1608,11 @@ { return self->data(); } -}%template(Color_vector) std::vector; +} + +%template( +Color_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_enum2_field(std::vector&&); @@ -1406,7 +1626,11 @@ { return self->data(); } -}%template(Material_vector) std::vector; +} + +%template( +Material_vector +) std::vector; %ignore KeyedCompleteTestType::bounded_sequence_struct_field(std::vector&&); @@ -1414,7 +1638,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore KeyedCompleteTestType::bounded_sequence_struct_field() const; -%template(StructType_vector) std::vector; +%template( +StructType_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_char_field(std::vector&&); @@ -1428,7 +1654,11 @@ { return self->data(); } -}%template(char_vector) std::vector; +} + +%template( +char_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_uint8_field(std::vector&&); @@ -1442,7 +1672,11 @@ { return self->data(); } -}%template(uint8_t_vector) std::vector; +} + +%template( +uint8_t_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_int16_field(std::vector&&); @@ -1456,7 +1690,11 @@ { return self->data(); } -}%template(int16_t_vector) std::vector; +} + +%template( +int16_t_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_uint16_field(std::vector&&); @@ -1470,7 +1708,11 @@ { return self->data(); } -}%template(uint16_t_vector) std::vector; +} + +%template( +uint16_t_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_int32_field(std::vector&&); @@ -1484,7 +1726,11 @@ { return self->data(); } -}%template(int32_t_vector) std::vector; +} + +%template( +int32_t_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_uint32_field(std::vector&&); @@ -1498,7 +1744,11 @@ { return self->data(); } -}%template(uint32_t_vector) std::vector; +} + +%template( +uint32_t_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_int64_field(std::vector&&); @@ -1512,7 +1762,11 @@ { return self->data(); } -}%template(int64_t_vector) std::vector; +} + +%template( +int64_t_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_uint64_field(std::vector&&); @@ -1526,7 +1780,11 @@ { return self->data(); } -}%template(uint64_t_vector) std::vector; +} + +%template( +uint64_t_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_float_field(std::vector&&); @@ -1540,7 +1798,11 @@ { return self->data(); } -}%template(float_vector) std::vector; +} + +%template( +float_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_double_field(std::vector&&); @@ -1554,7 +1816,11 @@ { return self->data(); } -}%template(double_vector) std::vector; +} + +%template( +double_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_bool_field(std::vector&&); @@ -1562,7 +1828,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore KeyedCompleteTestType::unbounded_sequence_bool_field() const; -%template(bool_vector) std::vector; +%template( +bool_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_enum_field(std::vector&&); @@ -1576,7 +1844,11 @@ { return self->data(); } -}%template(Color_vector) std::vector; +} + +%template( +Color_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_enum2_field(std::vector&&); @@ -1590,7 +1862,11 @@ { return self->data(); } -}%template(Material_vector) std::vector; +} + +%template( +Material_vector +) std::vector; %ignore KeyedCompleteTestType::unbounded_sequence_struct_field(std::vector&&); @@ -1598,7 +1874,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore KeyedCompleteTestType::unbounded_sequence_struct_field() const; -%template(StructType_vector) std::vector; +%template( +StructType_vector +) std::vector; %template(_KeyedCompleteTestTypeSeq) eprosima::fastdds::dds::LoanableTypedCollection; diff --git a/fastdds_python/test/types/test_completeCdrAux.hpp b/fastdds_python/test/types/test_completeCdrAux.hpp new file mode 100644 index 00000000..dab7d5bf --- /dev/null +++ b/fastdds_python/test/types/test_completeCdrAux.hpp @@ -0,0 +1,66 @@ +// 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_completeCdrAux.hpp + * This source file contains some definitions of CDR related functions. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_TEST_COMPLETECDRAUX_HPP_ +#define _FAST_DDS_GENERATED_TEST_COMPLETECDRAUX_HPP_ + +#include "test_complete.h" + +constexpr uint32_t CompleteTestType_max_cdr_typesize {77504UL}; +constexpr uint32_t CompleteTestType_max_key_cdr_typesize {0UL}; + + +constexpr uint32_t StructType_max_cdr_typesize {656UL}; +constexpr uint32_t StructType_max_key_cdr_typesize {0UL}; + + + + +constexpr uint32_t KeyedCompleteTestType_max_cdr_typesize {77504UL}; +constexpr uint32_t KeyedCompleteTestType_max_key_cdr_typesize {4UL}; + + + +namespace eprosima { +namespace fastcdr { + +class Cdr; +class CdrSizeCalculator; + +eProsima_user_DllExport void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const StructType& data); + + + +eProsima_user_DllExport void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const CompleteTestType& data); + +eProsima_user_DllExport void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const KeyedCompleteTestType& data); + + +} // namespace fastcdr +} // namespace eprosima + +#endif // _FAST_DDS_GENERATED_TEST_COMPLETECDRAUX_HPP_ \ No newline at end of file diff --git a/fastdds_python/test/types/test_completeCdrAux.ipp b/fastdds_python/test/types/test_completeCdrAux.ipp new file mode 100644 index 00000000..69241e86 --- /dev/null +++ b/fastdds_python/test/types/test_completeCdrAux.ipp @@ -0,0 +1,1349 @@ +// 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_completeCdrAux.ipp + * This source file contains some declarations of CDR related functions. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_TEST_COMPLETECDRAUX_IPP_ +#define _FAST_DDS_GENERATED_TEST_COMPLETECDRAUX_IPP_ + +#include "test_completeCdrAux.hpp" + +#include +#include + + +#include +using namespace eprosima::fastcdr::exception; + +namespace eprosima { +namespace fastcdr { + +template<> +eProsima_user_DllExport size_t calculate_serialized_size( + eprosima::fastcdr::CdrSizeCalculator& calculator, + const StructType& data, + size_t& current_alignment) +{ + static_cast(data); + + eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding(); + size_t calculated_size {calculator.begin_calculate_type_serialized_size( + eprosima::fastcdr::CdrVersion::XCDRv2 == calculator.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + current_alignment)}; + + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + data.char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + data.uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), + data.int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), + data.uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), + data.int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), + data.uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), + data.int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), + data.uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(8), + data.float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(9), + data.double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(10), + data.bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(11), + data.string_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(12), + data.enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(13), + data.enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(14), + data.included_module_struct(), current_alignment); + + + calculated_size += calculator.end_calculate_type_serialized_size(previous_encoding, current_alignment); + + return calculated_size; +} + +template<> +eProsima_user_DllExport void serialize( + eprosima::fastcdr::Cdr& scdr, + const StructType& data) +{ + eprosima::fastcdr::Cdr::state current_state(scdr); + scdr.begin_serialize_type(current_state, + eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR); + + scdr + << eprosima::fastcdr::MemberId(0) << data.char_field() + << eprosima::fastcdr::MemberId(1) << data.uint8_field() + << eprosima::fastcdr::MemberId(2) << data.int16_field() + << eprosima::fastcdr::MemberId(3) << data.uint16_field() + << eprosima::fastcdr::MemberId(4) << data.int32_field() + << eprosima::fastcdr::MemberId(5) << data.uint32_field() + << eprosima::fastcdr::MemberId(6) << data.int64_field() + << eprosima::fastcdr::MemberId(7) << data.uint64_field() + << eprosima::fastcdr::MemberId(8) << data.float_field() + << eprosima::fastcdr::MemberId(9) << data.double_field() + << eprosima::fastcdr::MemberId(10) << data.bool_field() + << eprosima::fastcdr::MemberId(11) << data.string_field() + << eprosima::fastcdr::MemberId(12) << data.enum_field() + << eprosima::fastcdr::MemberId(13) << data.enum2_field() + << eprosima::fastcdr::MemberId(14) << data.included_module_struct() +; + + scdr.end_serialize_type(current_state); +} + +template<> +eProsima_user_DllExport void deserialize( + eprosima::fastcdr::Cdr& cdr, + StructType& data) +{ + cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + [&data](eprosima::fastcdr::Cdr& dcdr, const eprosima::fastcdr::MemberId& mid) -> bool + { + bool ret_value = true; + switch (mid.id) + { + case 0: + dcdr >> data.char_field(); + break; + + case 1: + dcdr >> data.uint8_field(); + break; + + case 2: + dcdr >> data.int16_field(); + break; + + case 3: + dcdr >> data.uint16_field(); + break; + + case 4: + dcdr >> data.int32_field(); + break; + + case 5: + dcdr >> data.uint32_field(); + break; + + case 6: + dcdr >> data.int64_field(); + break; + + case 7: + dcdr >> data.uint64_field(); + break; + + case 8: + dcdr >> data.float_field(); + break; + + case 9: + dcdr >> data.double_field(); + break; + + case 10: + dcdr >> data.bool_field(); + break; + + case 11: + dcdr >> data.string_field(); + break; + + case 12: + dcdr >> data.enum_field(); + break; + + case 13: + dcdr >> data.enum2_field(); + break; + + case 14: + dcdr >> data.included_module_struct(); + break; + + default: + ret_value = false; + break; + } + return ret_value; + }); +} + +void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const StructType& data) +{ + static_cast(scdr); + static_cast(data); +} + + + + +template<> +eProsima_user_DllExport size_t calculate_serialized_size( + eprosima::fastcdr::CdrSizeCalculator& calculator, + const CompleteTestType& data, + size_t& current_alignment) +{ + static_cast(data); + + eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding(); + size_t calculated_size {calculator.begin_calculate_type_serialized_size( + eprosima::fastcdr::CdrVersion::XCDRv2 == calculator.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + current_alignment)}; + + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + data.char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + data.uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), + data.int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), + data.uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), + data.int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), + data.uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), + data.int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), + data.uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(8), + data.float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(9), + data.double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(10), + data.bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(11), + data.string_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(12), + data.enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(13), + data.enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(14), + data.struct_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(15), + data.array_char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(16), + data.array_uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(17), + data.array_int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(18), + data.array_uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(19), + data.array_int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(20), + data.array_uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(21), + data.array_int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(22), + data.array_uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(23), + data.array_float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(24), + data.array_double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(25), + data.array_bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(26), + data.array_enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(27), + data.array_enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(28), + data.array_struct_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(29), + data.bounded_sequence_char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(30), + data.bounded_sequence_uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(31), + data.bounded_sequence_int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(32), + data.bounded_sequence_uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(33), + data.bounded_sequence_int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(34), + data.bounded_sequence_uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(35), + data.bounded_sequence_int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(36), + data.bounded_sequence_uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(37), + data.bounded_sequence_float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(38), + data.bounded_sequence_double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(39), + data.bounded_sequence_bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(40), + data.bounded_sequence_enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(41), + data.bounded_sequence_enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(42), + data.bounded_sequence_struct_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(43), + data.unbounded_sequence_char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(44), + data.unbounded_sequence_uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(45), + data.unbounded_sequence_int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(46), + data.unbounded_sequence_uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(47), + data.unbounded_sequence_int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(48), + data.unbounded_sequence_uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(49), + data.unbounded_sequence_int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(50), + data.unbounded_sequence_uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(51), + data.unbounded_sequence_float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(52), + data.unbounded_sequence_double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(53), + data.unbounded_sequence_bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(54), + data.unbounded_sequence_enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(55), + data.unbounded_sequence_enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(56), + data.unbounded_sequence_struct_field(), current_alignment); + + + calculated_size += calculator.end_calculate_type_serialized_size(previous_encoding, current_alignment); + + return calculated_size; +} + +template<> +eProsima_user_DllExport void serialize( + eprosima::fastcdr::Cdr& scdr, + const CompleteTestType& data) +{ + eprosima::fastcdr::Cdr::state current_state(scdr); + scdr.begin_serialize_type(current_state, + eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR); + + scdr + << eprosima::fastcdr::MemberId(0) << data.char_field() + << eprosima::fastcdr::MemberId(1) << data.uint8_field() + << eprosima::fastcdr::MemberId(2) << data.int16_field() + << eprosima::fastcdr::MemberId(3) << data.uint16_field() + << eprosima::fastcdr::MemberId(4) << data.int32_field() + << eprosima::fastcdr::MemberId(5) << data.uint32_field() + << eprosima::fastcdr::MemberId(6) << data.int64_field() + << eprosima::fastcdr::MemberId(7) << data.uint64_field() + << eprosima::fastcdr::MemberId(8) << data.float_field() + << eprosima::fastcdr::MemberId(9) << data.double_field() + << eprosima::fastcdr::MemberId(10) << data.bool_field() + << eprosima::fastcdr::MemberId(11) << data.string_field() + << eprosima::fastcdr::MemberId(12) << data.enum_field() + << eprosima::fastcdr::MemberId(13) << data.enum2_field() + << eprosima::fastcdr::MemberId(14) << data.struct_field() + << eprosima::fastcdr::MemberId(15) << data.array_char_field() + << eprosima::fastcdr::MemberId(16) << data.array_uint8_field() + << eprosima::fastcdr::MemberId(17) << data.array_int16_field() + << eprosima::fastcdr::MemberId(18) << data.array_uint16_field() + << eprosima::fastcdr::MemberId(19) << data.array_int32_field() + << eprosima::fastcdr::MemberId(20) << data.array_uint32_field() + << eprosima::fastcdr::MemberId(21) << data.array_int64_field() + << eprosima::fastcdr::MemberId(22) << data.array_uint64_field() + << eprosima::fastcdr::MemberId(23) << data.array_float_field() + << eprosima::fastcdr::MemberId(24) << data.array_double_field() + << eprosima::fastcdr::MemberId(25) << data.array_bool_field() + << eprosima::fastcdr::MemberId(26) << data.array_enum_field() + << eprosima::fastcdr::MemberId(27) << data.array_enum2_field() + << eprosima::fastcdr::MemberId(28) << data.array_struct_field() + << eprosima::fastcdr::MemberId(29) << data.bounded_sequence_char_field() + << eprosima::fastcdr::MemberId(30) << data.bounded_sequence_uint8_field() + << eprosima::fastcdr::MemberId(31) << data.bounded_sequence_int16_field() + << eprosima::fastcdr::MemberId(32) << data.bounded_sequence_uint16_field() + << eprosima::fastcdr::MemberId(33) << data.bounded_sequence_int32_field() + << eprosima::fastcdr::MemberId(34) << data.bounded_sequence_uint32_field() + << eprosima::fastcdr::MemberId(35) << data.bounded_sequence_int64_field() + << eprosima::fastcdr::MemberId(36) << data.bounded_sequence_uint64_field() + << eprosima::fastcdr::MemberId(37) << data.bounded_sequence_float_field() + << eprosima::fastcdr::MemberId(38) << data.bounded_sequence_double_field() + << eprosima::fastcdr::MemberId(39) << data.bounded_sequence_bool_field() + << eprosima::fastcdr::MemberId(40) << data.bounded_sequence_enum_field() + << eprosima::fastcdr::MemberId(41) << data.bounded_sequence_enum2_field() + << eprosima::fastcdr::MemberId(42) << data.bounded_sequence_struct_field() + << eprosima::fastcdr::MemberId(43) << data.unbounded_sequence_char_field() + << eprosima::fastcdr::MemberId(44) << data.unbounded_sequence_uint8_field() + << eprosima::fastcdr::MemberId(45) << data.unbounded_sequence_int16_field() + << eprosima::fastcdr::MemberId(46) << data.unbounded_sequence_uint16_field() + << eprosima::fastcdr::MemberId(47) << data.unbounded_sequence_int32_field() + << eprosima::fastcdr::MemberId(48) << data.unbounded_sequence_uint32_field() + << eprosima::fastcdr::MemberId(49) << data.unbounded_sequence_int64_field() + << eprosima::fastcdr::MemberId(50) << data.unbounded_sequence_uint64_field() + << eprosima::fastcdr::MemberId(51) << data.unbounded_sequence_float_field() + << eprosima::fastcdr::MemberId(52) << data.unbounded_sequence_double_field() + << eprosima::fastcdr::MemberId(53) << data.unbounded_sequence_bool_field() + << eprosima::fastcdr::MemberId(54) << data.unbounded_sequence_enum_field() + << eprosima::fastcdr::MemberId(55) << data.unbounded_sequence_enum2_field() + << eprosima::fastcdr::MemberId(56) << data.unbounded_sequence_struct_field() +; + + scdr.end_serialize_type(current_state); +} + +template<> +eProsima_user_DllExport void deserialize( + eprosima::fastcdr::Cdr& cdr, + CompleteTestType& data) +{ + cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + [&data](eprosima::fastcdr::Cdr& dcdr, const eprosima::fastcdr::MemberId& mid) -> bool + { + bool ret_value = true; + switch (mid.id) + { + case 0: + dcdr >> data.char_field(); + break; + + case 1: + dcdr >> data.uint8_field(); + break; + + case 2: + dcdr >> data.int16_field(); + break; + + case 3: + dcdr >> data.uint16_field(); + break; + + case 4: + dcdr >> data.int32_field(); + break; + + case 5: + dcdr >> data.uint32_field(); + break; + + case 6: + dcdr >> data.int64_field(); + break; + + case 7: + dcdr >> data.uint64_field(); + break; + + case 8: + dcdr >> data.float_field(); + break; + + case 9: + dcdr >> data.double_field(); + break; + + case 10: + dcdr >> data.bool_field(); + break; + + case 11: + dcdr >> data.string_field(); + break; + + case 12: + dcdr >> data.enum_field(); + break; + + case 13: + dcdr >> data.enum2_field(); + break; + + case 14: + dcdr >> data.struct_field(); + break; + + case 15: + dcdr >> data.array_char_field(); + break; + + case 16: + dcdr >> data.array_uint8_field(); + break; + + case 17: + dcdr >> data.array_int16_field(); + break; + + case 18: + dcdr >> data.array_uint16_field(); + break; + + case 19: + dcdr >> data.array_int32_field(); + break; + + case 20: + dcdr >> data.array_uint32_field(); + break; + + case 21: + dcdr >> data.array_int64_field(); + break; + + case 22: + dcdr >> data.array_uint64_field(); + break; + + case 23: + dcdr >> data.array_float_field(); + break; + + case 24: + dcdr >> data.array_double_field(); + break; + + case 25: + dcdr >> data.array_bool_field(); + break; + + case 26: + dcdr >> data.array_enum_field(); + break; + + case 27: + dcdr >> data.array_enum2_field(); + break; + + case 28: + dcdr >> data.array_struct_field(); + break; + + case 29: + dcdr >> data.bounded_sequence_char_field(); + break; + + case 30: + dcdr >> data.bounded_sequence_uint8_field(); + break; + + case 31: + dcdr >> data.bounded_sequence_int16_field(); + break; + + case 32: + dcdr >> data.bounded_sequence_uint16_field(); + break; + + case 33: + dcdr >> data.bounded_sequence_int32_field(); + break; + + case 34: + dcdr >> data.bounded_sequence_uint32_field(); + break; + + case 35: + dcdr >> data.bounded_sequence_int64_field(); + break; + + case 36: + dcdr >> data.bounded_sequence_uint64_field(); + break; + + case 37: + dcdr >> data.bounded_sequence_float_field(); + break; + + case 38: + dcdr >> data.bounded_sequence_double_field(); + break; + + case 39: + dcdr >> data.bounded_sequence_bool_field(); + break; + + case 40: + dcdr >> data.bounded_sequence_enum_field(); + break; + + case 41: + dcdr >> data.bounded_sequence_enum2_field(); + break; + + case 42: + dcdr >> data.bounded_sequence_struct_field(); + break; + + case 43: + dcdr >> data.unbounded_sequence_char_field(); + break; + + case 44: + dcdr >> data.unbounded_sequence_uint8_field(); + break; + + case 45: + dcdr >> data.unbounded_sequence_int16_field(); + break; + + case 46: + dcdr >> data.unbounded_sequence_uint16_field(); + break; + + case 47: + dcdr >> data.unbounded_sequence_int32_field(); + break; + + case 48: + dcdr >> data.unbounded_sequence_uint32_field(); + break; + + case 49: + dcdr >> data.unbounded_sequence_int64_field(); + break; + + case 50: + dcdr >> data.unbounded_sequence_uint64_field(); + break; + + case 51: + dcdr >> data.unbounded_sequence_float_field(); + break; + + case 52: + dcdr >> data.unbounded_sequence_double_field(); + break; + + case 53: + dcdr >> data.unbounded_sequence_bool_field(); + break; + + case 54: + dcdr >> data.unbounded_sequence_enum_field(); + break; + + case 55: + dcdr >> data.unbounded_sequence_enum2_field(); + break; + + case 56: + dcdr >> data.unbounded_sequence_struct_field(); + break; + + default: + ret_value = false; + break; + } + return ret_value; + }); +} + +void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const CompleteTestType& data) +{ + static_cast(scdr); + static_cast(data); +} + + +template<> +eProsima_user_DllExport size_t calculate_serialized_size( + eprosima::fastcdr::CdrSizeCalculator& calculator, + const KeyedCompleteTestType& data, + size_t& current_alignment) +{ + static_cast(data); + + eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding(); + size_t calculated_size {calculator.begin_calculate_type_serialized_size( + eprosima::fastcdr::CdrVersion::XCDRv2 == calculator.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + current_alignment)}; + + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + data.id(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + data.char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), + data.uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), + data.int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), + data.uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), + data.int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), + data.uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), + data.int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(8), + data.uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(9), + data.float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(10), + data.double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(11), + data.bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(12), + data.string_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(13), + data.enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(14), + data.enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(15), + data.struct_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(16), + data.array_char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(17), + data.array_uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(18), + data.array_int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(19), + data.array_uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(20), + data.array_int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(21), + data.array_uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(22), + data.array_int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(23), + data.array_uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(24), + data.array_float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(25), + data.array_double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(26), + data.array_bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(27), + data.array_enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(28), + data.array_enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(29), + data.array_struct_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(30), + data.bounded_sequence_char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(31), + data.bounded_sequence_uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(32), + data.bounded_sequence_int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(33), + data.bounded_sequence_uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(34), + data.bounded_sequence_int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(35), + data.bounded_sequence_uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(36), + data.bounded_sequence_int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(37), + data.bounded_sequence_uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(38), + data.bounded_sequence_float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(39), + data.bounded_sequence_double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(40), + data.bounded_sequence_bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(41), + data.bounded_sequence_enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(42), + data.bounded_sequence_enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(43), + data.bounded_sequence_struct_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(44), + data.unbounded_sequence_char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(45), + data.unbounded_sequence_uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(46), + data.unbounded_sequence_int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(47), + data.unbounded_sequence_uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(48), + data.unbounded_sequence_int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(49), + data.unbounded_sequence_uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(50), + data.unbounded_sequence_int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(51), + data.unbounded_sequence_uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(52), + data.unbounded_sequence_float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(53), + data.unbounded_sequence_double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(54), + data.unbounded_sequence_bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(55), + data.unbounded_sequence_enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(56), + data.unbounded_sequence_enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(57), + data.unbounded_sequence_struct_field(), current_alignment); + + + calculated_size += calculator.end_calculate_type_serialized_size(previous_encoding, current_alignment); + + return calculated_size; +} + +template<> +eProsima_user_DllExport void serialize( + eprosima::fastcdr::Cdr& scdr, + const KeyedCompleteTestType& data) +{ + eprosima::fastcdr::Cdr::state current_state(scdr); + scdr.begin_serialize_type(current_state, + eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR); + + scdr + << eprosima::fastcdr::MemberId(0) << data.id() + << eprosima::fastcdr::MemberId(1) << data.char_field() + << eprosima::fastcdr::MemberId(2) << data.uint8_field() + << eprosima::fastcdr::MemberId(3) << data.int16_field() + << eprosima::fastcdr::MemberId(4) << data.uint16_field() + << eprosima::fastcdr::MemberId(5) << data.int32_field() + << eprosima::fastcdr::MemberId(6) << data.uint32_field() + << eprosima::fastcdr::MemberId(7) << data.int64_field() + << eprosima::fastcdr::MemberId(8) << data.uint64_field() + << eprosima::fastcdr::MemberId(9) << data.float_field() + << eprosima::fastcdr::MemberId(10) << data.double_field() + << eprosima::fastcdr::MemberId(11) << data.bool_field() + << eprosima::fastcdr::MemberId(12) << data.string_field() + << eprosima::fastcdr::MemberId(13) << data.enum_field() + << eprosima::fastcdr::MemberId(14) << data.enum2_field() + << eprosima::fastcdr::MemberId(15) << data.struct_field() + << eprosima::fastcdr::MemberId(16) << data.array_char_field() + << eprosima::fastcdr::MemberId(17) << data.array_uint8_field() + << eprosima::fastcdr::MemberId(18) << data.array_int16_field() + << eprosima::fastcdr::MemberId(19) << data.array_uint16_field() + << eprosima::fastcdr::MemberId(20) << data.array_int32_field() + << eprosima::fastcdr::MemberId(21) << data.array_uint32_field() + << eprosima::fastcdr::MemberId(22) << data.array_int64_field() + << eprosima::fastcdr::MemberId(23) << data.array_uint64_field() + << eprosima::fastcdr::MemberId(24) << data.array_float_field() + << eprosima::fastcdr::MemberId(25) << data.array_double_field() + << eprosima::fastcdr::MemberId(26) << data.array_bool_field() + << eprosima::fastcdr::MemberId(27) << data.array_enum_field() + << eprosima::fastcdr::MemberId(28) << data.array_enum2_field() + << eprosima::fastcdr::MemberId(29) << data.array_struct_field() + << eprosima::fastcdr::MemberId(30) << data.bounded_sequence_char_field() + << eprosima::fastcdr::MemberId(31) << data.bounded_sequence_uint8_field() + << eprosima::fastcdr::MemberId(32) << data.bounded_sequence_int16_field() + << eprosima::fastcdr::MemberId(33) << data.bounded_sequence_uint16_field() + << eprosima::fastcdr::MemberId(34) << data.bounded_sequence_int32_field() + << eprosima::fastcdr::MemberId(35) << data.bounded_sequence_uint32_field() + << eprosima::fastcdr::MemberId(36) << data.bounded_sequence_int64_field() + << eprosima::fastcdr::MemberId(37) << data.bounded_sequence_uint64_field() + << eprosima::fastcdr::MemberId(38) << data.bounded_sequence_float_field() + << eprosima::fastcdr::MemberId(39) << data.bounded_sequence_double_field() + << eprosima::fastcdr::MemberId(40) << data.bounded_sequence_bool_field() + << eprosima::fastcdr::MemberId(41) << data.bounded_sequence_enum_field() + << eprosima::fastcdr::MemberId(42) << data.bounded_sequence_enum2_field() + << eprosima::fastcdr::MemberId(43) << data.bounded_sequence_struct_field() + << eprosima::fastcdr::MemberId(44) << data.unbounded_sequence_char_field() + << eprosima::fastcdr::MemberId(45) << data.unbounded_sequence_uint8_field() + << eprosima::fastcdr::MemberId(46) << data.unbounded_sequence_int16_field() + << eprosima::fastcdr::MemberId(47) << data.unbounded_sequence_uint16_field() + << eprosima::fastcdr::MemberId(48) << data.unbounded_sequence_int32_field() + << eprosima::fastcdr::MemberId(49) << data.unbounded_sequence_uint32_field() + << eprosima::fastcdr::MemberId(50) << data.unbounded_sequence_int64_field() + << eprosima::fastcdr::MemberId(51) << data.unbounded_sequence_uint64_field() + << eprosima::fastcdr::MemberId(52) << data.unbounded_sequence_float_field() + << eprosima::fastcdr::MemberId(53) << data.unbounded_sequence_double_field() + << eprosima::fastcdr::MemberId(54) << data.unbounded_sequence_bool_field() + << eprosima::fastcdr::MemberId(55) << data.unbounded_sequence_enum_field() + << eprosima::fastcdr::MemberId(56) << data.unbounded_sequence_enum2_field() + << eprosima::fastcdr::MemberId(57) << data.unbounded_sequence_struct_field() +; + + scdr.end_serialize_type(current_state); +} + +template<> +eProsima_user_DllExport void deserialize( + eprosima::fastcdr::Cdr& cdr, + KeyedCompleteTestType& data) +{ + cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + [&data](eprosima::fastcdr::Cdr& dcdr, const eprosima::fastcdr::MemberId& mid) -> bool + { + bool ret_value = true; + switch (mid.id) + { + case 0: + dcdr >> data.id(); + break; + + case 1: + dcdr >> data.char_field(); + break; + + case 2: + dcdr >> data.uint8_field(); + break; + + case 3: + dcdr >> data.int16_field(); + break; + + case 4: + dcdr >> data.uint16_field(); + break; + + case 5: + dcdr >> data.int32_field(); + break; + + case 6: + dcdr >> data.uint32_field(); + break; + + case 7: + dcdr >> data.int64_field(); + break; + + case 8: + dcdr >> data.uint64_field(); + break; + + case 9: + dcdr >> data.float_field(); + break; + + case 10: + dcdr >> data.double_field(); + break; + + case 11: + dcdr >> data.bool_field(); + break; + + case 12: + dcdr >> data.string_field(); + break; + + case 13: + dcdr >> data.enum_field(); + break; + + case 14: + dcdr >> data.enum2_field(); + break; + + case 15: + dcdr >> data.struct_field(); + break; + + case 16: + dcdr >> data.array_char_field(); + break; + + case 17: + dcdr >> data.array_uint8_field(); + break; + + case 18: + dcdr >> data.array_int16_field(); + break; + + case 19: + dcdr >> data.array_uint16_field(); + break; + + case 20: + dcdr >> data.array_int32_field(); + break; + + case 21: + dcdr >> data.array_uint32_field(); + break; + + case 22: + dcdr >> data.array_int64_field(); + break; + + case 23: + dcdr >> data.array_uint64_field(); + break; + + case 24: + dcdr >> data.array_float_field(); + break; + + case 25: + dcdr >> data.array_double_field(); + break; + + case 26: + dcdr >> data.array_bool_field(); + break; + + case 27: + dcdr >> data.array_enum_field(); + break; + + case 28: + dcdr >> data.array_enum2_field(); + break; + + case 29: + dcdr >> data.array_struct_field(); + break; + + case 30: + dcdr >> data.bounded_sequence_char_field(); + break; + + case 31: + dcdr >> data.bounded_sequence_uint8_field(); + break; + + case 32: + dcdr >> data.bounded_sequence_int16_field(); + break; + + case 33: + dcdr >> data.bounded_sequence_uint16_field(); + break; + + case 34: + dcdr >> data.bounded_sequence_int32_field(); + break; + + case 35: + dcdr >> data.bounded_sequence_uint32_field(); + break; + + case 36: + dcdr >> data.bounded_sequence_int64_field(); + break; + + case 37: + dcdr >> data.bounded_sequence_uint64_field(); + break; + + case 38: + dcdr >> data.bounded_sequence_float_field(); + break; + + case 39: + dcdr >> data.bounded_sequence_double_field(); + break; + + case 40: + dcdr >> data.bounded_sequence_bool_field(); + break; + + case 41: + dcdr >> data.bounded_sequence_enum_field(); + break; + + case 42: + dcdr >> data.bounded_sequence_enum2_field(); + break; + + case 43: + dcdr >> data.bounded_sequence_struct_field(); + break; + + case 44: + dcdr >> data.unbounded_sequence_char_field(); + break; + + case 45: + dcdr >> data.unbounded_sequence_uint8_field(); + break; + + case 46: + dcdr >> data.unbounded_sequence_int16_field(); + break; + + case 47: + dcdr >> data.unbounded_sequence_uint16_field(); + break; + + case 48: + dcdr >> data.unbounded_sequence_int32_field(); + break; + + case 49: + dcdr >> data.unbounded_sequence_uint32_field(); + break; + + case 50: + dcdr >> data.unbounded_sequence_int64_field(); + break; + + case 51: + dcdr >> data.unbounded_sequence_uint64_field(); + break; + + case 52: + dcdr >> data.unbounded_sequence_float_field(); + break; + + case 53: + dcdr >> data.unbounded_sequence_double_field(); + break; + + case 54: + dcdr >> data.unbounded_sequence_bool_field(); + break; + + case 55: + dcdr >> data.unbounded_sequence_enum_field(); + break; + + case 56: + dcdr >> data.unbounded_sequence_enum2_field(); + break; + + case 57: + dcdr >> data.unbounded_sequence_struct_field(); + break; + + default: + ret_value = false; + break; + } + return ret_value; + }); +} + +void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const KeyedCompleteTestType& data) +{ + static_cast(scdr); + static_cast(data); + scdr << data.id(); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + + + +} // namespace fastcdr +} // namespace eprosima + +#endif // _FAST_DDS_GENERATED_TEST_COMPLETECDRAUX_IPP_ \ No newline at end of file diff --git a/fastdds_python/test/types/test_completePubSubTypes.cxx b/fastdds_python/test/types/test_completePubSubTypes.cxx index 98ca9e74..00696b4d 100644 --- a/fastdds_python/test/types/test_completePubSubTypes.cxx +++ b/fastdds_python/test/types/test_completePubSubTypes.cxx @@ -16,29 +16,29 @@ * @file test_completePubSubTypes.cpp * This header file contains the implementation of the serialization functions. * - * This file was generated by the tool fastcdrgen. + * This file was generated by the tool fastddsgen. */ #include #include +#include #include "test_completePubSubTypes.h" +#include "test_completeCdrAux.hpp" using SerializedPayload_t = eprosima::fastrtps::rtps::SerializedPayload_t; using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t; - - +using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t; StructTypePubSubType::StructTypePubSubType() { setName("StructType"); - auto type_size = StructType::getMaxCdrSerializedSize(); - type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */ - m_typeSize = static_cast(type_size) + 4; /*encapsulation*/ - m_isGetKeyDefined = StructType::isKeyDefined(); - size_t keyLength = StructType::getKeyMaxCdrSerializedSize() > 16 ? - StructType::getKeyMaxCdrSerializedSize() : 16; + uint32_t type_size = StructType_max_cdr_typesize; + type_size += static_cast(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */ + m_typeSize = type_size + 4; /*encapsulation*/ + m_isGetKeyDefined = false; + uint32_t keyLength = StructType_max_key_cdr_typesize > 16 ? StructType_max_key_cdr_typesize : 16; m_keyBuffer = reinterpret_cast(malloc(keyLength)); memset(m_keyBuffer, 0, keyLength); } @@ -53,22 +53,29 @@ StructTypePubSubType::~StructTypePubSubType() bool StructTypePubSubType::serialize( void* data, - SerializedPayload_t* payload) + SerializedPayload_t* payload, + DataRepresentationId_t data_representation) { StructType* p_type = static_cast(data); // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->max_size); // Object that serializes the data. - eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 : eprosima::fastcdr::CdrVersion::XCDRv2); payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + ser.set_encoding_flag( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR : + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2); try { // Serialize encapsulation ser.serialize_encapsulation(); // Serialize the object. - p_type->serialize(ser); + ser << *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -76,7 +83,7 @@ bool StructTypePubSubType::serialize( } // Get the serialized length - payload->length = static_cast(ser.getSerializedDataLength()); + payload->length = static_cast(ser.get_serialized_data_length()); return true; } @@ -93,14 +100,14 @@ bool StructTypePubSubType::deserialize( eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->length); // Object that deserializes the data. - eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN); // Deserialize encapsulation. deser.read_encapsulation(); payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; // Deserialize the object. - p_type->deserialize(deser); + deser >> *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -111,12 +118,18 @@ bool StructTypePubSubType::deserialize( } std::function StructTypePubSubType::getSerializedSizeProvider( - void* data) + void* data, + DataRepresentationId_t data_representation) { - return [data]() -> uint32_t + return [data, data_representation]() -> uint32_t { - return static_cast(type::getCdrSerializedSize(*static_cast(data))) + - 4u /*encapsulation*/; + eprosima::fastcdr::CdrSizeCalculator calculator( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2); + size_t current_alignment {0}; + return static_cast(calculator.calculate_serialized_size( + *static_cast(data), current_alignment)) + + 4u /*encapsulation*/; }; } @@ -145,15 +158,15 @@ bool StructTypePubSubType::getKey( // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(m_keyBuffer), - StructType::getKeyMaxCdrSerializedSize()); + StructType_max_key_cdr_typesize); // Object that serializes the data. eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS); - p_type->serializeKey(ser); - if (force_md5 || StructType::getKeyMaxCdrSerializedSize() > 16) + eprosima::fastcdr::serialize_key(ser, *p_type); + if (force_md5 || StructType_max_key_cdr_typesize > 16) { m_md5.init(); - m_md5.update(m_keyBuffer, static_cast(ser.getSerializedDataLength())); + m_md5.update(m_keyBuffer, static_cast(ser.get_serialized_data_length())); m_md5.finalize(); for (uint8_t i = 0; i < 16; ++i) { @@ -175,12 +188,11 @@ bool StructTypePubSubType::getKey( CompleteTestTypePubSubType::CompleteTestTypePubSubType() { setName("CompleteTestType"); - auto type_size = CompleteTestType::getMaxCdrSerializedSize(); - type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */ - m_typeSize = static_cast(type_size) + 4; /*encapsulation*/ - m_isGetKeyDefined = CompleteTestType::isKeyDefined(); - size_t keyLength = CompleteTestType::getKeyMaxCdrSerializedSize() > 16 ? - CompleteTestType::getKeyMaxCdrSerializedSize() : 16; + uint32_t type_size = CompleteTestType_max_cdr_typesize; + type_size += static_cast(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */ + m_typeSize = type_size + 4; /*encapsulation*/ + m_isGetKeyDefined = false; + uint32_t keyLength = CompleteTestType_max_key_cdr_typesize > 16 ? CompleteTestType_max_key_cdr_typesize : 16; m_keyBuffer = reinterpret_cast(malloc(keyLength)); memset(m_keyBuffer, 0, keyLength); } @@ -195,22 +207,29 @@ CompleteTestTypePubSubType::~CompleteTestTypePubSubType() bool CompleteTestTypePubSubType::serialize( void* data, - SerializedPayload_t* payload) + SerializedPayload_t* payload, + DataRepresentationId_t data_representation) { CompleteTestType* p_type = static_cast(data); // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->max_size); // Object that serializes the data. - eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 : eprosima::fastcdr::CdrVersion::XCDRv2); payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + ser.set_encoding_flag( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR : + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2); try { // Serialize encapsulation ser.serialize_encapsulation(); // Serialize the object. - p_type->serialize(ser); + ser << *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -218,7 +237,7 @@ bool CompleteTestTypePubSubType::serialize( } // Get the serialized length - payload->length = static_cast(ser.getSerializedDataLength()); + payload->length = static_cast(ser.get_serialized_data_length()); return true; } @@ -235,14 +254,14 @@ bool CompleteTestTypePubSubType::deserialize( eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->length); // Object that deserializes the data. - eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN); // Deserialize encapsulation. deser.read_encapsulation(); payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; // Deserialize the object. - p_type->deserialize(deser); + deser >> *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -253,12 +272,18 @@ bool CompleteTestTypePubSubType::deserialize( } std::function CompleteTestTypePubSubType::getSerializedSizeProvider( - void* data) + void* data, + DataRepresentationId_t data_representation) { - return [data]() -> uint32_t + return [data, data_representation]() -> uint32_t { - return static_cast(type::getCdrSerializedSize(*static_cast(data))) + - 4u /*encapsulation*/; + eprosima::fastcdr::CdrSizeCalculator calculator( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2); + size_t current_alignment {0}; + return static_cast(calculator.calculate_serialized_size( + *static_cast(data), current_alignment)) + + 4u /*encapsulation*/; }; } @@ -287,15 +312,15 @@ bool CompleteTestTypePubSubType::getKey( // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(m_keyBuffer), - CompleteTestType::getKeyMaxCdrSerializedSize()); + CompleteTestType_max_key_cdr_typesize); // Object that serializes the data. eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS); - p_type->serializeKey(ser); - if (force_md5 || CompleteTestType::getKeyMaxCdrSerializedSize() > 16) + eprosima::fastcdr::serialize_key(ser, *p_type); + if (force_md5 || CompleteTestType_max_key_cdr_typesize > 16) { m_md5.init(); - m_md5.update(m_keyBuffer, static_cast(ser.getSerializedDataLength())); + m_md5.update(m_keyBuffer, static_cast(ser.get_serialized_data_length())); m_md5.finalize(); for (uint8_t i = 0; i < 16; ++i) { @@ -315,12 +340,11 @@ bool CompleteTestTypePubSubType::getKey( KeyedCompleteTestTypePubSubType::KeyedCompleteTestTypePubSubType() { setName("KeyedCompleteTestType"); - auto type_size = KeyedCompleteTestType::getMaxCdrSerializedSize(); - type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */ - m_typeSize = static_cast(type_size) + 4; /*encapsulation*/ - m_isGetKeyDefined = KeyedCompleteTestType::isKeyDefined(); - size_t keyLength = KeyedCompleteTestType::getKeyMaxCdrSerializedSize() > 16 ? - KeyedCompleteTestType::getKeyMaxCdrSerializedSize() : 16; + uint32_t type_size = KeyedCompleteTestType_max_cdr_typesize; + type_size += static_cast(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */ + m_typeSize = type_size + 4; /*encapsulation*/ + m_isGetKeyDefined = true; + uint32_t keyLength = KeyedCompleteTestType_max_key_cdr_typesize > 16 ? KeyedCompleteTestType_max_key_cdr_typesize : 16; m_keyBuffer = reinterpret_cast(malloc(keyLength)); memset(m_keyBuffer, 0, keyLength); } @@ -335,22 +359,29 @@ KeyedCompleteTestTypePubSubType::~KeyedCompleteTestTypePubSubType() bool KeyedCompleteTestTypePubSubType::serialize( void* data, - SerializedPayload_t* payload) + SerializedPayload_t* payload, + DataRepresentationId_t data_representation) { KeyedCompleteTestType* p_type = static_cast(data); // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->max_size); // Object that serializes the data. - eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 : eprosima::fastcdr::CdrVersion::XCDRv2); payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + ser.set_encoding_flag( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR : + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2); try { // Serialize encapsulation ser.serialize_encapsulation(); // Serialize the object. - p_type->serialize(ser); + ser << *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -358,7 +389,7 @@ bool KeyedCompleteTestTypePubSubType::serialize( } // Get the serialized length - payload->length = static_cast(ser.getSerializedDataLength()); + payload->length = static_cast(ser.get_serialized_data_length()); return true; } @@ -375,14 +406,14 @@ bool KeyedCompleteTestTypePubSubType::deserialize( eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->length); // Object that deserializes the data. - eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN); // Deserialize encapsulation. deser.read_encapsulation(); payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; // Deserialize the object. - p_type->deserialize(deser); + deser >> *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -393,12 +424,18 @@ bool KeyedCompleteTestTypePubSubType::deserialize( } std::function KeyedCompleteTestTypePubSubType::getSerializedSizeProvider( - void* data) + void* data, + DataRepresentationId_t data_representation) { - return [data]() -> uint32_t + return [data, data_representation]() -> uint32_t { - return static_cast(type::getCdrSerializedSize(*static_cast(data))) + - 4u /*encapsulation*/; + eprosima::fastcdr::CdrSizeCalculator calculator( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2); + size_t current_alignment {0}; + return static_cast(calculator.calculate_serialized_size( + *static_cast(data), current_alignment)) + + 4u /*encapsulation*/; }; } @@ -427,15 +464,15 @@ bool KeyedCompleteTestTypePubSubType::getKey( // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(m_keyBuffer), - KeyedCompleteTestType::getKeyMaxCdrSerializedSize()); + KeyedCompleteTestType_max_key_cdr_typesize); // Object that serializes the data. eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS); - p_type->serializeKey(ser); - if (force_md5 || KeyedCompleteTestType::getKeyMaxCdrSerializedSize() > 16) + eprosima::fastcdr::serialize_key(ser, *p_type); + if (force_md5 || KeyedCompleteTestType_max_key_cdr_typesize > 16) { m_md5.init(); - m_md5.update(m_keyBuffer, static_cast(ser.getSerializedDataLength())); + m_md5.update(m_keyBuffer, static_cast(ser.get_serialized_data_length())); m_md5.finalize(); for (uint8_t i = 0; i < 16; ++i) { diff --git a/fastdds_python/test/types/test_completePubSubTypes.h b/fastdds_python/test/types/test_completePubSubTypes.h index dc8da88d..7815f1da 100644 --- a/fastdds_python/test/types/test_completePubSubTypes.h +++ b/fastdds_python/test/types/test_completePubSubTypes.h @@ -16,28 +16,29 @@ * @file test_completePubSubTypes.h * This header file contains the declaration of the serialization functions. * - * This file was generated by the tool fastcdrgen. + * This file was generated by the tool fastddsgen. */ #ifndef _FAST_DDS_GENERATED_TEST_COMPLETE_PUBSUBTYPES_H_ #define _FAST_DDS_GENERATED_TEST_COMPLETE_PUBSUBTYPES_H_ +#include #include +#include +#include #include #include "test_complete.h" #include "test_included_modulesPubSubTypes.h" -#if !defined(GEN_API_VER) || (GEN_API_VER != 1) +#if !defined(GEN_API_VER) || (GEN_API_VER != 2) #error \ Generated test_complete is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen. #endif // GEN_API_VER - - /*! * @brief This class represents the TopicDataType of the type StructType defined by the user in the IDL file. * @ingroup test_complete @@ -50,27 +51,42 @@ class StructTypePubSubType : public eprosima::fastdds::dds::TopicDataType eProsima_user_DllExport StructTypePubSubType(); - eProsima_user_DllExport virtual ~StructTypePubSubType() override; + eProsima_user_DllExport ~StructTypePubSubType() override; + + eProsima_user_DllExport bool serialize( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload) override + { + return serialize(data, payload, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } - eProsima_user_DllExport virtual bool serialize( + eProsima_user_DllExport bool serialize( void* data, - eprosima::fastrtps::rtps::SerializedPayload_t* payload) override; + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; - eProsima_user_DllExport virtual bool deserialize( + eProsima_user_DllExport bool deserialize( eprosima::fastrtps::rtps::SerializedPayload_t* payload, void* data) override; - eProsima_user_DllExport virtual std::function getSerializedSizeProvider( - void* data) override; + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data) override + { + return getSerializedSizeProvider(data, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } + + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; - eProsima_user_DllExport virtual bool getKey( + eProsima_user_DllExport bool getKey( void* data, eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, bool force_md5 = false) override; - eProsima_user_DllExport virtual void* createData() override; + eProsima_user_DllExport void* createData() override; - eProsima_user_DllExport virtual void deleteData( + eProsima_user_DllExport void deleteData( void* data) override; #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED @@ -93,7 +109,7 @@ class StructTypePubSubType : public eprosima::fastdds::dds::TopicDataType eProsima_user_DllExport inline bool construct_sample( void* memory) const override { - (void)memory; + static_cast(memory); return false; } @@ -118,27 +134,42 @@ class CompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicDataType eProsima_user_DllExport CompleteTestTypePubSubType(); - eProsima_user_DllExport virtual ~CompleteTestTypePubSubType() override; + eProsima_user_DllExport ~CompleteTestTypePubSubType() override; - eProsima_user_DllExport virtual bool serialize( + eProsima_user_DllExport bool serialize( void* data, - eprosima::fastrtps::rtps::SerializedPayload_t* payload) override; + eprosima::fastrtps::rtps::SerializedPayload_t* payload) override + { + return serialize(data, payload, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } - eProsima_user_DllExport virtual bool deserialize( + eProsima_user_DllExport bool serialize( + void* data, eprosima::fastrtps::rtps::SerializedPayload_t* payload, - void* data) override; + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; - eProsima_user_DllExport virtual std::function getSerializedSizeProvider( + eProsima_user_DllExport bool deserialize( + eprosima::fastrtps::rtps::SerializedPayload_t* payload, void* data) override; - eProsima_user_DllExport virtual bool getKey( + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data) override + { + return getSerializedSizeProvider(data, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } + + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; + + eProsima_user_DllExport bool getKey( void* data, eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, bool force_md5 = false) override; - eProsima_user_DllExport virtual void* createData() override; + eProsima_user_DllExport void* createData() override; - eProsima_user_DllExport virtual void deleteData( + eProsima_user_DllExport void deleteData( void* data) override; #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED @@ -161,7 +192,7 @@ class CompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicDataType eProsima_user_DllExport inline bool construct_sample( void* memory) const override { - (void)memory; + static_cast(memory); return false; } @@ -184,27 +215,42 @@ class KeyedCompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicData eProsima_user_DllExport KeyedCompleteTestTypePubSubType(); - eProsima_user_DllExport virtual ~KeyedCompleteTestTypePubSubType() override; + eProsima_user_DllExport ~KeyedCompleteTestTypePubSubType() override; + + eProsima_user_DllExport bool serialize( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload) override + { + return serialize(data, payload, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } - eProsima_user_DllExport virtual bool serialize( + eProsima_user_DllExport bool serialize( void* data, - eprosima::fastrtps::rtps::SerializedPayload_t* payload) override; + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; - eProsima_user_DllExport virtual bool deserialize( + eProsima_user_DllExport bool deserialize( eprosima::fastrtps::rtps::SerializedPayload_t* payload, void* data) override; - eProsima_user_DllExport virtual std::function getSerializedSizeProvider( - void* data) override; + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data) override + { + return getSerializedSizeProvider(data, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } + + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; - eProsima_user_DllExport virtual bool getKey( + eProsima_user_DllExport bool getKey( void* data, eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, bool force_md5 = false) override; - eProsima_user_DllExport virtual void* createData() override; + eProsima_user_DllExport void* createData() override; - eProsima_user_DllExport virtual void deleteData( + eProsima_user_DllExport void deleteData( void* data) override; #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED @@ -227,7 +273,7 @@ class KeyedCompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicData eProsima_user_DllExport inline bool construct_sample( void* memory) const override { - (void)memory; + static_cast(memory); return false; } diff --git a/fastdds_python/test/types/test_completePubSubTypes.i b/fastdds_python/test/types/test_completePubSubTypes.i index 10d74178..2c68f927 100644 --- a/fastdds_python/test/types/test_completePubSubTypes.i +++ b/fastdds_python/test/types/test_completePubSubTypes.i @@ -16,7 +16,7 @@ * @file test_completePubSubTypes.i * This header file contains the SWIG interface of the serialization functions. * - * This file was generated by the tool fastcdrgen. + * This file was generated by the tool fastddsgen. */ %import(module="fastdds") "fastdds/dds/topic/TopicDataType.hpp"; @@ -25,6 +25,6 @@ #include "test_completePubSubTypes.h" %} -#define GEN_API_VER 1 +#define GEN_API_VER 2 %include "test_completePubSubTypes.h" diff --git a/fastdds_python/test/types/test_included_modules.cxx b/fastdds_python/test/types/test_included_modules.cxx index 8d3df76d..0b1dd736 100644 --- a/fastdds_python/test/types/test_included_modules.cxx +++ b/fastdds_python/test/types/test_included_modules.cxx @@ -14,9 +14,9 @@ /*! * @file test_included_modules.cpp - * This source file contains the definition of the described types in the IDL file. + * This source file contains the implementation of the described types in the IDL file. * - * This file was generated by the tool gen. + * This file was generated by the tool fastddsgen. */ #ifdef _WIN32 @@ -29,69 +29,20 @@ char dummy; #include "test_included_modules.h" #include + #include using namespace eprosima::fastcdr::exception; #include -#define eprosima_test2_StructType2_max_cdr_typesize 320ULL; - - -#define eprosima_test2_StructType2_max_key_cdr_typesize 0ULL; - - - - eprosima::test2::StructType2::StructType2() { - // char m_char_field - m_char_field = 0; - // octet m_uint8_field - m_uint8_field = 0; - // short m_int16_field - m_int16_field = 0; - // unsigned short m_uint16_field - m_uint16_field = 0; - // long m_int32_field - m_int32_field = 0; - // unsigned long m_uint32_field - m_uint32_field = 0; - // long long m_int64_field - m_int64_field = 0; - // unsigned long long m_uint64_field - m_uint64_field = 0; - // float m_float_field - m_float_field = 0.0; - // double m_double_field - m_double_field = 0.0; - // boolean m_bool_field - m_bool_field = false; - // string m_string_field - m_string_field =""; - // eprosima::test2::Color2 m_enum_field - m_enum_field = eprosima::test2::RED2; - // eprosima::test2::Material2 m_enum2_field - m_enum2_field = eprosima::test2::WOOD2; } eprosima::test2::StructType2::~StructType2() { - - - - - - - - - - - - - - } eprosima::test2::StructType2::StructType2( @@ -114,7 +65,7 @@ eprosima::test2::StructType2::StructType2( } eprosima::test2::StructType2::StructType2( - StructType2&& x) noexcept + StructType2&& x) noexcept { m_char_field = x.m_char_field; m_uint8_field = x.m_uint8_field; @@ -179,8 +130,20 @@ eprosima::test2::StructType2& eprosima::test2::StructType2::operator =( bool eprosima::test2::StructType2::operator ==( const StructType2& x) const { - - return (m_char_field == x.m_char_field && m_uint8_field == x.m_uint8_field && m_int16_field == x.m_int16_field && m_uint16_field == x.m_uint16_field && m_int32_field == x.m_int32_field && m_uint32_field == x.m_uint32_field && m_int64_field == x.m_int64_field && m_uint64_field == x.m_uint64_field && m_float_field == x.m_float_field && m_double_field == x.m_double_field && m_bool_field == x.m_bool_field && m_string_field == x.m_string_field && m_enum_field == x.m_enum_field && m_enum2_field == x.m_enum2_field); + return (m_char_field == x.m_char_field && + m_uint8_field == x.m_uint8_field && + m_int16_field == x.m_int16_field && + m_uint16_field == x.m_uint16_field && + m_int32_field == x.m_int32_field && + m_uint32_field == x.m_uint32_field && + m_int64_field == x.m_int64_field && + m_uint64_field == x.m_uint64_field && + m_float_field == x.m_float_field && + m_double_field == x.m_double_field && + m_bool_field == x.m_bool_field && + m_string_field == x.m_string_field && + m_enum_field == x.m_enum_field && + m_enum2_field == x.m_enum2_field); } bool eprosima::test2::StructType2::operator !=( @@ -189,117 +152,6 @@ bool eprosima::test2::StructType2::operator !=( return !(*this == x); } -size_t eprosima::test2::StructType2::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_test2_StructType2_max_cdr_typesize; -} - -size_t eprosima::test2::StructType2::getCdrSerializedSize( - const eprosima::test2::StructType2& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.string_field().size() + 1; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - return current_alignment - initial_alignment; -} - -void eprosima::test2::StructType2::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - - scdr << m_char_field; - scdr << m_uint8_field; - scdr << m_int16_field; - scdr << m_uint16_field; - scdr << m_int32_field; - scdr << m_uint32_field; - scdr << m_int64_field; - scdr << m_uint64_field; - scdr << m_float_field; - scdr << m_double_field; - scdr << m_bool_field; - scdr << m_string_field.c_str(); - scdr << (uint32_t)m_enum_field; - scdr << (uint32_t)m_enum2_field; - -} - -void eprosima::test2::StructType2::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_char_field; - dcdr >> m_uint8_field; - dcdr >> m_int16_field; - dcdr >> m_uint16_field; - dcdr >> m_int32_field; - dcdr >> m_uint32_field; - dcdr >> m_int64_field; - dcdr >> m_uint64_field; - dcdr >> m_float_field; - dcdr >> m_double_field; - dcdr >> m_bool_field; - dcdr >> m_string_field; - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum_field = (eprosima::test2::Color2)enum_value; - } - - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum2_field = (eprosima::test2::Material2)enum_value; - } - -} - /*! * @brief This function sets a value in member char_field * @param _char_field New value for member char_field @@ -328,6 +180,7 @@ char& eprosima::test2::StructType2::char_field() return m_char_field; } + /*! * @brief This function sets a value in member uint8_field * @param _uint8_field New value for member uint8_field @@ -356,6 +209,7 @@ uint8_t& eprosima::test2::StructType2::uint8_field() return m_uint8_field; } + /*! * @brief This function sets a value in member int16_field * @param _int16_field New value for member int16_field @@ -384,6 +238,7 @@ int16_t& eprosima::test2::StructType2::int16_field() return m_int16_field; } + /*! * @brief This function sets a value in member uint16_field * @param _uint16_field New value for member uint16_field @@ -412,6 +267,7 @@ uint16_t& eprosima::test2::StructType2::uint16_field() return m_uint16_field; } + /*! * @brief This function sets a value in member int32_field * @param _int32_field New value for member int32_field @@ -440,6 +296,7 @@ int32_t& eprosima::test2::StructType2::int32_field() return m_int32_field; } + /*! * @brief This function sets a value in member uint32_field * @param _uint32_field New value for member uint32_field @@ -468,6 +325,7 @@ uint32_t& eprosima::test2::StructType2::uint32_field() return m_uint32_field; } + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -496,6 +354,7 @@ int64_t& eprosima::test2::StructType2::int64_field() return m_int64_field; } + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -524,6 +383,7 @@ uint64_t& eprosima::test2::StructType2::uint64_field() return m_uint64_field; } + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -552,6 +412,7 @@ float& eprosima::test2::StructType2::float_field() return m_float_field; } + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -580,6 +441,7 @@ double& eprosima::test2::StructType2::double_field() return m_double_field; } + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -608,6 +470,7 @@ bool& eprosima::test2::StructType2::bool_field() return m_bool_field; } + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -645,6 +508,8 @@ std::string& eprosima::test2::StructType2::string_field() { return m_string_field; } + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -673,6 +538,7 @@ eprosima::test2::Color2& eprosima::test2::StructType2::enum_field() return m_enum_field; } + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -703,23 +569,6 @@ eprosima::test2::Material2& eprosima::test2::StructType2::enum2_field() -size_t eprosima::test2::StructType2::getKeyMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_test2_StructType2_max_key_cdr_typesize; -} - -bool eprosima::test2::StructType2::isKeyDefined() -{ - return false; -} - -void eprosima::test2::StructType2::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - - +// Include auxiliary functions like for serializing/deserializing. +#include "test_included_modulesCdrAux.ipp" diff --git a/fastdds_python/test/types/test_included_modules.h b/fastdds_python/test/types/test_included_modules.h index 00edf04e..e673716d 100644 --- a/fastdds_python/test/types/test_included_modules.h +++ b/fastdds_python/test/types/test_included_modules.h @@ -16,21 +16,23 @@ * @file test_included_modules.h * This header file contains the declaration of the described types in the IDL file. * - * This file was generated by the tool gen. + * This file was generated by the tool fastddsgen. */ #ifndef _FAST_DDS_GENERATED_EPROSIMA_TEST2_TEST_INCLUDED_MODULES_H_ #define _FAST_DDS_GENERATED_EPROSIMA_TEST2_TEST_INCLUDED_MODULES_H_ - -#include - -#include #include +#include +#include +#include #include #include -#include -#include + +#include +#include + + #if defined(_WIN32) #if defined(EPROSIMA_USER_DLL_EXPORT) @@ -59,10 +61,12 @@ namespace eprosima { namespace fastcdr { class Cdr; +class CdrSizeCalculator; } // namespace fastcdr } // namespace eprosima + namespace eprosima { namespace test2 { /*! @@ -168,6 +172,7 @@ namespace eprosima { */ eProsima_user_DllExport char& char_field(); + /*! * @brief This function sets a value in member uint8_field * @param _uint8_field New value for member uint8_field @@ -187,6 +192,7 @@ namespace eprosima { */ eProsima_user_DllExport uint8_t& uint8_field(); + /*! * @brief This function sets a value in member int16_field * @param _int16_field New value for member int16_field @@ -206,6 +212,7 @@ namespace eprosima { */ eProsima_user_DllExport int16_t& int16_field(); + /*! * @brief This function sets a value in member uint16_field * @param _uint16_field New value for member uint16_field @@ -225,6 +232,7 @@ namespace eprosima { */ eProsima_user_DllExport uint16_t& uint16_field(); + /*! * @brief This function sets a value in member int32_field * @param _int32_field New value for member int32_field @@ -244,6 +252,7 @@ namespace eprosima { */ eProsima_user_DllExport int32_t& int32_field(); + /*! * @brief This function sets a value in member uint32_field * @param _uint32_field New value for member uint32_field @@ -263,6 +272,7 @@ namespace eprosima { */ eProsima_user_DllExport uint32_t& uint32_field(); + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -282,6 +292,7 @@ namespace eprosima { */ eProsima_user_DllExport int64_t& int64_field(); + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -301,6 +312,7 @@ namespace eprosima { */ eProsima_user_DllExport uint64_t& uint64_field(); + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -320,6 +332,7 @@ namespace eprosima { */ eProsima_user_DllExport float& float_field(); + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -339,6 +352,7 @@ namespace eprosima { */ eProsima_user_DllExport double& double_field(); + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -358,6 +372,7 @@ namespace eprosima { */ eProsima_user_DllExport bool& bool_field(); + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -383,6 +398,8 @@ namespace eprosima { * @return Reference to member string_field */ eProsima_user_DllExport std::string& string_field(); + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -402,6 +419,7 @@ namespace eprosima { */ eProsima_user_DllExport eprosima::test2::Color2& enum_field(); + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -421,80 +439,22 @@ namespace eprosima { */ eProsima_user_DllExport eprosima::test2::Material2& enum2_field(); - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize( - const eprosima::test2::StructType2& data, - size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize( - eprosima::fastcdr::Cdr& cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize( - eprosima::fastcdr::Cdr& cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey( - eprosima::fastcdr::Cdr& cdr) const; - private: - char m_char_field; - uint8_t m_uint8_field; - int16_t m_int16_field; - uint16_t m_uint16_field; - int32_t m_int32_field; - uint32_t m_uint32_field; - int64_t m_int64_field; - uint64_t m_uint64_field; - float m_float_field; - double m_double_field; - bool m_bool_field; + char m_char_field{0}; + uint8_t m_uint8_field{0}; + int16_t m_int16_field{0}; + uint16_t m_uint16_field{0}; + int32_t m_int32_field{0}; + uint32_t m_uint32_field{0}; + int64_t m_int64_field{0}; + uint64_t m_uint64_field{0}; + float m_float_field{0.0}; + double m_double_field{0.0}; + bool m_bool_field{false}; std::string m_string_field; - eprosima::test2::Color2 m_enum_field; - eprosima::test2::Material2 m_enum2_field; + eprosima::test2::Color2 m_enum_field{eprosima::test2::RED2}; + eprosima::test2::Material2 m_enum2_field{eprosima::test2::WOOD2}; }; } // namespace test2 diff --git a/fastdds_python/test/types/test_included_modules.i b/fastdds_python/test/types/test_included_modules.i index 8a57c250..59acca05 100644 --- a/fastdds_python/test/types/test_included_modules.i +++ b/fastdds_python/test/types/test_included_modules.i @@ -16,17 +16,17 @@ * @file test_included_modules.i * This header file contains the SWIG interface of the described types in the IDL file. * - * This file was generated by the tool gen. + * This file was generated by the tool fastddsgen. */ %module test_included_modules // SWIG helper modules %include "stdint.i" -%include "std_string.i" -%include "std_vector.i" %include "std_array.i" %include "std_map.i" +%include "std_string.i" +%include "std_vector.i" %include "typemaps.i" // Assignemt operators are ignored, as there is no such thing in Python. @@ -49,8 +49,6 @@ %import(module="fastdds") "fastdds/dds/core/LoanableTypedCollection.hpp" %import(module="fastdds") "fastdds/dds/core/LoanableSequence.hpp" - - //////////////////////////////////////////////////////// // Binding for class eprosima::test2::StructType2 //////////////////////////////////////////////////////// @@ -69,6 +67,7 @@ %ignore eprosima::test2::StructType2::char_field(); %rename("%s") eprosima::test2::StructType2::char_field() const; + %ignore eprosima::test2::StructType2::uint8_field(uint8_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -77,6 +76,7 @@ %ignore eprosima::test2::StructType2::uint8_field(); %rename("%s") eprosima::test2::StructType2::uint8_field() const; + %ignore eprosima::test2::StructType2::int16_field(int16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -85,6 +85,7 @@ %ignore eprosima::test2::StructType2::int16_field(); %rename("%s") eprosima::test2::StructType2::int16_field() const; + %ignore eprosima::test2::StructType2::uint16_field(uint16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -93,6 +94,7 @@ %ignore eprosima::test2::StructType2::uint16_field(); %rename("%s") eprosima::test2::StructType2::uint16_field() const; + %ignore eprosima::test2::StructType2::int32_field(int32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -101,6 +103,7 @@ %ignore eprosima::test2::StructType2::int32_field(); %rename("%s") eprosima::test2::StructType2::int32_field() const; + %ignore eprosima::test2::StructType2::uint32_field(uint32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -109,6 +112,7 @@ %ignore eprosima::test2::StructType2::uint32_field(); %rename("%s") eprosima::test2::StructType2::uint32_field() const; + %ignore eprosima::test2::StructType2::int64_field(int64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -117,6 +121,7 @@ %ignore eprosima::test2::StructType2::int64_field(); %rename("%s") eprosima::test2::StructType2::int64_field() const; + %ignore eprosima::test2::StructType2::uint64_field(uint64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -125,6 +130,7 @@ %ignore eprosima::test2::StructType2::uint64_field(); %rename("%s") eprosima::test2::StructType2::uint64_field() const; + %ignore eprosima::test2::StructType2::float_field(float&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -133,6 +139,7 @@ %ignore eprosima::test2::StructType2::float_field(); %rename("%s") eprosima::test2::StructType2::float_field() const; + %ignore eprosima::test2::StructType2::double_field(double&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -141,6 +148,7 @@ %ignore eprosima::test2::StructType2::double_field(); %rename("%s") eprosima::test2::StructType2::double_field() const; + %ignore eprosima::test2::StructType2::bool_field(bool&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -149,6 +157,7 @@ %ignore eprosima::test2::StructType2::bool_field(); %rename("%s") eprosima::test2::StructType2::bool_field() const; + %ignore eprosima::test2::StructType2::string_field(std::string&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -157,6 +166,7 @@ %ignore eprosima::test2::StructType2::string_field(); %rename("%s") eprosima::test2::StructType2::string_field() const; + %ignore eprosima::test2::StructType2::enum_field(eprosima::test2::Color2&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -165,6 +175,7 @@ %ignore eprosima::test2::StructType2::enum_field(); %rename("%s") eprosima::test2::StructType2::enum_field() const; + %ignore eprosima::test2::StructType2::enum2_field(eprosima::test2::Material2&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -174,6 +185,7 @@ %rename("%s") eprosima::test2::StructType2::enum2_field() const; + %template(_StructType2Seq) eprosima::fastdds::dds::LoanableTypedCollection; %template(StructType2Seq) eprosima::fastdds::dds::LoanableSequence; %extend eprosima::fastdds::dds::LoanableSequence diff --git a/fastdds_python/test/types/test_included_modulesCdrAux.hpp b/fastdds_python/test/types/test_included_modulesCdrAux.hpp new file mode 100644 index 00000000..172f99da --- /dev/null +++ b/fastdds_python/test/types/test_included_modulesCdrAux.hpp @@ -0,0 +1,48 @@ +// 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_included_modulesCdrAux.hpp + * This source file contains some definitions of CDR related functions. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_EPROSIMA_TEST2_TEST_INCLUDED_MODULESCDRAUX_HPP_ +#define _FAST_DDS_GENERATED_EPROSIMA_TEST2_TEST_INCLUDED_MODULESCDRAUX_HPP_ + +#include "test_included_modules.h" + +constexpr uint32_t eprosima_test2_StructType2_max_cdr_typesize {328UL}; +constexpr uint32_t eprosima_test2_StructType2_max_key_cdr_typesize {0UL}; + + + +namespace eprosima { +namespace fastcdr { + +class Cdr; +class CdrSizeCalculator; + +eProsima_user_DllExport void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const eprosima::test2::StructType2& data); + + + + +} // namespace fastcdr +} // namespace eprosima + +#endif // _FAST_DDS_GENERATED_EPROSIMA_TEST2_TEST_INCLUDED_MODULESCDRAUX_HPP_ \ No newline at end of file diff --git a/fastdds_python/test/types/test_included_modulesCdrAux.ipp b/fastdds_python/test/types/test_included_modulesCdrAux.ipp new file mode 100644 index 00000000..d4f8d97e --- /dev/null +++ b/fastdds_python/test/types/test_included_modulesCdrAux.ipp @@ -0,0 +1,224 @@ +// 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_included_modulesCdrAux.ipp + * This source file contains some declarations of CDR related functions. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_EPROSIMA_TEST2_TEST_INCLUDED_MODULESCDRAUX_IPP_ +#define _FAST_DDS_GENERATED_EPROSIMA_TEST2_TEST_INCLUDED_MODULESCDRAUX_IPP_ + +#include "test_included_modulesCdrAux.hpp" + +#include +#include + + +#include +using namespace eprosima::fastcdr::exception; + +namespace eprosima { +namespace fastcdr { + +template<> +eProsima_user_DllExport size_t calculate_serialized_size( + eprosima::fastcdr::CdrSizeCalculator& calculator, + const eprosima::test2::StructType2& data, + size_t& current_alignment) +{ + static_cast(data); + + eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding(); + size_t calculated_size {calculator.begin_calculate_type_serialized_size( + eprosima::fastcdr::CdrVersion::XCDRv2 == calculator.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + current_alignment)}; + + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + data.char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + data.uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), + data.int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), + data.uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), + data.int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), + data.uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), + data.int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), + data.uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(8), + data.float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(9), + data.double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(10), + data.bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(11), + data.string_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(12), + data.enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(13), + data.enum2_field(), current_alignment); + + + calculated_size += calculator.end_calculate_type_serialized_size(previous_encoding, current_alignment); + + return calculated_size; +} + +template<> +eProsima_user_DllExport void serialize( + eprosima::fastcdr::Cdr& scdr, + const eprosima::test2::StructType2& data) +{ + eprosima::fastcdr::Cdr::state current_state(scdr); + scdr.begin_serialize_type(current_state, + eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR); + + scdr + << eprosima::fastcdr::MemberId(0) << data.char_field() + << eprosima::fastcdr::MemberId(1) << data.uint8_field() + << eprosima::fastcdr::MemberId(2) << data.int16_field() + << eprosima::fastcdr::MemberId(3) << data.uint16_field() + << eprosima::fastcdr::MemberId(4) << data.int32_field() + << eprosima::fastcdr::MemberId(5) << data.uint32_field() + << eprosima::fastcdr::MemberId(6) << data.int64_field() + << eprosima::fastcdr::MemberId(7) << data.uint64_field() + << eprosima::fastcdr::MemberId(8) << data.float_field() + << eprosima::fastcdr::MemberId(9) << data.double_field() + << eprosima::fastcdr::MemberId(10) << data.bool_field() + << eprosima::fastcdr::MemberId(11) << data.string_field() + << eprosima::fastcdr::MemberId(12) << data.enum_field() + << eprosima::fastcdr::MemberId(13) << data.enum2_field() +; + + scdr.end_serialize_type(current_state); +} + +template<> +eProsima_user_DllExport void deserialize( + eprosima::fastcdr::Cdr& cdr, + eprosima::test2::StructType2& data) +{ + cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + [&data](eprosima::fastcdr::Cdr& dcdr, const eprosima::fastcdr::MemberId& mid) -> bool + { + bool ret_value = true; + switch (mid.id) + { + case 0: + dcdr >> data.char_field(); + break; + + case 1: + dcdr >> data.uint8_field(); + break; + + case 2: + dcdr >> data.int16_field(); + break; + + case 3: + dcdr >> data.uint16_field(); + break; + + case 4: + dcdr >> data.int32_field(); + break; + + case 5: + dcdr >> data.uint32_field(); + break; + + case 6: + dcdr >> data.int64_field(); + break; + + case 7: + dcdr >> data.uint64_field(); + break; + + case 8: + dcdr >> data.float_field(); + break; + + case 9: + dcdr >> data.double_field(); + break; + + case 10: + dcdr >> data.bool_field(); + break; + + case 11: + dcdr >> data.string_field(); + break; + + case 12: + dcdr >> data.enum_field(); + break; + + case 13: + dcdr >> data.enum2_field(); + break; + + default: + ret_value = false; + break; + } + return ret_value; + }); +} + +void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const eprosima::test2::StructType2& data) +{ + static_cast(scdr); + static_cast(data); +} + + + + + +} // namespace fastcdr +} // namespace eprosima + +#endif // _FAST_DDS_GENERATED_EPROSIMA_TEST2_TEST_INCLUDED_MODULESCDRAUX_IPP_ \ No newline at end of file diff --git a/fastdds_python/test/types/test_included_modulesPubSubTypes.cxx b/fastdds_python/test/types/test_included_modulesPubSubTypes.cxx index 2e459137..b5e441d5 100644 --- a/fastdds_python/test/types/test_included_modulesPubSubTypes.cxx +++ b/fastdds_python/test/types/test_included_modulesPubSubTypes.cxx @@ -16,31 +16,31 @@ * @file test_included_modulesPubSubTypes.cpp * This header file contains the implementation of the serialization functions. * - * This file was generated by the tool fastcdrgen. + * This file was generated by the tool fastddsgen. */ #include #include +#include #include "test_included_modulesPubSubTypes.h" +#include "test_included_modulesCdrAux.hpp" using SerializedPayload_t = eprosima::fastrtps::rtps::SerializedPayload_t; using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t; +using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t; namespace eprosima { namespace test2 { - - StructType2PubSubType::StructType2PubSubType() { setName("eprosima::test2::StructType2"); - auto type_size = StructType2::getMaxCdrSerializedSize(); - type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */ - m_typeSize = static_cast(type_size) + 4; /*encapsulation*/ - m_isGetKeyDefined = StructType2::isKeyDefined(); - size_t keyLength = StructType2::getKeyMaxCdrSerializedSize() > 16 ? - StructType2::getKeyMaxCdrSerializedSize() : 16; + uint32_t type_size = eprosima_test2_StructType2_max_cdr_typesize; + type_size += static_cast(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */ + m_typeSize = type_size + 4; /*encapsulation*/ + m_isGetKeyDefined = false; + uint32_t keyLength = eprosima_test2_StructType2_max_key_cdr_typesize > 16 ? eprosima_test2_StructType2_max_key_cdr_typesize : 16; m_keyBuffer = reinterpret_cast(malloc(keyLength)); memset(m_keyBuffer, 0, keyLength); } @@ -55,22 +55,29 @@ namespace eprosima { bool StructType2PubSubType::serialize( void* data, - SerializedPayload_t* payload) + SerializedPayload_t* payload, + DataRepresentationId_t data_representation) { StructType2* p_type = static_cast(data); // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->max_size); // Object that serializes the data. - eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 : eprosima::fastcdr::CdrVersion::XCDRv2); payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + ser.set_encoding_flag( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR : + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2); try { // Serialize encapsulation ser.serialize_encapsulation(); // Serialize the object. - p_type->serialize(ser); + ser << *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -78,7 +85,7 @@ namespace eprosima { } // Get the serialized length - payload->length = static_cast(ser.getSerializedDataLength()); + payload->length = static_cast(ser.get_serialized_data_length()); return true; } @@ -95,14 +102,14 @@ namespace eprosima { eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->length); // Object that deserializes the data. - eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN); // Deserialize encapsulation. deser.read_encapsulation(); payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; // Deserialize the object. - p_type->deserialize(deser); + deser >> *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -113,12 +120,18 @@ namespace eprosima { } std::function StructType2PubSubType::getSerializedSizeProvider( - void* data) + void* data, + DataRepresentationId_t data_representation) { - return [data]() -> uint32_t + return [data, data_representation]() -> uint32_t { - return static_cast(type::getCdrSerializedSize(*static_cast(data))) + - 4u /*encapsulation*/; + eprosima::fastcdr::CdrSizeCalculator calculator( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2); + size_t current_alignment {0}; + return static_cast(calculator.calculate_serialized_size( + *static_cast(data), current_alignment)) + + 4u /*encapsulation*/; }; } @@ -147,15 +160,15 @@ namespace eprosima { // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(m_keyBuffer), - StructType2::getKeyMaxCdrSerializedSize()); + eprosima_test2_StructType2_max_key_cdr_typesize); // Object that serializes the data. eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS); - p_type->serializeKey(ser); - if (force_md5 || StructType2::getKeyMaxCdrSerializedSize() > 16) + eprosima::fastcdr::serialize_key(ser, *p_type); + if (force_md5 || eprosima_test2_StructType2_max_key_cdr_typesize > 16) { m_md5.init(); - m_md5.update(m_keyBuffer, static_cast(ser.getSerializedDataLength())); + m_md5.update(m_keyBuffer, static_cast(ser.get_serialized_data_length())); m_md5.finalize(); for (uint8_t i = 0; i < 16; ++i) { diff --git a/fastdds_python/test/types/test_included_modulesPubSubTypes.h b/fastdds_python/test/types/test_included_modulesPubSubTypes.h index 06f2cb04..6cc52860 100644 --- a/fastdds_python/test/types/test_included_modulesPubSubTypes.h +++ b/fastdds_python/test/types/test_included_modulesPubSubTypes.h @@ -16,20 +16,23 @@ * @file test_included_modulesPubSubTypes.h * This header file contains the declaration of the serialization functions. * - * This file was generated by the tool fastcdrgen. + * This file was generated by the tool fastddsgen. */ #ifndef _FAST_DDS_GENERATED_EPROSIMA_TEST2_TEST_INCLUDED_MODULES_PUBSUBTYPES_H_ #define _FAST_DDS_GENERATED_EPROSIMA_TEST2_TEST_INCLUDED_MODULES_PUBSUBTYPES_H_ +#include #include +#include +#include #include #include "test_included_modules.h" -#if !defined(GEN_API_VER) || (GEN_API_VER != 1) +#if !defined(GEN_API_VER) || (GEN_API_VER != 2) #error \ Generated test_included_modules is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen. #endif // GEN_API_VER @@ -39,8 +42,6 @@ namespace eprosima namespace test2 { - - /*! * @brief This class represents the TopicDataType of the type StructType2 defined by the user in the IDL file. * @ingroup test_included_modules @@ -53,27 +54,42 @@ namespace eprosima eProsima_user_DllExport StructType2PubSubType(); - eProsima_user_DllExport virtual ~StructType2PubSubType() override; + eProsima_user_DllExport ~StructType2PubSubType() override; - eProsima_user_DllExport virtual bool serialize( + eProsima_user_DllExport bool serialize( void* data, - eprosima::fastrtps::rtps::SerializedPayload_t* payload) override; + eprosima::fastrtps::rtps::SerializedPayload_t* payload) override + { + return serialize(data, payload, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } - eProsima_user_DllExport virtual bool deserialize( + eProsima_user_DllExport bool serialize( + void* data, eprosima::fastrtps::rtps::SerializedPayload_t* payload, - void* data) override; + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; - eProsima_user_DllExport virtual std::function getSerializedSizeProvider( + eProsima_user_DllExport bool deserialize( + eprosima::fastrtps::rtps::SerializedPayload_t* payload, void* data) override; - eProsima_user_DllExport virtual bool getKey( + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data) override + { + return getSerializedSizeProvider(data, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } + + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; + + eProsima_user_DllExport bool getKey( void* data, eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, bool force_md5 = false) override; - eProsima_user_DllExport virtual void* createData() override; + eProsima_user_DllExport void* createData() override; - eProsima_user_DllExport virtual void deleteData( + eProsima_user_DllExport void deleteData( void* data) override; #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED @@ -96,7 +112,7 @@ namespace eprosima eProsima_user_DllExport inline bool construct_sample( void* memory) const override { - (void)memory; + static_cast(memory); return false; } diff --git a/fastdds_python/test/types/test_included_modulesPubSubTypes.i b/fastdds_python/test/types/test_included_modulesPubSubTypes.i index ba7112a3..3c3a2891 100644 --- a/fastdds_python/test/types/test_included_modulesPubSubTypes.i +++ b/fastdds_python/test/types/test_included_modulesPubSubTypes.i @@ -16,7 +16,7 @@ * @file test_included_modulesPubSubTypes.i * This header file contains the SWIG interface of the serialization functions. * - * This file was generated by the tool fastcdrgen. + * This file was generated by the tool fastddsgen. */ %import(module="fastdds") "fastdds/dds/topic/TopicDataType.hpp"; @@ -25,6 +25,6 @@ #include "test_included_modulesPubSubTypes.h" %} -#define GEN_API_VER 1 +#define GEN_API_VER 2 %include "test_included_modulesPubSubTypes.h" diff --git a/fastdds_python/test/types/test_modules.cxx b/fastdds_python/test/types/test_modules.cxx index 0510ff6b..82eb8096 100644 --- a/fastdds_python/test/types/test_modules.cxx +++ b/fastdds_python/test/types/test_modules.cxx @@ -14,9 +14,9 @@ /*! * @file test_modules.cpp - * This source file contains the definition of the described types in the IDL file. + * This source file contains the implementation of the described types in the IDL file. * - * This file was generated by the tool gen. + * This file was generated by the tool fastddsgen. */ #ifdef _WIN32 @@ -29,73 +29,20 @@ char dummy; #include "test_modules.h" #include + #include using namespace eprosima::fastcdr::exception; #include -#define eprosima_test_KeyedCompleteTestType_max_cdr_typesize 40880ULL; - -#define eprosima_test_CompleteTestType_max_cdr_typesize 40872ULL; -#define eprosima_test_StructType_max_cdr_typesize 320ULL; - -#define eprosima_test_KeyedCompleteTestType_max_key_cdr_typesize 4ULL; - -#define eprosima_test_CompleteTestType_max_key_cdr_typesize 0ULL; -#define eprosima_test_StructType_max_key_cdr_typesize 0ULL; - - - eprosima::test::StructType::StructType() { - // char m_char_field - m_char_field = 0; - // octet m_uint8_field - m_uint8_field = 0; - // short m_int16_field - m_int16_field = 0; - // unsigned short m_uint16_field - m_uint16_field = 0; - // long m_int32_field - m_int32_field = 0; - // unsigned long m_uint32_field - m_uint32_field = 0; - // long long m_int64_field - m_int64_field = 0; - // unsigned long long m_uint64_field - m_uint64_field = 0; - // float m_float_field - m_float_field = 0.0; - // double m_double_field - m_double_field = 0.0; - // boolean m_bool_field - m_bool_field = false; - // string m_string_field - m_string_field =""; - // eprosima::test::Color m_enum_field - m_enum_field = eprosima::test::RED; - // eprosima::test::Material m_enum2_field - m_enum2_field = eprosima::test::WOOD; } eprosima::test::StructType::~StructType() { - - - - - - - - - - - - - - } eprosima::test::StructType::StructType( @@ -118,7 +65,7 @@ eprosima::test::StructType::StructType( } eprosima::test::StructType::StructType( - StructType&& x) noexcept + StructType&& x) noexcept { m_char_field = x.m_char_field; m_uint8_field = x.m_uint8_field; @@ -183,8 +130,20 @@ eprosima::test::StructType& eprosima::test::StructType::operator =( bool eprosima::test::StructType::operator ==( const StructType& x) const { - - return (m_char_field == x.m_char_field && m_uint8_field == x.m_uint8_field && m_int16_field == x.m_int16_field && m_uint16_field == x.m_uint16_field && m_int32_field == x.m_int32_field && m_uint32_field == x.m_uint32_field && m_int64_field == x.m_int64_field && m_uint64_field == x.m_uint64_field && m_float_field == x.m_float_field && m_double_field == x.m_double_field && m_bool_field == x.m_bool_field && m_string_field == x.m_string_field && m_enum_field == x.m_enum_field && m_enum2_field == x.m_enum2_field); + return (m_char_field == x.m_char_field && + m_uint8_field == x.m_uint8_field && + m_int16_field == x.m_int16_field && + m_uint16_field == x.m_uint16_field && + m_int32_field == x.m_int32_field && + m_uint32_field == x.m_uint32_field && + m_int64_field == x.m_int64_field && + m_uint64_field == x.m_uint64_field && + m_float_field == x.m_float_field && + m_double_field == x.m_double_field && + m_bool_field == x.m_bool_field && + m_string_field == x.m_string_field && + m_enum_field == x.m_enum_field && + m_enum2_field == x.m_enum2_field); } bool eprosima::test::StructType::operator !=( @@ -193,117 +152,6 @@ bool eprosima::test::StructType::operator !=( return !(*this == x); } -size_t eprosima::test::StructType::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_test_StructType_max_cdr_typesize; -} - -size_t eprosima::test::StructType::getCdrSerializedSize( - const eprosima::test::StructType& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.string_field().size() + 1; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - return current_alignment - initial_alignment; -} - -void eprosima::test::StructType::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - - scdr << m_char_field; - scdr << m_uint8_field; - scdr << m_int16_field; - scdr << m_uint16_field; - scdr << m_int32_field; - scdr << m_uint32_field; - scdr << m_int64_field; - scdr << m_uint64_field; - scdr << m_float_field; - scdr << m_double_field; - scdr << m_bool_field; - scdr << m_string_field.c_str(); - scdr << (uint32_t)m_enum_field; - scdr << (uint32_t)m_enum2_field; - -} - -void eprosima::test::StructType::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_char_field; - dcdr >> m_uint8_field; - dcdr >> m_int16_field; - dcdr >> m_uint16_field; - dcdr >> m_int32_field; - dcdr >> m_uint32_field; - dcdr >> m_int64_field; - dcdr >> m_uint64_field; - dcdr >> m_float_field; - dcdr >> m_double_field; - dcdr >> m_bool_field; - dcdr >> m_string_field; - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum_field = (eprosima::test::Color)enum_value; - } - - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum2_field = (eprosima::test::Material)enum_value; - } - -} - /*! * @brief This function sets a value in member char_field * @param _char_field New value for member char_field @@ -332,6 +180,7 @@ char& eprosima::test::StructType::char_field() return m_char_field; } + /*! * @brief This function sets a value in member uint8_field * @param _uint8_field New value for member uint8_field @@ -360,6 +209,7 @@ uint8_t& eprosima::test::StructType::uint8_field() return m_uint8_field; } + /*! * @brief This function sets a value in member int16_field * @param _int16_field New value for member int16_field @@ -388,6 +238,7 @@ int16_t& eprosima::test::StructType::int16_field() return m_int16_field; } + /*! * @brief This function sets a value in member uint16_field * @param _uint16_field New value for member uint16_field @@ -416,6 +267,7 @@ uint16_t& eprosima::test::StructType::uint16_field() return m_uint16_field; } + /*! * @brief This function sets a value in member int32_field * @param _int32_field New value for member int32_field @@ -444,6 +296,7 @@ int32_t& eprosima::test::StructType::int32_field() return m_int32_field; } + /*! * @brief This function sets a value in member uint32_field * @param _uint32_field New value for member uint32_field @@ -472,6 +325,7 @@ uint32_t& eprosima::test::StructType::uint32_field() return m_uint32_field; } + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -500,6 +354,7 @@ int64_t& eprosima::test::StructType::int64_field() return m_int64_field; } + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -528,6 +383,7 @@ uint64_t& eprosima::test::StructType::uint64_field() return m_uint64_field; } + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -556,6 +412,7 @@ float& eprosima::test::StructType::float_field() return m_float_field; } + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -584,6 +441,7 @@ double& eprosima::test::StructType::double_field() return m_double_field; } + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -612,6 +470,7 @@ bool& eprosima::test::StructType::bool_field() return m_bool_field; } + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -649,6 +508,8 @@ std::string& eprosima::test::StructType::string_field() { return m_string_field; } + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -677,6 +538,7 @@ eprosima::test::Color& eprosima::test::StructType::enum_field() return m_enum_field; } + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -707,205 +569,14 @@ eprosima::test::Material& eprosima::test::StructType::enum2_field() -size_t eprosima::test::StructType::getKeyMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_test_StructType_max_key_cdr_typesize; -} - -bool eprosima::test::StructType::isKeyDefined() -{ - return false; -} - -void eprosima::test::StructType::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - - - eprosima::test::CompleteTestType::CompleteTestType() { - // char m_char_field - m_char_field = 0; - // octet m_uint8_field - m_uint8_field = 0; - // short m_int16_field - m_int16_field = 0; - // unsigned short m_uint16_field - m_uint16_field = 0; - // long m_int32_field - m_int32_field = 0; - // unsigned long m_uint32_field - m_uint32_field = 0; - // long long m_int64_field - m_int64_field = 0; - // unsigned long long m_uint64_field - m_uint64_field = 0; - // float m_float_field - m_float_field = 0.0; - // double m_double_field - m_double_field = 0.0; - // boolean m_bool_field - m_bool_field = false; - // string m_string_field - m_string_field =""; - // eprosima::test::Color m_enum_field - m_enum_field = eprosima::test::RED; - // eprosima::test::Material m_enum2_field - m_enum2_field = eprosima::test::WOOD; - // eprosima::test::StructType m_struct_field - - // char m_array_char_field - memset(&m_array_char_field, 0, (3) * 1); - // octet m_array_uint8_field - memset(&m_array_uint8_field, 0, (3) * 1); - // short m_array_int16_field - memset(&m_array_int16_field, 0, (3) * 2); - // unsigned short m_array_uint16_field - memset(&m_array_uint16_field, 0, (3) * 2); - // long m_array_int32_field - memset(&m_array_int32_field, 0, (3) * 4); - // unsigned long m_array_uint32_field - memset(&m_array_uint32_field, 0, (3) * 4); - // long long m_array_int64_field - memset(&m_array_int64_field, 0, (3) * 8); - // unsigned long long m_array_uint64_field - memset(&m_array_uint64_field, 0, (3) * 8); - // float m_array_float_field - memset(&m_array_float_field, 0, (3) * 4); - // double m_array_double_field - memset(&m_array_double_field, 0, (3) * 8); - // boolean m_array_bool_field - memset(&m_array_bool_field, 0, (3) * 1); - // eprosima::test::Color m_array_enum_field - memset(&m_array_enum_field, 0, (3) * 4); - // eprosima::test::Material m_array_enum2_field - memset(&m_array_enum2_field, 0, (3) * 4); - // eprosima::test::StructType m_array_struct_field - - // sequence m_bounded_sequence_char_field - - // sequence m_bounded_sequence_uint8_field - - // sequence m_bounded_sequence_int16_field - - // sequence m_bounded_sequence_uint16_field - - // sequence m_bounded_sequence_int32_field - - // sequence m_bounded_sequence_uint32_field - - // sequence m_bounded_sequence_int64_field - - // sequence m_bounded_sequence_uint64_field - - // sequence m_bounded_sequence_float_field - - // sequence m_bounded_sequence_double_field - - // sequence m_bounded_sequence_bool_field - - // sequence m_bounded_sequence_enum_field - - // sequence m_bounded_sequence_enum2_field - - // sequence m_bounded_sequence_struct_field - - // sequence m_unbounded_sequence_char_field - - // sequence m_unbounded_sequence_uint8_field - - // sequence m_unbounded_sequence_int16_field - - // sequence m_unbounded_sequence_uint16_field - - // sequence m_unbounded_sequence_int32_field - - // sequence m_unbounded_sequence_uint32_field - - // sequence m_unbounded_sequence_int64_field - - // sequence m_unbounded_sequence_uint64_field - - // sequence m_unbounded_sequence_float_field - - // sequence m_unbounded_sequence_double_field - - // sequence m_unbounded_sequence_bool_field - - // sequence m_unbounded_sequence_enum_field - - // sequence m_unbounded_sequence_enum2_field - - // sequence m_unbounded_sequence_struct_field - } eprosima::test::CompleteTestType::~CompleteTestType() { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } eprosima::test::CompleteTestType::CompleteTestType( @@ -971,7 +642,7 @@ eprosima::test::CompleteTestType::CompleteTestType( } eprosima::test::CompleteTestType::CompleteTestType( - CompleteTestType&& x) noexcept + CompleteTestType&& x) noexcept { m_char_field = x.m_char_field; m_uint8_field = x.m_uint8_field; @@ -1165,8 +836,63 @@ eprosima::test::CompleteTestType& eprosima::test::CompleteTestType::operator =( bool eprosima::test::CompleteTestType::operator ==( const CompleteTestType& x) const { - - return (m_char_field == x.m_char_field && m_uint8_field == x.m_uint8_field && m_int16_field == x.m_int16_field && m_uint16_field == x.m_uint16_field && m_int32_field == x.m_int32_field && m_uint32_field == x.m_uint32_field && m_int64_field == x.m_int64_field && m_uint64_field == x.m_uint64_field && m_float_field == x.m_float_field && m_double_field == x.m_double_field && m_bool_field == x.m_bool_field && m_string_field == x.m_string_field && m_enum_field == x.m_enum_field && m_enum2_field == x.m_enum2_field && m_struct_field == x.m_struct_field && m_array_char_field == x.m_array_char_field && m_array_uint8_field == x.m_array_uint8_field && m_array_int16_field == x.m_array_int16_field && m_array_uint16_field == x.m_array_uint16_field && m_array_int32_field == x.m_array_int32_field && m_array_uint32_field == x.m_array_uint32_field && m_array_int64_field == x.m_array_int64_field && m_array_uint64_field == x.m_array_uint64_field && m_array_float_field == x.m_array_float_field && m_array_double_field == x.m_array_double_field && m_array_bool_field == x.m_array_bool_field && m_array_enum_field == x.m_array_enum_field && m_array_enum2_field == x.m_array_enum2_field && m_array_struct_field == x.m_array_struct_field && m_bounded_sequence_char_field == x.m_bounded_sequence_char_field && m_bounded_sequence_uint8_field == x.m_bounded_sequence_uint8_field && m_bounded_sequence_int16_field == x.m_bounded_sequence_int16_field && m_bounded_sequence_uint16_field == x.m_bounded_sequence_uint16_field && m_bounded_sequence_int32_field == x.m_bounded_sequence_int32_field && m_bounded_sequence_uint32_field == x.m_bounded_sequence_uint32_field && m_bounded_sequence_int64_field == x.m_bounded_sequence_int64_field && m_bounded_sequence_uint64_field == x.m_bounded_sequence_uint64_field && m_bounded_sequence_float_field == x.m_bounded_sequence_float_field && m_bounded_sequence_double_field == x.m_bounded_sequence_double_field && m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && m_bounded_sequence_enum_field == x.m_bounded_sequence_enum_field && m_bounded_sequence_enum2_field == x.m_bounded_sequence_enum2_field && m_bounded_sequence_struct_field == x.m_bounded_sequence_struct_field && m_unbounded_sequence_char_field == x.m_unbounded_sequence_char_field && m_unbounded_sequence_uint8_field == x.m_unbounded_sequence_uint8_field && m_unbounded_sequence_int16_field == x.m_unbounded_sequence_int16_field && m_unbounded_sequence_uint16_field == x.m_unbounded_sequence_uint16_field && m_unbounded_sequence_int32_field == x.m_unbounded_sequence_int32_field && m_unbounded_sequence_uint32_field == x.m_unbounded_sequence_uint32_field && m_unbounded_sequence_int64_field == x.m_unbounded_sequence_int64_field && m_unbounded_sequence_uint64_field == x.m_unbounded_sequence_uint64_field && m_unbounded_sequence_float_field == x.m_unbounded_sequence_float_field && m_unbounded_sequence_double_field == x.m_unbounded_sequence_double_field && m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && m_unbounded_sequence_enum_field == x.m_unbounded_sequence_enum_field && m_unbounded_sequence_enum2_field == x.m_unbounded_sequence_enum2_field && m_unbounded_sequence_struct_field == x.m_unbounded_sequence_struct_field); + return (m_char_field == x.m_char_field && + m_uint8_field == x.m_uint8_field && + m_int16_field == x.m_int16_field && + m_uint16_field == x.m_uint16_field && + m_int32_field == x.m_int32_field && + m_uint32_field == x.m_uint32_field && + m_int64_field == x.m_int64_field && + m_uint64_field == x.m_uint64_field && + m_float_field == x.m_float_field && + m_double_field == x.m_double_field && + m_bool_field == x.m_bool_field && + m_string_field == x.m_string_field && + m_enum_field == x.m_enum_field && + m_enum2_field == x.m_enum2_field && + m_struct_field == x.m_struct_field && + m_array_char_field == x.m_array_char_field && + m_array_uint8_field == x.m_array_uint8_field && + m_array_int16_field == x.m_array_int16_field && + m_array_uint16_field == x.m_array_uint16_field && + m_array_int32_field == x.m_array_int32_field && + m_array_uint32_field == x.m_array_uint32_field && + m_array_int64_field == x.m_array_int64_field && + m_array_uint64_field == x.m_array_uint64_field && + m_array_float_field == x.m_array_float_field && + m_array_double_field == x.m_array_double_field && + m_array_bool_field == x.m_array_bool_field && + m_array_enum_field == x.m_array_enum_field && + m_array_enum2_field == x.m_array_enum2_field && + m_array_struct_field == x.m_array_struct_field && + m_bounded_sequence_char_field == x.m_bounded_sequence_char_field && + m_bounded_sequence_uint8_field == x.m_bounded_sequence_uint8_field && + m_bounded_sequence_int16_field == x.m_bounded_sequence_int16_field && + m_bounded_sequence_uint16_field == x.m_bounded_sequence_uint16_field && + m_bounded_sequence_int32_field == x.m_bounded_sequence_int32_field && + m_bounded_sequence_uint32_field == x.m_bounded_sequence_uint32_field && + m_bounded_sequence_int64_field == x.m_bounded_sequence_int64_field && + m_bounded_sequence_uint64_field == x.m_bounded_sequence_uint64_field && + m_bounded_sequence_float_field == x.m_bounded_sequence_float_field && + m_bounded_sequence_double_field == x.m_bounded_sequence_double_field && + m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && + m_bounded_sequence_enum_field == x.m_bounded_sequence_enum_field && + m_bounded_sequence_enum2_field == x.m_bounded_sequence_enum2_field && + m_bounded_sequence_struct_field == x.m_bounded_sequence_struct_field && + m_unbounded_sequence_char_field == x.m_unbounded_sequence_char_field && + m_unbounded_sequence_uint8_field == x.m_unbounded_sequence_uint8_field && + m_unbounded_sequence_int16_field == x.m_unbounded_sequence_int16_field && + m_unbounded_sequence_uint16_field == x.m_unbounded_sequence_uint16_field && + m_unbounded_sequence_int32_field == x.m_unbounded_sequence_int32_field && + m_unbounded_sequence_uint32_field == x.m_unbounded_sequence_uint32_field && + m_unbounded_sequence_int64_field == x.m_unbounded_sequence_int64_field && + m_unbounded_sequence_uint64_field == x.m_unbounded_sequence_uint64_field && + m_unbounded_sequence_float_field == x.m_unbounded_sequence_float_field && + m_unbounded_sequence_double_field == x.m_unbounded_sequence_double_field && + m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && + m_unbounded_sequence_enum_field == x.m_unbounded_sequence_enum_field && + m_unbounded_sequence_enum2_field == x.m_unbounded_sequence_enum2_field && + m_unbounded_sequence_struct_field == x.m_unbounded_sequence_struct_field); } bool eprosima::test::CompleteTestType::operator !=( @@ -1175,704 +901,168 @@ bool eprosima::test::CompleteTestType::operator !=( return !(*this == x); } -size_t eprosima::test::CompleteTestType::getMaxCdrSerializedSize( - size_t current_alignment) +/*! + * @brief This function sets a value in member char_field + * @param _char_field New value for member char_field + */ +void eprosima::test::CompleteTestType::char_field( + char _char_field) { - static_cast(current_alignment); - return eprosima_test_CompleteTestType_max_cdr_typesize; + m_char_field = _char_field; } -size_t eprosima::test::CompleteTestType::getCdrSerializedSize( - const eprosima::test::CompleteTestType& data, - size_t current_alignment) +/*! + * @brief This function returns the value of member char_field + * @return Value of member char_field + */ +char eprosima::test::CompleteTestType::char_field() const { - (void)data; - size_t initial_alignment = current_alignment; + return m_char_field; +} +/*! + * @brief This function returns a reference to member char_field + * @return Reference to member char_field + */ +char& eprosima::test::CompleteTestType::char_field() +{ + return m_char_field; +} - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); +/*! + * @brief This function sets a value in member uint8_field + * @param _uint8_field New value for member uint8_field + */ +void eprosima::test::CompleteTestType::uint8_field( + uint8_t _uint8_field) +{ + m_uint8_field = _uint8_field; +} - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); +/*! + * @brief This function returns the value of member uint8_field + * @return Value of member uint8_field + */ +uint8_t eprosima::test::CompleteTestType::uint8_field() const +{ + return m_uint8_field; +} +/*! + * @brief This function returns a reference to member uint8_field + * @return Reference to member uint8_field + */ +uint8_t& eprosima::test::CompleteTestType::uint8_field() +{ + return m_uint8_field; +} - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); +/*! + * @brief This function sets a value in member int16_field + * @param _int16_field New value for member int16_field + */ +void eprosima::test::CompleteTestType::int16_field( + int16_t _int16_field) +{ + m_int16_field = _int16_field; +} - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); +/*! + * @brief This function returns the value of member int16_field + * @return Value of member int16_field + */ +int16_t eprosima::test::CompleteTestType::int16_field() const +{ + return m_int16_field; +} +/*! + * @brief This function returns a reference to member int16_field + * @return Reference to member int16_field + */ +int16_t& eprosima::test::CompleteTestType::int16_field() +{ + return m_int16_field; +} - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.string_field().size() + 1; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += eprosima::test::StructType::getCdrSerializedSize(data.struct_field(), current_alignment); - current_alignment += ((3) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += ((3) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += ((3) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - current_alignment += ((3) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - current_alignment += ((3) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - current_alignment += ((3) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.array_struct_field().size(); ++a) - { - current_alignment += eprosima::test::StructType::getCdrSerializedSize(data.array_struct_field().at(a), current_alignment); - } - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_char_field().size() > 0) - { - current_alignment += (data.bounded_sequence_char_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint8_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint8_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_int16_field().size() > 0) - { - current_alignment += (data.bounded_sequence_int16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint16_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_int32_field().size() > 0) - { - current_alignment += (data.bounded_sequence_int32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint32_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_int64_field().size() > 0) - { - current_alignment += (data.bounded_sequence_int64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint64_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_float_field().size() > 0) - { - current_alignment += (data.bounded_sequence_float_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_double_field().size() > 0) - { - current_alignment += (data.bounded_sequence_double_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_bool_field().size() > 0) - { - current_alignment += (data.bounded_sequence_bool_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_enum_field().size() > 0) - { - current_alignment += (data.bounded_sequence_enum_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_enum2_field().size() > 0) - { - current_alignment += (data.bounded_sequence_enum2_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.bounded_sequence_struct_field().size(); ++a) - { - current_alignment += eprosima::test::StructType::getCdrSerializedSize(data.bounded_sequence_struct_field().at(a), current_alignment);} - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_char_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_char_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint8_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint8_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_int16_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_int16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint16_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_int32_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_int32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint32_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_int64_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_int64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint64_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_float_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_float_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_double_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_double_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_bool_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_bool_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_enum_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_enum_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_enum2_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_enum2_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.unbounded_sequence_struct_field().size(); ++a) - { - current_alignment += eprosima::test::StructType::getCdrSerializedSize(data.unbounded_sequence_struct_field().at(a), current_alignment);} - - - return current_alignment - initial_alignment; -} - -void eprosima::test::CompleteTestType::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - - scdr << m_char_field; - scdr << m_uint8_field; - scdr << m_int16_field; - scdr << m_uint16_field; - scdr << m_int32_field; - scdr << m_uint32_field; - scdr << m_int64_field; - scdr << m_uint64_field; - scdr << m_float_field; - scdr << m_double_field; - scdr << m_bool_field; - scdr << m_string_field.c_str(); - scdr << (uint32_t)m_enum_field; - scdr << (uint32_t)m_enum2_field; - scdr << m_struct_field; - scdr << m_array_char_field; - - scdr << m_array_uint8_field; - - scdr << m_array_int16_field; - - scdr << m_array_uint16_field; - - scdr << m_array_int32_field; - - scdr << m_array_uint32_field; - - scdr << m_array_int64_field; - - scdr << m_array_uint64_field; - - scdr << m_array_float_field; - - scdr << m_array_double_field; - - scdr << m_array_bool_field; - - scdr.serializeArray(reinterpret_cast(m_array_enum_field.data()), m_array_enum_field.size()); - - - scdr.serializeArray(reinterpret_cast(m_array_enum2_field.data()), m_array_enum2_field.size()); - - - scdr << m_array_struct_field; - - scdr << m_bounded_sequence_char_field; - scdr << m_bounded_sequence_uint8_field; - scdr << m_bounded_sequence_int16_field; - scdr << m_bounded_sequence_uint16_field; - scdr << m_bounded_sequence_int32_field; - scdr << m_bounded_sequence_uint32_field; - scdr << m_bounded_sequence_int64_field; - scdr << m_bounded_sequence_uint64_field; - scdr << m_bounded_sequence_float_field; - scdr << m_bounded_sequence_double_field; - scdr << m_bounded_sequence_bool_field; - scdr << static_cast(m_bounded_sequence_enum_field.size()); - scdr.serializeArray(reinterpret_cast(m_bounded_sequence_enum_field.data()), m_bounded_sequence_enum_field.size()); - - scdr << static_cast(m_bounded_sequence_enum2_field.size()); - scdr.serializeArray(reinterpret_cast(m_bounded_sequence_enum2_field.data()), m_bounded_sequence_enum2_field.size()); - - scdr << m_bounded_sequence_struct_field; - scdr << m_unbounded_sequence_char_field; - scdr << m_unbounded_sequence_uint8_field; - scdr << m_unbounded_sequence_int16_field; - scdr << m_unbounded_sequence_uint16_field; - scdr << m_unbounded_sequence_int32_field; - scdr << m_unbounded_sequence_uint32_field; - scdr << m_unbounded_sequence_int64_field; - scdr << m_unbounded_sequence_uint64_field; - scdr << m_unbounded_sequence_float_field; - scdr << m_unbounded_sequence_double_field; - scdr << m_unbounded_sequence_bool_field; - scdr << static_cast(m_unbounded_sequence_enum_field.size()); - scdr.serializeArray(reinterpret_cast(m_unbounded_sequence_enum_field.data()), m_unbounded_sequence_enum_field.size()); - - scdr << static_cast(m_unbounded_sequence_enum2_field.size()); - scdr.serializeArray(reinterpret_cast(m_unbounded_sequence_enum2_field.data()), m_unbounded_sequence_enum2_field.size()); - - scdr << m_unbounded_sequence_struct_field; - -} - -void eprosima::test::CompleteTestType::deserialize( - eprosima::fastcdr::Cdr& dcdr) +/*! + * @brief This function sets a value in member uint16_field + * @param _uint16_field New value for member uint16_field + */ +void eprosima::test::CompleteTestType::uint16_field( + uint16_t _uint16_field) { - - dcdr >> m_char_field; - dcdr >> m_uint8_field; - dcdr >> m_int16_field; - dcdr >> m_uint16_field; - dcdr >> m_int32_field; - dcdr >> m_uint32_field; - dcdr >> m_int64_field; - dcdr >> m_uint64_field; - dcdr >> m_float_field; - dcdr >> m_double_field; - dcdr >> m_bool_field; - dcdr >> m_string_field; - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum_field = (eprosima::test::Color)enum_value; - } - - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum2_field = (eprosima::test::Material)enum_value; - } - - dcdr >> m_struct_field; - dcdr >> m_array_char_field; - - dcdr >> m_array_uint8_field; - - dcdr >> m_array_int16_field; - - dcdr >> m_array_uint16_field; - - dcdr >> m_array_int32_field; - - dcdr >> m_array_uint32_field; - - dcdr >> m_array_int64_field; - - dcdr >> m_array_uint64_field; - - dcdr >> m_array_float_field; - - dcdr >> m_array_double_field; - - dcdr >> m_array_bool_field; - - dcdr.deserializeArray(reinterpret_cast(m_array_enum_field.data()), m_array_enum_field.size()); - - - dcdr.deserializeArray(reinterpret_cast(m_array_enum2_field.data()), m_array_enum2_field.size()); - - - dcdr >> m_array_struct_field; - - dcdr >> m_bounded_sequence_char_field; - dcdr >> m_bounded_sequence_uint8_field; - dcdr >> m_bounded_sequence_int16_field; - dcdr >> m_bounded_sequence_uint16_field; - dcdr >> m_bounded_sequence_int32_field; - dcdr >> m_bounded_sequence_uint32_field; - dcdr >> m_bounded_sequence_int64_field; - dcdr >> m_bounded_sequence_uint64_field; - dcdr >> m_bounded_sequence_float_field; - dcdr >> m_bounded_sequence_double_field; - dcdr >> m_bounded_sequence_bool_field; - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_bounded_sequence_enum_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_bounded_sequence_enum_field.data()), seq_length); - } - - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_bounded_sequence_enum2_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_bounded_sequence_enum2_field.data()), seq_length); - } - - dcdr >> m_bounded_sequence_struct_field; - dcdr >> m_unbounded_sequence_char_field; - dcdr >> m_unbounded_sequence_uint8_field; - dcdr >> m_unbounded_sequence_int16_field; - dcdr >> m_unbounded_sequence_uint16_field; - dcdr >> m_unbounded_sequence_int32_field; - dcdr >> m_unbounded_sequence_uint32_field; - dcdr >> m_unbounded_sequence_int64_field; - dcdr >> m_unbounded_sequence_uint64_field; - dcdr >> m_unbounded_sequence_float_field; - dcdr >> m_unbounded_sequence_double_field; - dcdr >> m_unbounded_sequence_bool_field; - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_unbounded_sequence_enum_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_unbounded_sequence_enum_field.data()), seq_length); - } - - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_unbounded_sequence_enum2_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_unbounded_sequence_enum2_field.data()), seq_length); - } - - dcdr >> m_unbounded_sequence_struct_field; + m_uint16_field = _uint16_field; } /*! - * @brief This function sets a value in member char_field - * @param _char_field New value for member char_field + * @brief This function returns the value of member uint16_field + * @return Value of member uint16_field */ -void eprosima::test::CompleteTestType::char_field( - char _char_field) +uint16_t eprosima::test::CompleteTestType::uint16_field() const { - m_char_field = _char_field; + return m_uint16_field; } /*! - * @brief This function returns the value of member char_field - * @return Value of member char_field + * @brief This function returns a reference to member uint16_field + * @return Reference to member uint16_field */ -char eprosima::test::CompleteTestType::char_field() const +uint16_t& eprosima::test::CompleteTestType::uint16_field() { - return m_char_field; + return m_uint16_field; } + /*! - * @brief This function returns a reference to member char_field - * @return Reference to member char_field + * @brief This function sets a value in member int32_field + * @param _int32_field New value for member int32_field */ -char& eprosima::test::CompleteTestType::char_field() +void eprosima::test::CompleteTestType::int32_field( + int32_t _int32_field) { - return m_char_field; + m_int32_field = _int32_field; } /*! - * @brief This function sets a value in member uint8_field - * @param _uint8_field New value for member uint8_field + * @brief This function returns the value of member int32_field + * @return Value of member int32_field */ -void eprosima::test::CompleteTestType::uint8_field( - uint8_t _uint8_field) +int32_t eprosima::test::CompleteTestType::int32_field() const { - m_uint8_field = _uint8_field; + return m_int32_field; } /*! - * @brief This function returns the value of member uint8_field - * @return Value of member uint8_field + * @brief This function returns a reference to member int32_field + * @return Reference to member int32_field */ -uint8_t eprosima::test::CompleteTestType::uint8_field() const +int32_t& eprosima::test::CompleteTestType::int32_field() { - return m_uint8_field; + return m_int32_field; } + /*! - * @brief This function returns a reference to member uint8_field - * @return Reference to member uint8_field + * @brief This function sets a value in member uint32_field + * @param _uint32_field New value for member uint32_field */ -uint8_t& eprosima::test::CompleteTestType::uint8_field() +void eprosima::test::CompleteTestType::uint32_field( + uint32_t _uint32_field) { - return m_uint8_field; + m_uint32_field = _uint32_field; } /*! - * @brief This function sets a value in member int16_field - * @param _int16_field New value for member int16_field + * @brief This function returns the value of member uint32_field + * @return Value of member uint32_field */ -void eprosima::test::CompleteTestType::int16_field( - int16_t _int16_field) +uint32_t eprosima::test::CompleteTestType::uint32_field() const { - m_int16_field = _int16_field; -} - -/*! - * @brief This function returns the value of member int16_field - * @return Value of member int16_field - */ -int16_t eprosima::test::CompleteTestType::int16_field() const -{ - return m_int16_field; -} - -/*! - * @brief This function returns a reference to member int16_field - * @return Reference to member int16_field - */ -int16_t& eprosima::test::CompleteTestType::int16_field() -{ - return m_int16_field; -} - -/*! - * @brief This function sets a value in member uint16_field - * @param _uint16_field New value for member uint16_field - */ -void eprosima::test::CompleteTestType::uint16_field( - uint16_t _uint16_field) -{ - m_uint16_field = _uint16_field; -} - -/*! - * @brief This function returns the value of member uint16_field - * @return Value of member uint16_field - */ -uint16_t eprosima::test::CompleteTestType::uint16_field() const -{ - return m_uint16_field; -} - -/*! - * @brief This function returns a reference to member uint16_field - * @return Reference to member uint16_field - */ -uint16_t& eprosima::test::CompleteTestType::uint16_field() -{ - return m_uint16_field; -} - -/*! - * @brief This function sets a value in member int32_field - * @param _int32_field New value for member int32_field - */ -void eprosima::test::CompleteTestType::int32_field( - int32_t _int32_field) -{ - m_int32_field = _int32_field; -} - -/*! - * @brief This function returns the value of member int32_field - * @return Value of member int32_field - */ -int32_t eprosima::test::CompleteTestType::int32_field() const -{ - return m_int32_field; -} - -/*! - * @brief This function returns a reference to member int32_field - * @return Reference to member int32_field - */ -int32_t& eprosima::test::CompleteTestType::int32_field() -{ - return m_int32_field; -} - -/*! - * @brief This function sets a value in member uint32_field - * @param _uint32_field New value for member uint32_field - */ -void eprosima::test::CompleteTestType::uint32_field( - uint32_t _uint32_field) -{ - m_uint32_field = _uint32_field; -} - -/*! - * @brief This function returns the value of member uint32_field - * @return Value of member uint32_field - */ -uint32_t eprosima::test::CompleteTestType::uint32_field() const -{ - return m_uint32_field; + return m_uint32_field; } /*! @@ -1884,6 +1074,7 @@ uint32_t& eprosima::test::CompleteTestType::uint32_field() return m_uint32_field; } + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -1912,6 +1103,7 @@ int64_t& eprosima::test::CompleteTestType::int64_field() return m_int64_field; } + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -1940,6 +1132,7 @@ uint64_t& eprosima::test::CompleteTestType::uint64_field() return m_uint64_field; } + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -1968,6 +1161,7 @@ float& eprosima::test::CompleteTestType::float_field() return m_float_field; } + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -1996,6 +1190,7 @@ double& eprosima::test::CompleteTestType::double_field() return m_double_field; } + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -2024,6 +1219,7 @@ bool& eprosima::test::CompleteTestType::bool_field() return m_bool_field; } + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -2061,6 +1257,8 @@ std::string& eprosima::test::CompleteTestType::string_field() { return m_string_field; } + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -2089,6 +1287,7 @@ eprosima::test::Color& eprosima::test::CompleteTestType::enum_field() return m_enum_field; } + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -2117,6 +1316,7 @@ eprosima::test::Material& eprosima::test::CompleteTestType::enum2_field() return m_enum2_field; } + /*! * @brief This function copies the value in member struct_field * @param _struct_field New value to be copied in member struct_field @@ -2154,6 +1354,8 @@ eprosima::test::StructType& eprosima::test::CompleteTestType::struct_field() { return m_struct_field; } + + /*! * @brief This function copies the value in member array_char_field * @param _array_char_field New value to be copied in member array_char_field @@ -2191,6 +1393,8 @@ std::array& eprosima::test::CompleteTestType::array_char_field() { return m_array_char_field; } + + /*! * @brief This function copies the value in member array_uint8_field * @param _array_uint8_field New value to be copied in member array_uint8_field @@ -2228,6 +1432,8 @@ std::array& eprosima::test::CompleteTestType::array_uint8_field() { return m_array_uint8_field; } + + /*! * @brief This function copies the value in member array_int16_field * @param _array_int16_field New value to be copied in member array_int16_field @@ -2265,6 +1471,8 @@ std::array& eprosima::test::CompleteTestType::array_int16_field() { return m_array_int16_field; } + + /*! * @brief This function copies the value in member array_uint16_field * @param _array_uint16_field New value to be copied in member array_uint16_field @@ -2302,6 +1510,8 @@ std::array& eprosima::test::CompleteTestType::array_uint16_field() { return m_array_uint16_field; } + + /*! * @brief This function copies the value in member array_int32_field * @param _array_int32_field New value to be copied in member array_int32_field @@ -2339,6 +1549,8 @@ std::array& eprosima::test::CompleteTestType::array_int32_field() { return m_array_int32_field; } + + /*! * @brief This function copies the value in member array_uint32_field * @param _array_uint32_field New value to be copied in member array_uint32_field @@ -2376,6 +1588,8 @@ std::array& eprosima::test::CompleteTestType::array_uint32_field() { return m_array_uint32_field; } + + /*! * @brief This function copies the value in member array_int64_field * @param _array_int64_field New value to be copied in member array_int64_field @@ -2413,6 +1627,8 @@ std::array& eprosima::test::CompleteTestType::array_int64_field() { return m_array_int64_field; } + + /*! * @brief This function copies the value in member array_uint64_field * @param _array_uint64_field New value to be copied in member array_uint64_field @@ -2450,6 +1666,8 @@ std::array& eprosima::test::CompleteTestType::array_uint64_field() { return m_array_uint64_field; } + + /*! * @brief This function copies the value in member array_float_field * @param _array_float_field New value to be copied in member array_float_field @@ -2487,6 +1705,8 @@ std::array& eprosima::test::CompleteTestType::array_float_field() { return m_array_float_field; } + + /*! * @brief This function copies the value in member array_double_field * @param _array_double_field New value to be copied in member array_double_field @@ -2524,6 +1744,8 @@ std::array& eprosima::test::CompleteTestType::array_double_field() { return m_array_double_field; } + + /*! * @brief This function copies the value in member array_bool_field * @param _array_bool_field New value to be copied in member array_bool_field @@ -2561,6 +1783,8 @@ std::array& eprosima::test::CompleteTestType::array_bool_field() { return m_array_bool_field; } + + /*! * @brief This function copies the value in member array_enum_field * @param _array_enum_field New value to be copied in member array_enum_field @@ -2598,6 +1822,8 @@ std::array& eprosima::test::CompleteTestType::array_en { return m_array_enum_field; } + + /*! * @brief This function copies the value in member array_enum2_field * @param _array_enum2_field New value to be copied in member array_enum2_field @@ -2635,6 +1861,8 @@ std::array& eprosima::test::CompleteTestType::array { return m_array_enum2_field; } + + /*! * @brief This function copies the value in member array_struct_field * @param _array_struct_field New value to be copied in member array_struct_field @@ -2672,6 +1900,8 @@ std::array& eprosima::test::CompleteTestType::arr { return m_array_struct_field; } + + /*! * @brief This function copies the value in member bounded_sequence_char_field * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field @@ -2709,6 +1939,8 @@ std::vector& eprosima::test::CompleteTestType::bounded_sequence_char_field { return m_bounded_sequence_char_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint8_field * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field @@ -2746,6 +1978,8 @@ std::vector& eprosima::test::CompleteTestType::bounded_sequence_uint8_f { return m_bounded_sequence_uint8_field; } + + /*! * @brief This function copies the value in member bounded_sequence_int16_field * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field @@ -2783,6 +2017,8 @@ std::vector& eprosima::test::CompleteTestType::bounded_sequence_int16_f { return m_bounded_sequence_int16_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint16_field * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field @@ -2820,6 +2056,8 @@ std::vector& eprosima::test::CompleteTestType::bounded_sequence_uint16 { return m_bounded_sequence_uint16_field; } + + /*! * @brief This function copies the value in member bounded_sequence_int32_field * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field @@ -2857,6 +2095,8 @@ std::vector& eprosima::test::CompleteTestType::bounded_sequence_int32_f { return m_bounded_sequence_int32_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint32_field * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field @@ -2894,6 +2134,8 @@ std::vector& eprosima::test::CompleteTestType::bounded_sequence_uint32 { return m_bounded_sequence_uint32_field; } + + /*! * @brief This function copies the value in member bounded_sequence_int64_field * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field @@ -2931,6 +2173,8 @@ std::vector& eprosima::test::CompleteTestType::bounded_sequence_int64_f { return m_bounded_sequence_int64_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint64_field * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field @@ -2968,6 +2212,8 @@ std::vector& eprosima::test::CompleteTestType::bounded_sequence_uint64 { return m_bounded_sequence_uint64_field; } + + /*! * @brief This function copies the value in member bounded_sequence_float_field * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field @@ -3005,6 +2251,8 @@ std::vector& eprosima::test::CompleteTestType::bounded_sequence_float_fie { return m_bounded_sequence_float_field; } + + /*! * @brief This function copies the value in member bounded_sequence_double_field * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field @@ -3042,6 +2290,8 @@ std::vector& eprosima::test::CompleteTestType::bounded_sequence_double_f { return m_bounded_sequence_double_field; } + + /*! * @brief This function copies the value in member bounded_sequence_bool_field * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field @@ -3079,6 +2329,8 @@ std::vector& eprosima::test::CompleteTestType::bounded_sequence_bool_field { return m_bounded_sequence_bool_field; } + + /*! * @brief This function copies the value in member bounded_sequence_enum_field * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field @@ -3116,6 +2368,8 @@ std::vector& eprosima::test::CompleteTestType::bounded_se { return m_bounded_sequence_enum_field; } + + /*! * @brief This function copies the value in member bounded_sequence_enum2_field * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field @@ -3153,6 +2407,8 @@ std::vector& eprosima::test::CompleteTestType::bounded { return m_bounded_sequence_enum2_field; } + + /*! * @brief This function copies the value in member bounded_sequence_struct_field * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field @@ -3190,6 +2446,8 @@ std::vector& eprosima::test::CompleteTestType::bound { return m_bounded_sequence_struct_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_char_field * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field @@ -3227,6 +2485,8 @@ std::vector& eprosima::test::CompleteTestType::unbounded_sequence_char_fie { return m_unbounded_sequence_char_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint8_field * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field @@ -3264,6 +2524,8 @@ std::vector& eprosima::test::CompleteTestType::unbounded_sequence_uint8 { return m_unbounded_sequence_uint8_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_int16_field * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field @@ -3301,6 +2563,8 @@ std::vector& eprosima::test::CompleteTestType::unbounded_sequence_int16 { return m_unbounded_sequence_int16_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint16_field * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field @@ -3338,6 +2602,8 @@ std::vector& eprosima::test::CompleteTestType::unbounded_sequence_uint { return m_unbounded_sequence_uint16_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_int32_field * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field @@ -3375,6 +2641,8 @@ std::vector& eprosima::test::CompleteTestType::unbounded_sequence_int32 { return m_unbounded_sequence_int32_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint32_field * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field @@ -3412,6 +2680,8 @@ std::vector& eprosima::test::CompleteTestType::unbounded_sequence_uint { return m_unbounded_sequence_uint32_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_int64_field * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field @@ -3449,6 +2719,8 @@ std::vector& eprosima::test::CompleteTestType::unbounded_sequence_int64 { return m_unbounded_sequence_int64_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint64_field * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field @@ -3486,6 +2758,8 @@ std::vector& eprosima::test::CompleteTestType::unbounded_sequence_uint { return m_unbounded_sequence_uint64_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_float_field * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field @@ -3523,6 +2797,8 @@ std::vector& eprosima::test::CompleteTestType::unbounded_sequence_float_f { return m_unbounded_sequence_float_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_double_field * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field @@ -3560,6 +2836,8 @@ std::vector& eprosima::test::CompleteTestType::unbounded_sequence_double { return m_unbounded_sequence_double_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_bool_field * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field @@ -3597,6 +2875,8 @@ std::vector& eprosima::test::CompleteTestType::unbounded_sequence_bool_fie { return m_unbounded_sequence_bool_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_enum_field * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field @@ -3634,6 +2914,8 @@ std::vector& eprosima::test::CompleteTestType::unbounded_ { return m_unbounded_sequence_enum_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_enum2_field * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field @@ -3671,6 +2953,8 @@ std::vector& eprosima::test::CompleteTestType::unbound { return m_unbounded_sequence_enum2_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_struct_field * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field @@ -3684,364 +2968,44 @@ void eprosima::test::CompleteTestType::unbounded_sequence_struct_field( /*! * @brief This function moves the value in member unbounded_sequence_struct_field * @param _unbounded_sequence_struct_field New value to be moved in member unbounded_sequence_struct_field - */ -void eprosima::test::CompleteTestType::unbounded_sequence_struct_field( - std::vector&& _unbounded_sequence_struct_field) -{ - m_unbounded_sequence_struct_field = std::move(_unbounded_sequence_struct_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_struct_field - * @return Constant reference to member unbounded_sequence_struct_field - */ -const std::vector& eprosima::test::CompleteTestType::unbounded_sequence_struct_field() const -{ - return m_unbounded_sequence_struct_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_struct_field - * @return Reference to member unbounded_sequence_struct_field - */ -std::vector& eprosima::test::CompleteTestType::unbounded_sequence_struct_field() -{ - return m_unbounded_sequence_struct_field; -} - - -size_t eprosima::test::CompleteTestType::getKeyMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_test_CompleteTestType_max_key_cdr_typesize; -} - -bool eprosima::test::CompleteTestType::isKeyDefined() -{ - return false; -} - -void eprosima::test::CompleteTestType::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - - -eprosima::test::KeyedCompleteTestType::KeyedCompleteTestType() -{ - // long m_id - m_id = 0; - // char m_char_field - m_char_field = 0; - // octet m_uint8_field - m_uint8_field = 0; - // short m_int16_field - m_int16_field = 0; - // unsigned short m_uint16_field - m_uint16_field = 0; - // long m_int32_field - m_int32_field = 0; - // unsigned long m_uint32_field - m_uint32_field = 0; - // long long m_int64_field - m_int64_field = 0; - // unsigned long long m_uint64_field - m_uint64_field = 0; - // float m_float_field - m_float_field = 0.0; - // double m_double_field - m_double_field = 0.0; - // boolean m_bool_field - m_bool_field = false; - // string m_string_field - m_string_field =""; - // eprosima::test::Color m_enum_field - m_enum_field = eprosima::test::RED; - // eprosima::test::Material m_enum2_field - m_enum2_field = eprosima::test::WOOD; - // eprosima::test::StructType m_struct_field - - // char m_array_char_field - memset(&m_array_char_field, 0, (3) * 1); - // octet m_array_uint8_field - memset(&m_array_uint8_field, 0, (3) * 1); - // short m_array_int16_field - memset(&m_array_int16_field, 0, (3) * 2); - // unsigned short m_array_uint16_field - memset(&m_array_uint16_field, 0, (3) * 2); - // long m_array_int32_field - memset(&m_array_int32_field, 0, (3) * 4); - // unsigned long m_array_uint32_field - memset(&m_array_uint32_field, 0, (3) * 4); - // long long m_array_int64_field - memset(&m_array_int64_field, 0, (3) * 8); - // unsigned long long m_array_uint64_field - memset(&m_array_uint64_field, 0, (3) * 8); - // float m_array_float_field - memset(&m_array_float_field, 0, (3) * 4); - // double m_array_double_field - memset(&m_array_double_field, 0, (3) * 8); - // boolean m_array_bool_field - memset(&m_array_bool_field, 0, (3) * 1); - // eprosima::test::Color m_array_enum_field - memset(&m_array_enum_field, 0, (3) * 4); - // eprosima::test::Material m_array_enum2_field - memset(&m_array_enum2_field, 0, (3) * 4); - // eprosima::test::StructType m_array_struct_field - - // sequence m_bounded_sequence_char_field - - // sequence m_bounded_sequence_uint8_field - - // sequence m_bounded_sequence_int16_field - - // sequence m_bounded_sequence_uint16_field - - // sequence m_bounded_sequence_int32_field - - // sequence m_bounded_sequence_uint32_field - - // sequence m_bounded_sequence_int64_field - - // sequence m_bounded_sequence_uint64_field - - // sequence m_bounded_sequence_float_field - - // sequence m_bounded_sequence_double_field - - // sequence m_bounded_sequence_bool_field - - // sequence m_bounded_sequence_enum_field - - // sequence m_bounded_sequence_enum2_field - - // sequence m_bounded_sequence_struct_field - - // sequence m_unbounded_sequence_char_field - - // sequence m_unbounded_sequence_uint8_field - - // sequence m_unbounded_sequence_int16_field - - // sequence m_unbounded_sequence_uint16_field - - // sequence m_unbounded_sequence_int32_field - - // sequence m_unbounded_sequence_uint32_field - - // sequence m_unbounded_sequence_int64_field - - // sequence m_unbounded_sequence_uint64_field - - // sequence m_unbounded_sequence_float_field - - // sequence m_unbounded_sequence_double_field - - // sequence m_unbounded_sequence_bool_field - - // sequence m_unbounded_sequence_enum_field - - // sequence m_unbounded_sequence_enum2_field - - // sequence m_unbounded_sequence_struct_field - - -} - -eprosima::test::KeyedCompleteTestType::~KeyedCompleteTestType() -{ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -eprosima::test::KeyedCompleteTestType::KeyedCompleteTestType( - const KeyedCompleteTestType& x) -{ - m_id = x.m_id; - m_char_field = x.m_char_field; - m_uint8_field = x.m_uint8_field; - m_int16_field = x.m_int16_field; - m_uint16_field = x.m_uint16_field; - m_int32_field = x.m_int32_field; - m_uint32_field = x.m_uint32_field; - m_int64_field = x.m_int64_field; - m_uint64_field = x.m_uint64_field; - m_float_field = x.m_float_field; - m_double_field = x.m_double_field; - m_bool_field = x.m_bool_field; - m_string_field = x.m_string_field; - m_enum_field = x.m_enum_field; - m_enum2_field = x.m_enum2_field; - m_struct_field = x.m_struct_field; - m_array_char_field = x.m_array_char_field; - m_array_uint8_field = x.m_array_uint8_field; - m_array_int16_field = x.m_array_int16_field; - m_array_uint16_field = x.m_array_uint16_field; - m_array_int32_field = x.m_array_int32_field; - m_array_uint32_field = x.m_array_uint32_field; - m_array_int64_field = x.m_array_int64_field; - m_array_uint64_field = x.m_array_uint64_field; - m_array_float_field = x.m_array_float_field; - m_array_double_field = x.m_array_double_field; - m_array_bool_field = x.m_array_bool_field; - m_array_enum_field = x.m_array_enum_field; - m_array_enum2_field = x.m_array_enum2_field; - m_array_struct_field = x.m_array_struct_field; - m_bounded_sequence_char_field = x.m_bounded_sequence_char_field; - m_bounded_sequence_uint8_field = x.m_bounded_sequence_uint8_field; - m_bounded_sequence_int16_field = x.m_bounded_sequence_int16_field; - m_bounded_sequence_uint16_field = x.m_bounded_sequence_uint16_field; - m_bounded_sequence_int32_field = x.m_bounded_sequence_int32_field; - m_bounded_sequence_uint32_field = x.m_bounded_sequence_uint32_field; - m_bounded_sequence_int64_field = x.m_bounded_sequence_int64_field; - m_bounded_sequence_uint64_field = x.m_bounded_sequence_uint64_field; - m_bounded_sequence_float_field = x.m_bounded_sequence_float_field; - m_bounded_sequence_double_field = x.m_bounded_sequence_double_field; - m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; - m_bounded_sequence_enum_field = x.m_bounded_sequence_enum_field; - m_bounded_sequence_enum2_field = x.m_bounded_sequence_enum2_field; - m_bounded_sequence_struct_field = x.m_bounded_sequence_struct_field; - m_unbounded_sequence_char_field = x.m_unbounded_sequence_char_field; - m_unbounded_sequence_uint8_field = x.m_unbounded_sequence_uint8_field; - m_unbounded_sequence_int16_field = x.m_unbounded_sequence_int16_field; - m_unbounded_sequence_uint16_field = x.m_unbounded_sequence_uint16_field; - m_unbounded_sequence_int32_field = x.m_unbounded_sequence_int32_field; - m_unbounded_sequence_uint32_field = x.m_unbounded_sequence_uint32_field; - m_unbounded_sequence_int64_field = x.m_unbounded_sequence_int64_field; - m_unbounded_sequence_uint64_field = x.m_unbounded_sequence_uint64_field; - m_unbounded_sequence_float_field = x.m_unbounded_sequence_float_field; - m_unbounded_sequence_double_field = x.m_unbounded_sequence_double_field; - m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; - m_unbounded_sequence_enum_field = x.m_unbounded_sequence_enum_field; - m_unbounded_sequence_enum2_field = x.m_unbounded_sequence_enum2_field; - m_unbounded_sequence_struct_field = x.m_unbounded_sequence_struct_field; -} - -eprosima::test::KeyedCompleteTestType::KeyedCompleteTestType( - KeyedCompleteTestType&& x) noexcept -{ - m_id = x.m_id; - m_char_field = x.m_char_field; - m_uint8_field = x.m_uint8_field; - m_int16_field = x.m_int16_field; - m_uint16_field = x.m_uint16_field; - m_int32_field = x.m_int32_field; - m_uint32_field = x.m_uint32_field; - m_int64_field = x.m_int64_field; - m_uint64_field = x.m_uint64_field; - m_float_field = x.m_float_field; - m_double_field = x.m_double_field; - m_bool_field = x.m_bool_field; - m_string_field = std::move(x.m_string_field); - m_enum_field = x.m_enum_field; - m_enum2_field = x.m_enum2_field; - m_struct_field = std::move(x.m_struct_field); - m_array_char_field = std::move(x.m_array_char_field); - m_array_uint8_field = std::move(x.m_array_uint8_field); - m_array_int16_field = std::move(x.m_array_int16_field); - m_array_uint16_field = std::move(x.m_array_uint16_field); - m_array_int32_field = std::move(x.m_array_int32_field); - m_array_uint32_field = std::move(x.m_array_uint32_field); - m_array_int64_field = std::move(x.m_array_int64_field); - m_array_uint64_field = std::move(x.m_array_uint64_field); - m_array_float_field = std::move(x.m_array_float_field); - m_array_double_field = std::move(x.m_array_double_field); - m_array_bool_field = std::move(x.m_array_bool_field); - m_array_enum_field = std::move(x.m_array_enum_field); - m_array_enum2_field = std::move(x.m_array_enum2_field); - m_array_struct_field = std::move(x.m_array_struct_field); - m_bounded_sequence_char_field = std::move(x.m_bounded_sequence_char_field); - m_bounded_sequence_uint8_field = std::move(x.m_bounded_sequence_uint8_field); - m_bounded_sequence_int16_field = std::move(x.m_bounded_sequence_int16_field); - m_bounded_sequence_uint16_field = std::move(x.m_bounded_sequence_uint16_field); - m_bounded_sequence_int32_field = std::move(x.m_bounded_sequence_int32_field); - m_bounded_sequence_uint32_field = std::move(x.m_bounded_sequence_uint32_field); - m_bounded_sequence_int64_field = std::move(x.m_bounded_sequence_int64_field); - m_bounded_sequence_uint64_field = std::move(x.m_bounded_sequence_uint64_field); - m_bounded_sequence_float_field = std::move(x.m_bounded_sequence_float_field); - m_bounded_sequence_double_field = std::move(x.m_bounded_sequence_double_field); - m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); - m_bounded_sequence_enum_field = std::move(x.m_bounded_sequence_enum_field); - m_bounded_sequence_enum2_field = std::move(x.m_bounded_sequence_enum2_field); - m_bounded_sequence_struct_field = std::move(x.m_bounded_sequence_struct_field); - m_unbounded_sequence_char_field = std::move(x.m_unbounded_sequence_char_field); - m_unbounded_sequence_uint8_field = std::move(x.m_unbounded_sequence_uint8_field); - m_unbounded_sequence_int16_field = std::move(x.m_unbounded_sequence_int16_field); - m_unbounded_sequence_uint16_field = std::move(x.m_unbounded_sequence_uint16_field); - m_unbounded_sequence_int32_field = std::move(x.m_unbounded_sequence_int32_field); - m_unbounded_sequence_uint32_field = std::move(x.m_unbounded_sequence_uint32_field); - m_unbounded_sequence_int64_field = std::move(x.m_unbounded_sequence_int64_field); - m_unbounded_sequence_uint64_field = std::move(x.m_unbounded_sequence_uint64_field); - m_unbounded_sequence_float_field = std::move(x.m_unbounded_sequence_float_field); - m_unbounded_sequence_double_field = std::move(x.m_unbounded_sequence_double_field); - m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); - m_unbounded_sequence_enum_field = std::move(x.m_unbounded_sequence_enum_field); - m_unbounded_sequence_enum2_field = std::move(x.m_unbounded_sequence_enum2_field); - m_unbounded_sequence_struct_field = std::move(x.m_unbounded_sequence_struct_field); + */ +void eprosima::test::CompleteTestType::unbounded_sequence_struct_field( + std::vector&& _unbounded_sequence_struct_field) +{ + m_unbounded_sequence_struct_field = std::move(_unbounded_sequence_struct_field); } -eprosima::test::KeyedCompleteTestType& eprosima::test::KeyedCompleteTestType::operator =( - const KeyedCompleteTestType& x) +/*! + * @brief This function returns a constant reference to member unbounded_sequence_struct_field + * @return Constant reference to member unbounded_sequence_struct_field + */ +const std::vector& eprosima::test::CompleteTestType::unbounded_sequence_struct_field() const +{ + return m_unbounded_sequence_struct_field; +} + +/*! + * @brief This function returns a reference to member unbounded_sequence_struct_field + * @return Reference to member unbounded_sequence_struct_field + */ +std::vector& eprosima::test::CompleteTestType::unbounded_sequence_struct_field() +{ + return m_unbounded_sequence_struct_field; +} + + +eprosima::test::KeyedCompleteTestType::KeyedCompleteTestType() +{ + +} + +eprosima::test::KeyedCompleteTestType::~KeyedCompleteTestType() { +} +eprosima::test::KeyedCompleteTestType::KeyedCompleteTestType( + const KeyedCompleteTestType& x) +{ m_id = x.m_id; m_char_field = x.m_char_field; m_uint8_field = x.m_uint8_field; @@ -4100,14 +3064,11 @@ eprosima::test::KeyedCompleteTestType& eprosima::test::KeyedCompleteTestType::op m_unbounded_sequence_enum_field = x.m_unbounded_sequence_enum_field; m_unbounded_sequence_enum2_field = x.m_unbounded_sequence_enum2_field; m_unbounded_sequence_struct_field = x.m_unbounded_sequence_struct_field; - - return *this; } -eprosima::test::KeyedCompleteTestType& eprosima::test::KeyedCompleteTestType::operator =( +eprosima::test::KeyedCompleteTestType::KeyedCompleteTestType( KeyedCompleteTestType&& x) noexcept { - m_id = x.m_id; m_char_field = x.m_char_field; m_uint8_field = x.m_uint8_field; @@ -4152,581 +3113,221 @@ eprosima::test::KeyedCompleteTestType& eprosima::test::KeyedCompleteTestType::op m_bounded_sequence_enum_field = std::move(x.m_bounded_sequence_enum_field); m_bounded_sequence_enum2_field = std::move(x.m_bounded_sequence_enum2_field); m_bounded_sequence_struct_field = std::move(x.m_bounded_sequence_struct_field); - m_unbounded_sequence_char_field = std::move(x.m_unbounded_sequence_char_field); - m_unbounded_sequence_uint8_field = std::move(x.m_unbounded_sequence_uint8_field); - m_unbounded_sequence_int16_field = std::move(x.m_unbounded_sequence_int16_field); - m_unbounded_sequence_uint16_field = std::move(x.m_unbounded_sequence_uint16_field); - m_unbounded_sequence_int32_field = std::move(x.m_unbounded_sequence_int32_field); - m_unbounded_sequence_uint32_field = std::move(x.m_unbounded_sequence_uint32_field); - m_unbounded_sequence_int64_field = std::move(x.m_unbounded_sequence_int64_field); - m_unbounded_sequence_uint64_field = std::move(x.m_unbounded_sequence_uint64_field); - m_unbounded_sequence_float_field = std::move(x.m_unbounded_sequence_float_field); - m_unbounded_sequence_double_field = std::move(x.m_unbounded_sequence_double_field); - m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); - m_unbounded_sequence_enum_field = std::move(x.m_unbounded_sequence_enum_field); - m_unbounded_sequence_enum2_field = std::move(x.m_unbounded_sequence_enum2_field); - m_unbounded_sequence_struct_field = std::move(x.m_unbounded_sequence_struct_field); - - return *this; -} - -bool eprosima::test::KeyedCompleteTestType::operator ==( - const KeyedCompleteTestType& x) const -{ - - return (m_id == x.m_id && m_char_field == x.m_char_field && m_uint8_field == x.m_uint8_field && m_int16_field == x.m_int16_field && m_uint16_field == x.m_uint16_field && m_int32_field == x.m_int32_field && m_uint32_field == x.m_uint32_field && m_int64_field == x.m_int64_field && m_uint64_field == x.m_uint64_field && m_float_field == x.m_float_field && m_double_field == x.m_double_field && m_bool_field == x.m_bool_field && m_string_field == x.m_string_field && m_enum_field == x.m_enum_field && m_enum2_field == x.m_enum2_field && m_struct_field == x.m_struct_field && m_array_char_field == x.m_array_char_field && m_array_uint8_field == x.m_array_uint8_field && m_array_int16_field == x.m_array_int16_field && m_array_uint16_field == x.m_array_uint16_field && m_array_int32_field == x.m_array_int32_field && m_array_uint32_field == x.m_array_uint32_field && m_array_int64_field == x.m_array_int64_field && m_array_uint64_field == x.m_array_uint64_field && m_array_float_field == x.m_array_float_field && m_array_double_field == x.m_array_double_field && m_array_bool_field == x.m_array_bool_field && m_array_enum_field == x.m_array_enum_field && m_array_enum2_field == x.m_array_enum2_field && m_array_struct_field == x.m_array_struct_field && m_bounded_sequence_char_field == x.m_bounded_sequence_char_field && m_bounded_sequence_uint8_field == x.m_bounded_sequence_uint8_field && m_bounded_sequence_int16_field == x.m_bounded_sequence_int16_field && m_bounded_sequence_uint16_field == x.m_bounded_sequence_uint16_field && m_bounded_sequence_int32_field == x.m_bounded_sequence_int32_field && m_bounded_sequence_uint32_field == x.m_bounded_sequence_uint32_field && m_bounded_sequence_int64_field == x.m_bounded_sequence_int64_field && m_bounded_sequence_uint64_field == x.m_bounded_sequence_uint64_field && m_bounded_sequence_float_field == x.m_bounded_sequence_float_field && m_bounded_sequence_double_field == x.m_bounded_sequence_double_field && m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && m_bounded_sequence_enum_field == x.m_bounded_sequence_enum_field && m_bounded_sequence_enum2_field == x.m_bounded_sequence_enum2_field && m_bounded_sequence_struct_field == x.m_bounded_sequence_struct_field && m_unbounded_sequence_char_field == x.m_unbounded_sequence_char_field && m_unbounded_sequence_uint8_field == x.m_unbounded_sequence_uint8_field && m_unbounded_sequence_int16_field == x.m_unbounded_sequence_int16_field && m_unbounded_sequence_uint16_field == x.m_unbounded_sequence_uint16_field && m_unbounded_sequence_int32_field == x.m_unbounded_sequence_int32_field && m_unbounded_sequence_uint32_field == x.m_unbounded_sequence_uint32_field && m_unbounded_sequence_int64_field == x.m_unbounded_sequence_int64_field && m_unbounded_sequence_uint64_field == x.m_unbounded_sequence_uint64_field && m_unbounded_sequence_float_field == x.m_unbounded_sequence_float_field && m_unbounded_sequence_double_field == x.m_unbounded_sequence_double_field && m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && m_unbounded_sequence_enum_field == x.m_unbounded_sequence_enum_field && m_unbounded_sequence_enum2_field == x.m_unbounded_sequence_enum2_field && m_unbounded_sequence_struct_field == x.m_unbounded_sequence_struct_field); -} - -bool eprosima::test::KeyedCompleteTestType::operator !=( - const KeyedCompleteTestType& x) const -{ - return !(*this == x); -} - -size_t eprosima::test::KeyedCompleteTestType::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_test_KeyedCompleteTestType_max_cdr_typesize; -} - -size_t eprosima::test::KeyedCompleteTestType::getCdrSerializedSize( - const eprosima::test::KeyedCompleteTestType& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.string_field().size() + 1; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += eprosima::test::StructType::getCdrSerializedSize(data.struct_field(), current_alignment); - current_alignment += ((3) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += ((3) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += ((3) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - current_alignment += ((3) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - current_alignment += ((3) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - current_alignment += ((3) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += ((3) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.array_struct_field().size(); ++a) - { - current_alignment += eprosima::test::StructType::getCdrSerializedSize(data.array_struct_field().at(a), current_alignment); - } - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_char_field().size() > 0) - { - current_alignment += (data.bounded_sequence_char_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint8_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint8_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_int16_field().size() > 0) - { - current_alignment += (data.bounded_sequence_int16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint16_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_int32_field().size() > 0) - { - current_alignment += (data.bounded_sequence_int32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint32_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_int64_field().size() > 0) - { - current_alignment += (data.bounded_sequence_int64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_uint64_field().size() > 0) - { - current_alignment += (data.bounded_sequence_uint64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_float_field().size() > 0) - { - current_alignment += (data.bounded_sequence_float_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_double_field().size() > 0) - { - current_alignment += (data.bounded_sequence_double_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_bool_field().size() > 0) - { - current_alignment += (data.bounded_sequence_bool_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_enum_field().size() > 0) - { - current_alignment += (data.bounded_sequence_enum_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.bounded_sequence_enum2_field().size() > 0) - { - current_alignment += (data.bounded_sequence_enum2_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.bounded_sequence_struct_field().size(); ++a) - { - current_alignment += eprosima::test::StructType::getCdrSerializedSize(data.bounded_sequence_struct_field().at(a), current_alignment);} - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_char_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_char_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint8_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint8_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_int16_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_int16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint16_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint16_field().size() * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_int32_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_int32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint32_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint32_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_int64_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_int64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_uint64_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_uint64_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_float_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_float_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_double_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_double_field().size() * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_bool_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_bool_field().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_enum_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_enum_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.unbounded_sequence_enum2_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_enum2_field().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.unbounded_sequence_struct_field().size(); ++a) - { - current_alignment += eprosima::test::StructType::getCdrSerializedSize(data.unbounded_sequence_struct_field().at(a), current_alignment);} - - - return current_alignment - initial_alignment; -} - -void eprosima::test::KeyedCompleteTestType::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - - scdr << m_id; - scdr << m_char_field; - scdr << m_uint8_field; - scdr << m_int16_field; - scdr << m_uint16_field; - scdr << m_int32_field; - scdr << m_uint32_field; - scdr << m_int64_field; - scdr << m_uint64_field; - scdr << m_float_field; - scdr << m_double_field; - scdr << m_bool_field; - scdr << m_string_field.c_str(); - scdr << (uint32_t)m_enum_field; - scdr << (uint32_t)m_enum2_field; - scdr << m_struct_field; - scdr << m_array_char_field; - - scdr << m_array_uint8_field; - - scdr << m_array_int16_field; - - scdr << m_array_uint16_field; - - scdr << m_array_int32_field; - - scdr << m_array_uint32_field; - - scdr << m_array_int64_field; - - scdr << m_array_uint64_field; - - scdr << m_array_float_field; - - scdr << m_array_double_field; - - scdr << m_array_bool_field; - - scdr.serializeArray(reinterpret_cast(m_array_enum_field.data()), m_array_enum_field.size()); - - - scdr.serializeArray(reinterpret_cast(m_array_enum2_field.data()), m_array_enum2_field.size()); - - - scdr << m_array_struct_field; - - scdr << m_bounded_sequence_char_field; - scdr << m_bounded_sequence_uint8_field; - scdr << m_bounded_sequence_int16_field; - scdr << m_bounded_sequence_uint16_field; - scdr << m_bounded_sequence_int32_field; - scdr << m_bounded_sequence_uint32_field; - scdr << m_bounded_sequence_int64_field; - scdr << m_bounded_sequence_uint64_field; - scdr << m_bounded_sequence_float_field; - scdr << m_bounded_sequence_double_field; - scdr << m_bounded_sequence_bool_field; - scdr << static_cast(m_bounded_sequence_enum_field.size()); - scdr.serializeArray(reinterpret_cast(m_bounded_sequence_enum_field.data()), m_bounded_sequence_enum_field.size()); - - scdr << static_cast(m_bounded_sequence_enum2_field.size()); - scdr.serializeArray(reinterpret_cast(m_bounded_sequence_enum2_field.data()), m_bounded_sequence_enum2_field.size()); - - scdr << m_bounded_sequence_struct_field; - scdr << m_unbounded_sequence_char_field; - scdr << m_unbounded_sequence_uint8_field; - scdr << m_unbounded_sequence_int16_field; - scdr << m_unbounded_sequence_uint16_field; - scdr << m_unbounded_sequence_int32_field; - scdr << m_unbounded_sequence_uint32_field; - scdr << m_unbounded_sequence_int64_field; - scdr << m_unbounded_sequence_uint64_field; - scdr << m_unbounded_sequence_float_field; - scdr << m_unbounded_sequence_double_field; - scdr << m_unbounded_sequence_bool_field; - scdr << static_cast(m_unbounded_sequence_enum_field.size()); - scdr.serializeArray(reinterpret_cast(m_unbounded_sequence_enum_field.data()), m_unbounded_sequence_enum_field.size()); - - scdr << static_cast(m_unbounded_sequence_enum2_field.size()); - scdr.serializeArray(reinterpret_cast(m_unbounded_sequence_enum2_field.data()), m_unbounded_sequence_enum2_field.size()); - - scdr << m_unbounded_sequence_struct_field; - + m_unbounded_sequence_char_field = std::move(x.m_unbounded_sequence_char_field); + m_unbounded_sequence_uint8_field = std::move(x.m_unbounded_sequence_uint8_field); + m_unbounded_sequence_int16_field = std::move(x.m_unbounded_sequence_int16_field); + m_unbounded_sequence_uint16_field = std::move(x.m_unbounded_sequence_uint16_field); + m_unbounded_sequence_int32_field = std::move(x.m_unbounded_sequence_int32_field); + m_unbounded_sequence_uint32_field = std::move(x.m_unbounded_sequence_uint32_field); + m_unbounded_sequence_int64_field = std::move(x.m_unbounded_sequence_int64_field); + m_unbounded_sequence_uint64_field = std::move(x.m_unbounded_sequence_uint64_field); + m_unbounded_sequence_float_field = std::move(x.m_unbounded_sequence_float_field); + m_unbounded_sequence_double_field = std::move(x.m_unbounded_sequence_double_field); + m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); + m_unbounded_sequence_enum_field = std::move(x.m_unbounded_sequence_enum_field); + m_unbounded_sequence_enum2_field = std::move(x.m_unbounded_sequence_enum2_field); + m_unbounded_sequence_struct_field = std::move(x.m_unbounded_sequence_struct_field); } -void eprosima::test::KeyedCompleteTestType::deserialize( - eprosima::fastcdr::Cdr& dcdr) +eprosima::test::KeyedCompleteTestType& eprosima::test::KeyedCompleteTestType::operator =( + const KeyedCompleteTestType& x) { - dcdr >> m_id; - dcdr >> m_char_field; - dcdr >> m_uint8_field; - dcdr >> m_int16_field; - dcdr >> m_uint16_field; - dcdr >> m_int32_field; - dcdr >> m_uint32_field; - dcdr >> m_int64_field; - dcdr >> m_uint64_field; - dcdr >> m_float_field; - dcdr >> m_double_field; - dcdr >> m_bool_field; - dcdr >> m_string_field; - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum_field = (eprosima::test::Color)enum_value; - } - - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_enum2_field = (eprosima::test::Material)enum_value; - } - - dcdr >> m_struct_field; - dcdr >> m_array_char_field; - - dcdr >> m_array_uint8_field; - - dcdr >> m_array_int16_field; - - dcdr >> m_array_uint16_field; - - dcdr >> m_array_int32_field; - - dcdr >> m_array_uint32_field; + m_id = x.m_id; + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = x.m_string_field; + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + m_struct_field = x.m_struct_field; + m_array_char_field = x.m_array_char_field; + m_array_uint8_field = x.m_array_uint8_field; + m_array_int16_field = x.m_array_int16_field; + m_array_uint16_field = x.m_array_uint16_field; + m_array_int32_field = x.m_array_int32_field; + m_array_uint32_field = x.m_array_uint32_field; + m_array_int64_field = x.m_array_int64_field; + m_array_uint64_field = x.m_array_uint64_field; + m_array_float_field = x.m_array_float_field; + m_array_double_field = x.m_array_double_field; + m_array_bool_field = x.m_array_bool_field; + m_array_enum_field = x.m_array_enum_field; + m_array_enum2_field = x.m_array_enum2_field; + m_array_struct_field = x.m_array_struct_field; + m_bounded_sequence_char_field = x.m_bounded_sequence_char_field; + m_bounded_sequence_uint8_field = x.m_bounded_sequence_uint8_field; + m_bounded_sequence_int16_field = x.m_bounded_sequence_int16_field; + m_bounded_sequence_uint16_field = x.m_bounded_sequence_uint16_field; + m_bounded_sequence_int32_field = x.m_bounded_sequence_int32_field; + m_bounded_sequence_uint32_field = x.m_bounded_sequence_uint32_field; + m_bounded_sequence_int64_field = x.m_bounded_sequence_int64_field; + m_bounded_sequence_uint64_field = x.m_bounded_sequence_uint64_field; + m_bounded_sequence_float_field = x.m_bounded_sequence_float_field; + m_bounded_sequence_double_field = x.m_bounded_sequence_double_field; + m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; + m_bounded_sequence_enum_field = x.m_bounded_sequence_enum_field; + m_bounded_sequence_enum2_field = x.m_bounded_sequence_enum2_field; + m_bounded_sequence_struct_field = x.m_bounded_sequence_struct_field; + m_unbounded_sequence_char_field = x.m_unbounded_sequence_char_field; + m_unbounded_sequence_uint8_field = x.m_unbounded_sequence_uint8_field; + m_unbounded_sequence_int16_field = x.m_unbounded_sequence_int16_field; + m_unbounded_sequence_uint16_field = x.m_unbounded_sequence_uint16_field; + m_unbounded_sequence_int32_field = x.m_unbounded_sequence_int32_field; + m_unbounded_sequence_uint32_field = x.m_unbounded_sequence_uint32_field; + m_unbounded_sequence_int64_field = x.m_unbounded_sequence_int64_field; + m_unbounded_sequence_uint64_field = x.m_unbounded_sequence_uint64_field; + m_unbounded_sequence_float_field = x.m_unbounded_sequence_float_field; + m_unbounded_sequence_double_field = x.m_unbounded_sequence_double_field; + m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; + m_unbounded_sequence_enum_field = x.m_unbounded_sequence_enum_field; + m_unbounded_sequence_enum2_field = x.m_unbounded_sequence_enum2_field; + m_unbounded_sequence_struct_field = x.m_unbounded_sequence_struct_field; - dcdr >> m_array_int64_field; + return *this; +} - dcdr >> m_array_uint64_field; +eprosima::test::KeyedCompleteTestType& eprosima::test::KeyedCompleteTestType::operator =( + KeyedCompleteTestType&& x) noexcept +{ - dcdr >> m_array_float_field; + m_id = x.m_id; + m_char_field = x.m_char_field; + m_uint8_field = x.m_uint8_field; + m_int16_field = x.m_int16_field; + m_uint16_field = x.m_uint16_field; + m_int32_field = x.m_int32_field; + m_uint32_field = x.m_uint32_field; + m_int64_field = x.m_int64_field; + m_uint64_field = x.m_uint64_field; + m_float_field = x.m_float_field; + m_double_field = x.m_double_field; + m_bool_field = x.m_bool_field; + m_string_field = std::move(x.m_string_field); + m_enum_field = x.m_enum_field; + m_enum2_field = x.m_enum2_field; + m_struct_field = std::move(x.m_struct_field); + m_array_char_field = std::move(x.m_array_char_field); + m_array_uint8_field = std::move(x.m_array_uint8_field); + m_array_int16_field = std::move(x.m_array_int16_field); + m_array_uint16_field = std::move(x.m_array_uint16_field); + m_array_int32_field = std::move(x.m_array_int32_field); + m_array_uint32_field = std::move(x.m_array_uint32_field); + m_array_int64_field = std::move(x.m_array_int64_field); + m_array_uint64_field = std::move(x.m_array_uint64_field); + m_array_float_field = std::move(x.m_array_float_field); + m_array_double_field = std::move(x.m_array_double_field); + m_array_bool_field = std::move(x.m_array_bool_field); + m_array_enum_field = std::move(x.m_array_enum_field); + m_array_enum2_field = std::move(x.m_array_enum2_field); + m_array_struct_field = std::move(x.m_array_struct_field); + m_bounded_sequence_char_field = std::move(x.m_bounded_sequence_char_field); + m_bounded_sequence_uint8_field = std::move(x.m_bounded_sequence_uint8_field); + m_bounded_sequence_int16_field = std::move(x.m_bounded_sequence_int16_field); + m_bounded_sequence_uint16_field = std::move(x.m_bounded_sequence_uint16_field); + m_bounded_sequence_int32_field = std::move(x.m_bounded_sequence_int32_field); + m_bounded_sequence_uint32_field = std::move(x.m_bounded_sequence_uint32_field); + m_bounded_sequence_int64_field = std::move(x.m_bounded_sequence_int64_field); + m_bounded_sequence_uint64_field = std::move(x.m_bounded_sequence_uint64_field); + m_bounded_sequence_float_field = std::move(x.m_bounded_sequence_float_field); + m_bounded_sequence_double_field = std::move(x.m_bounded_sequence_double_field); + m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); + m_bounded_sequence_enum_field = std::move(x.m_bounded_sequence_enum_field); + m_bounded_sequence_enum2_field = std::move(x.m_bounded_sequence_enum2_field); + m_bounded_sequence_struct_field = std::move(x.m_bounded_sequence_struct_field); + m_unbounded_sequence_char_field = std::move(x.m_unbounded_sequence_char_field); + m_unbounded_sequence_uint8_field = std::move(x.m_unbounded_sequence_uint8_field); + m_unbounded_sequence_int16_field = std::move(x.m_unbounded_sequence_int16_field); + m_unbounded_sequence_uint16_field = std::move(x.m_unbounded_sequence_uint16_field); + m_unbounded_sequence_int32_field = std::move(x.m_unbounded_sequence_int32_field); + m_unbounded_sequence_uint32_field = std::move(x.m_unbounded_sequence_uint32_field); + m_unbounded_sequence_int64_field = std::move(x.m_unbounded_sequence_int64_field); + m_unbounded_sequence_uint64_field = std::move(x.m_unbounded_sequence_uint64_field); + m_unbounded_sequence_float_field = std::move(x.m_unbounded_sequence_float_field); + m_unbounded_sequence_double_field = std::move(x.m_unbounded_sequence_double_field); + m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); + m_unbounded_sequence_enum_field = std::move(x.m_unbounded_sequence_enum_field); + m_unbounded_sequence_enum2_field = std::move(x.m_unbounded_sequence_enum2_field); + m_unbounded_sequence_struct_field = std::move(x.m_unbounded_sequence_struct_field); - dcdr >> m_array_double_field; + return *this; +} - dcdr >> m_array_bool_field; - - dcdr.deserializeArray(reinterpret_cast(m_array_enum_field.data()), m_array_enum_field.size()); - - - dcdr.deserializeArray(reinterpret_cast(m_array_enum2_field.data()), m_array_enum2_field.size()); - - - dcdr >> m_array_struct_field; - - dcdr >> m_bounded_sequence_char_field; - dcdr >> m_bounded_sequence_uint8_field; - dcdr >> m_bounded_sequence_int16_field; - dcdr >> m_bounded_sequence_uint16_field; - dcdr >> m_bounded_sequence_int32_field; - dcdr >> m_bounded_sequence_uint32_field; - dcdr >> m_bounded_sequence_int64_field; - dcdr >> m_bounded_sequence_uint64_field; - dcdr >> m_bounded_sequence_float_field; - dcdr >> m_bounded_sequence_double_field; - dcdr >> m_bounded_sequence_bool_field; - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_bounded_sequence_enum_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_bounded_sequence_enum_field.data()), seq_length); - } - - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_bounded_sequence_enum2_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_bounded_sequence_enum2_field.data()), seq_length); - } +bool eprosima::test::KeyedCompleteTestType::operator ==( + const KeyedCompleteTestType& x) const +{ + return (m_id == x.m_id && + m_char_field == x.m_char_field && + m_uint8_field == x.m_uint8_field && + m_int16_field == x.m_int16_field && + m_uint16_field == x.m_uint16_field && + m_int32_field == x.m_int32_field && + m_uint32_field == x.m_uint32_field && + m_int64_field == x.m_int64_field && + m_uint64_field == x.m_uint64_field && + m_float_field == x.m_float_field && + m_double_field == x.m_double_field && + m_bool_field == x.m_bool_field && + m_string_field == x.m_string_field && + m_enum_field == x.m_enum_field && + m_enum2_field == x.m_enum2_field && + m_struct_field == x.m_struct_field && + m_array_char_field == x.m_array_char_field && + m_array_uint8_field == x.m_array_uint8_field && + m_array_int16_field == x.m_array_int16_field && + m_array_uint16_field == x.m_array_uint16_field && + m_array_int32_field == x.m_array_int32_field && + m_array_uint32_field == x.m_array_uint32_field && + m_array_int64_field == x.m_array_int64_field && + m_array_uint64_field == x.m_array_uint64_field && + m_array_float_field == x.m_array_float_field && + m_array_double_field == x.m_array_double_field && + m_array_bool_field == x.m_array_bool_field && + m_array_enum_field == x.m_array_enum_field && + m_array_enum2_field == x.m_array_enum2_field && + m_array_struct_field == x.m_array_struct_field && + m_bounded_sequence_char_field == x.m_bounded_sequence_char_field && + m_bounded_sequence_uint8_field == x.m_bounded_sequence_uint8_field && + m_bounded_sequence_int16_field == x.m_bounded_sequence_int16_field && + m_bounded_sequence_uint16_field == x.m_bounded_sequence_uint16_field && + m_bounded_sequence_int32_field == x.m_bounded_sequence_int32_field && + m_bounded_sequence_uint32_field == x.m_bounded_sequence_uint32_field && + m_bounded_sequence_int64_field == x.m_bounded_sequence_int64_field && + m_bounded_sequence_uint64_field == x.m_bounded_sequence_uint64_field && + m_bounded_sequence_float_field == x.m_bounded_sequence_float_field && + m_bounded_sequence_double_field == x.m_bounded_sequence_double_field && + m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && + m_bounded_sequence_enum_field == x.m_bounded_sequence_enum_field && + m_bounded_sequence_enum2_field == x.m_bounded_sequence_enum2_field && + m_bounded_sequence_struct_field == x.m_bounded_sequence_struct_field && + m_unbounded_sequence_char_field == x.m_unbounded_sequence_char_field && + m_unbounded_sequence_uint8_field == x.m_unbounded_sequence_uint8_field && + m_unbounded_sequence_int16_field == x.m_unbounded_sequence_int16_field && + m_unbounded_sequence_uint16_field == x.m_unbounded_sequence_uint16_field && + m_unbounded_sequence_int32_field == x.m_unbounded_sequence_int32_field && + m_unbounded_sequence_uint32_field == x.m_unbounded_sequence_uint32_field && + m_unbounded_sequence_int64_field == x.m_unbounded_sequence_int64_field && + m_unbounded_sequence_uint64_field == x.m_unbounded_sequence_uint64_field && + m_unbounded_sequence_float_field == x.m_unbounded_sequence_float_field && + m_unbounded_sequence_double_field == x.m_unbounded_sequence_double_field && + m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && + m_unbounded_sequence_enum_field == x.m_unbounded_sequence_enum_field && + m_unbounded_sequence_enum2_field == x.m_unbounded_sequence_enum2_field && + m_unbounded_sequence_struct_field == x.m_unbounded_sequence_struct_field); +} - dcdr >> m_bounded_sequence_struct_field; - dcdr >> m_unbounded_sequence_char_field; - dcdr >> m_unbounded_sequence_uint8_field; - dcdr >> m_unbounded_sequence_int16_field; - dcdr >> m_unbounded_sequence_uint16_field; - dcdr >> m_unbounded_sequence_int32_field; - dcdr >> m_unbounded_sequence_uint32_field; - dcdr >> m_unbounded_sequence_int64_field; - dcdr >> m_unbounded_sequence_uint64_field; - dcdr >> m_unbounded_sequence_float_field; - dcdr >> m_unbounded_sequence_double_field; - dcdr >> m_unbounded_sequence_bool_field; - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_unbounded_sequence_enum_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_unbounded_sequence_enum_field.data()), seq_length); - } - - { - uint32_t seq_length = 0; - dcdr >> seq_length; - m_unbounded_sequence_enum2_field.resize(seq_length); - dcdr.deserializeArray(reinterpret_cast(m_unbounded_sequence_enum2_field.data()), seq_length); - } - - dcdr >> m_unbounded_sequence_struct_field; +bool eprosima::test::KeyedCompleteTestType::operator !=( + const KeyedCompleteTestType& x) const +{ + return !(*this == x); } /*! @@ -4757,6 +3358,7 @@ int32_t& eprosima::test::KeyedCompleteTestType::id() return m_id; } + /*! * @brief This function sets a value in member char_field * @param _char_field New value for member char_field @@ -4785,6 +3387,7 @@ char& eprosima::test::KeyedCompleteTestType::char_field() return m_char_field; } + /*! * @brief This function sets a value in member uint8_field * @param _uint8_field New value for member uint8_field @@ -4813,6 +3416,7 @@ uint8_t& eprosima::test::KeyedCompleteTestType::uint8_field() return m_uint8_field; } + /*! * @brief This function sets a value in member int16_field * @param _int16_field New value for member int16_field @@ -4841,6 +3445,7 @@ int16_t& eprosima::test::KeyedCompleteTestType::int16_field() return m_int16_field; } + /*! * @brief This function sets a value in member uint16_field * @param _uint16_field New value for member uint16_field @@ -4869,6 +3474,7 @@ uint16_t& eprosima::test::KeyedCompleteTestType::uint16_field() return m_uint16_field; } + /*! * @brief This function sets a value in member int32_field * @param _int32_field New value for member int32_field @@ -4897,6 +3503,7 @@ int32_t& eprosima::test::KeyedCompleteTestType::int32_field() return m_int32_field; } + /*! * @brief This function sets a value in member uint32_field * @param _uint32_field New value for member uint32_field @@ -4925,6 +3532,7 @@ uint32_t& eprosima::test::KeyedCompleteTestType::uint32_field() return m_uint32_field; } + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -4953,6 +3561,7 @@ int64_t& eprosima::test::KeyedCompleteTestType::int64_field() return m_int64_field; } + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -4981,6 +3590,7 @@ uint64_t& eprosima::test::KeyedCompleteTestType::uint64_field() return m_uint64_field; } + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -5009,6 +3619,7 @@ float& eprosima::test::KeyedCompleteTestType::float_field() return m_float_field; } + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -5037,6 +3648,7 @@ double& eprosima::test::KeyedCompleteTestType::double_field() return m_double_field; } + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -5065,6 +3677,7 @@ bool& eprosima::test::KeyedCompleteTestType::bool_field() return m_bool_field; } + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -5102,6 +3715,8 @@ std::string& eprosima::test::KeyedCompleteTestType::string_field() { return m_string_field; } + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -5130,6 +3745,7 @@ eprosima::test::Color& eprosima::test::KeyedCompleteTestType::enum_field() return m_enum_field; } + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -5158,6 +3774,7 @@ eprosima::test::Material& eprosima::test::KeyedCompleteTestType::enum2_field() return m_enum2_field; } + /*! * @brief This function copies the value in member struct_field * @param _struct_field New value to be copied in member struct_field @@ -5195,6 +3812,8 @@ eprosima::test::StructType& eprosima::test::KeyedCompleteTestType::struct_field( { return m_struct_field; } + + /*! * @brief This function copies the value in member array_char_field * @param _array_char_field New value to be copied in member array_char_field @@ -5232,6 +3851,8 @@ std::array& eprosima::test::KeyedCompleteTestType::array_char_field() { return m_array_char_field; } + + /*! * @brief This function copies the value in member array_uint8_field * @param _array_uint8_field New value to be copied in member array_uint8_field @@ -5269,6 +3890,8 @@ std::array& eprosima::test::KeyedCompleteTestType::array_uint8_field { return m_array_uint8_field; } + + /*! * @brief This function copies the value in member array_int16_field * @param _array_int16_field New value to be copied in member array_int16_field @@ -5306,6 +3929,8 @@ std::array& eprosima::test::KeyedCompleteTestType::array_int16_field { return m_array_int16_field; } + + /*! * @brief This function copies the value in member array_uint16_field * @param _array_uint16_field New value to be copied in member array_uint16_field @@ -5343,6 +3968,8 @@ std::array& eprosima::test::KeyedCompleteTestType::array_uint16_fie { return m_array_uint16_field; } + + /*! * @brief This function copies the value in member array_int32_field * @param _array_int32_field New value to be copied in member array_int32_field @@ -5380,6 +4007,8 @@ std::array& eprosima::test::KeyedCompleteTestType::array_int32_field { return m_array_int32_field; } + + /*! * @brief This function copies the value in member array_uint32_field * @param _array_uint32_field New value to be copied in member array_uint32_field @@ -5417,6 +4046,8 @@ std::array& eprosima::test::KeyedCompleteTestType::array_uint32_fie { return m_array_uint32_field; } + + /*! * @brief This function copies the value in member array_int64_field * @param _array_int64_field New value to be copied in member array_int64_field @@ -5454,6 +4085,8 @@ std::array& eprosima::test::KeyedCompleteTestType::array_int64_field { return m_array_int64_field; } + + /*! * @brief This function copies the value in member array_uint64_field * @param _array_uint64_field New value to be copied in member array_uint64_field @@ -5491,6 +4124,8 @@ std::array& eprosima::test::KeyedCompleteTestType::array_uint64_fie { return m_array_uint64_field; } + + /*! * @brief This function copies the value in member array_float_field * @param _array_float_field New value to be copied in member array_float_field @@ -5528,6 +4163,8 @@ std::array& eprosima::test::KeyedCompleteTestType::array_float_field() { return m_array_float_field; } + + /*! * @brief This function copies the value in member array_double_field * @param _array_double_field New value to be copied in member array_double_field @@ -5565,6 +4202,8 @@ std::array& eprosima::test::KeyedCompleteTestType::array_double_field { return m_array_double_field; } + + /*! * @brief This function copies the value in member array_bool_field * @param _array_bool_field New value to be copied in member array_bool_field @@ -5602,6 +4241,8 @@ std::array& eprosima::test::KeyedCompleteTestType::array_bool_field() { return m_array_bool_field; } + + /*! * @brief This function copies the value in member array_enum_field * @param _array_enum_field New value to be copied in member array_enum_field @@ -5639,6 +4280,8 @@ std::array& eprosima::test::KeyedCompleteTestType::arr { return m_array_enum_field; } + + /*! * @brief This function copies the value in member array_enum2_field * @param _array_enum2_field New value to be copied in member array_enum2_field @@ -5676,6 +4319,8 @@ std::array& eprosima::test::KeyedCompleteTestType:: { return m_array_enum2_field; } + + /*! * @brief This function copies the value in member array_struct_field * @param _array_struct_field New value to be copied in member array_struct_field @@ -5713,6 +4358,8 @@ std::array& eprosima::test::KeyedCompleteTestType { return m_array_struct_field; } + + /*! * @brief This function copies the value in member bounded_sequence_char_field * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field @@ -5750,6 +4397,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bounded_sequence_char_ { return m_bounded_sequence_char_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint8_field * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field @@ -5787,6 +4436,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bounded_sequence_ui { return m_bounded_sequence_uint8_field; } + + /*! * @brief This function copies the value in member bounded_sequence_int16_field * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field @@ -5824,6 +4475,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bounded_sequence_in { return m_bounded_sequence_int16_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint16_field * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field @@ -5861,6 +4514,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bounded_sequence_u { return m_bounded_sequence_uint16_field; } + + /*! * @brief This function copies the value in member bounded_sequence_int32_field * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field @@ -5898,6 +4553,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bounded_sequence_in { return m_bounded_sequence_int32_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint32_field * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field @@ -5935,6 +4592,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bounded_sequence_u { return m_bounded_sequence_uint32_field; } + + /*! * @brief This function copies the value in member bounded_sequence_int64_field * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field @@ -5972,6 +4631,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bounded_sequence_in { return m_bounded_sequence_int64_field; } + + /*! * @brief This function copies the value in member bounded_sequence_uint64_field * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field @@ -6009,6 +4670,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bounded_sequence_u { return m_bounded_sequence_uint64_field; } + + /*! * @brief This function copies the value in member bounded_sequence_float_field * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field @@ -6046,6 +4709,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bounded_sequence_floa { return m_bounded_sequence_float_field; } + + /*! * @brief This function copies the value in member bounded_sequence_double_field * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field @@ -6083,6 +4748,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bounded_sequence_dou { return m_bounded_sequence_double_field; } + + /*! * @brief This function copies the value in member bounded_sequence_bool_field * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field @@ -6120,6 +4787,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bounded_sequence_bool_ { return m_bounded_sequence_bool_field; } + + /*! * @brief This function copies the value in member bounded_sequence_enum_field * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field @@ -6157,6 +4826,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bound { return m_bounded_sequence_enum_field; } + + /*! * @brief This function copies the value in member bounded_sequence_enum2_field * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field @@ -6194,6 +4865,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::bo { return m_bounded_sequence_enum2_field; } + + /*! * @brief This function copies the value in member bounded_sequence_struct_field * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field @@ -6231,6 +4904,8 @@ std::vector& eprosima::test::KeyedCompleteTestType:: { return m_bounded_sequence_struct_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_char_field * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field @@ -6268,6 +4943,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::unbounded_sequence_cha { return m_unbounded_sequence_char_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint8_field * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field @@ -6305,6 +4982,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::unbounded_sequence_ { return m_unbounded_sequence_uint8_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_int16_field * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field @@ -6342,6 +5021,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::unbounded_sequence_ { return m_unbounded_sequence_int16_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint16_field * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field @@ -6379,6 +5060,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::unbounded_sequence { return m_unbounded_sequence_uint16_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_int32_field * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field @@ -6416,6 +5099,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::unbounded_sequence_ { return m_unbounded_sequence_int32_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint32_field * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field @@ -6453,6 +5138,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::unbounded_sequence { return m_unbounded_sequence_uint32_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_int64_field * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field @@ -6490,6 +5177,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::unbounded_sequence_ { return m_unbounded_sequence_int64_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_uint64_field * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field @@ -6527,6 +5216,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::unbounded_sequence { return m_unbounded_sequence_uint64_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_float_field * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field @@ -6564,6 +5255,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::unbounded_sequence_fl { return m_unbounded_sequence_float_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_double_field * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field @@ -6601,6 +5294,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::unbounded_sequence_d { return m_unbounded_sequence_double_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_bool_field * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field @@ -6638,6 +5333,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::unbounded_sequence_boo { return m_unbounded_sequence_bool_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_enum_field * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field @@ -6675,6 +5372,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::unbou { return m_unbounded_sequence_enum_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_enum2_field * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field @@ -6712,6 +5411,8 @@ std::vector& eprosima::test::KeyedCompleteTestType::un { return m_unbounded_sequence_enum2_field; } + + /*! * @brief This function copies the value in member unbounded_sequence_struct_field * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field @@ -6751,82 +5452,7 @@ std::vector& eprosima::test::KeyedCompleteTestType:: } -size_t eprosima::test::KeyedCompleteTestType::getKeyMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_test_KeyedCompleteTestType_max_key_cdr_typesize; -} - -bool eprosima::test::KeyedCompleteTestType::isKeyDefined() -{ - return true; -} - -void eprosima::test::KeyedCompleteTestType::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - scdr << m_id; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - +// Include auxiliary functions like for serializing/deserializing. +#include "test_modulesCdrAux.ipp" diff --git a/fastdds_python/test/types/test_modules.h b/fastdds_python/test/types/test_modules.h index 94f534df..f76ddcaf 100644 --- a/fastdds_python/test/types/test_modules.h +++ b/fastdds_python/test/types/test_modules.h @@ -16,21 +16,23 @@ * @file test_modules.h * This header file contains the declaration of the described types in the IDL file. * - * This file was generated by the tool gen. + * This file was generated by the tool fastddsgen. */ #ifndef _FAST_DDS_GENERATED_EPROSIMA_TEST_TEST_MODULES_H_ #define _FAST_DDS_GENERATED_EPROSIMA_TEST_TEST_MODULES_H_ - -#include - -#include #include +#include +#include +#include #include #include -#include -#include + +#include +#include + + #if defined(_WIN32) #if defined(EPROSIMA_USER_DLL_EXPORT) @@ -59,10 +61,12 @@ namespace eprosima { namespace fastcdr { class Cdr; +class CdrSizeCalculator; } // namespace fastcdr } // namespace eprosima + namespace eprosima { namespace test { /*! @@ -168,6 +172,7 @@ namespace eprosima { */ eProsima_user_DllExport char& char_field(); + /*! * @brief This function sets a value in member uint8_field * @param _uint8_field New value for member uint8_field @@ -187,6 +192,7 @@ namespace eprosima { */ eProsima_user_DllExport uint8_t& uint8_field(); + /*! * @brief This function sets a value in member int16_field * @param _int16_field New value for member int16_field @@ -206,6 +212,7 @@ namespace eprosima { */ eProsima_user_DllExport int16_t& int16_field(); + /*! * @brief This function sets a value in member uint16_field * @param _uint16_field New value for member uint16_field @@ -225,6 +232,7 @@ namespace eprosima { */ eProsima_user_DllExport uint16_t& uint16_field(); + /*! * @brief This function sets a value in member int32_field * @param _int32_field New value for member int32_field @@ -244,6 +252,7 @@ namespace eprosima { */ eProsima_user_DllExport int32_t& int32_field(); + /*! * @brief This function sets a value in member uint32_field * @param _uint32_field New value for member uint32_field @@ -263,6 +272,7 @@ namespace eprosima { */ eProsima_user_DllExport uint32_t& uint32_field(); + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -282,6 +292,7 @@ namespace eprosima { */ eProsima_user_DllExport int64_t& int64_field(); + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -301,6 +312,7 @@ namespace eprosima { */ eProsima_user_DllExport uint64_t& uint64_field(); + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -320,6 +332,7 @@ namespace eprosima { */ eProsima_user_DllExport float& float_field(); + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -339,6 +352,7 @@ namespace eprosima { */ eProsima_user_DllExport double& double_field(); + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -358,6 +372,7 @@ namespace eprosima { */ eProsima_user_DllExport bool& bool_field(); + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -383,6 +398,8 @@ namespace eprosima { * @return Reference to member string_field */ eProsima_user_DllExport std::string& string_field(); + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -402,6 +419,7 @@ namespace eprosima { */ eProsima_user_DllExport eprosima::test::Color& enum_field(); + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -421,80 +439,22 @@ namespace eprosima { */ eProsima_user_DllExport eprosima::test::Material& enum2_field(); - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize( - const eprosima::test::StructType& data, - size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize( - eprosima::fastcdr::Cdr& cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize( - eprosima::fastcdr::Cdr& cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey( - eprosima::fastcdr::Cdr& cdr) const; - private: - char m_char_field; - uint8_t m_uint8_field; - int16_t m_int16_field; - uint16_t m_uint16_field; - int32_t m_int32_field; - uint32_t m_uint32_field; - int64_t m_int64_field; - uint64_t m_uint64_field; - float m_float_field; - double m_double_field; - bool m_bool_field; + char m_char_field{0}; + uint8_t m_uint8_field{0}; + int16_t m_int16_field{0}; + uint16_t m_uint16_field{0}; + int32_t m_int32_field{0}; + uint32_t m_uint32_field{0}; + int64_t m_int64_field{0}; + uint64_t m_uint64_field{0}; + float m_float_field{0.0}; + double m_double_field{0.0}; + bool m_bool_field{false}; std::string m_string_field; - eprosima::test::Color m_enum_field; - eprosima::test::Material m_enum2_field; + eprosima::test::Color m_enum_field{eprosima::test::RED}; + eprosima::test::Material m_enum2_field{eprosima::test::WOOD}; }; const uint32_t max_array_size = 3; @@ -578,6 +538,7 @@ namespace eprosima { */ eProsima_user_DllExport char& char_field(); + /*! * @brief This function sets a value in member uint8_field * @param _uint8_field New value for member uint8_field @@ -597,6 +558,7 @@ namespace eprosima { */ eProsima_user_DllExport uint8_t& uint8_field(); + /*! * @brief This function sets a value in member int16_field * @param _int16_field New value for member int16_field @@ -616,6 +578,7 @@ namespace eprosima { */ eProsima_user_DllExport int16_t& int16_field(); + /*! * @brief This function sets a value in member uint16_field * @param _uint16_field New value for member uint16_field @@ -635,6 +598,7 @@ namespace eprosima { */ eProsima_user_DllExport uint16_t& uint16_field(); + /*! * @brief This function sets a value in member int32_field * @param _int32_field New value for member int32_field @@ -654,6 +618,7 @@ namespace eprosima { */ eProsima_user_DllExport int32_t& int32_field(); + /*! * @brief This function sets a value in member uint32_field * @param _uint32_field New value for member uint32_field @@ -673,6 +638,7 @@ namespace eprosima { */ eProsima_user_DllExport uint32_t& uint32_field(); + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -692,6 +658,7 @@ namespace eprosima { */ eProsima_user_DllExport int64_t& int64_field(); + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -711,6 +678,7 @@ namespace eprosima { */ eProsima_user_DllExport uint64_t& uint64_field(); + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -730,6 +698,7 @@ namespace eprosima { */ eProsima_user_DllExport float& float_field(); + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -749,6 +718,7 @@ namespace eprosima { */ eProsima_user_DllExport double& double_field(); + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -768,6 +738,7 @@ namespace eprosima { */ eProsima_user_DllExport bool& bool_field(); + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -793,6 +764,8 @@ namespace eprosima { * @return Reference to member string_field */ eProsima_user_DllExport std::string& string_field(); + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -812,6 +785,7 @@ namespace eprosima { */ eProsima_user_DllExport eprosima::test::Color& enum_field(); + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -831,6 +805,7 @@ namespace eprosima { */ eProsima_user_DllExport eprosima::test::Material& enum2_field(); + /*! * @brief This function copies the value in member struct_field * @param _struct_field New value to be copied in member struct_field @@ -856,6 +831,8 @@ namespace eprosima { * @return Reference to member struct_field */ eProsima_user_DllExport eprosima::test::StructType& struct_field(); + + /*! * @brief This function copies the value in member array_char_field * @param _array_char_field New value to be copied in member array_char_field @@ -881,6 +858,8 @@ namespace eprosima { * @return Reference to member array_char_field */ eProsima_user_DllExport std::array& array_char_field(); + + /*! * @brief This function copies the value in member array_uint8_field * @param _array_uint8_field New value to be copied in member array_uint8_field @@ -906,6 +885,8 @@ namespace eprosima { * @return Reference to member array_uint8_field */ eProsima_user_DllExport std::array& array_uint8_field(); + + /*! * @brief This function copies the value in member array_int16_field * @param _array_int16_field New value to be copied in member array_int16_field @@ -931,6 +912,8 @@ namespace eprosima { * @return Reference to member array_int16_field */ eProsima_user_DllExport std::array& array_int16_field(); + + /*! * @brief This function copies the value in member array_uint16_field * @param _array_uint16_field New value to be copied in member array_uint16_field @@ -956,6 +939,8 @@ namespace eprosima { * @return Reference to member array_uint16_field */ eProsima_user_DllExport std::array& array_uint16_field(); + + /*! * @brief This function copies the value in member array_int32_field * @param _array_int32_field New value to be copied in member array_int32_field @@ -981,6 +966,8 @@ namespace eprosima { * @return Reference to member array_int32_field */ eProsima_user_DllExport std::array& array_int32_field(); + + /*! * @brief This function copies the value in member array_uint32_field * @param _array_uint32_field New value to be copied in member array_uint32_field @@ -1006,6 +993,8 @@ namespace eprosima { * @return Reference to member array_uint32_field */ eProsima_user_DllExport std::array& array_uint32_field(); + + /*! * @brief This function copies the value in member array_int64_field * @param _array_int64_field New value to be copied in member array_int64_field @@ -1031,6 +1020,8 @@ namespace eprosima { * @return Reference to member array_int64_field */ eProsima_user_DllExport std::array& array_int64_field(); + + /*! * @brief This function copies the value in member array_uint64_field * @param _array_uint64_field New value to be copied in member array_uint64_field @@ -1056,6 +1047,8 @@ namespace eprosima { * @return Reference to member array_uint64_field */ eProsima_user_DllExport std::array& array_uint64_field(); + + /*! * @brief This function copies the value in member array_float_field * @param _array_float_field New value to be copied in member array_float_field @@ -1081,6 +1074,8 @@ namespace eprosima { * @return Reference to member array_float_field */ eProsima_user_DllExport std::array& array_float_field(); + + /*! * @brief This function copies the value in member array_double_field * @param _array_double_field New value to be copied in member array_double_field @@ -1106,6 +1101,8 @@ namespace eprosima { * @return Reference to member array_double_field */ eProsima_user_DllExport std::array& array_double_field(); + + /*! * @brief This function copies the value in member array_bool_field * @param _array_bool_field New value to be copied in member array_bool_field @@ -1131,6 +1128,8 @@ namespace eprosima { * @return Reference to member array_bool_field */ eProsima_user_DllExport std::array& array_bool_field(); + + /*! * @brief This function copies the value in member array_enum_field * @param _array_enum_field New value to be copied in member array_enum_field @@ -1156,6 +1155,8 @@ namespace eprosima { * @return Reference to member array_enum_field */ eProsima_user_DllExport std::array& array_enum_field(); + + /*! * @brief This function copies the value in member array_enum2_field * @param _array_enum2_field New value to be copied in member array_enum2_field @@ -1181,6 +1182,8 @@ namespace eprosima { * @return Reference to member array_enum2_field */ eProsima_user_DllExport std::array& array_enum2_field(); + + /*! * @brief This function copies the value in member array_struct_field * @param _array_struct_field New value to be copied in member array_struct_field @@ -1206,6 +1209,8 @@ namespace eprosima { * @return Reference to member array_struct_field */ eProsima_user_DllExport std::array& array_struct_field(); + + /*! * @brief This function copies the value in member bounded_sequence_char_field * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field @@ -1231,6 +1236,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_char_field */ eProsima_user_DllExport std::vector& bounded_sequence_char_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint8_field * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field @@ -1256,6 +1263,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_uint8_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint8_field(); + + /*! * @brief This function copies the value in member bounded_sequence_int16_field * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field @@ -1281,6 +1290,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_int16_field */ eProsima_user_DllExport std::vector& bounded_sequence_int16_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint16_field * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field @@ -1306,6 +1317,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_uint16_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint16_field(); + + /*! * @brief This function copies the value in member bounded_sequence_int32_field * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field @@ -1331,6 +1344,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_int32_field */ eProsima_user_DllExport std::vector& bounded_sequence_int32_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint32_field * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field @@ -1356,6 +1371,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_uint32_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint32_field(); + + /*! * @brief This function copies the value in member bounded_sequence_int64_field * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field @@ -1381,6 +1398,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_int64_field */ eProsima_user_DllExport std::vector& bounded_sequence_int64_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint64_field * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field @@ -1406,6 +1425,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_uint64_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint64_field(); + + /*! * @brief This function copies the value in member bounded_sequence_float_field * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field @@ -1431,6 +1452,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_float_field */ eProsima_user_DllExport std::vector& bounded_sequence_float_field(); + + /*! * @brief This function copies the value in member bounded_sequence_double_field * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field @@ -1456,6 +1479,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_double_field */ eProsima_user_DllExport std::vector& bounded_sequence_double_field(); + + /*! * @brief This function copies the value in member bounded_sequence_bool_field * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field @@ -1481,6 +1506,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_bool_field */ eProsima_user_DllExport std::vector& bounded_sequence_bool_field(); + + /*! * @brief This function copies the value in member bounded_sequence_enum_field * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field @@ -1506,6 +1533,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_enum_field */ eProsima_user_DllExport std::vector& bounded_sequence_enum_field(); + + /*! * @brief This function copies the value in member bounded_sequence_enum2_field * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field @@ -1531,6 +1560,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_enum2_field */ eProsima_user_DllExport std::vector& bounded_sequence_enum2_field(); + + /*! * @brief This function copies the value in member bounded_sequence_struct_field * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field @@ -1556,6 +1587,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_struct_field */ eProsima_user_DllExport std::vector& bounded_sequence_struct_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_char_field * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field @@ -1581,6 +1614,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_char_field */ eProsima_user_DllExport std::vector& unbounded_sequence_char_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint8_field * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field @@ -1606,6 +1641,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_uint8_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint8_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_int16_field * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field @@ -1631,6 +1668,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_int16_field */ eProsima_user_DllExport std::vector& unbounded_sequence_int16_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint16_field * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field @@ -1656,6 +1695,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_uint16_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint16_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_int32_field * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field @@ -1681,6 +1722,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_int32_field */ eProsima_user_DllExport std::vector& unbounded_sequence_int32_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint32_field * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field @@ -1706,6 +1749,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_uint32_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint32_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_int64_field * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field @@ -1731,6 +1776,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_int64_field */ eProsima_user_DllExport std::vector& unbounded_sequence_int64_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint64_field * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field @@ -1756,6 +1803,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_uint64_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint64_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_float_field * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field @@ -1781,6 +1830,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_float_field */ eProsima_user_DllExport std::vector& unbounded_sequence_float_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_double_field * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field @@ -1806,6 +1857,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_double_field */ eProsima_user_DllExport std::vector& unbounded_sequence_double_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_bool_field * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field @@ -1831,6 +1884,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_bool_field */ eProsima_user_DllExport std::vector& unbounded_sequence_bool_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_enum_field * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field @@ -1856,6 +1911,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_enum_field */ eProsima_user_DllExport std::vector& unbounded_sequence_enum_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_enum2_field * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field @@ -1881,6 +1938,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_enum2_field */ eProsima_user_DllExport std::vector& unbounded_sequence_enum2_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_struct_field * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field @@ -1907,93 +1966,36 @@ namespace eprosima { */ eProsima_user_DllExport std::vector& unbounded_sequence_struct_field(); - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize( - const eprosima::test::CompleteTestType& data, - size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize( - eprosima::fastcdr::Cdr& cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize( - eprosima::fastcdr::Cdr& cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey( - eprosima::fastcdr::Cdr& cdr) const; - private: - char m_char_field; - uint8_t m_uint8_field; - int16_t m_int16_field; - uint16_t m_uint16_field; - int32_t m_int32_field; - uint32_t m_uint32_field; - int64_t m_int64_field; - uint64_t m_uint64_field; - float m_float_field; - double m_double_field; - bool m_bool_field; + char m_char_field{0}; + uint8_t m_uint8_field{0}; + int16_t m_int16_field{0}; + uint16_t m_uint16_field{0}; + int32_t m_int32_field{0}; + uint32_t m_uint32_field{0}; + int64_t m_int64_field{0}; + uint64_t m_uint64_field{0}; + float m_float_field{0.0}; + double m_double_field{0.0}; + bool m_bool_field{false}; std::string m_string_field; - eprosima::test::Color m_enum_field; - eprosima::test::Material m_enum2_field; + eprosima::test::Color m_enum_field{eprosima::test::RED}; + eprosima::test::Material m_enum2_field{eprosima::test::WOOD}; eprosima::test::StructType m_struct_field; - std::array m_array_char_field; - std::array m_array_uint8_field; - std::array m_array_int16_field; - std::array m_array_uint16_field; - std::array m_array_int32_field; - std::array m_array_uint32_field; - std::array m_array_int64_field; - std::array m_array_uint64_field; - std::array m_array_float_field; - std::array m_array_double_field; - std::array m_array_bool_field; - std::array m_array_enum_field; - std::array m_array_enum2_field; + std::array m_array_char_field{0}; + std::array m_array_uint8_field{0}; + std::array m_array_int16_field{0}; + std::array m_array_uint16_field{0}; + std::array m_array_int32_field{0}; + std::array m_array_uint32_field{0}; + std::array m_array_int64_field{0}; + std::array m_array_uint64_field{0}; + std::array m_array_float_field{0.0}; + std::array m_array_double_field{0.0}; + std::array m_array_bool_field{false}; + std::array m_array_enum_field{eprosima::test::RED}; + std::array m_array_enum2_field{eprosima::test::WOOD}; std::array m_array_struct_field; std::vector m_bounded_sequence_char_field; std::vector m_bounded_sequence_uint8_field; @@ -2104,6 +2106,7 @@ namespace eprosima { */ eProsima_user_DllExport int32_t& id(); + /*! * @brief This function sets a value in member char_field * @param _char_field New value for member char_field @@ -2123,6 +2126,7 @@ namespace eprosima { */ eProsima_user_DllExport char& char_field(); + /*! * @brief This function sets a value in member uint8_field * @param _uint8_field New value for member uint8_field @@ -2142,6 +2146,7 @@ namespace eprosima { */ eProsima_user_DllExport uint8_t& uint8_field(); + /*! * @brief This function sets a value in member int16_field * @param _int16_field New value for member int16_field @@ -2161,6 +2166,7 @@ namespace eprosima { */ eProsima_user_DllExport int16_t& int16_field(); + /*! * @brief This function sets a value in member uint16_field * @param _uint16_field New value for member uint16_field @@ -2180,6 +2186,7 @@ namespace eprosima { */ eProsima_user_DllExport uint16_t& uint16_field(); + /*! * @brief This function sets a value in member int32_field * @param _int32_field New value for member int32_field @@ -2199,6 +2206,7 @@ namespace eprosima { */ eProsima_user_DllExport int32_t& int32_field(); + /*! * @brief This function sets a value in member uint32_field * @param _uint32_field New value for member uint32_field @@ -2218,6 +2226,7 @@ namespace eprosima { */ eProsima_user_DllExport uint32_t& uint32_field(); + /*! * @brief This function sets a value in member int64_field * @param _int64_field New value for member int64_field @@ -2237,6 +2246,7 @@ namespace eprosima { */ eProsima_user_DllExport int64_t& int64_field(); + /*! * @brief This function sets a value in member uint64_field * @param _uint64_field New value for member uint64_field @@ -2256,6 +2266,7 @@ namespace eprosima { */ eProsima_user_DllExport uint64_t& uint64_field(); + /*! * @brief This function sets a value in member float_field * @param _float_field New value for member float_field @@ -2275,6 +2286,7 @@ namespace eprosima { */ eProsima_user_DllExport float& float_field(); + /*! * @brief This function sets a value in member double_field * @param _double_field New value for member double_field @@ -2294,6 +2306,7 @@ namespace eprosima { */ eProsima_user_DllExport double& double_field(); + /*! * @brief This function sets a value in member bool_field * @param _bool_field New value for member bool_field @@ -2313,6 +2326,7 @@ namespace eprosima { */ eProsima_user_DllExport bool& bool_field(); + /*! * @brief This function copies the value in member string_field * @param _string_field New value to be copied in member string_field @@ -2338,6 +2352,8 @@ namespace eprosima { * @return Reference to member string_field */ eProsima_user_DllExport std::string& string_field(); + + /*! * @brief This function sets a value in member enum_field * @param _enum_field New value for member enum_field @@ -2357,6 +2373,7 @@ namespace eprosima { */ eProsima_user_DllExport eprosima::test::Color& enum_field(); + /*! * @brief This function sets a value in member enum2_field * @param _enum2_field New value for member enum2_field @@ -2376,6 +2393,7 @@ namespace eprosima { */ eProsima_user_DllExport eprosima::test::Material& enum2_field(); + /*! * @brief This function copies the value in member struct_field * @param _struct_field New value to be copied in member struct_field @@ -2401,6 +2419,8 @@ namespace eprosima { * @return Reference to member struct_field */ eProsima_user_DllExport eprosima::test::StructType& struct_field(); + + /*! * @brief This function copies the value in member array_char_field * @param _array_char_field New value to be copied in member array_char_field @@ -2426,6 +2446,8 @@ namespace eprosima { * @return Reference to member array_char_field */ eProsima_user_DllExport std::array& array_char_field(); + + /*! * @brief This function copies the value in member array_uint8_field * @param _array_uint8_field New value to be copied in member array_uint8_field @@ -2451,6 +2473,8 @@ namespace eprosima { * @return Reference to member array_uint8_field */ eProsima_user_DllExport std::array& array_uint8_field(); + + /*! * @brief This function copies the value in member array_int16_field * @param _array_int16_field New value to be copied in member array_int16_field @@ -2476,6 +2500,8 @@ namespace eprosima { * @return Reference to member array_int16_field */ eProsima_user_DllExport std::array& array_int16_field(); + + /*! * @brief This function copies the value in member array_uint16_field * @param _array_uint16_field New value to be copied in member array_uint16_field @@ -2501,6 +2527,8 @@ namespace eprosima { * @return Reference to member array_uint16_field */ eProsima_user_DllExport std::array& array_uint16_field(); + + /*! * @brief This function copies the value in member array_int32_field * @param _array_int32_field New value to be copied in member array_int32_field @@ -2526,6 +2554,8 @@ namespace eprosima { * @return Reference to member array_int32_field */ eProsima_user_DllExport std::array& array_int32_field(); + + /*! * @brief This function copies the value in member array_uint32_field * @param _array_uint32_field New value to be copied in member array_uint32_field @@ -2551,6 +2581,8 @@ namespace eprosima { * @return Reference to member array_uint32_field */ eProsima_user_DllExport std::array& array_uint32_field(); + + /*! * @brief This function copies the value in member array_int64_field * @param _array_int64_field New value to be copied in member array_int64_field @@ -2576,6 +2608,8 @@ namespace eprosima { * @return Reference to member array_int64_field */ eProsima_user_DllExport std::array& array_int64_field(); + + /*! * @brief This function copies the value in member array_uint64_field * @param _array_uint64_field New value to be copied in member array_uint64_field @@ -2601,6 +2635,8 @@ namespace eprosima { * @return Reference to member array_uint64_field */ eProsima_user_DllExport std::array& array_uint64_field(); + + /*! * @brief This function copies the value in member array_float_field * @param _array_float_field New value to be copied in member array_float_field @@ -2626,6 +2662,8 @@ namespace eprosima { * @return Reference to member array_float_field */ eProsima_user_DllExport std::array& array_float_field(); + + /*! * @brief This function copies the value in member array_double_field * @param _array_double_field New value to be copied in member array_double_field @@ -2651,6 +2689,8 @@ namespace eprosima { * @return Reference to member array_double_field */ eProsima_user_DllExport std::array& array_double_field(); + + /*! * @brief This function copies the value in member array_bool_field * @param _array_bool_field New value to be copied in member array_bool_field @@ -2676,6 +2716,8 @@ namespace eprosima { * @return Reference to member array_bool_field */ eProsima_user_DllExport std::array& array_bool_field(); + + /*! * @brief This function copies the value in member array_enum_field * @param _array_enum_field New value to be copied in member array_enum_field @@ -2701,6 +2743,8 @@ namespace eprosima { * @return Reference to member array_enum_field */ eProsima_user_DllExport std::array& array_enum_field(); + + /*! * @brief This function copies the value in member array_enum2_field * @param _array_enum2_field New value to be copied in member array_enum2_field @@ -2726,6 +2770,8 @@ namespace eprosima { * @return Reference to member array_enum2_field */ eProsima_user_DllExport std::array& array_enum2_field(); + + /*! * @brief This function copies the value in member array_struct_field * @param _array_struct_field New value to be copied in member array_struct_field @@ -2751,6 +2797,8 @@ namespace eprosima { * @return Reference to member array_struct_field */ eProsima_user_DllExport std::array& array_struct_field(); + + /*! * @brief This function copies the value in member bounded_sequence_char_field * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field @@ -2776,6 +2824,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_char_field */ eProsima_user_DllExport std::vector& bounded_sequence_char_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint8_field * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field @@ -2801,6 +2851,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_uint8_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint8_field(); + + /*! * @brief This function copies the value in member bounded_sequence_int16_field * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field @@ -2826,6 +2878,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_int16_field */ eProsima_user_DllExport std::vector& bounded_sequence_int16_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint16_field * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field @@ -2851,6 +2905,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_uint16_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint16_field(); + + /*! * @brief This function copies the value in member bounded_sequence_int32_field * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field @@ -2876,6 +2932,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_int32_field */ eProsima_user_DllExport std::vector& bounded_sequence_int32_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint32_field * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field @@ -2901,6 +2959,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_uint32_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint32_field(); + + /*! * @brief This function copies the value in member bounded_sequence_int64_field * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field @@ -2926,6 +2986,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_int64_field */ eProsima_user_DllExport std::vector& bounded_sequence_int64_field(); + + /*! * @brief This function copies the value in member bounded_sequence_uint64_field * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field @@ -2951,6 +3013,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_uint64_field */ eProsima_user_DllExport std::vector& bounded_sequence_uint64_field(); + + /*! * @brief This function copies the value in member bounded_sequence_float_field * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field @@ -2976,6 +3040,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_float_field */ eProsima_user_DllExport std::vector& bounded_sequence_float_field(); + + /*! * @brief This function copies the value in member bounded_sequence_double_field * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field @@ -3001,6 +3067,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_double_field */ eProsima_user_DllExport std::vector& bounded_sequence_double_field(); + + /*! * @brief This function copies the value in member bounded_sequence_bool_field * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field @@ -3026,6 +3094,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_bool_field */ eProsima_user_DllExport std::vector& bounded_sequence_bool_field(); + + /*! * @brief This function copies the value in member bounded_sequence_enum_field * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field @@ -3051,6 +3121,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_enum_field */ eProsima_user_DllExport std::vector& bounded_sequence_enum_field(); + + /*! * @brief This function copies the value in member bounded_sequence_enum2_field * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field @@ -3076,6 +3148,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_enum2_field */ eProsima_user_DllExport std::vector& bounded_sequence_enum2_field(); + + /*! * @brief This function copies the value in member bounded_sequence_struct_field * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field @@ -3101,6 +3175,8 @@ namespace eprosima { * @return Reference to member bounded_sequence_struct_field */ eProsima_user_DllExport std::vector& bounded_sequence_struct_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_char_field * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field @@ -3126,6 +3202,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_char_field */ eProsima_user_DllExport std::vector& unbounded_sequence_char_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint8_field * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field @@ -3151,6 +3229,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_uint8_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint8_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_int16_field * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field @@ -3176,6 +3256,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_int16_field */ eProsima_user_DllExport std::vector& unbounded_sequence_int16_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint16_field * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field @@ -3201,6 +3283,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_uint16_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint16_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_int32_field * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field @@ -3226,6 +3310,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_int32_field */ eProsima_user_DllExport std::vector& unbounded_sequence_int32_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint32_field * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field @@ -3251,6 +3337,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_uint32_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint32_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_int64_field * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field @@ -3276,6 +3364,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_int64_field */ eProsima_user_DllExport std::vector& unbounded_sequence_int64_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_uint64_field * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field @@ -3301,6 +3391,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_uint64_field */ eProsima_user_DllExport std::vector& unbounded_sequence_uint64_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_float_field * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field @@ -3326,6 +3418,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_float_field */ eProsima_user_DllExport std::vector& unbounded_sequence_float_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_double_field * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field @@ -3351,6 +3445,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_double_field */ eProsima_user_DllExport std::vector& unbounded_sequence_double_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_bool_field * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field @@ -3376,6 +3472,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_bool_field */ eProsima_user_DllExport std::vector& unbounded_sequence_bool_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_enum_field * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field @@ -3401,6 +3499,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_enum_field */ eProsima_user_DllExport std::vector& unbounded_sequence_enum_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_enum2_field * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field @@ -3426,6 +3526,8 @@ namespace eprosima { * @return Reference to member unbounded_sequence_enum2_field */ eProsima_user_DllExport std::vector& unbounded_sequence_enum2_field(); + + /*! * @brief This function copies the value in member unbounded_sequence_struct_field * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field @@ -3452,94 +3554,37 @@ namespace eprosima { */ eProsima_user_DllExport std::vector& unbounded_sequence_struct_field(); - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize( - const eprosima::test::KeyedCompleteTestType& data, - size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize( - eprosima::fastcdr::Cdr& cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize( - eprosima::fastcdr::Cdr& cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize( - size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey( - eprosima::fastcdr::Cdr& cdr) const; - private: - int32_t m_id; - char m_char_field; - uint8_t m_uint8_field; - int16_t m_int16_field; - uint16_t m_uint16_field; - int32_t m_int32_field; - uint32_t m_uint32_field; - int64_t m_int64_field; - uint64_t m_uint64_field; - float m_float_field; - double m_double_field; - bool m_bool_field; + int32_t m_id{0}; + char m_char_field{0}; + uint8_t m_uint8_field{0}; + int16_t m_int16_field{0}; + uint16_t m_uint16_field{0}; + int32_t m_int32_field{0}; + uint32_t m_uint32_field{0}; + int64_t m_int64_field{0}; + uint64_t m_uint64_field{0}; + float m_float_field{0.0}; + double m_double_field{0.0}; + bool m_bool_field{false}; std::string m_string_field; - eprosima::test::Color m_enum_field; - eprosima::test::Material m_enum2_field; + eprosima::test::Color m_enum_field{eprosima::test::RED}; + eprosima::test::Material m_enum2_field{eprosima::test::WOOD}; eprosima::test::StructType m_struct_field; - std::array m_array_char_field; - std::array m_array_uint8_field; - std::array m_array_int16_field; - std::array m_array_uint16_field; - std::array m_array_int32_field; - std::array m_array_uint32_field; - std::array m_array_int64_field; - std::array m_array_uint64_field; - std::array m_array_float_field; - std::array m_array_double_field; - std::array m_array_bool_field; - std::array m_array_enum_field; - std::array m_array_enum2_field; + std::array m_array_char_field{0}; + std::array m_array_uint8_field{0}; + std::array m_array_int16_field{0}; + std::array m_array_uint16_field{0}; + std::array m_array_int32_field{0}; + std::array m_array_uint32_field{0}; + std::array m_array_int64_field{0}; + std::array m_array_uint64_field{0}; + std::array m_array_float_field{0.0}; + std::array m_array_double_field{0.0}; + std::array m_array_bool_field{false}; + std::array m_array_enum_field{eprosima::test::RED}; + std::array m_array_enum2_field{eprosima::test::WOOD}; std::array m_array_struct_field; std::vector m_bounded_sequence_char_field; std::vector m_bounded_sequence_uint8_field; diff --git a/fastdds_python/test/types/test_modules.i b/fastdds_python/test/types/test_modules.i index 8e54b4c0..69c0553d 100644 --- a/fastdds_python/test/types/test_modules.i +++ b/fastdds_python/test/types/test_modules.i @@ -16,17 +16,17 @@ * @file test_modules.i * This header file contains the SWIG interface of the described types in the IDL file. * - * This file was generated by the tool gen. + * This file was generated by the tool fastddsgen. */ %module test_modules // SWIG helper modules %include "stdint.i" -%include "std_string.i" -%include "std_vector.i" %include "std_array.i" %include "std_map.i" +%include "std_string.i" +%include "std_vector.i" %include "typemaps.i" // Assignemt operators are ignored, as there is no such thing in Python. @@ -49,8 +49,6 @@ %import(module="fastdds") "fastdds/dds/core/LoanableTypedCollection.hpp" %import(module="fastdds") "fastdds/dds/core/LoanableSequence.hpp" - - //////////////////////////////////////////////////////// // Binding for class eprosima::test::StructType //////////////////////////////////////////////////////// @@ -69,6 +67,7 @@ %ignore eprosima::test::StructType::char_field(); %rename("%s") eprosima::test::StructType::char_field() const; + %ignore eprosima::test::StructType::uint8_field(uint8_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -77,6 +76,7 @@ %ignore eprosima::test::StructType::uint8_field(); %rename("%s") eprosima::test::StructType::uint8_field() const; + %ignore eprosima::test::StructType::int16_field(int16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -85,6 +85,7 @@ %ignore eprosima::test::StructType::int16_field(); %rename("%s") eprosima::test::StructType::int16_field() const; + %ignore eprosima::test::StructType::uint16_field(uint16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -93,6 +94,7 @@ %ignore eprosima::test::StructType::uint16_field(); %rename("%s") eprosima::test::StructType::uint16_field() const; + %ignore eprosima::test::StructType::int32_field(int32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -101,6 +103,7 @@ %ignore eprosima::test::StructType::int32_field(); %rename("%s") eprosima::test::StructType::int32_field() const; + %ignore eprosima::test::StructType::uint32_field(uint32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -109,6 +112,7 @@ %ignore eprosima::test::StructType::uint32_field(); %rename("%s") eprosima::test::StructType::uint32_field() const; + %ignore eprosima::test::StructType::int64_field(int64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -117,6 +121,7 @@ %ignore eprosima::test::StructType::int64_field(); %rename("%s") eprosima::test::StructType::int64_field() const; + %ignore eprosima::test::StructType::uint64_field(uint64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -125,6 +130,7 @@ %ignore eprosima::test::StructType::uint64_field(); %rename("%s") eprosima::test::StructType::uint64_field() const; + %ignore eprosima::test::StructType::float_field(float&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -133,6 +139,7 @@ %ignore eprosima::test::StructType::float_field(); %rename("%s") eprosima::test::StructType::float_field() const; + %ignore eprosima::test::StructType::double_field(double&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -141,6 +148,7 @@ %ignore eprosima::test::StructType::double_field(); %rename("%s") eprosima::test::StructType::double_field() const; + %ignore eprosima::test::StructType::bool_field(bool&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -149,6 +157,7 @@ %ignore eprosima::test::StructType::bool_field(); %rename("%s") eprosima::test::StructType::bool_field() const; + %ignore eprosima::test::StructType::string_field(std::string&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -157,6 +166,7 @@ %ignore eprosima::test::StructType::string_field(); %rename("%s") eprosima::test::StructType::string_field() const; + %ignore eprosima::test::StructType::enum_field(eprosima::test::Color&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -165,6 +175,7 @@ %ignore eprosima::test::StructType::enum_field(); %rename("%s") eprosima::test::StructType::enum_field() const; + %ignore eprosima::test::StructType::enum2_field(eprosima::test::Material&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -174,6 +185,7 @@ %rename("%s") eprosima::test::StructType::enum2_field() const; + %template(_StructTypeSeq) eprosima::fastdds::dds::LoanableTypedCollection; %template(StructTypeSeq) eprosima::fastdds::dds::LoanableSequence; %extend eprosima::fastdds::dds::LoanableSequence @@ -209,6 +221,7 @@ %ignore eprosima::test::CompleteTestType::char_field(); %rename("%s") eprosima::test::CompleteTestType::char_field() const; + %ignore eprosima::test::CompleteTestType::uint8_field(uint8_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -217,6 +230,7 @@ %ignore eprosima::test::CompleteTestType::uint8_field(); %rename("%s") eprosima::test::CompleteTestType::uint8_field() const; + %ignore eprosima::test::CompleteTestType::int16_field(int16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -225,6 +239,7 @@ %ignore eprosima::test::CompleteTestType::int16_field(); %rename("%s") eprosima::test::CompleteTestType::int16_field() const; + %ignore eprosima::test::CompleteTestType::uint16_field(uint16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -233,6 +248,7 @@ %ignore eprosima::test::CompleteTestType::uint16_field(); %rename("%s") eprosima::test::CompleteTestType::uint16_field() const; + %ignore eprosima::test::CompleteTestType::int32_field(int32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -241,6 +257,7 @@ %ignore eprosima::test::CompleteTestType::int32_field(); %rename("%s") eprosima::test::CompleteTestType::int32_field() const; + %ignore eprosima::test::CompleteTestType::uint32_field(uint32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -249,6 +266,7 @@ %ignore eprosima::test::CompleteTestType::uint32_field(); %rename("%s") eprosima::test::CompleteTestType::uint32_field() const; + %ignore eprosima::test::CompleteTestType::int64_field(int64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -257,6 +275,7 @@ %ignore eprosima::test::CompleteTestType::int64_field(); %rename("%s") eprosima::test::CompleteTestType::int64_field() const; + %ignore eprosima::test::CompleteTestType::uint64_field(uint64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -265,6 +284,7 @@ %ignore eprosima::test::CompleteTestType::uint64_field(); %rename("%s") eprosima::test::CompleteTestType::uint64_field() const; + %ignore eprosima::test::CompleteTestType::float_field(float&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -273,6 +293,7 @@ %ignore eprosima::test::CompleteTestType::float_field(); %rename("%s") eprosima::test::CompleteTestType::float_field() const; + %ignore eprosima::test::CompleteTestType::double_field(double&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -281,6 +302,7 @@ %ignore eprosima::test::CompleteTestType::double_field(); %rename("%s") eprosima::test::CompleteTestType::double_field() const; + %ignore eprosima::test::CompleteTestType::bool_field(bool&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -289,6 +311,7 @@ %ignore eprosima::test::CompleteTestType::bool_field(); %rename("%s") eprosima::test::CompleteTestType::bool_field() const; + %ignore eprosima::test::CompleteTestType::string_field(std::string&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -297,6 +320,7 @@ %ignore eprosima::test::CompleteTestType::string_field(); %rename("%s") eprosima::test::CompleteTestType::string_field() const; + %ignore eprosima::test::CompleteTestType::enum_field(eprosima::test::Color&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -305,6 +329,7 @@ %ignore eprosima::test::CompleteTestType::enum_field(); %rename("%s") eprosima::test::CompleteTestType::enum_field() const; + %ignore eprosima::test::CompleteTestType::enum2_field(eprosima::test::Material&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -313,6 +338,7 @@ %ignore eprosima::test::CompleteTestType::enum2_field(); %rename("%s") eprosima::test::CompleteTestType::enum2_field() const; + %ignore eprosima::test::CompleteTestType::struct_field(eprosima::test::StructType&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -321,6 +347,7 @@ %ignore eprosima::test::CompleteTestType::struct_field(); %rename("%s") eprosima::test::CompleteTestType::struct_field() const; + %ignore eprosima::test::CompleteTestType::array_char_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -335,6 +362,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_uint8_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -349,6 +377,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_int16_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -363,6 +392,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_uint16_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -377,6 +407,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_int32_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -391,6 +422,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_uint32_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -405,6 +437,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_int64_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -419,6 +452,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_uint64_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -433,6 +467,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_float_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -447,6 +482,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_double_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -461,6 +497,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_bool_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -475,6 +512,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_enum_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -489,6 +527,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_enum2_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -503,6 +542,7 @@ return self->data(); } } + %ignore eprosima::test::CompleteTestType::array_struct_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -523,7 +563,11 @@ { return self->data(); } -}%template(char_vector) std::vector; +} + +%template( +char_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_uint8_field(std::vector&&); @@ -537,7 +581,11 @@ { return self->data(); } -}%template(uint8_t_vector) std::vector; +} + +%template( +uint8_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_int16_field(std::vector&&); @@ -551,7 +599,11 @@ { return self->data(); } -}%template(int16_t_vector) std::vector; +} + +%template( +int16_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_uint16_field(std::vector&&); @@ -565,7 +617,11 @@ { return self->data(); } -}%template(uint16_t_vector) std::vector; +} + +%template( +uint16_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_int32_field(std::vector&&); @@ -579,7 +635,11 @@ { return self->data(); } -}%template(int32_t_vector) std::vector; +} + +%template( +int32_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_uint32_field(std::vector&&); @@ -593,7 +653,11 @@ { return self->data(); } -}%template(uint32_t_vector) std::vector; +} + +%template( +uint32_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_int64_field(std::vector&&); @@ -607,7 +671,11 @@ { return self->data(); } -}%template(int64_t_vector) std::vector; +} + +%template( +int64_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_uint64_field(std::vector&&); @@ -621,7 +689,11 @@ { return self->data(); } -}%template(uint64_t_vector) std::vector; +} + +%template( +uint64_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_float_field(std::vector&&); @@ -635,7 +707,11 @@ { return self->data(); } -}%template(float_vector) std::vector; +} + +%template( +float_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_double_field(std::vector&&); @@ -649,7 +725,11 @@ { return self->data(); } -}%template(double_vector) std::vector; +} + +%template( +double_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_bool_field(std::vector&&); @@ -657,7 +737,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore eprosima::test::CompleteTestType::bounded_sequence_bool_field() const; -%template(bool_vector) std::vector; +%template( +bool_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_enum_field(std::vector&&); @@ -671,7 +753,11 @@ { return self->data(); } -}%template(eprosima_test_Color_vector) std::vector; +} + +%template( +eprosima_test_Color_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_enum2_field(std::vector&&); @@ -685,7 +771,11 @@ { return self->data(); } -}%template(eprosima_test_Material_vector) std::vector; +} + +%template( +eprosima_test_Material_vector +) std::vector; %ignore eprosima::test::CompleteTestType::bounded_sequence_struct_field(std::vector&&); @@ -693,7 +783,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore eprosima::test::CompleteTestType::bounded_sequence_struct_field() const; -%template(eprosima_test_StructType_vector) std::vector; +%template( +eprosima_test_StructType_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_char_field(std::vector&&); @@ -707,7 +799,11 @@ { return self->data(); } -}%template(char_vector) std::vector; +} + +%template( +char_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_uint8_field(std::vector&&); @@ -721,7 +817,11 @@ { return self->data(); } -}%template(uint8_t_vector) std::vector; +} + +%template( +uint8_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_int16_field(std::vector&&); @@ -735,7 +835,11 @@ { return self->data(); } -}%template(int16_t_vector) std::vector; +} + +%template( +int16_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_uint16_field(std::vector&&); @@ -749,7 +853,11 @@ { return self->data(); } -}%template(uint16_t_vector) std::vector; +} + +%template( +uint16_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_int32_field(std::vector&&); @@ -763,7 +871,11 @@ { return self->data(); } -}%template(int32_t_vector) std::vector; +} + +%template( +int32_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_uint32_field(std::vector&&); @@ -777,7 +889,11 @@ { return self->data(); } -}%template(uint32_t_vector) std::vector; +} + +%template( +uint32_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_int64_field(std::vector&&); @@ -791,7 +907,11 @@ { return self->data(); } -}%template(int64_t_vector) std::vector; +} + +%template( +int64_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_uint64_field(std::vector&&); @@ -805,7 +925,11 @@ { return self->data(); } -}%template(uint64_t_vector) std::vector; +} + +%template( +uint64_t_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_float_field(std::vector&&); @@ -819,7 +943,11 @@ { return self->data(); } -}%template(float_vector) std::vector; +} + +%template( +float_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_double_field(std::vector&&); @@ -833,7 +961,11 @@ { return self->data(); } -}%template(double_vector) std::vector; +} + +%template( +double_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_bool_field(std::vector&&); @@ -841,7 +973,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore eprosima::test::CompleteTestType::unbounded_sequence_bool_field() const; -%template(bool_vector) std::vector; +%template( +bool_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_enum_field(std::vector&&); @@ -855,7 +989,11 @@ { return self->data(); } -}%template(eprosima_test_Color_vector) std::vector; +} + +%template( +eprosima_test_Color_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_enum2_field(std::vector&&); @@ -869,7 +1007,11 @@ { return self->data(); } -}%template(eprosima_test_Material_vector) std::vector; +} + +%template( +eprosima_test_Material_vector +) std::vector; %ignore eprosima::test::CompleteTestType::unbounded_sequence_struct_field(std::vector&&); @@ -877,7 +1019,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore eprosima::test::CompleteTestType::unbounded_sequence_struct_field() const; -%template(eprosima_test_StructType_vector) std::vector; +%template( +eprosima_test_StructType_vector +) std::vector; %template(_CompleteTestTypeSeq) eprosima::fastdds::dds::LoanableTypedCollection; @@ -913,6 +1057,7 @@ %ignore eprosima::test::KeyedCompleteTestType::id(); %rename("%s") eprosima::test::KeyedCompleteTestType::id() const; + %ignore eprosima::test::KeyedCompleteTestType::char_field(char&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -921,6 +1066,7 @@ %ignore eprosima::test::KeyedCompleteTestType::char_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::char_field() const; + %ignore eprosima::test::KeyedCompleteTestType::uint8_field(uint8_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -929,6 +1075,7 @@ %ignore eprosima::test::KeyedCompleteTestType::uint8_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::uint8_field() const; + %ignore eprosima::test::KeyedCompleteTestType::int16_field(int16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -937,6 +1084,7 @@ %ignore eprosima::test::KeyedCompleteTestType::int16_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::int16_field() const; + %ignore eprosima::test::KeyedCompleteTestType::uint16_field(uint16_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -945,6 +1093,7 @@ %ignore eprosima::test::KeyedCompleteTestType::uint16_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::uint16_field() const; + %ignore eprosima::test::KeyedCompleteTestType::int32_field(int32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -953,6 +1102,7 @@ %ignore eprosima::test::KeyedCompleteTestType::int32_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::int32_field() const; + %ignore eprosima::test::KeyedCompleteTestType::uint32_field(uint32_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -961,6 +1111,7 @@ %ignore eprosima::test::KeyedCompleteTestType::uint32_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::uint32_field() const; + %ignore eprosima::test::KeyedCompleteTestType::int64_field(int64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -969,6 +1120,7 @@ %ignore eprosima::test::KeyedCompleteTestType::int64_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::int64_field() const; + %ignore eprosima::test::KeyedCompleteTestType::uint64_field(uint64_t&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -977,6 +1129,7 @@ %ignore eprosima::test::KeyedCompleteTestType::uint64_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::uint64_field() const; + %ignore eprosima::test::KeyedCompleteTestType::float_field(float&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -985,6 +1138,7 @@ %ignore eprosima::test::KeyedCompleteTestType::float_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::float_field() const; + %ignore eprosima::test::KeyedCompleteTestType::double_field(double&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -993,6 +1147,7 @@ %ignore eprosima::test::KeyedCompleteTestType::double_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::double_field() const; + %ignore eprosima::test::KeyedCompleteTestType::bool_field(bool&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1001,6 +1156,7 @@ %ignore eprosima::test::KeyedCompleteTestType::bool_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::bool_field() const; + %ignore eprosima::test::KeyedCompleteTestType::string_field(std::string&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1009,6 +1165,7 @@ %ignore eprosima::test::KeyedCompleteTestType::string_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::string_field() const; + %ignore eprosima::test::KeyedCompleteTestType::enum_field(eprosima::test::Color&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1017,6 +1174,7 @@ %ignore eprosima::test::KeyedCompleteTestType::enum_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::enum_field() const; + %ignore eprosima::test::KeyedCompleteTestType::enum2_field(eprosima::test::Material&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1025,6 +1183,7 @@ %ignore eprosima::test::KeyedCompleteTestType::enum2_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::enum2_field() const; + %ignore eprosima::test::KeyedCompleteTestType::struct_field(eprosima::test::StructType&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1033,6 +1192,7 @@ %ignore eprosima::test::KeyedCompleteTestType::struct_field(); %rename("%s") eprosima::test::KeyedCompleteTestType::struct_field() const; + %ignore eprosima::test::KeyedCompleteTestType::array_char_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1047,6 +1207,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_uint8_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1061,6 +1222,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_int16_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1075,6 +1237,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_uint16_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1089,6 +1252,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_int32_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1103,6 +1267,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_uint32_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1117,6 +1282,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_int64_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1131,6 +1297,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_uint64_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1145,6 +1312,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_float_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1159,6 +1327,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_double_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1173,6 +1342,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_bool_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1187,6 +1357,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_enum_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1201,6 +1372,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_enum2_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1215,6 +1387,7 @@ return self->data(); } } + %ignore eprosima::test::KeyedCompleteTestType::array_struct_field(std::array&&); // Overloaded getter methods shadow each other and are equivalent in python @@ -1235,7 +1408,11 @@ { return self->data(); } -}%template(char_vector) std::vector; +} + +%template( +char_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_uint8_field(std::vector&&); @@ -1249,7 +1426,11 @@ { return self->data(); } -}%template(uint8_t_vector) std::vector; +} + +%template( +uint8_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_int16_field(std::vector&&); @@ -1263,7 +1444,11 @@ { return self->data(); } -}%template(int16_t_vector) std::vector; +} + +%template( +int16_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_uint16_field(std::vector&&); @@ -1277,7 +1462,11 @@ { return self->data(); } -}%template(uint16_t_vector) std::vector; +} + +%template( +uint16_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_int32_field(std::vector&&); @@ -1291,7 +1480,11 @@ { return self->data(); } -}%template(int32_t_vector) std::vector; +} + +%template( +int32_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_uint32_field(std::vector&&); @@ -1305,7 +1498,11 @@ { return self->data(); } -}%template(uint32_t_vector) std::vector; +} + +%template( +uint32_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_int64_field(std::vector&&); @@ -1319,7 +1516,11 @@ { return self->data(); } -}%template(int64_t_vector) std::vector; +} + +%template( +int64_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_uint64_field(std::vector&&); @@ -1333,7 +1534,11 @@ { return self->data(); } -}%template(uint64_t_vector) std::vector; +} + +%template( +uint64_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_float_field(std::vector&&); @@ -1347,7 +1552,11 @@ { return self->data(); } -}%template(float_vector) std::vector; +} + +%template( +float_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_double_field(std::vector&&); @@ -1361,7 +1570,11 @@ { return self->data(); } -}%template(double_vector) std::vector; +} + +%template( +double_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_bool_field(std::vector&&); @@ -1369,7 +1582,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_bool_field() const; -%template(bool_vector) std::vector; +%template( +bool_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_enum_field(std::vector&&); @@ -1383,7 +1598,11 @@ { return self->data(); } -}%template(eprosima_test_Color_vector) std::vector; +} + +%template( +eprosima_test_Color_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_enum2_field(std::vector&&); @@ -1397,7 +1616,11 @@ { return self->data(); } -}%template(eprosima_test_Material_vector) std::vector; +} + +%template( +eprosima_test_Material_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_struct_field(std::vector&&); @@ -1405,7 +1628,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore eprosima::test::KeyedCompleteTestType::bounded_sequence_struct_field() const; -%template(eprosima_test_StructType_vector) std::vector; +%template( +eprosima_test_StructType_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_char_field(std::vector&&); @@ -1419,7 +1644,11 @@ { return self->data(); } -}%template(char_vector) std::vector; +} + +%template( +char_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_uint8_field(std::vector&&); @@ -1433,7 +1662,11 @@ { return self->data(); } -}%template(uint8_t_vector) std::vector; +} + +%template( +uint8_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_int16_field(std::vector&&); @@ -1447,7 +1680,11 @@ { return self->data(); } -}%template(int16_t_vector) std::vector; +} + +%template( +int16_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_uint16_field(std::vector&&); @@ -1461,7 +1698,11 @@ { return self->data(); } -}%template(uint16_t_vector) std::vector; +} + +%template( +uint16_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_int32_field(std::vector&&); @@ -1475,7 +1716,11 @@ { return self->data(); } -}%template(int32_t_vector) std::vector; +} + +%template( +int32_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_uint32_field(std::vector&&); @@ -1489,7 +1734,11 @@ { return self->data(); } -}%template(uint32_t_vector) std::vector; +} + +%template( +uint32_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_int64_field(std::vector&&); @@ -1503,7 +1752,11 @@ { return self->data(); } -}%template(int64_t_vector) std::vector; +} + +%template( +int64_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_uint64_field(std::vector&&); @@ -1517,7 +1770,11 @@ { return self->data(); } -}%template(uint64_t_vector) std::vector; +} + +%template( +uint64_t_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_float_field(std::vector&&); @@ -1531,7 +1788,11 @@ { return self->data(); } -}%template(float_vector) std::vector; +} + +%template( +float_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_double_field(std::vector&&); @@ -1545,7 +1806,11 @@ { return self->data(); } -}%template(double_vector) std::vector; +} + +%template( +double_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_bool_field(std::vector&&); @@ -1553,7 +1818,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_bool_field() const; -%template(bool_vector) std::vector; +%template( +bool_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_enum_field(std::vector&&); @@ -1567,7 +1834,11 @@ { return self->data(); } -}%template(eprosima_test_Color_vector) std::vector; +} + +%template( +eprosima_test_Color_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_enum2_field(std::vector&&); @@ -1581,7 +1852,11 @@ { return self->data(); } -}%template(eprosima_test_Material_vector) std::vector; +} + +%template( +eprosima_test_Material_vector +) std::vector; %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_struct_field(std::vector&&); @@ -1589,7 +1864,9 @@ // Const accesors produced constant enums instead of arrays/dictionaries when used // We ignore them to prevent this %ignore eprosima::test::KeyedCompleteTestType::unbounded_sequence_struct_field() const; -%template(eprosima_test_StructType_vector) std::vector; +%template( +eprosima_test_StructType_vector +) std::vector; %template(_KeyedCompleteTestTypeSeq) eprosima::fastdds::dds::LoanableTypedCollection; diff --git a/fastdds_python/test/types/test_modulesCdrAux.hpp b/fastdds_python/test/types/test_modulesCdrAux.hpp new file mode 100644 index 00000000..f37819ba --- /dev/null +++ b/fastdds_python/test/types/test_modulesCdrAux.hpp @@ -0,0 +1,64 @@ +// 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_modulesCdrAux.hpp + * This source file contains some definitions of CDR related functions. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_EPROSIMA_TEST_TEST_MODULESCDRAUX_HPP_ +#define _FAST_DDS_GENERATED_EPROSIMA_TEST_TEST_MODULESCDRAUX_HPP_ + +#include "test_modules.h" + +constexpr uint32_t eprosima_test_KeyedCompleteTestType_max_cdr_typesize {41752UL}; +constexpr uint32_t eprosima_test_KeyedCompleteTestType_max_key_cdr_typesize {4UL}; + + +constexpr uint32_t eprosima_test_CompleteTestType_max_cdr_typesize {41752UL}; +constexpr uint32_t eprosima_test_CompleteTestType_max_key_cdr_typesize {0UL}; + +constexpr uint32_t eprosima_test_StructType_max_cdr_typesize {328UL}; +constexpr uint32_t eprosima_test_StructType_max_key_cdr_typesize {0UL}; + + +namespace eprosima { +namespace fastcdr { + +class Cdr; +class CdrSizeCalculator; + +eProsima_user_DllExport void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const eprosima::test::StructType& data); + + + +eProsima_user_DllExport void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const eprosima::test::CompleteTestType& data); + +eProsima_user_DllExport void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const eprosima::test::KeyedCompleteTestType& data); + + + + +} // namespace fastcdr +} // namespace eprosima + +#endif // _FAST_DDS_GENERATED_EPROSIMA_TEST_TEST_MODULESCDRAUX_HPP_ \ No newline at end of file diff --git a/fastdds_python/test/types/test_modulesCdrAux.ipp b/fastdds_python/test/types/test_modulesCdrAux.ipp new file mode 100644 index 00000000..a7269fe4 --- /dev/null +++ b/fastdds_python/test/types/test_modulesCdrAux.ipp @@ -0,0 +1,1343 @@ +// 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_modulesCdrAux.ipp + * This source file contains some declarations of CDR related functions. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_EPROSIMA_TEST_TEST_MODULESCDRAUX_IPP_ +#define _FAST_DDS_GENERATED_EPROSIMA_TEST_TEST_MODULESCDRAUX_IPP_ + +#include "test_modulesCdrAux.hpp" + +#include +#include + + +#include +using namespace eprosima::fastcdr::exception; + +namespace eprosima { +namespace fastcdr { + +template<> +eProsima_user_DllExport size_t calculate_serialized_size( + eprosima::fastcdr::CdrSizeCalculator& calculator, + const eprosima::test::StructType& data, + size_t& current_alignment) +{ + static_cast(data); + + eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding(); + size_t calculated_size {calculator.begin_calculate_type_serialized_size( + eprosima::fastcdr::CdrVersion::XCDRv2 == calculator.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + current_alignment)}; + + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + data.char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + data.uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), + data.int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), + data.uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), + data.int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), + data.uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), + data.int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), + data.uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(8), + data.float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(9), + data.double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(10), + data.bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(11), + data.string_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(12), + data.enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(13), + data.enum2_field(), current_alignment); + + + calculated_size += calculator.end_calculate_type_serialized_size(previous_encoding, current_alignment); + + return calculated_size; +} + +template<> +eProsima_user_DllExport void serialize( + eprosima::fastcdr::Cdr& scdr, + const eprosima::test::StructType& data) +{ + eprosima::fastcdr::Cdr::state current_state(scdr); + scdr.begin_serialize_type(current_state, + eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR); + + scdr + << eprosima::fastcdr::MemberId(0) << data.char_field() + << eprosima::fastcdr::MemberId(1) << data.uint8_field() + << eprosima::fastcdr::MemberId(2) << data.int16_field() + << eprosima::fastcdr::MemberId(3) << data.uint16_field() + << eprosima::fastcdr::MemberId(4) << data.int32_field() + << eprosima::fastcdr::MemberId(5) << data.uint32_field() + << eprosima::fastcdr::MemberId(6) << data.int64_field() + << eprosima::fastcdr::MemberId(7) << data.uint64_field() + << eprosima::fastcdr::MemberId(8) << data.float_field() + << eprosima::fastcdr::MemberId(9) << data.double_field() + << eprosima::fastcdr::MemberId(10) << data.bool_field() + << eprosima::fastcdr::MemberId(11) << data.string_field() + << eprosima::fastcdr::MemberId(12) << data.enum_field() + << eprosima::fastcdr::MemberId(13) << data.enum2_field() +; + + scdr.end_serialize_type(current_state); +} + +template<> +eProsima_user_DllExport void deserialize( + eprosima::fastcdr::Cdr& cdr, + eprosima::test::StructType& data) +{ + cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + [&data](eprosima::fastcdr::Cdr& dcdr, const eprosima::fastcdr::MemberId& mid) -> bool + { + bool ret_value = true; + switch (mid.id) + { + case 0: + dcdr >> data.char_field(); + break; + + case 1: + dcdr >> data.uint8_field(); + break; + + case 2: + dcdr >> data.int16_field(); + break; + + case 3: + dcdr >> data.uint16_field(); + break; + + case 4: + dcdr >> data.int32_field(); + break; + + case 5: + dcdr >> data.uint32_field(); + break; + + case 6: + dcdr >> data.int64_field(); + break; + + case 7: + dcdr >> data.uint64_field(); + break; + + case 8: + dcdr >> data.float_field(); + break; + + case 9: + dcdr >> data.double_field(); + break; + + case 10: + dcdr >> data.bool_field(); + break; + + case 11: + dcdr >> data.string_field(); + break; + + case 12: + dcdr >> data.enum_field(); + break; + + case 13: + dcdr >> data.enum2_field(); + break; + + default: + ret_value = false; + break; + } + return ret_value; + }); +} + +void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const eprosima::test::StructType& data) +{ + static_cast(scdr); + static_cast(data); +} + + + + +template<> +eProsima_user_DllExport size_t calculate_serialized_size( + eprosima::fastcdr::CdrSizeCalculator& calculator, + const eprosima::test::CompleteTestType& data, + size_t& current_alignment) +{ + static_cast(data); + + eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding(); + size_t calculated_size {calculator.begin_calculate_type_serialized_size( + eprosima::fastcdr::CdrVersion::XCDRv2 == calculator.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + current_alignment)}; + + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + data.char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + data.uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), + data.int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), + data.uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), + data.int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), + data.uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), + data.int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), + data.uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(8), + data.float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(9), + data.double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(10), + data.bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(11), + data.string_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(12), + data.enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(13), + data.enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(14), + data.struct_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(15), + data.array_char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(16), + data.array_uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(17), + data.array_int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(18), + data.array_uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(19), + data.array_int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(20), + data.array_uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(21), + data.array_int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(22), + data.array_uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(23), + data.array_float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(24), + data.array_double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(25), + data.array_bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(26), + data.array_enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(27), + data.array_enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(28), + data.array_struct_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(29), + data.bounded_sequence_char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(30), + data.bounded_sequence_uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(31), + data.bounded_sequence_int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(32), + data.bounded_sequence_uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(33), + data.bounded_sequence_int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(34), + data.bounded_sequence_uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(35), + data.bounded_sequence_int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(36), + data.bounded_sequence_uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(37), + data.bounded_sequence_float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(38), + data.bounded_sequence_double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(39), + data.bounded_sequence_bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(40), + data.bounded_sequence_enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(41), + data.bounded_sequence_enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(42), + data.bounded_sequence_struct_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(43), + data.unbounded_sequence_char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(44), + data.unbounded_sequence_uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(45), + data.unbounded_sequence_int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(46), + data.unbounded_sequence_uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(47), + data.unbounded_sequence_int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(48), + data.unbounded_sequence_uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(49), + data.unbounded_sequence_int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(50), + data.unbounded_sequence_uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(51), + data.unbounded_sequence_float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(52), + data.unbounded_sequence_double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(53), + data.unbounded_sequence_bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(54), + data.unbounded_sequence_enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(55), + data.unbounded_sequence_enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(56), + data.unbounded_sequence_struct_field(), current_alignment); + + + calculated_size += calculator.end_calculate_type_serialized_size(previous_encoding, current_alignment); + + return calculated_size; +} + +template<> +eProsima_user_DllExport void serialize( + eprosima::fastcdr::Cdr& scdr, + const eprosima::test::CompleteTestType& data) +{ + eprosima::fastcdr::Cdr::state current_state(scdr); + scdr.begin_serialize_type(current_state, + eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR); + + scdr + << eprosima::fastcdr::MemberId(0) << data.char_field() + << eprosima::fastcdr::MemberId(1) << data.uint8_field() + << eprosima::fastcdr::MemberId(2) << data.int16_field() + << eprosima::fastcdr::MemberId(3) << data.uint16_field() + << eprosima::fastcdr::MemberId(4) << data.int32_field() + << eprosima::fastcdr::MemberId(5) << data.uint32_field() + << eprosima::fastcdr::MemberId(6) << data.int64_field() + << eprosima::fastcdr::MemberId(7) << data.uint64_field() + << eprosima::fastcdr::MemberId(8) << data.float_field() + << eprosima::fastcdr::MemberId(9) << data.double_field() + << eprosima::fastcdr::MemberId(10) << data.bool_field() + << eprosima::fastcdr::MemberId(11) << data.string_field() + << eprosima::fastcdr::MemberId(12) << data.enum_field() + << eprosima::fastcdr::MemberId(13) << data.enum2_field() + << eprosima::fastcdr::MemberId(14) << data.struct_field() + << eprosima::fastcdr::MemberId(15) << data.array_char_field() + << eprosima::fastcdr::MemberId(16) << data.array_uint8_field() + << eprosima::fastcdr::MemberId(17) << data.array_int16_field() + << eprosima::fastcdr::MemberId(18) << data.array_uint16_field() + << eprosima::fastcdr::MemberId(19) << data.array_int32_field() + << eprosima::fastcdr::MemberId(20) << data.array_uint32_field() + << eprosima::fastcdr::MemberId(21) << data.array_int64_field() + << eprosima::fastcdr::MemberId(22) << data.array_uint64_field() + << eprosima::fastcdr::MemberId(23) << data.array_float_field() + << eprosima::fastcdr::MemberId(24) << data.array_double_field() + << eprosima::fastcdr::MemberId(25) << data.array_bool_field() + << eprosima::fastcdr::MemberId(26) << data.array_enum_field() + << eprosima::fastcdr::MemberId(27) << data.array_enum2_field() + << eprosima::fastcdr::MemberId(28) << data.array_struct_field() + << eprosima::fastcdr::MemberId(29) << data.bounded_sequence_char_field() + << eprosima::fastcdr::MemberId(30) << data.bounded_sequence_uint8_field() + << eprosima::fastcdr::MemberId(31) << data.bounded_sequence_int16_field() + << eprosima::fastcdr::MemberId(32) << data.bounded_sequence_uint16_field() + << eprosima::fastcdr::MemberId(33) << data.bounded_sequence_int32_field() + << eprosima::fastcdr::MemberId(34) << data.bounded_sequence_uint32_field() + << eprosima::fastcdr::MemberId(35) << data.bounded_sequence_int64_field() + << eprosima::fastcdr::MemberId(36) << data.bounded_sequence_uint64_field() + << eprosima::fastcdr::MemberId(37) << data.bounded_sequence_float_field() + << eprosima::fastcdr::MemberId(38) << data.bounded_sequence_double_field() + << eprosima::fastcdr::MemberId(39) << data.bounded_sequence_bool_field() + << eprosima::fastcdr::MemberId(40) << data.bounded_sequence_enum_field() + << eprosima::fastcdr::MemberId(41) << data.bounded_sequence_enum2_field() + << eprosima::fastcdr::MemberId(42) << data.bounded_sequence_struct_field() + << eprosima::fastcdr::MemberId(43) << data.unbounded_sequence_char_field() + << eprosima::fastcdr::MemberId(44) << data.unbounded_sequence_uint8_field() + << eprosima::fastcdr::MemberId(45) << data.unbounded_sequence_int16_field() + << eprosima::fastcdr::MemberId(46) << data.unbounded_sequence_uint16_field() + << eprosima::fastcdr::MemberId(47) << data.unbounded_sequence_int32_field() + << eprosima::fastcdr::MemberId(48) << data.unbounded_sequence_uint32_field() + << eprosima::fastcdr::MemberId(49) << data.unbounded_sequence_int64_field() + << eprosima::fastcdr::MemberId(50) << data.unbounded_sequence_uint64_field() + << eprosima::fastcdr::MemberId(51) << data.unbounded_sequence_float_field() + << eprosima::fastcdr::MemberId(52) << data.unbounded_sequence_double_field() + << eprosima::fastcdr::MemberId(53) << data.unbounded_sequence_bool_field() + << eprosima::fastcdr::MemberId(54) << data.unbounded_sequence_enum_field() + << eprosima::fastcdr::MemberId(55) << data.unbounded_sequence_enum2_field() + << eprosima::fastcdr::MemberId(56) << data.unbounded_sequence_struct_field() +; + + scdr.end_serialize_type(current_state); +} + +template<> +eProsima_user_DllExport void deserialize( + eprosima::fastcdr::Cdr& cdr, + eprosima::test::CompleteTestType& data) +{ + cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + [&data](eprosima::fastcdr::Cdr& dcdr, const eprosima::fastcdr::MemberId& mid) -> bool + { + bool ret_value = true; + switch (mid.id) + { + case 0: + dcdr >> data.char_field(); + break; + + case 1: + dcdr >> data.uint8_field(); + break; + + case 2: + dcdr >> data.int16_field(); + break; + + case 3: + dcdr >> data.uint16_field(); + break; + + case 4: + dcdr >> data.int32_field(); + break; + + case 5: + dcdr >> data.uint32_field(); + break; + + case 6: + dcdr >> data.int64_field(); + break; + + case 7: + dcdr >> data.uint64_field(); + break; + + case 8: + dcdr >> data.float_field(); + break; + + case 9: + dcdr >> data.double_field(); + break; + + case 10: + dcdr >> data.bool_field(); + break; + + case 11: + dcdr >> data.string_field(); + break; + + case 12: + dcdr >> data.enum_field(); + break; + + case 13: + dcdr >> data.enum2_field(); + break; + + case 14: + dcdr >> data.struct_field(); + break; + + case 15: + dcdr >> data.array_char_field(); + break; + + case 16: + dcdr >> data.array_uint8_field(); + break; + + case 17: + dcdr >> data.array_int16_field(); + break; + + case 18: + dcdr >> data.array_uint16_field(); + break; + + case 19: + dcdr >> data.array_int32_field(); + break; + + case 20: + dcdr >> data.array_uint32_field(); + break; + + case 21: + dcdr >> data.array_int64_field(); + break; + + case 22: + dcdr >> data.array_uint64_field(); + break; + + case 23: + dcdr >> data.array_float_field(); + break; + + case 24: + dcdr >> data.array_double_field(); + break; + + case 25: + dcdr >> data.array_bool_field(); + break; + + case 26: + dcdr >> data.array_enum_field(); + break; + + case 27: + dcdr >> data.array_enum2_field(); + break; + + case 28: + dcdr >> data.array_struct_field(); + break; + + case 29: + dcdr >> data.bounded_sequence_char_field(); + break; + + case 30: + dcdr >> data.bounded_sequence_uint8_field(); + break; + + case 31: + dcdr >> data.bounded_sequence_int16_field(); + break; + + case 32: + dcdr >> data.bounded_sequence_uint16_field(); + break; + + case 33: + dcdr >> data.bounded_sequence_int32_field(); + break; + + case 34: + dcdr >> data.bounded_sequence_uint32_field(); + break; + + case 35: + dcdr >> data.bounded_sequence_int64_field(); + break; + + case 36: + dcdr >> data.bounded_sequence_uint64_field(); + break; + + case 37: + dcdr >> data.bounded_sequence_float_field(); + break; + + case 38: + dcdr >> data.bounded_sequence_double_field(); + break; + + case 39: + dcdr >> data.bounded_sequence_bool_field(); + break; + + case 40: + dcdr >> data.bounded_sequence_enum_field(); + break; + + case 41: + dcdr >> data.bounded_sequence_enum2_field(); + break; + + case 42: + dcdr >> data.bounded_sequence_struct_field(); + break; + + case 43: + dcdr >> data.unbounded_sequence_char_field(); + break; + + case 44: + dcdr >> data.unbounded_sequence_uint8_field(); + break; + + case 45: + dcdr >> data.unbounded_sequence_int16_field(); + break; + + case 46: + dcdr >> data.unbounded_sequence_uint16_field(); + break; + + case 47: + dcdr >> data.unbounded_sequence_int32_field(); + break; + + case 48: + dcdr >> data.unbounded_sequence_uint32_field(); + break; + + case 49: + dcdr >> data.unbounded_sequence_int64_field(); + break; + + case 50: + dcdr >> data.unbounded_sequence_uint64_field(); + break; + + case 51: + dcdr >> data.unbounded_sequence_float_field(); + break; + + case 52: + dcdr >> data.unbounded_sequence_double_field(); + break; + + case 53: + dcdr >> data.unbounded_sequence_bool_field(); + break; + + case 54: + dcdr >> data.unbounded_sequence_enum_field(); + break; + + case 55: + dcdr >> data.unbounded_sequence_enum2_field(); + break; + + case 56: + dcdr >> data.unbounded_sequence_struct_field(); + break; + + default: + ret_value = false; + break; + } + return ret_value; + }); +} + +void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const eprosima::test::CompleteTestType& data) +{ + static_cast(scdr); + static_cast(data); +} + + +template<> +eProsima_user_DllExport size_t calculate_serialized_size( + eprosima::fastcdr::CdrSizeCalculator& calculator, + const eprosima::test::KeyedCompleteTestType& data, + size_t& current_alignment) +{ + static_cast(data); + + eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding(); + size_t calculated_size {calculator.begin_calculate_type_serialized_size( + eprosima::fastcdr::CdrVersion::XCDRv2 == calculator.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + current_alignment)}; + + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + data.id(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + data.char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(2), + data.uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(3), + data.int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(4), + data.uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(5), + data.int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(6), + data.uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(7), + data.int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(8), + data.uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(9), + data.float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(10), + data.double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(11), + data.bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(12), + data.string_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(13), + data.enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(14), + data.enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(15), + data.struct_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(16), + data.array_char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(17), + data.array_uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(18), + data.array_int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(19), + data.array_uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(20), + data.array_int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(21), + data.array_uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(22), + data.array_int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(23), + data.array_uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(24), + data.array_float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(25), + data.array_double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(26), + data.array_bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(27), + data.array_enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(28), + data.array_enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(29), + data.array_struct_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(30), + data.bounded_sequence_char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(31), + data.bounded_sequence_uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(32), + data.bounded_sequence_int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(33), + data.bounded_sequence_uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(34), + data.bounded_sequence_int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(35), + data.bounded_sequence_uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(36), + data.bounded_sequence_int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(37), + data.bounded_sequence_uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(38), + data.bounded_sequence_float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(39), + data.bounded_sequence_double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(40), + data.bounded_sequence_bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(41), + data.bounded_sequence_enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(42), + data.bounded_sequence_enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(43), + data.bounded_sequence_struct_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(44), + data.unbounded_sequence_char_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(45), + data.unbounded_sequence_uint8_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(46), + data.unbounded_sequence_int16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(47), + data.unbounded_sequence_uint16_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(48), + data.unbounded_sequence_int32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(49), + data.unbounded_sequence_uint32_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(50), + data.unbounded_sequence_int64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(51), + data.unbounded_sequence_uint64_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(52), + data.unbounded_sequence_float_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(53), + data.unbounded_sequence_double_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(54), + data.unbounded_sequence_bool_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(55), + data.unbounded_sequence_enum_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(56), + data.unbounded_sequence_enum2_field(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(57), + data.unbounded_sequence_struct_field(), current_alignment); + + + calculated_size += calculator.end_calculate_type_serialized_size(previous_encoding, current_alignment); + + return calculated_size; +} + +template<> +eProsima_user_DllExport void serialize( + eprosima::fastcdr::Cdr& scdr, + const eprosima::test::KeyedCompleteTestType& data) +{ + eprosima::fastcdr::Cdr::state current_state(scdr); + scdr.begin_serialize_type(current_state, + eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR); + + scdr + << eprosima::fastcdr::MemberId(0) << data.id() + << eprosima::fastcdr::MemberId(1) << data.char_field() + << eprosima::fastcdr::MemberId(2) << data.uint8_field() + << eprosima::fastcdr::MemberId(3) << data.int16_field() + << eprosima::fastcdr::MemberId(4) << data.uint16_field() + << eprosima::fastcdr::MemberId(5) << data.int32_field() + << eprosima::fastcdr::MemberId(6) << data.uint32_field() + << eprosima::fastcdr::MemberId(7) << data.int64_field() + << eprosima::fastcdr::MemberId(8) << data.uint64_field() + << eprosima::fastcdr::MemberId(9) << data.float_field() + << eprosima::fastcdr::MemberId(10) << data.double_field() + << eprosima::fastcdr::MemberId(11) << data.bool_field() + << eprosima::fastcdr::MemberId(12) << data.string_field() + << eprosima::fastcdr::MemberId(13) << data.enum_field() + << eprosima::fastcdr::MemberId(14) << data.enum2_field() + << eprosima::fastcdr::MemberId(15) << data.struct_field() + << eprosima::fastcdr::MemberId(16) << data.array_char_field() + << eprosima::fastcdr::MemberId(17) << data.array_uint8_field() + << eprosima::fastcdr::MemberId(18) << data.array_int16_field() + << eprosima::fastcdr::MemberId(19) << data.array_uint16_field() + << eprosima::fastcdr::MemberId(20) << data.array_int32_field() + << eprosima::fastcdr::MemberId(21) << data.array_uint32_field() + << eprosima::fastcdr::MemberId(22) << data.array_int64_field() + << eprosima::fastcdr::MemberId(23) << data.array_uint64_field() + << eprosima::fastcdr::MemberId(24) << data.array_float_field() + << eprosima::fastcdr::MemberId(25) << data.array_double_field() + << eprosima::fastcdr::MemberId(26) << data.array_bool_field() + << eprosima::fastcdr::MemberId(27) << data.array_enum_field() + << eprosima::fastcdr::MemberId(28) << data.array_enum2_field() + << eprosima::fastcdr::MemberId(29) << data.array_struct_field() + << eprosima::fastcdr::MemberId(30) << data.bounded_sequence_char_field() + << eprosima::fastcdr::MemberId(31) << data.bounded_sequence_uint8_field() + << eprosima::fastcdr::MemberId(32) << data.bounded_sequence_int16_field() + << eprosima::fastcdr::MemberId(33) << data.bounded_sequence_uint16_field() + << eprosima::fastcdr::MemberId(34) << data.bounded_sequence_int32_field() + << eprosima::fastcdr::MemberId(35) << data.bounded_sequence_uint32_field() + << eprosima::fastcdr::MemberId(36) << data.bounded_sequence_int64_field() + << eprosima::fastcdr::MemberId(37) << data.bounded_sequence_uint64_field() + << eprosima::fastcdr::MemberId(38) << data.bounded_sequence_float_field() + << eprosima::fastcdr::MemberId(39) << data.bounded_sequence_double_field() + << eprosima::fastcdr::MemberId(40) << data.bounded_sequence_bool_field() + << eprosima::fastcdr::MemberId(41) << data.bounded_sequence_enum_field() + << eprosima::fastcdr::MemberId(42) << data.bounded_sequence_enum2_field() + << eprosima::fastcdr::MemberId(43) << data.bounded_sequence_struct_field() + << eprosima::fastcdr::MemberId(44) << data.unbounded_sequence_char_field() + << eprosima::fastcdr::MemberId(45) << data.unbounded_sequence_uint8_field() + << eprosima::fastcdr::MemberId(46) << data.unbounded_sequence_int16_field() + << eprosima::fastcdr::MemberId(47) << data.unbounded_sequence_uint16_field() + << eprosima::fastcdr::MemberId(48) << data.unbounded_sequence_int32_field() + << eprosima::fastcdr::MemberId(49) << data.unbounded_sequence_uint32_field() + << eprosima::fastcdr::MemberId(50) << data.unbounded_sequence_int64_field() + << eprosima::fastcdr::MemberId(51) << data.unbounded_sequence_uint64_field() + << eprosima::fastcdr::MemberId(52) << data.unbounded_sequence_float_field() + << eprosima::fastcdr::MemberId(53) << data.unbounded_sequence_double_field() + << eprosima::fastcdr::MemberId(54) << data.unbounded_sequence_bool_field() + << eprosima::fastcdr::MemberId(55) << data.unbounded_sequence_enum_field() + << eprosima::fastcdr::MemberId(56) << data.unbounded_sequence_enum2_field() + << eprosima::fastcdr::MemberId(57) << data.unbounded_sequence_struct_field() +; + + scdr.end_serialize_type(current_state); +} + +template<> +eProsima_user_DllExport void deserialize( + eprosima::fastcdr::Cdr& cdr, + eprosima::test::KeyedCompleteTestType& data) +{ + cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + [&data](eprosima::fastcdr::Cdr& dcdr, const eprosima::fastcdr::MemberId& mid) -> bool + { + bool ret_value = true; + switch (mid.id) + { + case 0: + dcdr >> data.id(); + break; + + case 1: + dcdr >> data.char_field(); + break; + + case 2: + dcdr >> data.uint8_field(); + break; + + case 3: + dcdr >> data.int16_field(); + break; + + case 4: + dcdr >> data.uint16_field(); + break; + + case 5: + dcdr >> data.int32_field(); + break; + + case 6: + dcdr >> data.uint32_field(); + break; + + case 7: + dcdr >> data.int64_field(); + break; + + case 8: + dcdr >> data.uint64_field(); + break; + + case 9: + dcdr >> data.float_field(); + break; + + case 10: + dcdr >> data.double_field(); + break; + + case 11: + dcdr >> data.bool_field(); + break; + + case 12: + dcdr >> data.string_field(); + break; + + case 13: + dcdr >> data.enum_field(); + break; + + case 14: + dcdr >> data.enum2_field(); + break; + + case 15: + dcdr >> data.struct_field(); + break; + + case 16: + dcdr >> data.array_char_field(); + break; + + case 17: + dcdr >> data.array_uint8_field(); + break; + + case 18: + dcdr >> data.array_int16_field(); + break; + + case 19: + dcdr >> data.array_uint16_field(); + break; + + case 20: + dcdr >> data.array_int32_field(); + break; + + case 21: + dcdr >> data.array_uint32_field(); + break; + + case 22: + dcdr >> data.array_int64_field(); + break; + + case 23: + dcdr >> data.array_uint64_field(); + break; + + case 24: + dcdr >> data.array_float_field(); + break; + + case 25: + dcdr >> data.array_double_field(); + break; + + case 26: + dcdr >> data.array_bool_field(); + break; + + case 27: + dcdr >> data.array_enum_field(); + break; + + case 28: + dcdr >> data.array_enum2_field(); + break; + + case 29: + dcdr >> data.array_struct_field(); + break; + + case 30: + dcdr >> data.bounded_sequence_char_field(); + break; + + case 31: + dcdr >> data.bounded_sequence_uint8_field(); + break; + + case 32: + dcdr >> data.bounded_sequence_int16_field(); + break; + + case 33: + dcdr >> data.bounded_sequence_uint16_field(); + break; + + case 34: + dcdr >> data.bounded_sequence_int32_field(); + break; + + case 35: + dcdr >> data.bounded_sequence_uint32_field(); + break; + + case 36: + dcdr >> data.bounded_sequence_int64_field(); + break; + + case 37: + dcdr >> data.bounded_sequence_uint64_field(); + break; + + case 38: + dcdr >> data.bounded_sequence_float_field(); + break; + + case 39: + dcdr >> data.bounded_sequence_double_field(); + break; + + case 40: + dcdr >> data.bounded_sequence_bool_field(); + break; + + case 41: + dcdr >> data.bounded_sequence_enum_field(); + break; + + case 42: + dcdr >> data.bounded_sequence_enum2_field(); + break; + + case 43: + dcdr >> data.bounded_sequence_struct_field(); + break; + + case 44: + dcdr >> data.unbounded_sequence_char_field(); + break; + + case 45: + dcdr >> data.unbounded_sequence_uint8_field(); + break; + + case 46: + dcdr >> data.unbounded_sequence_int16_field(); + break; + + case 47: + dcdr >> data.unbounded_sequence_uint16_field(); + break; + + case 48: + dcdr >> data.unbounded_sequence_int32_field(); + break; + + case 49: + dcdr >> data.unbounded_sequence_uint32_field(); + break; + + case 50: + dcdr >> data.unbounded_sequence_int64_field(); + break; + + case 51: + dcdr >> data.unbounded_sequence_uint64_field(); + break; + + case 52: + dcdr >> data.unbounded_sequence_float_field(); + break; + + case 53: + dcdr >> data.unbounded_sequence_double_field(); + break; + + case 54: + dcdr >> data.unbounded_sequence_bool_field(); + break; + + case 55: + dcdr >> data.unbounded_sequence_enum_field(); + break; + + case 56: + dcdr >> data.unbounded_sequence_enum2_field(); + break; + + case 57: + dcdr >> data.unbounded_sequence_struct_field(); + break; + + default: + ret_value = false; + break; + } + return ret_value; + }); +} + +void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const eprosima::test::KeyedCompleteTestType& data) +{ + static_cast(scdr); + static_cast(data); + scdr << data.id(); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + + + + + +} // namespace fastcdr +} // namespace eprosima + +#endif // _FAST_DDS_GENERATED_EPROSIMA_TEST_TEST_MODULESCDRAUX_IPP_ \ No newline at end of file diff --git a/fastdds_python/test/types/test_modulesPubSubTypes.cxx b/fastdds_python/test/types/test_modulesPubSubTypes.cxx index d396d86e..180db69b 100644 --- a/fastdds_python/test/types/test_modulesPubSubTypes.cxx +++ b/fastdds_python/test/types/test_modulesPubSubTypes.cxx @@ -16,31 +16,31 @@ * @file test_modulesPubSubTypes.cpp * This header file contains the implementation of the serialization functions. * - * This file was generated by the tool fastcdrgen. + * This file was generated by the tool fastddsgen. */ #include #include +#include #include "test_modulesPubSubTypes.h" +#include "test_modulesCdrAux.hpp" using SerializedPayload_t = eprosima::fastrtps::rtps::SerializedPayload_t; using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t; +using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t; namespace eprosima { namespace test { - - StructTypePubSubType::StructTypePubSubType() { setName("eprosima::test::StructType"); - auto type_size = StructType::getMaxCdrSerializedSize(); - type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */ - m_typeSize = static_cast(type_size) + 4; /*encapsulation*/ - m_isGetKeyDefined = StructType::isKeyDefined(); - size_t keyLength = StructType::getKeyMaxCdrSerializedSize() > 16 ? - StructType::getKeyMaxCdrSerializedSize() : 16; + uint32_t type_size = eprosima_test_StructType_max_cdr_typesize; + type_size += static_cast(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */ + m_typeSize = type_size + 4; /*encapsulation*/ + m_isGetKeyDefined = false; + uint32_t keyLength = eprosima_test_StructType_max_key_cdr_typesize > 16 ? eprosima_test_StructType_max_key_cdr_typesize : 16; m_keyBuffer = reinterpret_cast(malloc(keyLength)); memset(m_keyBuffer, 0, keyLength); } @@ -55,22 +55,29 @@ namespace eprosima { bool StructTypePubSubType::serialize( void* data, - SerializedPayload_t* payload) + SerializedPayload_t* payload, + DataRepresentationId_t data_representation) { StructType* p_type = static_cast(data); // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->max_size); // Object that serializes the data. - eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 : eprosima::fastcdr::CdrVersion::XCDRv2); payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + ser.set_encoding_flag( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR : + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2); try { // Serialize encapsulation ser.serialize_encapsulation(); // Serialize the object. - p_type->serialize(ser); + ser << *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -78,7 +85,7 @@ namespace eprosima { } // Get the serialized length - payload->length = static_cast(ser.getSerializedDataLength()); + payload->length = static_cast(ser.get_serialized_data_length()); return true; } @@ -95,14 +102,14 @@ namespace eprosima { eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->length); // Object that deserializes the data. - eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN); // Deserialize encapsulation. deser.read_encapsulation(); payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; // Deserialize the object. - p_type->deserialize(deser); + deser >> *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -113,12 +120,18 @@ namespace eprosima { } std::function StructTypePubSubType::getSerializedSizeProvider( - void* data) + void* data, + DataRepresentationId_t data_representation) { - return [data]() -> uint32_t + return [data, data_representation]() -> uint32_t { - return static_cast(type::getCdrSerializedSize(*static_cast(data))) + - 4u /*encapsulation*/; + eprosima::fastcdr::CdrSizeCalculator calculator( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2); + size_t current_alignment {0}; + return static_cast(calculator.calculate_serialized_size( + *static_cast(data), current_alignment)) + + 4u /*encapsulation*/; }; } @@ -147,15 +160,15 @@ namespace eprosima { // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(m_keyBuffer), - StructType::getKeyMaxCdrSerializedSize()); + eprosima_test_StructType_max_key_cdr_typesize); // Object that serializes the data. eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS); - p_type->serializeKey(ser); - if (force_md5 || StructType::getKeyMaxCdrSerializedSize() > 16) + eprosima::fastcdr::serialize_key(ser, *p_type); + if (force_md5 || eprosima_test_StructType_max_key_cdr_typesize > 16) { m_md5.init(); - m_md5.update(m_keyBuffer, static_cast(ser.getSerializedDataLength())); + m_md5.update(m_keyBuffer, static_cast(ser.get_serialized_data_length())); m_md5.finalize(); for (uint8_t i = 0; i < 16; ++i) { @@ -177,12 +190,11 @@ namespace eprosima { CompleteTestTypePubSubType::CompleteTestTypePubSubType() { setName("eprosima::test::CompleteTestType"); - auto type_size = CompleteTestType::getMaxCdrSerializedSize(); - type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */ - m_typeSize = static_cast(type_size) + 4; /*encapsulation*/ - m_isGetKeyDefined = CompleteTestType::isKeyDefined(); - size_t keyLength = CompleteTestType::getKeyMaxCdrSerializedSize() > 16 ? - CompleteTestType::getKeyMaxCdrSerializedSize() : 16; + uint32_t type_size = eprosima_test_CompleteTestType_max_cdr_typesize; + type_size += static_cast(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */ + m_typeSize = type_size + 4; /*encapsulation*/ + m_isGetKeyDefined = false; + uint32_t keyLength = eprosima_test_CompleteTestType_max_key_cdr_typesize > 16 ? eprosima_test_CompleteTestType_max_key_cdr_typesize : 16; m_keyBuffer = reinterpret_cast(malloc(keyLength)); memset(m_keyBuffer, 0, keyLength); } @@ -197,22 +209,29 @@ namespace eprosima { bool CompleteTestTypePubSubType::serialize( void* data, - SerializedPayload_t* payload) + SerializedPayload_t* payload, + DataRepresentationId_t data_representation) { CompleteTestType* p_type = static_cast(data); // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->max_size); // Object that serializes the data. - eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 : eprosima::fastcdr::CdrVersion::XCDRv2); payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + ser.set_encoding_flag( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR : + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2); try { // Serialize encapsulation ser.serialize_encapsulation(); // Serialize the object. - p_type->serialize(ser); + ser << *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -220,7 +239,7 @@ namespace eprosima { } // Get the serialized length - payload->length = static_cast(ser.getSerializedDataLength()); + payload->length = static_cast(ser.get_serialized_data_length()); return true; } @@ -237,14 +256,14 @@ namespace eprosima { eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->length); // Object that deserializes the data. - eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN); // Deserialize encapsulation. deser.read_encapsulation(); payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; // Deserialize the object. - p_type->deserialize(deser); + deser >> *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -255,12 +274,18 @@ namespace eprosima { } std::function CompleteTestTypePubSubType::getSerializedSizeProvider( - void* data) + void* data, + DataRepresentationId_t data_representation) { - return [data]() -> uint32_t + return [data, data_representation]() -> uint32_t { - return static_cast(type::getCdrSerializedSize(*static_cast(data))) + - 4u /*encapsulation*/; + eprosima::fastcdr::CdrSizeCalculator calculator( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2); + size_t current_alignment {0}; + return static_cast(calculator.calculate_serialized_size( + *static_cast(data), current_alignment)) + + 4u /*encapsulation*/; }; } @@ -289,15 +314,15 @@ namespace eprosima { // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(m_keyBuffer), - CompleteTestType::getKeyMaxCdrSerializedSize()); + eprosima_test_CompleteTestType_max_key_cdr_typesize); // Object that serializes the data. eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS); - p_type->serializeKey(ser); - if (force_md5 || CompleteTestType::getKeyMaxCdrSerializedSize() > 16) + eprosima::fastcdr::serialize_key(ser, *p_type); + if (force_md5 || eprosima_test_CompleteTestType_max_key_cdr_typesize > 16) { m_md5.init(); - m_md5.update(m_keyBuffer, static_cast(ser.getSerializedDataLength())); + m_md5.update(m_keyBuffer, static_cast(ser.get_serialized_data_length())); m_md5.finalize(); for (uint8_t i = 0; i < 16; ++i) { @@ -317,12 +342,11 @@ namespace eprosima { KeyedCompleteTestTypePubSubType::KeyedCompleteTestTypePubSubType() { setName("eprosima::test::KeyedCompleteTestType"); - auto type_size = KeyedCompleteTestType::getMaxCdrSerializedSize(); - type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */ - m_typeSize = static_cast(type_size) + 4; /*encapsulation*/ - m_isGetKeyDefined = KeyedCompleteTestType::isKeyDefined(); - size_t keyLength = KeyedCompleteTestType::getKeyMaxCdrSerializedSize() > 16 ? - KeyedCompleteTestType::getKeyMaxCdrSerializedSize() : 16; + uint32_t type_size = eprosima_test_KeyedCompleteTestType_max_cdr_typesize; + type_size += static_cast(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */ + m_typeSize = type_size + 4; /*encapsulation*/ + m_isGetKeyDefined = true; + uint32_t keyLength = eprosima_test_KeyedCompleteTestType_max_key_cdr_typesize > 16 ? eprosima_test_KeyedCompleteTestType_max_key_cdr_typesize : 16; m_keyBuffer = reinterpret_cast(malloc(keyLength)); memset(m_keyBuffer, 0, keyLength); } @@ -337,22 +361,29 @@ namespace eprosima { bool KeyedCompleteTestTypePubSubType::serialize( void* data, - SerializedPayload_t* payload) + SerializedPayload_t* payload, + DataRepresentationId_t data_representation) { KeyedCompleteTestType* p_type = static_cast(data); // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->max_size); // Object that serializes the data. - eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 : eprosima::fastcdr::CdrVersion::XCDRv2); payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + ser.set_encoding_flag( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR : + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2); try { // Serialize encapsulation ser.serialize_encapsulation(); // Serialize the object. - p_type->serialize(ser); + ser << *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -360,7 +391,7 @@ namespace eprosima { } // Get the serialized length - payload->length = static_cast(ser.getSerializedDataLength()); + payload->length = static_cast(ser.get_serialized_data_length()); return true; } @@ -377,14 +408,14 @@ namespace eprosima { eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->length); // Object that deserializes the data. - eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR); + eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN); // Deserialize encapsulation. deser.read_encapsulation(); payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; // Deserialize the object. - p_type->deserialize(deser); + deser >> *p_type; } catch (eprosima::fastcdr::exception::Exception& /*exception*/) { @@ -395,12 +426,18 @@ namespace eprosima { } std::function KeyedCompleteTestTypePubSubType::getSerializedSizeProvider( - void* data) + void* data, + DataRepresentationId_t data_representation) { - return [data]() -> uint32_t + return [data, data_representation]() -> uint32_t { - return static_cast(type::getCdrSerializedSize(*static_cast(data))) + - 4u /*encapsulation*/; + eprosima::fastcdr::CdrSizeCalculator calculator( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2); + size_t current_alignment {0}; + return static_cast(calculator.calculate_serialized_size( + *static_cast(data), current_alignment)) + + 4u /*encapsulation*/; }; } @@ -429,15 +466,15 @@ namespace eprosima { // Object that manages the raw buffer. eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(m_keyBuffer), - KeyedCompleteTestType::getKeyMaxCdrSerializedSize()); + eprosima_test_KeyedCompleteTestType_max_key_cdr_typesize); // Object that serializes the data. eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS); - p_type->serializeKey(ser); - if (force_md5 || KeyedCompleteTestType::getKeyMaxCdrSerializedSize() > 16) + eprosima::fastcdr::serialize_key(ser, *p_type); + if (force_md5 || eprosima_test_KeyedCompleteTestType_max_key_cdr_typesize > 16) { m_md5.init(); - m_md5.update(m_keyBuffer, static_cast(ser.getSerializedDataLength())); + m_md5.update(m_keyBuffer, static_cast(ser.get_serialized_data_length())); m_md5.finalize(); for (uint8_t i = 0; i < 16; ++i) { diff --git a/fastdds_python/test/types/test_modulesPubSubTypes.h b/fastdds_python/test/types/test_modulesPubSubTypes.h index 0767d4c2..c36efa15 100644 --- a/fastdds_python/test/types/test_modulesPubSubTypes.h +++ b/fastdds_python/test/types/test_modulesPubSubTypes.h @@ -16,20 +16,23 @@ * @file test_modulesPubSubTypes.h * This header file contains the declaration of the serialization functions. * - * This file was generated by the tool fastcdrgen. + * This file was generated by the tool fastddsgen. */ #ifndef _FAST_DDS_GENERATED_EPROSIMA_TEST_TEST_MODULES_PUBSUBTYPES_H_ #define _FAST_DDS_GENERATED_EPROSIMA_TEST_TEST_MODULES_PUBSUBTYPES_H_ +#include #include +#include +#include #include #include "test_modules.h" -#if !defined(GEN_API_VER) || (GEN_API_VER != 1) +#if !defined(GEN_API_VER) || (GEN_API_VER != 2) #error \ Generated test_modules is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen. #endif // GEN_API_VER @@ -39,8 +42,6 @@ namespace eprosima namespace test { - - /*! * @brief This class represents the TopicDataType of the type StructType defined by the user in the IDL file. * @ingroup test_modules @@ -53,27 +54,42 @@ namespace eprosima eProsima_user_DllExport StructTypePubSubType(); - eProsima_user_DllExport virtual ~StructTypePubSubType() override; + eProsima_user_DllExport ~StructTypePubSubType() override; + + eProsima_user_DllExport bool serialize( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload) override + { + return serialize(data, payload, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } - eProsima_user_DllExport virtual bool serialize( + eProsima_user_DllExport bool serialize( void* data, - eprosima::fastrtps::rtps::SerializedPayload_t* payload) override; + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; - eProsima_user_DllExport virtual bool deserialize( + eProsima_user_DllExport bool deserialize( eprosima::fastrtps::rtps::SerializedPayload_t* payload, void* data) override; - eProsima_user_DllExport virtual std::function getSerializedSizeProvider( - void* data) override; + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data) override + { + return getSerializedSizeProvider(data, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } + + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; - eProsima_user_DllExport virtual bool getKey( + eProsima_user_DllExport bool getKey( void* data, eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, bool force_md5 = false) override; - eProsima_user_DllExport virtual void* createData() override; + eProsima_user_DllExport void* createData() override; - eProsima_user_DllExport virtual void deleteData( + eProsima_user_DllExport void deleteData( void* data) override; #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED @@ -96,7 +112,7 @@ namespace eprosima eProsima_user_DllExport inline bool construct_sample( void* memory) const override { - (void)memory; + static_cast(memory); return false; } @@ -121,27 +137,42 @@ namespace eprosima eProsima_user_DllExport CompleteTestTypePubSubType(); - eProsima_user_DllExport virtual ~CompleteTestTypePubSubType() override; + eProsima_user_DllExport ~CompleteTestTypePubSubType() override; - eProsima_user_DllExport virtual bool serialize( + eProsima_user_DllExport bool serialize( void* data, - eprosima::fastrtps::rtps::SerializedPayload_t* payload) override; + eprosima::fastrtps::rtps::SerializedPayload_t* payload) override + { + return serialize(data, payload, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } - eProsima_user_DllExport virtual bool deserialize( + eProsima_user_DllExport bool serialize( + void* data, eprosima::fastrtps::rtps::SerializedPayload_t* payload, - void* data) override; + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; - eProsima_user_DllExport virtual std::function getSerializedSizeProvider( + eProsima_user_DllExport bool deserialize( + eprosima::fastrtps::rtps::SerializedPayload_t* payload, void* data) override; - eProsima_user_DllExport virtual bool getKey( + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data) override + { + return getSerializedSizeProvider(data, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } + + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; + + eProsima_user_DllExport bool getKey( void* data, eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, bool force_md5 = false) override; - eProsima_user_DllExport virtual void* createData() override; + eProsima_user_DllExport void* createData() override; - eProsima_user_DllExport virtual void deleteData( + eProsima_user_DllExport void deleteData( void* data) override; #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED @@ -164,7 +195,7 @@ namespace eprosima eProsima_user_DllExport inline bool construct_sample( void* memory) const override { - (void)memory; + static_cast(memory); return false; } @@ -187,27 +218,42 @@ namespace eprosima eProsima_user_DllExport KeyedCompleteTestTypePubSubType(); - eProsima_user_DllExport virtual ~KeyedCompleteTestTypePubSubType() override; + eProsima_user_DllExport ~KeyedCompleteTestTypePubSubType() override; + + eProsima_user_DllExport bool serialize( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload) override + { + return serialize(data, payload, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } - eProsima_user_DllExport virtual bool serialize( + eProsima_user_DllExport bool serialize( void* data, - eprosima::fastrtps::rtps::SerializedPayload_t* payload) override; + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; - eProsima_user_DllExport virtual bool deserialize( + eProsima_user_DllExport bool deserialize( eprosima::fastrtps::rtps::SerializedPayload_t* payload, void* data) override; - eProsima_user_DllExport virtual std::function getSerializedSizeProvider( - void* data) override; + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data) override + { + return getSerializedSizeProvider(data, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } + + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; - eProsima_user_DllExport virtual bool getKey( + eProsima_user_DllExport bool getKey( void* data, eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, bool force_md5 = false) override; - eProsima_user_DllExport virtual void* createData() override; + eProsima_user_DllExport void* createData() override; - eProsima_user_DllExport virtual void deleteData( + eProsima_user_DllExport void deleteData( void* data) override; #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED @@ -230,7 +276,7 @@ namespace eprosima eProsima_user_DllExport inline bool construct_sample( void* memory) const override { - (void)memory; + static_cast(memory); return false; } diff --git a/fastdds_python/test/types/test_modulesPubSubTypes.i b/fastdds_python/test/types/test_modulesPubSubTypes.i index 245ae9b8..f3b1a453 100644 --- a/fastdds_python/test/types/test_modulesPubSubTypes.i +++ b/fastdds_python/test/types/test_modulesPubSubTypes.i @@ -16,7 +16,7 @@ * @file test_modulesPubSubTypes.i * This header file contains the SWIG interface of the serialization functions. * - * This file was generated by the tool fastcdrgen. + * This file was generated by the tool fastddsgen. */ %import(module="fastdds") "fastdds/dds/topic/TopicDataType.hpp"; @@ -25,6 +25,6 @@ #include "test_modulesPubSubTypes.h" %} -#define GEN_API_VER 1 +#define GEN_API_VER 2 %include "test_modulesPubSubTypes.h"