From 7270dc456c37baf53cc0e5d2f57bae1d83aec9ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez?= Date: Fri, 24 Nov 2023 08:06:28 +0100 Subject: [PATCH] Regenerated IDL files with types header-only fastddsgen version (#4042) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refs #19971. Remove -cdr option in script Signed-off-by: Ricardo González Moreno * Refs #19960. Apply types header-only Signed-off-by: Ricardo González Moreno * Refs #19960. Fix compilation errors after rebase Signed-off-by: Ricardo González Moreno * Refs #19960. Trying compile VS2017 Signed-off-by: Ricardo González Moreno --------- Signed-off-by: Ricardo González Moreno --- .../HelloWorld.cxx | 168 - .../HelloWorld.hpp} | 115 +- .../HelloWorldCdrAux.hpp | 2 +- .../HelloWorldPubSubTypes.cxx | 3 + .../HelloWorldPubSubTypes.h | 2 +- .../HelloWorldv1.cxx | 288 - .../HelloWorldv1.h | 243 - .../BasicConfigurationExample/HelloWorld.cxx | 168 - .../HelloWorld.hpp} | 115 +- .../HelloWorldCdrAux.hpp | 2 +- .../HelloWorldPubSubTypes.cxx | 3 + .../HelloWorldPubSubTypes.h | 2 +- .../HelloWorldv1.cxx | 288 - .../BasicConfigurationExample/HelloWorldv1.h | 243 - examples/cpp/dds/Configurability/sample.cxx | 158 - .../sample.h => Configurability/sample.hpp} | 110 +- .../cpp/dds/Configurability/sampleCdrAux.hpp | 2 +- .../dds/Configurability/samplePubSubTypes.cxx | 3 + .../dds/Configurability/samplePubSubTypes.h | 2 +- examples/cpp/dds/Configurability/samplev1.cxx | 280 - examples/cpp/dds/Configurability/samplev1.h | 236 - .../CMakeLists.txt | 2 - .../HelloWorld.cxx | 172 - .../HelloWorld.hpp | 242 + .../HelloWorldCdrAux.hpp | 2 +- .../HelloWorldPubSubTypes.cxx | 3 + .../HelloWorldPubSubTypes.h | 2 +- .../HelloWorldTypeObject.cxx | 2 +- .../HelloWorldv1.cxx | 290 - .../HelloWorldv1.h | 243 - .../cpp/dds/CustomListenerExample/Topic.cxx | 168 - .../Topic.hpp} | 115 +- .../dds/CustomListenerExample/TopicCdrAux.hpp | 2 +- .../TopicPubSubTypes.cxx | 3 + .../CustomListenerExample/TopicPubSubTypes.h | 2 +- .../cpp/dds/CustomListenerExample/Topicv1.cxx | 286 - .../cpp/dds/CustomListenerExample/Topicv1.h | 243 - .../CustomPayloadPoolData.cxx | 168 - ...adPoolData.h => CustomPayloadPoolData.hpp} | 115 +- .../CustomPayloadPoolDataCdrAux.hpp | 2 +- .../CustomPayloadPoolDataPubSubTypes.cxx | 3 + .../CustomPayloadPoolDataPubSubTypes.h | 2 +- .../CustomPayloadPoolDatav1.cxx | 286 - .../CustomPayloadPoolDatav1.h | 243 - .../DeadlineQoSExample/deadlinepayload.cxx | 168 - ...{deadlinepayload.h => deadlinepayload.hpp} | 115 +- .../deadlinepayloadCdrAux.hpp | 2 +- .../deadlinepayloadPubSubTypes.cxx | 3 + .../deadlinepayloadPubSubTypes.h | 2 +- .../DeadlineQoSExample/deadlinepayloadv1.cxx | 294 - .../DeadlineQoSExample/deadlinepayloadv1.h | 243 - .../DisablePositiveACKsPublisher.h | 2 +- .../DisablePositiveACKsSubscriber.h | 2 +- .../cpp/dds/DisablePositiveACKs/Topic.cxx | 168 - .../{Topic.h => Topic.hpp} | 115 +- .../dds/DisablePositiveACKs/TopicCdrAux.hpp | 2 +- .../DisablePositiveACKs/TopicPubSubTypes.cxx | 3 + .../DisablePositiveACKs/TopicPubSubTypes.h | 2 +- .../cpp/dds/DisablePositiveACKs/Topicv1.cxx | 286 - .../cpp/dds/DisablePositiveACKs/Topicv1.h | 243 - .../types/HelloWorld.cxx | 168 - .../types/HelloWorld.hpp} | 115 +- .../types/HelloWorldCdrAux.hpp | 2 +- .../types/HelloWorldPubSubTypes.cxx | 3 + .../types/HelloWorldPubSubTypes.h | 2 +- .../types/HelloWorldv1.cxx | 286 - .../types/HelloWorldv1.h | 243 - .../cpp/dds/Filtering/FilteringExample.cxx | 124 - ...ilteringExample.h => FilteringExample.hpp} | 88 +- .../dds/Filtering/FilteringExampleCdrAux.hpp | 2 +- .../Filtering/FilteringExamplePubSubTypes.cxx | 3 + .../Filtering/FilteringExamplePubSubTypes.h | 2 +- .../cpp/dds/Filtering/FilteringExamplev1.cxx | 223 - .../cpp/dds/Filtering/FilteringExamplev1.h | 215 - .../FlowControlExample/FlowControlExample.cxx | 168 - ...ontrolExample.h => FlowControlExample.hpp} | 114 +- .../FlowControlExampleCdrAux.hpp | 2 +- .../FlowControlExamplePubSubTypes.cxx | 3 + .../FlowControlExamplePubSubTypes.h | 2 +- .../FlowControlExamplev1.cxx | 288 - .../FlowControlExample/FlowControlExamplev1.h | 243 - .../cpp/dds/HelloWorldExample/HelloWorld.cxx | 168 - .../HelloWorld.hpp} | 115 +- .../HelloWorldExample/HelloWorldCdrAux.hpp | 2 +- .../HelloWorldPubSubTypes.cxx | 3 + .../HelloWorldExample/HelloWorldPubSubTypes.h | 2 +- .../dds/HelloWorldExample/HelloWorldv1.cxx | 286 - .../cpp/dds/HelloWorldExample/HelloWorldv1.h | 243 - .../HelloWorld.cxx | 168 - .../{HelloWorld.h => HelloWorld.hpp} | 115 +- .../HelloWorldCdrAux.hpp | 2 +- .../HelloWorldPubSubTypes.cxx | 3 + .../HelloWorldPubSubTypes.h | 2 +- .../HelloWorldv1.cxx | 290 - .../HelloWorldv1.h | 243 - .../HelloWorldExampleSharedMem/HelloWorld.cxx | 212 - .../{HelloWorld.h => HelloWorld.hpp} | 142 +- .../HelloWorldCdrAux.hpp | 2 +- .../HelloWorldPubSubTypes.cxx | 3 + .../HelloWorldPubSubTypes.h | 2 +- .../HelloWorldPublisher.h | 2 +- .../HelloWorldSubscriber.h | 2 +- .../HelloWorldv1.cxx | 351 - .../HelloWorldExampleSharedMem/HelloWorldv1.h | 271 - .../dds/HelloWorldExampleTCP/HelloWorld.cxx | 168 - .../HelloWorld.hpp} | 115 +- .../HelloWorldExampleTCP/HelloWorldCdrAux.hpp | 2 +- .../HelloWorldPubSubTypes.cxx | 3 + .../HelloWorldPubSubTypes.h | 2 +- .../HelloWorldPublisher.h | 2 +- .../HelloWorldSubscriber.h | 2 +- .../dds/HelloWorldExampleTCP/HelloWorldv1.cxx | 286 - .../dds/HelloWorldExampleTCP/HelloWorldv1.h | 243 - examples/cpp/dds/HistoryKind/sample.cxx | 158 - .../{Keys/sample.h => HistoryKind/sample.hpp} | 110 +- examples/cpp/dds/HistoryKind/sampleCdrAux.hpp | 2 +- .../cpp/dds/HistoryKind/samplePubSubTypes.cxx | 3 + .../cpp/dds/HistoryKind/samplePubSubTypes.h | 2 +- examples/cpp/dds/HistoryKind/samplev1.cxx | 280 - examples/cpp/dds/HistoryKind/samplev1.h | 236 - examples/cpp/dds/Keys/sample.cxx | 158 - .../sample.h => Keys/sample.hpp} | 110 +- examples/cpp/dds/Keys/sampleCdrAux.hpp | 2 +- examples/cpp/dds/Keys/samplePubSubTypes.cxx | 3 + examples/cpp/dds/Keys/samplePubSubTypes.h | 2 +- examples/cpp/dds/Keys/samplev1.cxx | 280 - examples/cpp/dds/Keys/samplev1.h | 236 - examples/cpp/dds/LateJoiners/sample.cxx | 158 - .../dds/LateJoiners/{sample.h => sample.hpp} | 110 +- examples/cpp/dds/LateJoiners/sampleCdrAux.hpp | 2 +- .../cpp/dds/LateJoiners/samplePubSubTypes.cxx | 3 + .../cpp/dds/LateJoiners/samplePubSubTypes.h | 2 +- examples/cpp/dds/LateJoiners/samplev1.cxx | 280 - examples/cpp/dds/LateJoiners/samplev1.h | 236 - .../cpp/dds/LifespanQoSExample/Lifespan.cxx | 168 - .../{Lifespan.h => Lifespan.hpp} | 115 +- .../dds/LifespanQoSExample/LifespanCdrAux.hpp | 2 +- .../LifespanPubSubTypes.cxx | 3 + .../LifespanQoSExample/LifespanPubSubTypes.h | 2 +- .../LifespanQoSExample/LifespanPublisher.h | 2 +- .../LifespanQoSExample/LifespanSubscriber.h | 2 +- .../cpp/dds/LifespanQoSExample/Lifespanv1.cxx | 286 - .../cpp/dds/LifespanQoSExample/Lifespanv1.h | 243 - .../dds/LivelinessQoS/LivelinessPublisher.h | 2 +- .../dds/LivelinessQoS/LivelinessSubscriber.h | 2 +- examples/cpp/dds/LivelinessQoS/Topic.cxx | 168 - .../Topic.h => LivelinessQoS/Topic.hpp} | 115 +- .../cpp/dds/LivelinessQoS/TopicCdrAux.hpp | 2 +- .../dds/LivelinessQoS/TopicPubSubTypes.cxx | 3 + .../cpp/dds/LivelinessQoS/TopicPubSubTypes.h | 2 +- examples/cpp/dds/LivelinessQoS/Topicv1.cxx | 286 - examples/cpp/dds/LivelinessQoS/Topicv1.h | 243 - .../OwnershipStrength.cxx | 202 - ...ershipStrength.h => OwnershipStrength.hpp} | 137 +- .../OwnershipStrengthCdrAux.hpp | 2 +- .../OwnershipStrengthPubSubTypes.cxx | 3 + .../OwnershipStrengthPubSubTypes.h | 2 +- .../OwnershipStrengthv1.cxx | 339 - .../OwnershipStrengthv1.h | 264 - .../dds/RequestReplyExample/CMakeLists.txt | 2 - .../dds/RequestReplyExample/Calculator.cxx | 271 - .../{Calculator.h => Calculator.hpp} | 193 +- .../RequestReplyExample/CalculatorCdrAux.hpp | 2 +- .../CalculatorPubSubTypes.cxx | 3 + .../CalculatorPubSubTypes.h | 2 +- .../dds/RequestReplyExample/Calculatorv1.cxx | 467 - .../dds/RequestReplyExample/Calculatorv1.h | 407 - .../dds/SampleConfig_Controller/sample.cxx | 158 - .../cpp/dds/SampleConfig_Controller/sample.h | 188 - .../dds/SampleConfig_Controller/sample.hpp | 228 + .../SampleConfig_Controller/sampleCdrAux.hpp | 2 +- .../samplePubSubTypes.cxx | 3 + .../samplePubSubTypes.h | 2 +- .../dds/SampleConfig_Controller/samplev1.cxx | 280 - .../dds/SampleConfig_Controller/samplev1.h | 236 - .../cpp/dds/SampleConfig_Events/sample.cxx | 158 - examples/cpp/dds/SampleConfig_Events/sample.h | 188 - .../cpp/dds/SampleConfig_Events/sample.hpp | 228 + .../dds/SampleConfig_Events/sampleCdrAux.hpp | 2 +- .../SampleConfig_Events/samplePubSubTypes.cxx | 3 + .../SampleConfig_Events/samplePubSubTypes.h | 2 +- .../cpp/dds/SampleConfig_Events/samplev1.cxx | 280 - .../cpp/dds/SampleConfig_Events/samplev1.h | 236 - .../dds/SampleConfig_Multimedia/sample.cxx | 158 - .../cpp/dds/SampleConfig_Multimedia/sample.h | 188 - .../dds/SampleConfig_Multimedia/sample.hpp | 228 + .../SampleConfig_Multimedia/sampleCdrAux.hpp | 2 +- .../samplePubSubTypes.cxx | 3 + .../samplePubSubTypes.h | 2 +- .../dds/SampleConfig_Multimedia/samplev1.cxx | 280 - .../dds/SampleConfig_Multimedia/samplev1.h | 236 - .../SecureHelloWorldExample/HelloWorld.cxx | 168 - .../dds/SecureHelloWorldExample/HelloWorld.h | 195 - .../HelloWorld.hpp} | 115 +- .../HelloWorldCdrAux.hpp | 2 +- .../HelloWorldPubSubTypes.cxx | 3 + .../HelloWorldPubSubTypes.h | 2 +- .../HelloWorldPublisher.h | 2 +- .../HelloWorldSubscriber.h | 2 +- .../SecureHelloWorldExample/HelloWorldv1.cxx | 286 - .../SecureHelloWorldExample/HelloWorldv1.h | 243 - .../StaticHelloWorldExample/HelloWorld.cxx | 168 - .../dds/StaticHelloWorldExample/HelloWorld.h | 195 - .../StaticHelloWorldExample/HelloWorld.hpp | 238 + .../HelloWorldCdrAux.hpp | 2 +- .../HelloWorldPubSubTypes.cxx | 3 + .../HelloWorldPubSubTypes.h | 2 +- .../HelloWorldPublisher.h | 3 +- .../HelloWorldSubscriber.h | 2 +- .../StaticHelloWorldExample/HelloWorldv1.cxx | 286 - .../StaticHelloWorldExample/HelloWorldv1.h | 243 - .../WriterLoansExample/LoanableHelloWorld.cxx | 168 - .../LoanableHelloWorld.hpp} | 115 +- .../LoanableHelloWorldCdrAux.hpp | 2 +- .../LoanableHelloWorldPubSubTypes.cxx | 3 + .../LoanableHelloWorldPubSubTypes.h | 2 +- .../LoanableHelloWorldv1.cxx | 288 - .../WriterLoansExample/LoanableHelloWorldv1.h | 243 - .../ZeroCopyExample/LoanableHelloWorld.cxx | 168 - .../LoanableHelloWorld.hpp} | 115 +- .../LoanableHelloWorldCdrAux.hpp | 2 +- .../LoanableHelloWorldPubSubTypes.cxx | 3 + .../LoanableHelloWorldPubSubTypes.h | 2 +- .../ZeroCopyExample/LoanableHelloWorldv1.cxx | 288 - .../ZeroCopyExample/LoanableHelloWorldv1.h | 243 - .../dds/core/condition/GuardCondition.hpp | 2 - .../dds/core/condition/StatusCondition.hpp | 4 +- .../fastdds/dds/core/condition/WaitSet.hpp | 4 +- .../fastdds/dds/domain/DomainParticipant.hpp | 2 - .../dds/domain/DomainParticipantFactory.hpp | 2 - include/fastdds/dds/publisher/DataWriter.hpp | 2 - include/fastdds/dds/publisher/Publisher.hpp | 2 - include/fastdds/dds/subscriber/DataReader.hpp | 2 - include/fastdds/dds/subscriber/Subscriber.hpp | 2 - .../dds/topic/ContentFilteredTopic.hpp | 2 - .../dds/topic/IContentFilterFactory.hpp | 1 - include/fastdds/dds/topic/Topic.hpp | 2 - include/fastdds/dds/topic/TypeSupport.hpp | 2 - .../dds/domain/DomainParticipant.hpp | 8 +- src/cpp/CMakeLists.txt | 2 - src/cpp/dds/domain/DomainParticipant.cpp | 11 +- src/cpp/dds/pub/AnyDataWriter.cpp | 2 +- src/cpp/dds/pub/Publisher.cpp | 4 +- src/cpp/dds/sub/Subscriber.cpp | 4 +- .../core/condition/StatusCondition.cpp | 2 - .../core/condition/StatusConditionImpl.hpp | 2 - src/cpp/fastdds/core/condition/WaitSet.cpp | 3 - .../fastdds/core/condition/WaitSetImpl.cpp | 2 - .../fastdds/core/condition/WaitSetImpl.hpp | 2 - .../fastdds/domain/DomainParticipantImpl.hpp | 2 - src/cpp/fastdds/publisher/DataWriterImpl.hpp | 2 - src/cpp/fastdds/publisher/PublisherImpl.hpp | 2 - src/cpp/fastdds/subscriber/DataReaderImpl.cpp | 2 - .../DataReaderImpl/DataReaderLoanManager.hpp | 1 - .../DataReaderImpl/ReadTakeCommand.hpp | 1 - .../DataReaderImpl/SampleInfoPool.hpp | 2 - .../DataReaderImpl/SampleLoanManager.hpp | 1 - src/cpp/fastdds/subscriber/SubscriberImpl.hpp | 2 - .../topic/DDSSQLFilter/DDSFilterFactory.cpp | 20 +- src/cpp/fastdds/topic/TopicImpl.hpp | 2 - .../fastdds/domain/DomainParticipantImpl.cpp | 2 +- .../fastdds/domain/DomainParticipantImpl.hpp | 12 +- .../DomainParticipantStatisticsListener.cpp | 1 - .../DomainParticipantStatisticsListener.hpp | 2 +- src/cpp/statistics/rtps/GuidUtils.hpp | 2 +- src/cpp/statistics/rtps/StatisticsBase.hpp | 2 +- .../rtps/reader/StatisticsReaderImpl.cpp | 2 +- .../rtps/writer/StatisticsWriterImpl.cpp | 2 +- src/cpp/statistics/types/types.cxx | 3211 ------- src/cpp/statistics/types/types.h | 2331 ----- src/cpp/statistics/types/types.hpp | 4177 +++++++++ src/cpp/statistics/types/typesCdrAux.hpp | 8 +- src/cpp/statistics/types/typesCdrAux.ipp | 4 - src/cpp/statistics/types/typesPubSubTypes.cxx | 15 +- src/cpp/statistics/types/typesPubSubTypes.h | 12 +- src/cpp/statistics/types/typesv1.cxx | 4757 ---------- src/cpp/statistics/types/typesv1.h | 3092 ------- src/cpp/utils/SystemInfo.hpp | 2 +- test/blackbox/CMakeLists.txt | 34 - .../common/DDSBlackboxTestsAckPositive.cpp | 2 +- .../blackbox/common/DDSBlackboxTestsBasic.cpp | 2 +- .../common/DDSBlackboxTestsContentFilter.cpp | 2 +- .../common/DDSBlackboxTestsStatistics.cpp | 23 +- ...ackboxTestsStatisticsDomainParticipant.cpp | 2 +- test/blackbox/types/Data1mb.cxx | 136 - .../blackbox/types/{Data1mb.h => Data1mb.hpp} | 95 +- test/blackbox/types/Data1mbCdrAux.hpp | 4 +- test/blackbox/types/Data1mbCdrAux.ipp | 2 - test/blackbox/types/Data1mbPubSubTypes.cxx | 5 +- test/blackbox/types/Data1mbPubSubTypes.h | 4 +- test/blackbox/types/Data1mbv1.cxx | 243 - test/blackbox/types/Data1mbv1.h | 224 - test/blackbox/types/Data64kb.cxx | 136 - .../types/{Data64kb.h => Data64kb.hpp} | 95 +- test/blackbox/types/Data64kbCdrAux.hpp | 4 +- test/blackbox/types/Data64kbCdrAux.ipp | 2 - test/blackbox/types/Data64kbPubSubTypes.cxx | 5 +- test/blackbox/types/Data64kbPubSubTypes.h | 4 +- test/blackbox/types/Data64kbv1.cxx | 243 - test/blackbox/types/Data64kbv1.h | 224 - test/blackbox/types/FixedSized.cxx | 124 - .../types/{FixedSized.h => FixedSized.hpp} | 88 +- test/blackbox/types/FixedSizedCdrAux.hpp | 2 +- test/blackbox/types/FixedSizedPubSubTypes.cxx | 3 + test/blackbox/types/FixedSizedPubSubTypes.h | 2 +- test/blackbox/types/FixedSizedv1.cxx | 223 - test/blackbox/types/FixedSizedv1.h | 215 - test/blackbox/types/HelloWorld.cxx | 172 - .../types/{HelloWorld.h => HelloWorld.hpp} | 117 +- test/blackbox/types/HelloWorldCdrAux.hpp | 2 +- test/blackbox/types/HelloWorldPubSubTypes.cxx | 3 + test/blackbox/types/HelloWorldPubSubTypes.h | 2 +- test/blackbox/types/HelloWorldTypeObject.cxx | 2 +- test/blackbox/types/HelloWorldv1.cxx | 294 - test/blackbox/types/HelloWorldv1.h | 243 - test/blackbox/types/KeyedData1mb.cxx | 170 - .../{KeyedData1mb.h => KeyedData1mb.hpp} | 117 +- test/blackbox/types/KeyedData1mbCdrAux.hpp | 4 +- test/blackbox/types/KeyedData1mbCdrAux.ipp | 2 - .../types/KeyedData1mbPubSubTypes.cxx | 5 +- test/blackbox/types/KeyedData1mbPubSubTypes.h | 4 +- test/blackbox/types/KeyedData1mbv1.cxx | 300 - test/blackbox/types/KeyedData1mbv1.h | 245 - test/blackbox/types/KeyedHelloWorld.cxx | 202 - ...{KeyedHelloWorld.h => KeyedHelloWorld.hpp} | 137 +- test/blackbox/types/KeyedHelloWorldCdrAux.hpp | 2 +- .../types/KeyedHelloWorldPubSubTypes.cxx | 3 + .../types/KeyedHelloWorldPubSubTypes.h | 2 +- test/blackbox/types/KeyedHelloWorldv1.cxx | 348 - test/blackbox/types/KeyedHelloWorldv1.h | 264 - test/blackbox/types/StringTest.cxx | 134 - .../types/{StringTest.h => StringTest.hpp} | 93 +- test/blackbox/types/StringTestCdrAux.hpp | 2 +- test/blackbox/types/StringTestPubSubTypes.cxx | 3 + test/blackbox/types/StringTestPubSubTypes.h | 2 +- test/blackbox/types/StringTestv1.cxx | 237 - test/blackbox/types/StringTestv1.h | 222 - .../types/TestIncludeRegression3361.cxx | 48 - ...on3361.h => TestIncludeRegression3361.hpp} | 27 +- .../TestIncludeRegression3361PubSubTypes.h | 4 +- .../TestIncludeRegression3361TypeObject.cxx | 2 +- .../types/TestIncludeRegression3361v1.cxx | 95 - .../types/TestIncludeRegression3361v1.h | 80 - test/blackbox/types/TestRegression3361.cxx | 138 - ...egression3361.h => TestRegression3361.hpp} | 97 +- .../types/TestRegression3361CdrAux.hpp | 2 +- .../types/TestRegression3361PubSubTypes.cxx | 3 + .../types/TestRegression3361PubSubTypes.h | 2 +- .../types/TestRegression3361TypeObject.cxx | 2 +- test/blackbox/types/TestRegression3361v1.cxx | 238 - test/blackbox/types/TestRegression3361v1.h | 223 - test/blackbox/types/statistics/types.cxx | 3211 ------- test/blackbox/types/statistics/types.h | 2331 ----- test/blackbox/types/statistics/types.hpp | 4177 +++++++++ .../blackbox/types/statistics/typesCdrAux.hpp | 8 +- .../blackbox/types/statistics/typesCdrAux.ipp | 4 - .../types/statistics/typesPubSubTypes.cxx | 15 +- .../types/statistics/typesPubSubTypes.h | 12 +- test/blackbox/types/statistics/typesv1.cxx | 4757 ---------- test/blackbox/types/statistics/typesv1.h | 3092 ------- test/communication/CMakeLists.txt | 4 - test/dds/communication/CMakeLists.txt | 4 - test/profiling/allocations/AllocTestType.cxx | 124 - .../{AllocTestType.h => AllocTestType.hpp} | 88 +- .../allocations/AllocTestTypeCdrAux.hpp | 2 +- .../allocations/AllocTestTypePubSubTypes.cxx | 3 + .../allocations/AllocTestTypePubSubTypes.h | 2 +- .../profiling/allocations/AllocTestTypev1.cxx | 223 - test/profiling/allocations/AllocTestTypev1.h | 215 - test/unittest/dds/publisher/CMakeLists.txt | 2 - test/unittest/dds/status/CMakeLists.txt | 2 - .../topic/DDSSQLFilter/DDSSQLFilterTests.cpp | 3 +- .../data_types/ContentFilterTestType.cxx | 3341 ------- ...erTestType.h => ContentFilterTestType.hpp} | 2104 ++++- .../ContentFilterTestTypeCdrAux.hpp | 6 +- .../ContentFilterTestTypeCdrAux.ipp | 4 - .../ContentFilterTestTypePubSubTypes.cxx | 7 +- .../ContentFilterTestTypePubSubTypes.h | 6 +- .../ContentFilterTestTypeTypeObject.cxx | 6 +- .../ContentFilterTestTypeTypeObject.h | 4 - .../data_types/ContentFilterTestTypev1.cxx | 5318 ----------- .../data_types/ContentFilterTestTypev1.h | 2358 ----- test/unittest/dynamic_types/CMakeLists.txt | 6 - .../DynamicComplexTypesTests.cpp | 2 +- test/unittest/dynamic_types/idl/Basic.cxx | 3858 -------- .../dynamic_types/idl/{Basic.h => Basic.hpp} | 3142 ++++++- .../dynamic_types/idl/BasicCdrAux.hpp | 15 +- .../dynamic_types/idl/BasicCdrAux.ipp | 7 - .../dynamic_types/idl/BasicPubSubTypes.cxx | 16 +- .../dynamic_types/idl/BasicPubSubTypes.h | 15 +- .../dynamic_types/idl/BasicTypeObject.cxx | 9 +- .../dynamic_types/idl/BasicTypeObject.h | 7 - test/unittest/dynamic_types/idl/Basicv1.cxx | 6119 ------------ test/unittest/dynamic_types/idl/Basicv1.h | 5326 ----------- test/unittest/dynamic_types/idl/Test.cxx | 2405 ----- .../dynamic_types/idl/{Test.h => Test.hpp} | 1804 +++- .../unittest/dynamic_types/idl/TestCdrAux.hpp | 8 +- .../unittest/dynamic_types/idl/TestCdrAux.ipp | 2 - .../dynamic_types/idl/TestPubSubTypes.cxx | 9 +- .../dynamic_types/idl/TestPubSubTypes.h | 8 +- .../dynamic_types/idl/TestTypeObject.cxx | 4 +- .../dynamic_types/idl/TestTypeObject.h | 2 - test/unittest/dynamic_types/idl/Testv1.cxx | 3744 -------- test/unittest/dynamic_types/idl/Testv1.h | 1872 ---- .../dynamic_types/idl/new_features_4_2.cxx | 2065 ----- .../dynamic_types/idl/new_features_4_2.h | 1380 --- .../dynamic_types/idl/new_features_4_2.hpp | 2720 ++++++ .../idl/new_features_4_2CdrAux.hpp | 9 +- .../idl/new_features_4_2CdrAux.ipp | 1 - .../idl/new_features_4_2PubSubTypes.cxx | 12 +- .../idl/new_features_4_2PubSubTypes.h | 10 +- .../idl/new_features_4_2TypeObject.cxx | 2 +- .../dynamic_types/idl/new_features_4_2v1.cxx | 2905 ------ .../dynamic_types/idl/new_features_4_2v1.h | 1737 ---- test/unittest/statistics/dds/CMakeLists.txt | 6 - ...mainParticipantStatisticsListenerTests.cpp | 2 +- .../statistics/dds/StatisticsQosTests.cpp | 2 +- test/unittest/statistics/rtps/CMakeLists.txt | 2 - .../statistics/rtps/RTPSStatisticsTests.cpp | 2 +- test/unittest/xtypes/CMakeLists.txt | 4 - test/unittest/xtypes/idl/Types.cxx | 5244 ----------- .../Types.h => unittest/xtypes/idl/Types.hpp} | 4211 +++++++-- test/unittest/xtypes/idl/TypesCdrAux.hpp | 30 +- test/unittest/xtypes/idl/TypesCdrAux.ipp | 18 - test/unittest/xtypes/idl/TypesPubSubTypes.cxx | 31 +- test/unittest/xtypes/idl/TypesPubSubTypes.h | 30 +- test/unittest/xtypes/idl/TypesTypeObject.cxx | 20 +- test/unittest/xtypes/idl/TypesTypeObject.h | 18 - test/unittest/xtypes/idl/Typesv1.cxx | 8202 ----------------- test/unittest/xtypes/idl/Typesv1.h | 6495 ------------- test/unittest/xtypes/idl/WideEnum.cxx | 591 -- test/unittest/xtypes/idl/WideEnum.h | 426 - test/unittest/xtypes/idl/WideEnum.hpp | 817 ++ test/unittest/xtypes/idl/WideEnumCdrAux.hpp | 4 +- .../xtypes/idl/WideEnumPubSubTypes.cxx | 5 +- .../unittest/xtypes/idl/WideEnumPubSubTypes.h | 4 +- .../xtypes/idl/WideEnumTypeObject.cxx | 2 +- test/unittest/xtypes/idl/WideEnumv1.cxx | 858 -- test/unittest/xtypes/idl/WideEnumv1.h | 559 -- test/xtypes/CMakeLists.txt | 2 - test/xtypes/idl/Types.cxx | 5244 ----------- .../idl/Types.h => xtypes/idl/Types.hpp} | 4211 +++++++-- test/xtypes/idl/TypesCdrAux.hpp | 30 +- test/xtypes/idl/TypesCdrAux.ipp | 18 - test/xtypes/idl/TypesPubSubTypes.cxx | 31 +- test/xtypes/idl/TypesPubSubTypes.h | 30 +- test/xtypes/idl/TypesTypeObject.cxx | 20 +- test/xtypes/idl/TypesTypeObject.h | 18 - test/xtypes/idl/Typesv1.cxx | 8202 ----------------- test/xtypes/idl/Typesv1.h | 6495 ------------- .../scripts/update_generated_code_from_idl.sh | 4 +- 451 files changed, 29162 insertions(+), 143399 deletions(-) delete mode 100644 examples/cpp/dds/AdvancedConfigurationExample/HelloWorld.cxx rename examples/cpp/dds/{BasicConfigurationExample/HelloWorld.h => AdvancedConfigurationExample/HelloWorld.hpp} (70%) delete mode 100644 examples/cpp/dds/AdvancedConfigurationExample/HelloWorldv1.cxx delete mode 100644 examples/cpp/dds/AdvancedConfigurationExample/HelloWorldv1.h delete mode 100644 examples/cpp/dds/BasicConfigurationExample/HelloWorld.cxx rename examples/cpp/dds/{AdvancedConfigurationExample/HelloWorld.h => BasicConfigurationExample/HelloWorld.hpp} (70%) delete mode 100644 examples/cpp/dds/BasicConfigurationExample/HelloWorldv1.cxx delete mode 100644 examples/cpp/dds/BasicConfigurationExample/HelloWorldv1.h delete mode 100644 examples/cpp/dds/Configurability/sample.cxx rename examples/cpp/dds/{HistoryKind/sample.h => Configurability/sample.hpp} (70%) delete mode 100644 examples/cpp/dds/Configurability/samplev1.cxx delete mode 100644 examples/cpp/dds/Configurability/samplev1.h delete mode 100644 examples/cpp/dds/ContentFilteredTopicExample/HelloWorld.cxx create mode 100644 examples/cpp/dds/ContentFilteredTopicExample/HelloWorld.hpp delete mode 100644 examples/cpp/dds/ContentFilteredTopicExample/HelloWorldv1.cxx delete mode 100644 examples/cpp/dds/ContentFilteredTopicExample/HelloWorldv1.h delete mode 100644 examples/cpp/dds/CustomListenerExample/Topic.cxx rename examples/cpp/dds/{LivelinessQoS/Topic.h => CustomListenerExample/Topic.hpp} (70%) delete mode 100644 examples/cpp/dds/CustomListenerExample/Topicv1.cxx delete mode 100644 examples/cpp/dds/CustomListenerExample/Topicv1.h delete mode 100644 examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolData.cxx rename examples/cpp/dds/CustomPayloadPoolExample/{CustomPayloadPoolData.h => CustomPayloadPoolData.hpp} (69%) delete mode 100644 examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDatav1.cxx delete mode 100644 examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDatav1.h delete mode 100644 examples/cpp/dds/DeadlineQoSExample/deadlinepayload.cxx rename examples/cpp/dds/DeadlineQoSExample/{deadlinepayload.h => deadlinepayload.hpp} (71%) delete mode 100644 examples/cpp/dds/DeadlineQoSExample/deadlinepayloadv1.cxx delete mode 100644 examples/cpp/dds/DeadlineQoSExample/deadlinepayloadv1.h delete mode 100644 examples/cpp/dds/DisablePositiveACKs/Topic.cxx rename examples/cpp/dds/DisablePositiveACKs/{Topic.h => Topic.hpp} (70%) delete mode 100644 examples/cpp/dds/DisablePositiveACKs/Topicv1.cxx delete mode 100644 examples/cpp/dds/DisablePositiveACKs/Topicv1.h delete mode 100644 examples/cpp/dds/DiscoveryServerExample/types/HelloWorld.cxx rename examples/cpp/dds/{HelloWorldExample/HelloWorld.h => DiscoveryServerExample/types/HelloWorld.hpp} (69%) delete mode 100644 examples/cpp/dds/DiscoveryServerExample/types/HelloWorldv1.cxx delete mode 100644 examples/cpp/dds/DiscoveryServerExample/types/HelloWorldv1.h delete mode 100644 examples/cpp/dds/Filtering/FilteringExample.cxx rename examples/cpp/dds/Filtering/{FilteringExample.h => FilteringExample.hpp} (72%) delete mode 100644 examples/cpp/dds/Filtering/FilteringExamplev1.cxx delete mode 100644 examples/cpp/dds/Filtering/FilteringExamplev1.h delete mode 100644 examples/cpp/dds/FlowControlExample/FlowControlExample.cxx rename examples/cpp/dds/FlowControlExample/{FlowControlExample.h => FlowControlExample.hpp} (70%) delete mode 100644 examples/cpp/dds/FlowControlExample/FlowControlExamplev1.cxx delete mode 100644 examples/cpp/dds/FlowControlExample/FlowControlExamplev1.h delete mode 100644 examples/cpp/dds/HelloWorldExample/HelloWorld.cxx rename examples/cpp/dds/{HelloWorldExampleTCP/HelloWorld.h => HelloWorldExample/HelloWorld.hpp} (69%) delete mode 100644 examples/cpp/dds/HelloWorldExample/HelloWorldv1.cxx delete mode 100644 examples/cpp/dds/HelloWorldExample/HelloWorldv1.h delete mode 100644 examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorld.cxx rename examples/cpp/dds/HelloWorldExampleDataSharing/{HelloWorld.h => HelloWorld.hpp} (72%) delete mode 100644 examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldv1.cxx delete mode 100644 examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldv1.h delete mode 100644 examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorld.cxx rename examples/cpp/dds/HelloWorldExampleSharedMem/{HelloWorld.h => HelloWorld.hpp} (67%) delete mode 100644 examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldv1.cxx delete mode 100644 examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldv1.h delete mode 100644 examples/cpp/dds/HelloWorldExampleTCP/HelloWorld.cxx rename examples/cpp/dds/{ContentFilteredTopicExample/HelloWorld.h => HelloWorldExampleTCP/HelloWorld.hpp} (69%) delete mode 100644 examples/cpp/dds/HelloWorldExampleTCP/HelloWorldv1.cxx delete mode 100644 examples/cpp/dds/HelloWorldExampleTCP/HelloWorldv1.h delete mode 100644 examples/cpp/dds/HistoryKind/sample.cxx rename examples/cpp/dds/{Keys/sample.h => HistoryKind/sample.hpp} (70%) delete mode 100644 examples/cpp/dds/HistoryKind/samplev1.cxx delete mode 100644 examples/cpp/dds/HistoryKind/samplev1.h delete mode 100644 examples/cpp/dds/Keys/sample.cxx rename examples/cpp/dds/{Configurability/sample.h => Keys/sample.hpp} (70%) delete mode 100644 examples/cpp/dds/Keys/samplev1.cxx delete mode 100644 examples/cpp/dds/Keys/samplev1.h delete mode 100644 examples/cpp/dds/LateJoiners/sample.cxx rename examples/cpp/dds/LateJoiners/{sample.h => sample.hpp} (70%) delete mode 100644 examples/cpp/dds/LateJoiners/samplev1.cxx delete mode 100644 examples/cpp/dds/LateJoiners/samplev1.h delete mode 100644 examples/cpp/dds/LifespanQoSExample/Lifespan.cxx rename examples/cpp/dds/LifespanQoSExample/{Lifespan.h => Lifespan.hpp} (69%) delete mode 100644 examples/cpp/dds/LifespanQoSExample/Lifespanv1.cxx delete mode 100644 examples/cpp/dds/LifespanQoSExample/Lifespanv1.h delete mode 100644 examples/cpp/dds/LivelinessQoS/Topic.cxx rename examples/cpp/dds/{CustomListenerExample/Topic.h => LivelinessQoS/Topic.hpp} (70%) delete mode 100644 examples/cpp/dds/LivelinessQoS/Topicv1.cxx delete mode 100644 examples/cpp/dds/LivelinessQoS/Topicv1.h delete mode 100644 examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrength.cxx rename examples/cpp/dds/OwnershipStrengthQoSExample/{OwnershipStrength.h => OwnershipStrength.hpp} (65%) delete mode 100644 examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthv1.cxx delete mode 100644 examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthv1.h delete mode 100644 examples/cpp/dds/RequestReplyExample/Calculator.cxx rename examples/cpp/dds/RequestReplyExample/{Calculator.h => Calculator.hpp} (68%) delete mode 100644 examples/cpp/dds/RequestReplyExample/Calculatorv1.cxx delete mode 100644 examples/cpp/dds/RequestReplyExample/Calculatorv1.h delete mode 100644 examples/cpp/dds/SampleConfig_Controller/sample.cxx delete mode 100644 examples/cpp/dds/SampleConfig_Controller/sample.h create mode 100644 examples/cpp/dds/SampleConfig_Controller/sample.hpp delete mode 100644 examples/cpp/dds/SampleConfig_Controller/samplev1.cxx delete mode 100644 examples/cpp/dds/SampleConfig_Controller/samplev1.h delete mode 100644 examples/cpp/dds/SampleConfig_Events/sample.cxx delete mode 100644 examples/cpp/dds/SampleConfig_Events/sample.h create mode 100644 examples/cpp/dds/SampleConfig_Events/sample.hpp delete mode 100644 examples/cpp/dds/SampleConfig_Events/samplev1.cxx delete mode 100644 examples/cpp/dds/SampleConfig_Events/samplev1.h delete mode 100644 examples/cpp/dds/SampleConfig_Multimedia/sample.cxx delete mode 100644 examples/cpp/dds/SampleConfig_Multimedia/sample.h create mode 100644 examples/cpp/dds/SampleConfig_Multimedia/sample.hpp delete mode 100644 examples/cpp/dds/SampleConfig_Multimedia/samplev1.cxx delete mode 100644 examples/cpp/dds/SampleConfig_Multimedia/samplev1.h delete mode 100644 examples/cpp/dds/SecureHelloWorldExample/HelloWorld.cxx delete mode 100644 examples/cpp/dds/SecureHelloWorldExample/HelloWorld.h rename examples/cpp/dds/{DiscoveryServerExample/types/HelloWorld.h => SecureHelloWorldExample/HelloWorld.hpp} (69%) delete mode 100644 examples/cpp/dds/SecureHelloWorldExample/HelloWorldv1.cxx delete mode 100644 examples/cpp/dds/SecureHelloWorldExample/HelloWorldv1.h delete mode 100644 examples/cpp/dds/StaticHelloWorldExample/HelloWorld.cxx delete mode 100644 examples/cpp/dds/StaticHelloWorldExample/HelloWorld.h create mode 100644 examples/cpp/dds/StaticHelloWorldExample/HelloWorld.hpp delete mode 100644 examples/cpp/dds/StaticHelloWorldExample/HelloWorldv1.cxx delete mode 100644 examples/cpp/dds/StaticHelloWorldExample/HelloWorldv1.h delete mode 100644 examples/cpp/dds/WriterLoansExample/LoanableHelloWorld.cxx rename examples/cpp/dds/{ZeroCopyExample/LoanableHelloWorld.h => WriterLoansExample/LoanableHelloWorld.hpp} (70%) delete mode 100644 examples/cpp/dds/WriterLoansExample/LoanableHelloWorldv1.cxx delete mode 100644 examples/cpp/dds/WriterLoansExample/LoanableHelloWorldv1.h delete mode 100644 examples/cpp/dds/ZeroCopyExample/LoanableHelloWorld.cxx rename examples/cpp/dds/{WriterLoansExample/LoanableHelloWorld.h => ZeroCopyExample/LoanableHelloWorld.hpp} (70%) delete mode 100644 examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldv1.cxx delete mode 100644 examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldv1.h delete mode 100644 src/cpp/statistics/types/types.cxx delete mode 100644 src/cpp/statistics/types/types.h create mode 100644 src/cpp/statistics/types/types.hpp delete mode 100644 src/cpp/statistics/types/typesv1.cxx delete mode 100644 src/cpp/statistics/types/typesv1.h delete mode 100644 test/blackbox/types/Data1mb.cxx rename test/blackbox/types/{Data1mb.h => Data1mb.hpp} (75%) delete mode 100644 test/blackbox/types/Data1mbv1.cxx delete mode 100644 test/blackbox/types/Data1mbv1.h delete mode 100644 test/blackbox/types/Data64kb.cxx rename test/blackbox/types/{Data64kb.h => Data64kb.hpp} (74%) delete mode 100644 test/blackbox/types/Data64kbv1.cxx delete mode 100644 test/blackbox/types/Data64kbv1.h delete mode 100644 test/blackbox/types/FixedSized.cxx rename test/blackbox/types/{FixedSized.h => FixedSized.hpp} (74%) delete mode 100644 test/blackbox/types/FixedSizedv1.cxx delete mode 100644 test/blackbox/types/FixedSizedv1.h delete mode 100644 test/blackbox/types/HelloWorld.cxx rename test/blackbox/types/{HelloWorld.h => HelloWorld.hpp} (70%) delete mode 100644 test/blackbox/types/HelloWorldv1.cxx delete mode 100644 test/blackbox/types/HelloWorldv1.h delete mode 100644 test/blackbox/types/KeyedData1mb.cxx rename test/blackbox/types/{KeyedData1mb.h => KeyedData1mb.hpp} (71%) delete mode 100644 test/blackbox/types/KeyedData1mbv1.cxx delete mode 100644 test/blackbox/types/KeyedData1mbv1.h delete mode 100644 test/blackbox/types/KeyedHelloWorld.cxx rename test/blackbox/types/{KeyedHelloWorld.h => KeyedHelloWorld.hpp} (69%) delete mode 100644 test/blackbox/types/KeyedHelloWorldv1.cxx delete mode 100644 test/blackbox/types/KeyedHelloWorldv1.h delete mode 100644 test/blackbox/types/StringTest.cxx rename test/blackbox/types/{StringTest.h => StringTest.hpp} (75%) delete mode 100644 test/blackbox/types/StringTestv1.cxx delete mode 100644 test/blackbox/types/StringTestv1.h delete mode 100644 test/blackbox/types/TestIncludeRegression3361.cxx rename test/blackbox/types/{TestIncludeRegression3361.h => TestIncludeRegression3361.hpp} (78%) delete mode 100644 test/blackbox/types/TestIncludeRegression3361v1.cxx delete mode 100644 test/blackbox/types/TestIncludeRegression3361v1.h delete mode 100644 test/blackbox/types/TestRegression3361.cxx rename test/blackbox/types/{TestRegression3361.h => TestRegression3361.hpp} (71%) delete mode 100644 test/blackbox/types/TestRegression3361v1.cxx delete mode 100644 test/blackbox/types/TestRegression3361v1.h delete mode 100644 test/blackbox/types/statistics/types.cxx delete mode 100644 test/blackbox/types/statistics/types.h create mode 100644 test/blackbox/types/statistics/types.hpp delete mode 100644 test/blackbox/types/statistics/typesv1.cxx delete mode 100644 test/blackbox/types/statistics/typesv1.h delete mode 100644 test/profiling/allocations/AllocTestType.cxx rename test/profiling/allocations/{AllocTestType.h => AllocTestType.hpp} (74%) delete mode 100644 test/profiling/allocations/AllocTestTypev1.cxx delete mode 100644 test/profiling/allocations/AllocTestTypev1.h delete mode 100644 test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestType.cxx rename test/unittest/dds/topic/DDSSQLFilter/data_types/{ContentFilterTestType.h => ContentFilterTestType.hpp} (58%) delete mode 100644 test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypev1.cxx delete mode 100644 test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypev1.h delete mode 100644 test/unittest/dynamic_types/idl/Basic.cxx rename test/unittest/dynamic_types/idl/{Basic.h => Basic.hpp} (57%) delete mode 100644 test/unittest/dynamic_types/idl/Basicv1.cxx delete mode 100644 test/unittest/dynamic_types/idl/Basicv1.h delete mode 100644 test/unittest/dynamic_types/idl/Test.cxx rename test/unittest/dynamic_types/idl/{Test.h => Test.hpp} (52%) delete mode 100644 test/unittest/dynamic_types/idl/Testv1.cxx delete mode 100644 test/unittest/dynamic_types/idl/Testv1.h delete mode 100644 test/unittest/dynamic_types/idl/new_features_4_2.cxx delete mode 100644 test/unittest/dynamic_types/idl/new_features_4_2.h create mode 100644 test/unittest/dynamic_types/idl/new_features_4_2.hpp delete mode 100644 test/unittest/dynamic_types/idl/new_features_4_2v1.cxx delete mode 100644 test/unittest/dynamic_types/idl/new_features_4_2v1.h delete mode 100644 test/unittest/xtypes/idl/Types.cxx rename test/{xtypes/idl/Types.h => unittest/xtypes/idl/Types.hpp} (55%) delete mode 100644 test/unittest/xtypes/idl/Typesv1.cxx delete mode 100644 test/unittest/xtypes/idl/Typesv1.h delete mode 100644 test/unittest/xtypes/idl/WideEnum.cxx delete mode 100644 test/unittest/xtypes/idl/WideEnum.h create mode 100644 test/unittest/xtypes/idl/WideEnum.hpp delete mode 100644 test/unittest/xtypes/idl/WideEnumv1.cxx delete mode 100644 test/unittest/xtypes/idl/WideEnumv1.h delete mode 100644 test/xtypes/idl/Types.cxx rename test/{unittest/xtypes/idl/Types.h => xtypes/idl/Types.hpp} (55%) delete mode 100644 test/xtypes/idl/Typesv1.cxx delete mode 100644 test/xtypes/idl/Typesv1.h diff --git a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorld.cxx b/examples/cpp/dds/AdvancedConfigurationExample/HelloWorld.cxx deleted file mode 100644 index 0d9236d0cee..00000000000 --- a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorld.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -HelloWorld::HelloWorld() -{ -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::array& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::array&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::array& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::array& HelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "HelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/BasicConfigurationExample/HelloWorld.h b/examples/cpp/dds/AdvancedConfigurationExample/HelloWorld.hpp similarity index 70% rename from examples/cpp/dds/BasicConfigurationExample/HelloWorld.h rename to examples/cpp/dds/AdvancedConfigurationExample/HelloWorld.hpp index aaf09e4bc57..8a6ec886f86 100644 --- a/examples/cpp/dds/BasicConfigurationExample/HelloWorld.h +++ b/examples/cpp/dds/AdvancedConfigurationExample/HelloWorld.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file HelloWorld.h + * @file HelloWorld.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "HelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLD_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define HELLOWORLD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class HelloWorld /*! * @brief Default constructor. */ - eProsima_user_DllExport HelloWorld(); + eProsima_user_DllExport HelloWorld() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~HelloWorld(); + eProsima_user_DllExport ~HelloWorld() + { + } /*! * @brief Copy constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - const HelloWorld& x); + const HelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); + const HelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class HelloWorld * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::array& _message); + const std::array& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::array&& _message); + std::array&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::array& message() const; + eProsima_user_DllExport const std::array& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::array& message(); + eProsima_user_DllExport std::array& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class HelloWorld }; -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - +#endif // _FAST_DDS_GENERATED_HELLOWORLD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldCdrAux.hpp b/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldCdrAux.hpp index 5c8468e7cb1..dbbb68c874d 100644 --- a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldCdrAux.hpp +++ b/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ -#include "HelloWorld.h" +#include "HelloWorld.hpp" constexpr uint32_t HelloWorld_max_cdr_typesize {28UL}; constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldPubSubTypes.cxx b/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldPubSubTypes.cxx index 85cb477896e..9eaca1f74a9 100644 --- a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldPubSubTypes.cxx +++ b/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool HelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" diff --git a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldPubSubTypes.h b/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldPubSubTypes.h index ddbfbab5db6..c9b70273375 100644 --- a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldPubSubTypes.h +++ b/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldv1.cxx b/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldv1.cxx deleted file mode 100644 index 3b9a562b692..00000000000 --- a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldv1.cxx +++ /dev/null @@ -1,288 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define HelloWorld_max_cdr_typesize 28ULL; - - - - -HelloWorld::HelloWorld() -{ - // unsigned long m_index - m_index = 0; - // char m_message - memset(&m_message, 0, ((20)) * 1); - -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -size_t HelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return HelloWorld_max_cdr_typesize; -} - -size_t HelloWorld::getCdrSerializedSize( - const HelloWorld& 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 += (((20)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void HelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message; - - -} - -void HelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool HelloWorld::isKeyDefined() -{ - return false; -} - -void HelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::array& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::array&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::array& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::array& HelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldv1.h b/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldv1.h deleted file mode 100644 index 4d6e4158cbc..00000000000 --- a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorldv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::array& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::array&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::array& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::array& message(); - - - /*! - * @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 HelloWorld& 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 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: - - uint32_t m_index; - std::array m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/BasicConfigurationExample/HelloWorld.cxx b/examples/cpp/dds/BasicConfigurationExample/HelloWorld.cxx deleted file mode 100644 index 0d9236d0cee..00000000000 --- a/examples/cpp/dds/BasicConfigurationExample/HelloWorld.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -HelloWorld::HelloWorld() -{ -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::array& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::array&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::array& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::array& HelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "HelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorld.h b/examples/cpp/dds/BasicConfigurationExample/HelloWorld.hpp similarity index 70% rename from examples/cpp/dds/AdvancedConfigurationExample/HelloWorld.h rename to examples/cpp/dds/BasicConfigurationExample/HelloWorld.hpp index aaf09e4bc57..8a6ec886f86 100644 --- a/examples/cpp/dds/AdvancedConfigurationExample/HelloWorld.h +++ b/examples/cpp/dds/BasicConfigurationExample/HelloWorld.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file HelloWorld.h + * @file HelloWorld.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "HelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLD_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define HELLOWORLD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class HelloWorld /*! * @brief Default constructor. */ - eProsima_user_DllExport HelloWorld(); + eProsima_user_DllExport HelloWorld() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~HelloWorld(); + eProsima_user_DllExport ~HelloWorld() + { + } /*! * @brief Copy constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - const HelloWorld& x); + const HelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); + const HelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class HelloWorld * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::array& _message); + const std::array& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::array&& _message); + std::array&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::array& message() const; + eProsima_user_DllExport const std::array& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::array& message(); + eProsima_user_DllExport std::array& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class HelloWorld }; -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - +#endif // _FAST_DDS_GENERATED_HELLOWORLD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/BasicConfigurationExample/HelloWorldCdrAux.hpp b/examples/cpp/dds/BasicConfigurationExample/HelloWorldCdrAux.hpp index 5c8468e7cb1..dbbb68c874d 100644 --- a/examples/cpp/dds/BasicConfigurationExample/HelloWorldCdrAux.hpp +++ b/examples/cpp/dds/BasicConfigurationExample/HelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ -#include "HelloWorld.h" +#include "HelloWorld.hpp" constexpr uint32_t HelloWorld_max_cdr_typesize {28UL}; constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/BasicConfigurationExample/HelloWorldPubSubTypes.cxx b/examples/cpp/dds/BasicConfigurationExample/HelloWorldPubSubTypes.cxx index 85cb477896e..9eaca1f74a9 100644 --- a/examples/cpp/dds/BasicConfigurationExample/HelloWorldPubSubTypes.cxx +++ b/examples/cpp/dds/BasicConfigurationExample/HelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool HelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" diff --git a/examples/cpp/dds/BasicConfigurationExample/HelloWorldPubSubTypes.h b/examples/cpp/dds/BasicConfigurationExample/HelloWorldPubSubTypes.h index ddbfbab5db6..c9b70273375 100644 --- a/examples/cpp/dds/BasicConfigurationExample/HelloWorldPubSubTypes.h +++ b/examples/cpp/dds/BasicConfigurationExample/HelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/BasicConfigurationExample/HelloWorldv1.cxx b/examples/cpp/dds/BasicConfigurationExample/HelloWorldv1.cxx deleted file mode 100644 index 3b9a562b692..00000000000 --- a/examples/cpp/dds/BasicConfigurationExample/HelloWorldv1.cxx +++ /dev/null @@ -1,288 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define HelloWorld_max_cdr_typesize 28ULL; - - - - -HelloWorld::HelloWorld() -{ - // unsigned long m_index - m_index = 0; - // char m_message - memset(&m_message, 0, ((20)) * 1); - -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -size_t HelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return HelloWorld_max_cdr_typesize; -} - -size_t HelloWorld::getCdrSerializedSize( - const HelloWorld& 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 += (((20)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void HelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message; - - -} - -void HelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool HelloWorld::isKeyDefined() -{ - return false; -} - -void HelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::array& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::array&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::array& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::array& HelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/BasicConfigurationExample/HelloWorldv1.h b/examples/cpp/dds/BasicConfigurationExample/HelloWorldv1.h deleted file mode 100644 index 4d6e4158cbc..00000000000 --- a/examples/cpp/dds/BasicConfigurationExample/HelloWorldv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::array& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::array&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::array& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::array& message(); - - - /*! - * @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 HelloWorld& 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 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: - - uint32_t m_index; - std::array m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/Configurability/sample.cxx b/examples/cpp/dds/Configurability/sample.cxx deleted file mode 100644 index 360d4a1b2b2..00000000000 --- a/examples/cpp/dds/Configurability/sample.cxx +++ /dev/null @@ -1,158 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -sample::sample() -{ -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample& sample::operator =( - const sample& x) -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "sampleCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/HistoryKind/sample.h b/examples/cpp/dds/Configurability/sample.hpp similarity index 70% rename from examples/cpp/dds/HistoryKind/sample.h rename to examples/cpp/dds/Configurability/sample.hpp index c050c8527cc..d8a5b01cf2f 100644 --- a/examples/cpp/dds/HistoryKind/sample.h +++ b/examples/cpp/dds/Configurability/sample.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file sample.h + * @file sample.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "samplev1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ +#ifndef _FAST_DDS_GENERATED_SAMPLE_HPP_ +#define _FAST_DDS_GENERATED_SAMPLE_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define SAMPLE_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class sample /*! * @brief Default constructor. */ - eProsima_user_DllExport sample(); + eProsima_user_DllExport sample() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~sample(); + eProsima_user_DllExport ~sample() + { + } /*! * @brief Copy constructor. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample( - const sample& x); + const sample& x) + { + m_index = x.m_index; + + m_key_value = x.m_key_value; + + } /*! * @brief Move constructor. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample( - sample&& x) noexcept; + sample&& x) noexcept + { + m_index = x.m_index; + m_key_value = x.m_key_value; + } /*! * @brief Copy assignment. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample& operator =( - const sample& x); + const sample& x) + { + + m_index = x.m_index; + + m_key_value = x.m_key_value; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; + sample&& x) noexcept + { + + m_index = x.m_index; + m_key_value = x.m_key_value; + return *this; + } /*! * @brief Comparison operator. * @param x sample object to compare. */ eProsima_user_DllExport bool operator ==( - const sample& x) const; + const sample& x) const + { + return (m_index == x.m_index && + m_key_value == x.m_key_value); + } /*! * @brief Comparison operator. * @param x sample object to compare. */ eProsima_user_DllExport bool operator !=( - const sample& x) const; + const sample& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint8_t _index); + uint8_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint8_t index() const; + eProsima_user_DllExport uint8_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint8_t& index(); + eProsima_user_DllExport uint8_t& index() + { + return m_index; + } /*! @@ -160,19 +191,30 @@ class sample * @param _key_value New value for member key_value */ eProsima_user_DllExport void key_value( - uint8_t _key_value); + uint8_t _key_value) + { + m_key_value = _key_value; + } /*! * @brief This function returns the value of member key_value * @return Value of member key_value */ - eProsima_user_DllExport uint8_t key_value() const; + eProsima_user_DllExport uint8_t key_value() const + { + return m_key_value; + } /*! * @brief This function returns a reference to member key_value * @return Reference to member key_value */ - eProsima_user_DllExport uint8_t& key_value(); + eProsima_user_DllExport uint8_t& key_value() + { + return m_key_value; + } + + private: @@ -181,8 +223,6 @@ class sample }; -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - +#endif // _FAST_DDS_GENERATED_SAMPLE_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/Configurability/sampleCdrAux.hpp b/examples/cpp/dds/Configurability/sampleCdrAux.hpp index 18ed5857add..12ba74bf0ec 100644 --- a/examples/cpp/dds/Configurability/sampleCdrAux.hpp +++ b/examples/cpp/dds/Configurability/sampleCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ #define _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ -#include "sample.h" +#include "sample.hpp" constexpr uint32_t sample_max_cdr_typesize {6UL}; constexpr uint32_t sample_max_key_cdr_typesize {1UL}; diff --git a/examples/cpp/dds/Configurability/samplePubSubTypes.cxx b/examples/cpp/dds/Configurability/samplePubSubTypes.cxx index 9095d77083a..f60945627b4 100644 --- a/examples/cpp/dds/Configurability/samplePubSubTypes.cxx +++ b/examples/cpp/dds/Configurability/samplePubSubTypes.cxx @@ -219,3 +219,6 @@ bool samplePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "sampleCdrAux.ipp" diff --git a/examples/cpp/dds/Configurability/samplePubSubTypes.h b/examples/cpp/dds/Configurability/samplePubSubTypes.h index ec881115211..5f858658dec 100644 --- a/examples/cpp/dds/Configurability/samplePubSubTypes.h +++ b/examples/cpp/dds/Configurability/samplePubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "sample.h" +#include "sample.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/Configurability/samplev1.cxx b/examples/cpp/dds/Configurability/samplev1.cxx deleted file mode 100644 index 3b735befaf8..00000000000 --- a/examples/cpp/dds/Configurability/samplev1.cxx +++ /dev/null @@ -1,280 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define sample_max_cdr_typesize 6ULL; - - - - -sample::sample() -{ - // octet m_index - m_index = 0; - // octet m_key_value - m_key_value = 0; - -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample& sample::operator =( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -size_t sample::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return sample_max_cdr_typesize; -} - -size_t sample::getCdrSerializedSize( - const sample& 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); - - - return current_alignment - initial_alignment; -} - - -void sample::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_key_value; - -} - -void sample::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_key_value; - - -} - - -bool sample::isKeyDefined() -{ - return true; -} - -void sample::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - - - scdr << m_key_value; - -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/Configurability/samplev1.h b/examples/cpp/dds/Configurability/samplev1.h deleted file mode 100644 index 97613067c8b..00000000000 --- a/examples/cpp/dds/Configurability/samplev1.h +++ /dev/null @@ -1,236 +0,0 @@ -// 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 sample.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(SAMPLE_SOURCE) -#define SAMPLE_DllAPI __declspec( dllexport ) -#else -#define SAMPLE_DllAPI __declspec( dllimport ) -#endif // SAMPLE_SOURCE -#else -#define SAMPLE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define SAMPLE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure sample defined by the user in the IDL file. - * @ingroup sample - */ -class sample -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport sample(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~sample(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - const sample& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - sample&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - const sample& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator ==( - const sample& x) const; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator !=( - const sample& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint8_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint8_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint8_t& index(); - - - /*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ - eProsima_user_DllExport void key_value( - uint8_t _key_value); - - /*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ - eProsima_user_DllExport uint8_t key_value() const; - - /*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ - eProsima_user_DllExport uint8_t& key_value(); - - - /*! - * @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 sample& 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 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: - - uint8_t m_index; - uint8_t m_key_value; - -}; - - -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/ContentFilteredTopicExample/CMakeLists.txt b/examples/cpp/dds/ContentFilteredTopicExample/CMakeLists.txt index b556d135900..3a5025c9ed2 100644 --- a/examples/cpp/dds/ContentFilteredTopicExample/CMakeLists.txt +++ b/examples/cpp/dds/ContentFilteredTopicExample/CMakeLists.txt @@ -31,8 +31,6 @@ set(CFT_COMMON_SOURCES ContentFilteredTopicExample_main.cpp ContentFilteredTopicExamplePublisher.cpp ContentFilteredTopicExampleSubscriber.cpp - HelloWorld.cxx - HelloWorldv1.cxx HelloWorldPubSubTypes.cxx HelloWorldTypeObject.cxx ) diff --git a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorld.cxx b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorld.cxx deleted file mode 100644 index 502f3953b05..00000000000 --- a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorld.cxx +++ /dev/null @@ -1,172 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include "HelloWorldTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -HelloWorld::HelloWorld() -{ - // Just to register all known types - registerHelloWorldTypes(); -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "HelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorld.hpp b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorld.hpp new file mode 100644 index 00000000000..03efcac9d02 --- /dev/null +++ b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorld.hpp @@ -0,0 +1,242 @@ +// 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 HelloWorld.hpp + * This header file contains the declaration of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLD_HPP_ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +#include "HelloWorldTypeObject.h" + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#define eProsima_user_DllExport __declspec( dllexport ) +#else +#define eProsima_user_DllExport +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define eProsima_user_DllExport +#endif // _WIN32 + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#if defined(HELLOWORLD_SOURCE) +#define HELLOWORLD_DllAPI __declspec( dllexport ) +#else +#define HELLOWORLD_DllAPI __declspec( dllimport ) +#endif // HELLOWORLD_SOURCE +#else +#define HELLOWORLD_DllAPI +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define HELLOWORLD_DllAPI +#endif // _WIN32 + + + +/*! + * @brief This class represents the structure HelloWorld defined by the user in the IDL file. + * @ingroup HelloWorld + */ +class HelloWorld +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport HelloWorld() + { + // Just to register all known types + registerHelloWorldTypes(); + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~HelloWorld() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld( + const HelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld( + HelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld& operator =( + const HelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld& operator =( + HelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x HelloWorld object to compare. + */ + eProsima_user_DllExport bool operator ==( + const HelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } + + /*! + * @brief Comparison operator. + * @param x HelloWorld object to compare. + */ + eProsima_user_DllExport bool operator !=( + const HelloWorld& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member index + * @param _index New value for member index + */ + eProsima_user_DllExport void index( + uint32_t _index) + { + m_index = _index; + } + + /*! + * @brief This function returns the value of member index + * @return Value of member index + */ + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } + + /*! + * @brief This function returns a reference to member index + * @return Reference to member index + */ + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } + + + /*! + * @brief This function copies the value in member message + * @param _message New value to be copied in member message + */ + eProsima_user_DllExport void message( + const std::string& _message) + { + m_message = _message; + } + + /*! + * @brief This function moves the value in member message + * @param _message New value to be moved in member message + */ + eProsima_user_DllExport void message( + std::string&& _message) + { + m_message = std::move(_message); + } + + /*! + * @brief This function returns a constant reference to member message + * @return Constant reference to member message + */ + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } + + /*! + * @brief This function returns a reference to member message + * @return Reference to member message + */ + eProsima_user_DllExport std::string& message() + { + return m_message; + } + + + +private: + + uint32_t m_index{0}; + std::string m_message; + +}; + +#endif // _FAST_DDS_GENERATED_HELLOWORLD_HPP_ + + diff --git a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldCdrAux.hpp b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldCdrAux.hpp index 9f346d306be..ca17b2a5507 100644 --- a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldCdrAux.hpp +++ b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ -#include "HelloWorld.h" +#include "HelloWorld.hpp" constexpr uint32_t HelloWorld_max_cdr_typesize {268UL}; constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldPubSubTypes.cxx b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldPubSubTypes.cxx index 85cb477896e..9eaca1f74a9 100644 --- a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldPubSubTypes.cxx +++ b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool HelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" diff --git a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldPubSubTypes.h b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldPubSubTypes.h index cb61cd6ba23..8a3697d4308 100644 --- a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldPubSubTypes.h +++ b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldTypeObject.cxx b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldTypeObject.cxx index 69e829c28d7..2f2e299de8e 100644 --- a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldTypeObject.cxx +++ b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldTypeObject.cxx @@ -24,7 +24,7 @@ namespace { char dummy; } #endif -#include "HelloWorld.h" +#include "HelloWorld.hpp" #include "HelloWorldTypeObject.h" #include #include diff --git a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldv1.cxx b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldv1.cxx deleted file mode 100644 index bb049241e49..00000000000 --- a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldv1.cxx +++ /dev/null @@ -1,290 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include "HelloWorldTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define HelloWorld_max_cdr_typesize 268ULL; - - - - -HelloWorld::HelloWorld() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - - // Just to register all known types - registerHelloWorldTypes(); -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -size_t HelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return HelloWorld_max_cdr_typesize; -} - -size_t HelloWorld::getCdrSerializedSize( - const HelloWorld& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void HelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void HelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool HelloWorld::isKeyDefined() -{ - return false; -} - -void HelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldv1.h b/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldv1.h deleted file mode 100644 index 7758cd793fd..00000000000 --- a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorldv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @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 HelloWorld& 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 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: - - uint32_t m_index; - std::string m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/CustomListenerExample/Topic.cxx b/examples/cpp/dds/CustomListenerExample/Topic.cxx deleted file mode 100644 index ca86d176ba1..00000000000 --- a/examples/cpp/dds/CustomListenerExample/Topic.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 Topic.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Topic.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -Topic::Topic() -{ -} - -Topic::~Topic() -{ -} - -Topic::Topic( - const Topic& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -Topic::Topic( - Topic&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -Topic& Topic::operator =( - const Topic& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -Topic& Topic::operator =( - Topic&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool Topic::operator ==( - const Topic& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool Topic::operator !=( - const Topic& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void Topic::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t Topic::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& Topic::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void Topic::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void Topic::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& Topic::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& Topic::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "TopicCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/LivelinessQoS/Topic.h b/examples/cpp/dds/CustomListenerExample/Topic.hpp similarity index 70% rename from examples/cpp/dds/LivelinessQoS/Topic.h rename to examples/cpp/dds/CustomListenerExample/Topic.hpp index 2596f317a1e..e171b930e79 100644 --- a/examples/cpp/dds/LivelinessQoS/Topic.h +++ b/examples/cpp/dds/CustomListenerExample/Topic.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file Topic.h + * @file Topic.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "Topicv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_TOPIC_H_ -#define _FAST_DDS_GENERATED_TOPIC_H_ +#ifndef _FAST_DDS_GENERATED_TOPIC_HPP_ +#define _FAST_DDS_GENERATED_TOPIC_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define TOPIC_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class Topic /*! * @brief Default constructor. */ - eProsima_user_DllExport Topic(); + eProsima_user_DllExport Topic() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~Topic(); + eProsima_user_DllExport ~Topic() + { + } /*! * @brief Copy constructor. * @param x Reference to the object Topic that will be copied. */ eProsima_user_DllExport Topic( - const Topic& x); + const Topic& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object Topic that will be copied. */ eProsima_user_DllExport Topic( - Topic&& x) noexcept; + Topic&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object Topic that will be copied. */ eProsima_user_DllExport Topic& operator =( - const Topic& x); + const Topic& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object Topic that will be copied. */ eProsima_user_DllExport Topic& operator =( - Topic&& x) noexcept; + Topic&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x Topic object to compare. */ eProsima_user_DllExport bool operator ==( - const Topic& x) const; + const Topic& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x Topic object to compare. */ eProsima_user_DllExport bool operator !=( - const Topic& x) const; + const Topic& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class Topic * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::string& _message); + const std::string& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::string&& _message); + std::string&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::string& message() const; + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::string& message(); + eProsima_user_DllExport std::string& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class Topic }; -#endif // _FAST_DDS_GENERATED_TOPIC_H_ - +#endif // _FAST_DDS_GENERATED_TOPIC_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/CustomListenerExample/TopicCdrAux.hpp b/examples/cpp/dds/CustomListenerExample/TopicCdrAux.hpp index 619cdbbb7b8..eeddc162206 100644 --- a/examples/cpp/dds/CustomListenerExample/TopicCdrAux.hpp +++ b/examples/cpp/dds/CustomListenerExample/TopicCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_TOPICCDRAUX_HPP_ #define _FAST_DDS_GENERATED_TOPICCDRAUX_HPP_ -#include "Topic.h" +#include "Topic.hpp" constexpr uint32_t Topic_max_cdr_typesize {268UL}; constexpr uint32_t Topic_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/CustomListenerExample/TopicPubSubTypes.cxx b/examples/cpp/dds/CustomListenerExample/TopicPubSubTypes.cxx index ce688064a0e..200e7fb3057 100644 --- a/examples/cpp/dds/CustomListenerExample/TopicPubSubTypes.cxx +++ b/examples/cpp/dds/CustomListenerExample/TopicPubSubTypes.cxx @@ -219,3 +219,6 @@ bool TopicPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "TopicCdrAux.ipp" diff --git a/examples/cpp/dds/CustomListenerExample/TopicPubSubTypes.h b/examples/cpp/dds/CustomListenerExample/TopicPubSubTypes.h index b9100bacbe9..15658c08f39 100644 --- a/examples/cpp/dds/CustomListenerExample/TopicPubSubTypes.h +++ b/examples/cpp/dds/CustomListenerExample/TopicPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "Topic.h" +#include "Topic.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/CustomListenerExample/Topicv1.cxx b/examples/cpp/dds/CustomListenerExample/Topicv1.cxx deleted file mode 100644 index a3e85584242..00000000000 --- a/examples/cpp/dds/CustomListenerExample/Topicv1.cxx +++ /dev/null @@ -1,286 +0,0 @@ -// 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 Topic.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Topic.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define Topic_max_cdr_typesize 268ULL; - - - - -Topic::Topic() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - -} - -Topic::~Topic() -{ -} - -Topic::Topic( - const Topic& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -Topic::Topic( - Topic&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -Topic& Topic::operator =( - const Topic& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -Topic& Topic::operator =( - Topic&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool Topic::operator ==( - const Topic& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool Topic::operator !=( - const Topic& x) const -{ - return !(*this == x); -} - -size_t Topic::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return Topic_max_cdr_typesize; -} - -size_t Topic::getCdrSerializedSize( - const Topic& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void Topic::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void Topic::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool Topic::isKeyDefined() -{ - return false; -} - -void Topic::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void Topic::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t Topic::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& Topic::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void Topic::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void Topic::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& Topic::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& Topic::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/CustomListenerExample/Topicv1.h b/examples/cpp/dds/CustomListenerExample/Topicv1.h deleted file mode 100644 index 9a6dfa97b4d..00000000000 --- a/examples/cpp/dds/CustomListenerExample/Topicv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 Topic.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_TOPIC_H_ -#define _FAST_DDS_GENERATED_TOPIC_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(TOPIC_SOURCE) -#define TOPIC_DllAPI __declspec( dllexport ) -#else -#define TOPIC_DllAPI __declspec( dllimport ) -#endif // TOPIC_SOURCE -#else -#define TOPIC_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define TOPIC_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure Topic defined by the user in the IDL file. - * @ingroup Topic - */ -class Topic -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Topic(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Topic(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object Topic that will be copied. - */ - eProsima_user_DllExport Topic( - const Topic& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object Topic that will be copied. - */ - eProsima_user_DllExport Topic( - Topic&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object Topic that will be copied. - */ - eProsima_user_DllExport Topic& operator =( - const Topic& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object Topic that will be copied. - */ - eProsima_user_DllExport Topic& operator =( - Topic&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x Topic object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Topic& x) const; - - /*! - * @brief Comparison operator. - * @param x Topic object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Topic& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @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 Topic& 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 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: - - uint32_t m_index; - std::string m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_TOPIC_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolData.cxx b/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolData.cxx deleted file mode 100644 index 7f304177d38..00000000000 --- a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolData.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 CustomPayloadPoolData.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "CustomPayloadPoolData.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -CustomPayloadPoolData::CustomPayloadPoolData() -{ -} - -CustomPayloadPoolData::~CustomPayloadPoolData() -{ -} - -CustomPayloadPoolData::CustomPayloadPoolData( - const CustomPayloadPoolData& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -CustomPayloadPoolData::CustomPayloadPoolData( - CustomPayloadPoolData&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -CustomPayloadPoolData& CustomPayloadPoolData::operator =( - const CustomPayloadPoolData& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -CustomPayloadPoolData& CustomPayloadPoolData::operator =( - CustomPayloadPoolData&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool CustomPayloadPoolData::operator ==( - const CustomPayloadPoolData& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool CustomPayloadPoolData::operator !=( - const CustomPayloadPoolData& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void CustomPayloadPoolData::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t CustomPayloadPoolData::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& CustomPayloadPoolData::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void CustomPayloadPoolData::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void CustomPayloadPoolData::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& CustomPayloadPoolData::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& CustomPayloadPoolData::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "CustomPayloadPoolDataCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolData.h b/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolData.hpp similarity index 69% rename from examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolData.h rename to examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolData.hpp index 46b1c16c138..baf1f917a1b 100644 --- a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolData.h +++ b/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolData.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file CustomPayloadPoolData.h + * @file CustomPayloadPoolData.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "CustomPayloadPoolDatav1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_CUSTOMPAYLOADPOOLDATA_H_ -#define _FAST_DDS_GENERATED_CUSTOMPAYLOADPOOLDATA_H_ +#ifndef _FAST_DDS_GENERATED_CUSTOMPAYLOADPOOLDATA_HPP_ +#define _FAST_DDS_GENERATED_CUSTOMPAYLOADPOOLDATA_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define CUSTOMPAYLOADPOOLDATA_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class CustomPayloadPoolData /*! * @brief Default constructor. */ - eProsima_user_DllExport CustomPayloadPoolData(); + eProsima_user_DllExport CustomPayloadPoolData() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~CustomPayloadPoolData(); + eProsima_user_DllExport ~CustomPayloadPoolData() + { + } /*! * @brief Copy constructor. * @param x Reference to the object CustomPayloadPoolData that will be copied. */ eProsima_user_DllExport CustomPayloadPoolData( - const CustomPayloadPoolData& x); + const CustomPayloadPoolData& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object CustomPayloadPoolData that will be copied. */ eProsima_user_DllExport CustomPayloadPoolData( - CustomPayloadPoolData&& x) noexcept; + CustomPayloadPoolData&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object CustomPayloadPoolData that will be copied. */ eProsima_user_DllExport CustomPayloadPoolData& operator =( - const CustomPayloadPoolData& x); + const CustomPayloadPoolData& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object CustomPayloadPoolData that will be copied. */ eProsima_user_DllExport CustomPayloadPoolData& operator =( - CustomPayloadPoolData&& x) noexcept; + CustomPayloadPoolData&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x CustomPayloadPoolData object to compare. */ eProsima_user_DllExport bool operator ==( - const CustomPayloadPoolData& x) const; + const CustomPayloadPoolData& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x CustomPayloadPoolData object to compare. */ eProsima_user_DllExport bool operator !=( - const CustomPayloadPoolData& x) const; + const CustomPayloadPoolData& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class CustomPayloadPoolData * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::string& _message); + const std::string& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::string&& _message); + std::string&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::string& message() const; + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::string& message(); + eProsima_user_DllExport std::string& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class CustomPayloadPoolData }; -#endif // _FAST_DDS_GENERATED_CUSTOMPAYLOADPOOLDATA_H_ - +#endif // _FAST_DDS_GENERATED_CUSTOMPAYLOADPOOLDATA_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDataCdrAux.hpp b/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDataCdrAux.hpp index 3d50c83da22..9e7c5137390 100644 --- a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDataCdrAux.hpp +++ b/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDataCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_CUSTOMPAYLOADPOOLDATACDRAUX_HPP_ #define _FAST_DDS_GENERATED_CUSTOMPAYLOADPOOLDATACDRAUX_HPP_ -#include "CustomPayloadPoolData.h" +#include "CustomPayloadPoolData.hpp" constexpr uint32_t CustomPayloadPoolData_max_cdr_typesize {268UL}; constexpr uint32_t CustomPayloadPoolData_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDataPubSubTypes.cxx b/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDataPubSubTypes.cxx index ffd0e7faa97..d5ae9865c44 100644 --- a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDataPubSubTypes.cxx +++ b/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDataPubSubTypes.cxx @@ -219,3 +219,6 @@ bool CustomPayloadPoolDataPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "CustomPayloadPoolDataCdrAux.ipp" diff --git a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDataPubSubTypes.h b/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDataPubSubTypes.h index a8ae92cfc06..999aee19731 100644 --- a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDataPubSubTypes.h +++ b/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDataPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "CustomPayloadPoolData.h" +#include "CustomPayloadPoolData.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDatav1.cxx b/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDatav1.cxx deleted file mode 100644 index 51f45ea225f..00000000000 --- a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDatav1.cxx +++ /dev/null @@ -1,286 +0,0 @@ -// 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 CustomPayloadPoolData.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "CustomPayloadPoolData.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define CustomPayloadPoolData_max_cdr_typesize 268ULL; - - - - -CustomPayloadPoolData::CustomPayloadPoolData() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - -} - -CustomPayloadPoolData::~CustomPayloadPoolData() -{ -} - -CustomPayloadPoolData::CustomPayloadPoolData( - const CustomPayloadPoolData& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -CustomPayloadPoolData::CustomPayloadPoolData( - CustomPayloadPoolData&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -CustomPayloadPoolData& CustomPayloadPoolData::operator =( - const CustomPayloadPoolData& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -CustomPayloadPoolData& CustomPayloadPoolData::operator =( - CustomPayloadPoolData&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool CustomPayloadPoolData::operator ==( - const CustomPayloadPoolData& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool CustomPayloadPoolData::operator !=( - const CustomPayloadPoolData& x) const -{ - return !(*this == x); -} - -size_t CustomPayloadPoolData::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return CustomPayloadPoolData_max_cdr_typesize; -} - -size_t CustomPayloadPoolData::getCdrSerializedSize( - const CustomPayloadPoolData& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void CustomPayloadPoolData::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void CustomPayloadPoolData::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool CustomPayloadPoolData::isKeyDefined() -{ - return false; -} - -void CustomPayloadPoolData::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void CustomPayloadPoolData::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t CustomPayloadPoolData::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& CustomPayloadPoolData::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void CustomPayloadPoolData::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void CustomPayloadPoolData::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& CustomPayloadPoolData::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& CustomPayloadPoolData::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDatav1.h b/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDatav1.h deleted file mode 100644 index ac30ce9a3b4..00000000000 --- a/examples/cpp/dds/CustomPayloadPoolExample/CustomPayloadPoolDatav1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 CustomPayloadPoolData.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_CUSTOMPAYLOADPOOLDATA_H_ -#define _FAST_DDS_GENERATED_CUSTOMPAYLOADPOOLDATA_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(CUSTOMPAYLOADPOOLDATA_SOURCE) -#define CUSTOMPAYLOADPOOLDATA_DllAPI __declspec( dllexport ) -#else -#define CUSTOMPAYLOADPOOLDATA_DllAPI __declspec( dllimport ) -#endif // CUSTOMPAYLOADPOOLDATA_SOURCE -#else -#define CUSTOMPAYLOADPOOLDATA_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define CUSTOMPAYLOADPOOLDATA_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure CustomPayloadPoolData defined by the user in the IDL file. - * @ingroup CustomPayloadPoolData - */ -class CustomPayloadPoolData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport CustomPayloadPoolData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~CustomPayloadPoolData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object CustomPayloadPoolData that will be copied. - */ - eProsima_user_DllExport CustomPayloadPoolData( - const CustomPayloadPoolData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object CustomPayloadPoolData that will be copied. - */ - eProsima_user_DllExport CustomPayloadPoolData( - CustomPayloadPoolData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object CustomPayloadPoolData that will be copied. - */ - eProsima_user_DllExport CustomPayloadPoolData& operator =( - const CustomPayloadPoolData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object CustomPayloadPoolData that will be copied. - */ - eProsima_user_DllExport CustomPayloadPoolData& operator =( - CustomPayloadPoolData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x CustomPayloadPoolData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const CustomPayloadPoolData& x) const; - - /*! - * @brief Comparison operator. - * @param x CustomPayloadPoolData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const CustomPayloadPoolData& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @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 CustomPayloadPoolData& 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 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: - - uint32_t m_index; - std::string m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_CUSTOMPAYLOADPOOLDATA_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/DeadlineQoSExample/deadlinepayload.cxx b/examples/cpp/dds/DeadlineQoSExample/deadlinepayload.cxx deleted file mode 100644 index ded92f4bcdc..00000000000 --- a/examples/cpp/dds/DeadlineQoSExample/deadlinepayload.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 deadlinepayload.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "deadlinepayload.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -HelloMsg::HelloMsg() -{ -} - -HelloMsg::~HelloMsg() -{ -} - -HelloMsg::HelloMsg( - const HelloMsg& x) -{ - m_deadlinekey = x.m_deadlinekey; - m_payload = x.m_payload; -} - -HelloMsg::HelloMsg( - HelloMsg&& x) noexcept -{ - m_deadlinekey = x.m_deadlinekey; - m_payload = std::move(x.m_payload); -} - -HelloMsg& HelloMsg::operator =( - const HelloMsg& x) -{ - - m_deadlinekey = x.m_deadlinekey; - m_payload = x.m_payload; - return *this; -} - -HelloMsg& HelloMsg::operator =( - HelloMsg&& x) noexcept -{ - - m_deadlinekey = x.m_deadlinekey; - m_payload = std::move(x.m_payload); - return *this; -} - -bool HelloMsg::operator ==( - const HelloMsg& x) const -{ - return (m_deadlinekey == x.m_deadlinekey && - m_payload == x.m_payload); -} - -bool HelloMsg::operator !=( - const HelloMsg& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member deadlinekey - * @param _deadlinekey New value for member deadlinekey - */ -void HelloMsg::deadlinekey( - uint16_t _deadlinekey) -{ - m_deadlinekey = _deadlinekey; -} - -/*! - * @brief This function returns the value of member deadlinekey - * @return Value of member deadlinekey - */ -uint16_t HelloMsg::deadlinekey() const -{ - return m_deadlinekey; -} - -/*! - * @brief This function returns a reference to member deadlinekey - * @return Reference to member deadlinekey - */ -uint16_t& HelloMsg::deadlinekey() -{ - return m_deadlinekey; -} - - -/*! - * @brief This function copies the value in member payload - * @param _payload New value to be copied in member payload - */ -void HelloMsg::payload( - const eprosima::fastcdr::fixed_string<256>& _payload) -{ - m_payload = _payload; -} - -/*! - * @brief This function moves the value in member payload - * @param _payload New value to be moved in member payload - */ -void HelloMsg::payload( - eprosima::fastcdr::fixed_string<256>&& _payload) -{ - m_payload = std::move(_payload); -} - -/*! - * @brief This function returns a constant reference to member payload - * @return Constant reference to member payload - */ -const eprosima::fastcdr::fixed_string<256>& HelloMsg::payload() const -{ - return m_payload; -} - -/*! - * @brief This function returns a reference to member payload - * @return Reference to member payload - */ -eprosima::fastcdr::fixed_string<256>& HelloMsg::payload() -{ - return m_payload; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "deadlinepayloadCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/DeadlineQoSExample/deadlinepayload.h b/examples/cpp/dds/DeadlineQoSExample/deadlinepayload.hpp similarity index 71% rename from examples/cpp/dds/DeadlineQoSExample/deadlinepayload.h rename to examples/cpp/dds/DeadlineQoSExample/deadlinepayload.hpp index 4dd530394b2..54e7ecbdd7e 100644 --- a/examples/cpp/dds/DeadlineQoSExample/deadlinepayload.h +++ b/examples/cpp/dds/DeadlineQoSExample/deadlinepayload.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file deadlinepayload.h + * @file deadlinepayload.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "deadlinepayloadv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_DEADLINEPAYLOAD_H_ -#define _FAST_DDS_GENERATED_DEADLINEPAYLOAD_H_ +#ifndef _FAST_DDS_GENERATED_DEADLINEPAYLOAD_HPP_ +#define _FAST_DDS_GENERATED_DEADLINEPAYLOAD_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define DEADLINEPAYLOAD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class HelloMsg /*! * @brief Default constructor. */ - eProsima_user_DllExport HelloMsg(); + eProsima_user_DllExport HelloMsg() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~HelloMsg(); + eProsima_user_DllExport ~HelloMsg() + { + } /*! * @brief Copy constructor. * @param x Reference to the object HelloMsg that will be copied. */ eProsima_user_DllExport HelloMsg( - const HelloMsg& x); + const HelloMsg& x) + { + m_deadlinekey = x.m_deadlinekey; + + m_payload = x.m_payload; + + } /*! * @brief Move constructor. * @param x Reference to the object HelloMsg that will be copied. */ eProsima_user_DllExport HelloMsg( - HelloMsg&& x) noexcept; + HelloMsg&& x) noexcept + { + m_deadlinekey = x.m_deadlinekey; + m_payload = std::move(x.m_payload); + } /*! * @brief Copy assignment. * @param x Reference to the object HelloMsg that will be copied. */ eProsima_user_DllExport HelloMsg& operator =( - const HelloMsg& x); + const HelloMsg& x) + { + + m_deadlinekey = x.m_deadlinekey; + + m_payload = x.m_payload; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object HelloMsg that will be copied. */ eProsima_user_DllExport HelloMsg& operator =( - HelloMsg&& x) noexcept; + HelloMsg&& x) noexcept + { + + m_deadlinekey = x.m_deadlinekey; + m_payload = std::move(x.m_payload); + return *this; + } /*! * @brief Comparison operator. * @param x HelloMsg object to compare. */ eProsima_user_DllExport bool operator ==( - const HelloMsg& x) const; + const HelloMsg& x) const + { + return (m_deadlinekey == x.m_deadlinekey && + m_payload == x.m_payload); + } /*! * @brief Comparison operator. * @param x HelloMsg object to compare. */ eProsima_user_DllExport bool operator !=( - const HelloMsg& x) const; + const HelloMsg& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member deadlinekey * @param _deadlinekey New value for member deadlinekey */ eProsima_user_DllExport void deadlinekey( - uint16_t _deadlinekey); + uint16_t _deadlinekey) + { + m_deadlinekey = _deadlinekey; + } /*! * @brief This function returns the value of member deadlinekey * @return Value of member deadlinekey */ - eProsima_user_DllExport uint16_t deadlinekey() const; + eProsima_user_DllExport uint16_t deadlinekey() const + { + return m_deadlinekey; + } /*! * @brief This function returns a reference to member deadlinekey * @return Reference to member deadlinekey */ - eProsima_user_DllExport uint16_t& deadlinekey(); + eProsima_user_DllExport uint16_t& deadlinekey() + { + return m_deadlinekey; + } /*! @@ -160,26 +191,40 @@ class HelloMsg * @param _payload New value to be copied in member payload */ eProsima_user_DllExport void payload( - const eprosima::fastcdr::fixed_string<256>& _payload); + const eprosima::fastcdr::fixed_string<256>& _payload) + { + m_payload = _payload; + } /*! * @brief This function moves the value in member payload * @param _payload New value to be moved in member payload */ eProsima_user_DllExport void payload( - eprosima::fastcdr::fixed_string<256>&& _payload); + eprosima::fastcdr::fixed_string<256>&& _payload) + { + m_payload = std::move(_payload); + } /*! * @brief This function returns a constant reference to member payload * @return Constant reference to member payload */ - eProsima_user_DllExport const eprosima::fastcdr::fixed_string<256>& payload() const; + eProsima_user_DllExport const eprosima::fastcdr::fixed_string<256>& payload() const + { + return m_payload; + } /*! * @brief This function returns a reference to member payload * @return Reference to member payload */ - eProsima_user_DllExport eprosima::fastcdr::fixed_string<256>& payload(); + eProsima_user_DllExport eprosima::fastcdr::fixed_string<256>& payload() + { + return m_payload; + } + + private: @@ -188,8 +233,6 @@ class HelloMsg }; -#endif // _FAST_DDS_GENERATED_DEADLINEPAYLOAD_H_ - +#endif // _FAST_DDS_GENERATED_DEADLINEPAYLOAD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadCdrAux.hpp b/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadCdrAux.hpp index cf5ad3e0bdc..2bbe6cd929d 100644 --- a/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadCdrAux.hpp +++ b/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_DEADLINEPAYLOADCDRAUX_HPP_ #define _FAST_DDS_GENERATED_DEADLINEPAYLOADCDRAUX_HPP_ -#include "deadlinepayload.h" +#include "deadlinepayload.hpp" constexpr uint32_t HelloMsg_max_cdr_typesize {269UL}; constexpr uint32_t HelloMsg_max_key_cdr_typesize {2UL}; diff --git a/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadPubSubTypes.cxx b/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadPubSubTypes.cxx index 300ac806538..9130f9ed0ad 100644 --- a/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadPubSubTypes.cxx +++ b/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadPubSubTypes.cxx @@ -219,3 +219,6 @@ bool HelloMsgPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "deadlinepayloadCdrAux.ipp" diff --git a/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadPubSubTypes.h b/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadPubSubTypes.h index bc9fceae08e..817e697d426 100644 --- a/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadPubSubTypes.h +++ b/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "deadlinepayload.h" +#include "deadlinepayload.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadv1.cxx b/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadv1.cxx deleted file mode 100644 index 6e8e3e66443..00000000000 --- a/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadv1.cxx +++ /dev/null @@ -1,294 +0,0 @@ -// 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 deadlinepayload.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "deadlinepayload.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define HelloMsg_max_cdr_typesize 269ULL; - - - - -HelloMsg::HelloMsg() -{ - // unsigned short m_deadlinekey - m_deadlinekey = 0; - // /type_d() m_payload - - -} - -HelloMsg::~HelloMsg() -{ -} - -HelloMsg::HelloMsg( - const HelloMsg& x) -{ - m_deadlinekey = x.m_deadlinekey; - - - m_payload = x.m_payload; - -} - -HelloMsg::HelloMsg( - HelloMsg&& x) noexcept -{ - m_deadlinekey = x.m_deadlinekey; - - - m_payload = std::move(x.m_payload); - -} - -HelloMsg& HelloMsg::operator =( - const HelloMsg& x) -{ - m_deadlinekey = x.m_deadlinekey; - - - m_payload = x.m_payload; - - return *this; -} - -HelloMsg& HelloMsg::operator =( - HelloMsg&& x) noexcept -{ - m_deadlinekey = x.m_deadlinekey; - - - m_payload = std::move(x.m_payload); - - return *this; -} - -bool HelloMsg::operator ==( - const HelloMsg& x) const -{ - return (m_deadlinekey == x.m_deadlinekey && - m_payload == x.m_payload); -} - -bool HelloMsg::operator !=( - const HelloMsg& x) const -{ - return !(*this == x); -} - -size_t HelloMsg::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return HelloMsg_max_cdr_typesize; -} - -size_t HelloMsg::getCdrSerializedSize( - const HelloMsg& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.payload().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void HelloMsg::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_deadlinekey; - - scdr << m_payload.c_str(); - -} - -void HelloMsg::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_deadlinekey; - - - - { - std::string aux; - dcdr >> aux; - m_payload = aux.c_str(); - } - - -} - - -bool HelloMsg::isKeyDefined() -{ - return true; -} - -void HelloMsg::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - - scdr << m_deadlinekey; - - -} - -/*! - * @brief This function sets a value in member deadlinekey - * @param _deadlinekey New value for member deadlinekey - */ -void HelloMsg::deadlinekey( - uint16_t _deadlinekey) -{ - m_deadlinekey = _deadlinekey; -} - -/*! - * @brief This function returns the value of member deadlinekey - * @return Value of member deadlinekey - */ -uint16_t HelloMsg::deadlinekey() const -{ - return m_deadlinekey; -} - -/*! - * @brief This function returns a reference to member deadlinekey - * @return Reference to member deadlinekey - */ -uint16_t& HelloMsg::deadlinekey() -{ - return m_deadlinekey; -} - - -/*! - * @brief This function copies the value in member payload - * @param _payload New value to be copied in member payload - */ -void HelloMsg::payload( - const eprosima::fastrtps::fixed_string<256>& _payload) -{ - m_payload = _payload; -} - -/*! - * @brief This function moves the value in member payload - * @param _payload New value to be moved in member payload - */ -void HelloMsg::payload( - eprosima::fastrtps::fixed_string<256>&& _payload) -{ - m_payload = std::move(_payload); -} - -/*! - * @brief This function returns a constant reference to member payload - * @return Constant reference to member payload - */ -const eprosima::fastrtps::fixed_string<256>& HelloMsg::payload() const -{ - return m_payload; -} - -/*! - * @brief This function returns a reference to member payload - * @return Reference to member payload - */ -eprosima::fastrtps::fixed_string<256>& HelloMsg::payload() -{ - return m_payload; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadv1.h b/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadv1.h deleted file mode 100644 index 143be9e6dca..00000000000 --- a/examples/cpp/dds/DeadlineQoSExample/deadlinepayloadv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 deadlinepayload.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_DEADLINEPAYLOAD_H_ -#define _FAST_DDS_GENERATED_DEADLINEPAYLOAD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(DEADLINEPAYLOAD_SOURCE) -#define DEADLINEPAYLOAD_DllAPI __declspec( dllexport ) -#else -#define DEADLINEPAYLOAD_DllAPI __declspec( dllimport ) -#endif // DEADLINEPAYLOAD_SOURCE -#else -#define DEADLINEPAYLOAD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define DEADLINEPAYLOAD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloMsg defined by the user in the IDL file. - * @ingroup deadlinepayload - */ -class HelloMsg -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloMsg(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloMsg(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloMsg that will be copied. - */ - eProsima_user_DllExport HelloMsg( - const HelloMsg& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloMsg that will be copied. - */ - eProsima_user_DllExport HelloMsg( - HelloMsg&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloMsg that will be copied. - */ - eProsima_user_DllExport HelloMsg& operator =( - const HelloMsg& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloMsg that will be copied. - */ - eProsima_user_DllExport HelloMsg& operator =( - HelloMsg&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloMsg object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloMsg& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloMsg object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloMsg& x) const; - - /*! - * @brief This function sets a value in member deadlinekey - * @param _deadlinekey New value for member deadlinekey - */ - eProsima_user_DllExport void deadlinekey( - uint16_t _deadlinekey); - - /*! - * @brief This function returns the value of member deadlinekey - * @return Value of member deadlinekey - */ - eProsima_user_DllExport uint16_t deadlinekey() const; - - /*! - * @brief This function returns a reference to member deadlinekey - * @return Reference to member deadlinekey - */ - eProsima_user_DllExport uint16_t& deadlinekey(); - - - /*! - * @brief This function copies the value in member payload - * @param _payload New value to be copied in member payload - */ - eProsima_user_DllExport void payload( - const eprosima::fastrtps::fixed_string<256>& _payload); - - /*! - * @brief This function moves the value in member payload - * @param _payload New value to be moved in member payload - */ - eProsima_user_DllExport void payload( - eprosima::fastrtps::fixed_string<256>&& _payload); - - /*! - * @brief This function returns a constant reference to member payload - * @return Constant reference to member payload - */ - eProsima_user_DllExport const eprosima::fastrtps::fixed_string<256>& payload() const; - - /*! - * @brief This function returns a reference to member payload - * @return Reference to member payload - */ - eProsima_user_DllExport eprosima::fastrtps::fixed_string<256>& payload(); - - - /*! - * @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 HelloMsg& 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 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: - - uint16_t m_deadlinekey; - eprosima::fastrtps::fixed_string<256> m_payload; - -}; - - -#endif // _FAST_DDS_GENERATED_DEADLINEPAYLOAD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/DisablePositiveACKs/DisablePositiveACKsPublisher.h b/examples/cpp/dds/DisablePositiveACKs/DisablePositiveACKsPublisher.h index 694f227fec9..8c0aa046795 100644 --- a/examples/cpp/dds/DisablePositiveACKs/DisablePositiveACKsPublisher.h +++ b/examples/cpp/dds/DisablePositiveACKs/DisablePositiveACKsPublisher.h @@ -20,7 +20,7 @@ #ifndef DisablePositiveACKsPublisher_H_ #define DisablePositiveACKsPublisher_H_ -#include "Topic.h" +#include "Topic.hpp" #include "TopicPubSubTypes.h" #include diff --git a/examples/cpp/dds/DisablePositiveACKs/DisablePositiveACKsSubscriber.h b/examples/cpp/dds/DisablePositiveACKs/DisablePositiveACKsSubscriber.h index 0d383c77717..7423e10579d 100644 --- a/examples/cpp/dds/DisablePositiveACKs/DisablePositiveACKsSubscriber.h +++ b/examples/cpp/dds/DisablePositiveACKs/DisablePositiveACKsSubscriber.h @@ -20,8 +20,8 @@ #ifndef DisablePositiveACKsSubscriber_H_ #define DisablePositiveACKsSubscriber_H_ +#include "Topic.hpp" #include "TopicPubSubTypes.h" -#include "Topic.h" #include #include diff --git a/examples/cpp/dds/DisablePositiveACKs/Topic.cxx b/examples/cpp/dds/DisablePositiveACKs/Topic.cxx deleted file mode 100644 index ca86d176ba1..00000000000 --- a/examples/cpp/dds/DisablePositiveACKs/Topic.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 Topic.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Topic.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -Topic::Topic() -{ -} - -Topic::~Topic() -{ -} - -Topic::Topic( - const Topic& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -Topic::Topic( - Topic&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -Topic& Topic::operator =( - const Topic& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -Topic& Topic::operator =( - Topic&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool Topic::operator ==( - const Topic& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool Topic::operator !=( - const Topic& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void Topic::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t Topic::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& Topic::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void Topic::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void Topic::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& Topic::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& Topic::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "TopicCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/DisablePositiveACKs/Topic.h b/examples/cpp/dds/DisablePositiveACKs/Topic.hpp similarity index 70% rename from examples/cpp/dds/DisablePositiveACKs/Topic.h rename to examples/cpp/dds/DisablePositiveACKs/Topic.hpp index 2596f317a1e..e171b930e79 100644 --- a/examples/cpp/dds/DisablePositiveACKs/Topic.h +++ b/examples/cpp/dds/DisablePositiveACKs/Topic.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file Topic.h + * @file Topic.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "Topicv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_TOPIC_H_ -#define _FAST_DDS_GENERATED_TOPIC_H_ +#ifndef _FAST_DDS_GENERATED_TOPIC_HPP_ +#define _FAST_DDS_GENERATED_TOPIC_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define TOPIC_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class Topic /*! * @brief Default constructor. */ - eProsima_user_DllExport Topic(); + eProsima_user_DllExport Topic() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~Topic(); + eProsima_user_DllExport ~Topic() + { + } /*! * @brief Copy constructor. * @param x Reference to the object Topic that will be copied. */ eProsima_user_DllExport Topic( - const Topic& x); + const Topic& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object Topic that will be copied. */ eProsima_user_DllExport Topic( - Topic&& x) noexcept; + Topic&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object Topic that will be copied. */ eProsima_user_DllExport Topic& operator =( - const Topic& x); + const Topic& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object Topic that will be copied. */ eProsima_user_DllExport Topic& operator =( - Topic&& x) noexcept; + Topic&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x Topic object to compare. */ eProsima_user_DllExport bool operator ==( - const Topic& x) const; + const Topic& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x Topic object to compare. */ eProsima_user_DllExport bool operator !=( - const Topic& x) const; + const Topic& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class Topic * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::string& _message); + const std::string& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::string&& _message); + std::string&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::string& message() const; + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::string& message(); + eProsima_user_DllExport std::string& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class Topic }; -#endif // _FAST_DDS_GENERATED_TOPIC_H_ - +#endif // _FAST_DDS_GENERATED_TOPIC_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/DisablePositiveACKs/TopicCdrAux.hpp b/examples/cpp/dds/DisablePositiveACKs/TopicCdrAux.hpp index 619cdbbb7b8..eeddc162206 100644 --- a/examples/cpp/dds/DisablePositiveACKs/TopicCdrAux.hpp +++ b/examples/cpp/dds/DisablePositiveACKs/TopicCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_TOPICCDRAUX_HPP_ #define _FAST_DDS_GENERATED_TOPICCDRAUX_HPP_ -#include "Topic.h" +#include "Topic.hpp" constexpr uint32_t Topic_max_cdr_typesize {268UL}; constexpr uint32_t Topic_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/DisablePositiveACKs/TopicPubSubTypes.cxx b/examples/cpp/dds/DisablePositiveACKs/TopicPubSubTypes.cxx index ce688064a0e..200e7fb3057 100644 --- a/examples/cpp/dds/DisablePositiveACKs/TopicPubSubTypes.cxx +++ b/examples/cpp/dds/DisablePositiveACKs/TopicPubSubTypes.cxx @@ -219,3 +219,6 @@ bool TopicPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "TopicCdrAux.ipp" diff --git a/examples/cpp/dds/DisablePositiveACKs/TopicPubSubTypes.h b/examples/cpp/dds/DisablePositiveACKs/TopicPubSubTypes.h index b9100bacbe9..15658c08f39 100644 --- a/examples/cpp/dds/DisablePositiveACKs/TopicPubSubTypes.h +++ b/examples/cpp/dds/DisablePositiveACKs/TopicPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "Topic.h" +#include "Topic.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/DisablePositiveACKs/Topicv1.cxx b/examples/cpp/dds/DisablePositiveACKs/Topicv1.cxx deleted file mode 100644 index a3e85584242..00000000000 --- a/examples/cpp/dds/DisablePositiveACKs/Topicv1.cxx +++ /dev/null @@ -1,286 +0,0 @@ -// 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 Topic.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Topic.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define Topic_max_cdr_typesize 268ULL; - - - - -Topic::Topic() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - -} - -Topic::~Topic() -{ -} - -Topic::Topic( - const Topic& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -Topic::Topic( - Topic&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -Topic& Topic::operator =( - const Topic& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -Topic& Topic::operator =( - Topic&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool Topic::operator ==( - const Topic& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool Topic::operator !=( - const Topic& x) const -{ - return !(*this == x); -} - -size_t Topic::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return Topic_max_cdr_typesize; -} - -size_t Topic::getCdrSerializedSize( - const Topic& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void Topic::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void Topic::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool Topic::isKeyDefined() -{ - return false; -} - -void Topic::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void Topic::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t Topic::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& Topic::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void Topic::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void Topic::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& Topic::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& Topic::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/DisablePositiveACKs/Topicv1.h b/examples/cpp/dds/DisablePositiveACKs/Topicv1.h deleted file mode 100644 index 9a6dfa97b4d..00000000000 --- a/examples/cpp/dds/DisablePositiveACKs/Topicv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 Topic.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_TOPIC_H_ -#define _FAST_DDS_GENERATED_TOPIC_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(TOPIC_SOURCE) -#define TOPIC_DllAPI __declspec( dllexport ) -#else -#define TOPIC_DllAPI __declspec( dllimport ) -#endif // TOPIC_SOURCE -#else -#define TOPIC_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define TOPIC_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure Topic defined by the user in the IDL file. - * @ingroup Topic - */ -class Topic -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Topic(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Topic(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object Topic that will be copied. - */ - eProsima_user_DllExport Topic( - const Topic& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object Topic that will be copied. - */ - eProsima_user_DllExport Topic( - Topic&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object Topic that will be copied. - */ - eProsima_user_DllExport Topic& operator =( - const Topic& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object Topic that will be copied. - */ - eProsima_user_DllExport Topic& operator =( - Topic&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x Topic object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Topic& x) const; - - /*! - * @brief Comparison operator. - * @param x Topic object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Topic& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @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 Topic& 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 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: - - uint32_t m_index; - std::string m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_TOPIC_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorld.cxx b/examples/cpp/dds/DiscoveryServerExample/types/HelloWorld.cxx deleted file mode 100644 index 4b415d67769..00000000000 --- a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorld.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -HelloWorld::HelloWorld() -{ -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "HelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/HelloWorldExample/HelloWorld.h b/examples/cpp/dds/DiscoveryServerExample/types/HelloWorld.hpp similarity index 69% rename from examples/cpp/dds/HelloWorldExample/HelloWorld.h rename to examples/cpp/dds/DiscoveryServerExample/types/HelloWorld.hpp index 5cd0ddba511..b6f1afb22bf 100644 --- a/examples/cpp/dds/HelloWorldExample/HelloWorld.h +++ b/examples/cpp/dds/DiscoveryServerExample/types/HelloWorld.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file HelloWorld.h + * @file HelloWorld.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "HelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLD_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define HELLOWORLD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class HelloWorld /*! * @brief Default constructor. */ - eProsima_user_DllExport HelloWorld(); + eProsima_user_DllExport HelloWorld() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~HelloWorld(); + eProsima_user_DllExport ~HelloWorld() + { + } /*! * @brief Copy constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - const HelloWorld& x); + const HelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); + const HelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class HelloWorld * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::string& _message); + const std::string& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::string&& _message); + std::string&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::string& message() const; + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::string& message(); + eProsima_user_DllExport std::string& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class HelloWorld }; -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - +#endif // _FAST_DDS_GENERATED_HELLOWORLD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldCdrAux.hpp b/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldCdrAux.hpp index 9f346d306be..ca17b2a5507 100644 --- a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldCdrAux.hpp +++ b/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ -#include "HelloWorld.h" +#include "HelloWorld.hpp" constexpr uint32_t HelloWorld_max_cdr_typesize {268UL}; constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldPubSubTypes.cxx b/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldPubSubTypes.cxx index 85cb477896e..9eaca1f74a9 100644 --- a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldPubSubTypes.cxx +++ b/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool HelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" diff --git a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldPubSubTypes.h b/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldPubSubTypes.h index cb61cd6ba23..8a3697d4308 100644 --- a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldPubSubTypes.h +++ b/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldv1.cxx b/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldv1.cxx deleted file mode 100644 index 90e82ea88a7..00000000000 --- a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldv1.cxx +++ /dev/null @@ -1,286 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define HelloWorld_max_cdr_typesize 268ULL; - - - - -HelloWorld::HelloWorld() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -size_t HelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return HelloWorld_max_cdr_typesize; -} - -size_t HelloWorld::getCdrSerializedSize( - const HelloWorld& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void HelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void HelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool HelloWorld::isKeyDefined() -{ - return false; -} - -void HelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldv1.h b/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldv1.h deleted file mode 100644 index 7758cd793fd..00000000000 --- a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorldv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @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 HelloWorld& 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 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: - - uint32_t m_index; - std::string m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/Filtering/FilteringExample.cxx b/examples/cpp/dds/Filtering/FilteringExample.cxx deleted file mode 100644 index 3f489150d46..00000000000 --- a/examples/cpp/dds/Filtering/FilteringExample.cxx +++ /dev/null @@ -1,124 +0,0 @@ -// 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 FilteringExample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "FilteringExample.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -FilteringExample::FilteringExample() -{ -} - -FilteringExample::~FilteringExample() -{ -} - -FilteringExample::FilteringExample( - const FilteringExample& x) -{ - m_sampleNumber = x.m_sampleNumber; -} - -FilteringExample::FilteringExample( - FilteringExample&& x) noexcept -{ - m_sampleNumber = x.m_sampleNumber; -} - -FilteringExample& FilteringExample::operator =( - const FilteringExample& x) -{ - - m_sampleNumber = x.m_sampleNumber; - return *this; -} - -FilteringExample& FilteringExample::operator =( - FilteringExample&& x) noexcept -{ - - m_sampleNumber = x.m_sampleNumber; - return *this; -} - -bool FilteringExample::operator ==( - const FilteringExample& x) const -{ - return (m_sampleNumber == x.m_sampleNumber); -} - -bool FilteringExample::operator !=( - const FilteringExample& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member sampleNumber - * @param _sampleNumber New value for member sampleNumber - */ -void FilteringExample::sampleNumber( - int32_t _sampleNumber) -{ - m_sampleNumber = _sampleNumber; -} - -/*! - * @brief This function returns the value of member sampleNumber - * @return Value of member sampleNumber - */ -int32_t FilteringExample::sampleNumber() const -{ - return m_sampleNumber; -} - -/*! - * @brief This function returns a reference to member sampleNumber - * @return Reference to member sampleNumber - */ -int32_t& FilteringExample::sampleNumber() -{ - return m_sampleNumber; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "FilteringExampleCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/Filtering/FilteringExample.h b/examples/cpp/dds/Filtering/FilteringExample.hpp similarity index 72% rename from examples/cpp/dds/Filtering/FilteringExample.h rename to examples/cpp/dds/Filtering/FilteringExample.hpp index c57439eb75c..bce7a578966 100644 --- a/examples/cpp/dds/Filtering/FilteringExample.h +++ b/examples/cpp/dds/Filtering/FilteringExample.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file FilteringExample.h + * @file FilteringExample.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "FilteringExamplev1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_FILTERINGEXAMPLE_H_ -#define _FAST_DDS_GENERATED_FILTERINGEXAMPLE_H_ +#ifndef _FAST_DDS_GENERATED_FILTERINGEXAMPLE_HPP_ +#define _FAST_DDS_GENERATED_FILTERINGEXAMPLE_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define FILTERINGEXAMPLE_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,112 @@ class FilteringExample /*! * @brief Default constructor. */ - eProsima_user_DllExport FilteringExample(); + eProsima_user_DllExport FilteringExample() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~FilteringExample(); + eProsima_user_DllExport ~FilteringExample() + { + } /*! * @brief Copy constructor. * @param x Reference to the object FilteringExample that will be copied. */ eProsima_user_DllExport FilteringExample( - const FilteringExample& x); + const FilteringExample& x) + { + m_sampleNumber = x.m_sampleNumber; + + } /*! * @brief Move constructor. * @param x Reference to the object FilteringExample that will be copied. */ eProsima_user_DllExport FilteringExample( - FilteringExample&& x) noexcept; + FilteringExample&& x) noexcept + { + m_sampleNumber = x.m_sampleNumber; + } /*! * @brief Copy assignment. * @param x Reference to the object FilteringExample that will be copied. */ eProsima_user_DllExport FilteringExample& operator =( - const FilteringExample& x); + const FilteringExample& x) + { + + m_sampleNumber = x.m_sampleNumber; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object FilteringExample that will be copied. */ eProsima_user_DllExport FilteringExample& operator =( - FilteringExample&& x) noexcept; + FilteringExample&& x) noexcept + { + + m_sampleNumber = x.m_sampleNumber; + return *this; + } /*! * @brief Comparison operator. * @param x FilteringExample object to compare. */ eProsima_user_DllExport bool operator ==( - const FilteringExample& x) const; + const FilteringExample& x) const + { + return (m_sampleNumber == x.m_sampleNumber); + } /*! * @brief Comparison operator. * @param x FilteringExample object to compare. */ eProsima_user_DllExport bool operator !=( - const FilteringExample& x) const; + const FilteringExample& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member sampleNumber * @param _sampleNumber New value for member sampleNumber */ eProsima_user_DllExport void sampleNumber( - int32_t _sampleNumber); + int32_t _sampleNumber) + { + m_sampleNumber = _sampleNumber; + } /*! * @brief This function returns the value of member sampleNumber * @return Value of member sampleNumber */ - eProsima_user_DllExport int32_t sampleNumber() const; + eProsima_user_DllExport int32_t sampleNumber() const + { + return m_sampleNumber; + } /*! * @brief This function returns a reference to member sampleNumber * @return Reference to member sampleNumber */ - eProsima_user_DllExport int32_t& sampleNumber(); + eProsima_user_DllExport int32_t& sampleNumber() + { + return m_sampleNumber; + } + + private: @@ -160,8 +186,6 @@ class FilteringExample }; -#endif // _FAST_DDS_GENERATED_FILTERINGEXAMPLE_H_ - +#endif // _FAST_DDS_GENERATED_FILTERINGEXAMPLE_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/Filtering/FilteringExampleCdrAux.hpp b/examples/cpp/dds/Filtering/FilteringExampleCdrAux.hpp index 54b78a2c93a..a81a6fa0765 100644 --- a/examples/cpp/dds/Filtering/FilteringExampleCdrAux.hpp +++ b/examples/cpp/dds/Filtering/FilteringExampleCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_FILTERINGEXAMPLECDRAUX_HPP_ #define _FAST_DDS_GENERATED_FILTERINGEXAMPLECDRAUX_HPP_ -#include "FilteringExample.h" +#include "FilteringExample.hpp" constexpr uint32_t FilteringExample_max_cdr_typesize {8UL}; constexpr uint32_t FilteringExample_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/Filtering/FilteringExamplePubSubTypes.cxx b/examples/cpp/dds/Filtering/FilteringExamplePubSubTypes.cxx index be0bd937a6b..81ce28eeacc 100644 --- a/examples/cpp/dds/Filtering/FilteringExamplePubSubTypes.cxx +++ b/examples/cpp/dds/Filtering/FilteringExamplePubSubTypes.cxx @@ -219,3 +219,6 @@ bool FilteringExamplePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "FilteringExampleCdrAux.ipp" diff --git a/examples/cpp/dds/Filtering/FilteringExamplePubSubTypes.h b/examples/cpp/dds/Filtering/FilteringExamplePubSubTypes.h index 7f167f7b498..1958eed5442 100644 --- a/examples/cpp/dds/Filtering/FilteringExamplePubSubTypes.h +++ b/examples/cpp/dds/Filtering/FilteringExamplePubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "FilteringExample.h" +#include "FilteringExample.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/Filtering/FilteringExamplev1.cxx b/examples/cpp/dds/Filtering/FilteringExamplev1.cxx deleted file mode 100644 index 22b80052278..00000000000 --- a/examples/cpp/dds/Filtering/FilteringExamplev1.cxx +++ /dev/null @@ -1,223 +0,0 @@ -// 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 FilteringExample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "FilteringExample.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define FilteringExample_max_cdr_typesize 8ULL; - - - - -FilteringExample::FilteringExample() -{ - // long m_sampleNumber - m_sampleNumber = 0; - -} - -FilteringExample::~FilteringExample() -{ -} - -FilteringExample::FilteringExample( - const FilteringExample& x) -{ - m_sampleNumber = x.m_sampleNumber; - -} - -FilteringExample::FilteringExample( - FilteringExample&& x) noexcept -{ - m_sampleNumber = x.m_sampleNumber; - -} - -FilteringExample& FilteringExample::operator =( - const FilteringExample& x) -{ - m_sampleNumber = x.m_sampleNumber; - - return *this; -} - -FilteringExample& FilteringExample::operator =( - FilteringExample&& x) noexcept -{ - m_sampleNumber = x.m_sampleNumber; - - return *this; -} - -bool FilteringExample::operator ==( - const FilteringExample& x) const -{ - return (m_sampleNumber == x.m_sampleNumber); -} - -bool FilteringExample::operator !=( - const FilteringExample& x) const -{ - return !(*this == x); -} - -size_t FilteringExample::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return FilteringExample_max_cdr_typesize; -} - -size_t FilteringExample::getCdrSerializedSize( - const FilteringExample& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void FilteringExample::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_sampleNumber; - -} - -void FilteringExample::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_sampleNumber; - - -} - - -bool FilteringExample::isKeyDefined() -{ - return false; -} - -void FilteringExample::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member sampleNumber - * @param _sampleNumber New value for member sampleNumber - */ -void FilteringExample::sampleNumber( - int32_t _sampleNumber) -{ - m_sampleNumber = _sampleNumber; -} - -/*! - * @brief This function returns the value of member sampleNumber - * @return Value of member sampleNumber - */ -int32_t FilteringExample::sampleNumber() const -{ - return m_sampleNumber; -} - -/*! - * @brief This function returns a reference to member sampleNumber - * @return Reference to member sampleNumber - */ -int32_t& FilteringExample::sampleNumber() -{ - return m_sampleNumber; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/Filtering/FilteringExamplev1.h b/examples/cpp/dds/Filtering/FilteringExamplev1.h deleted file mode 100644 index 5d82d5d1853..00000000000 --- a/examples/cpp/dds/Filtering/FilteringExamplev1.h +++ /dev/null @@ -1,215 +0,0 @@ -// 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 FilteringExample.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_FILTERINGEXAMPLE_H_ -#define _FAST_DDS_GENERATED_FILTERINGEXAMPLE_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(FILTERINGEXAMPLE_SOURCE) -#define FILTERINGEXAMPLE_DllAPI __declspec( dllexport ) -#else -#define FILTERINGEXAMPLE_DllAPI __declspec( dllimport ) -#endif // FILTERINGEXAMPLE_SOURCE -#else -#define FILTERINGEXAMPLE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define FILTERINGEXAMPLE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure FilteringExample defined by the user in the IDL file. - * @ingroup FilteringExample - */ -class FilteringExample -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport FilteringExample(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~FilteringExample(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object FilteringExample that will be copied. - */ - eProsima_user_DllExport FilteringExample( - const FilteringExample& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object FilteringExample that will be copied. - */ - eProsima_user_DllExport FilteringExample( - FilteringExample&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object FilteringExample that will be copied. - */ - eProsima_user_DllExport FilteringExample& operator =( - const FilteringExample& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object FilteringExample that will be copied. - */ - eProsima_user_DllExport FilteringExample& operator =( - FilteringExample&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x FilteringExample object to compare. - */ - eProsima_user_DllExport bool operator ==( - const FilteringExample& x) const; - - /*! - * @brief Comparison operator. - * @param x FilteringExample object to compare. - */ - eProsima_user_DllExport bool operator !=( - const FilteringExample& x) const; - - /*! - * @brief This function sets a value in member sampleNumber - * @param _sampleNumber New value for member sampleNumber - */ - eProsima_user_DllExport void sampleNumber( - int32_t _sampleNumber); - - /*! - * @brief This function returns the value of member sampleNumber - * @return Value of member sampleNumber - */ - eProsima_user_DllExport int32_t sampleNumber() const; - - /*! - * @brief This function returns a reference to member sampleNumber - * @return Reference to member sampleNumber - */ - eProsima_user_DllExport int32_t& sampleNumber(); - - - /*! - * @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 FilteringExample& 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 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_sampleNumber; - -}; - - -#endif // _FAST_DDS_GENERATED_FILTERINGEXAMPLE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/FlowControlExample/FlowControlExample.cxx b/examples/cpp/dds/FlowControlExample/FlowControlExample.cxx deleted file mode 100644 index c38d02771de..00000000000 --- a/examples/cpp/dds/FlowControlExample/FlowControlExample.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 FlowControlExample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "FlowControlExample.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -FlowControlExample::FlowControlExample() -{ -} - -FlowControlExample::~FlowControlExample() -{ -} - -FlowControlExample::FlowControlExample( - const FlowControlExample& x) -{ - m_message = x.m_message; - m_wasFast = x.m_wasFast; -} - -FlowControlExample::FlowControlExample( - FlowControlExample&& x) noexcept -{ - m_message = std::move(x.m_message); - m_wasFast = x.m_wasFast; -} - -FlowControlExample& FlowControlExample::operator =( - const FlowControlExample& x) -{ - - m_message = x.m_message; - m_wasFast = x.m_wasFast; - return *this; -} - -FlowControlExample& FlowControlExample::operator =( - FlowControlExample&& x) noexcept -{ - - m_message = std::move(x.m_message); - m_wasFast = x.m_wasFast; - return *this; -} - -bool FlowControlExample::operator ==( - const FlowControlExample& x) const -{ - return (m_message == x.m_message && - m_wasFast == x.m_wasFast); -} - -bool FlowControlExample::operator !=( - const FlowControlExample& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void FlowControlExample::message( - const std::array& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void FlowControlExample::message( - std::array&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::array& FlowControlExample::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::array& FlowControlExample::message() -{ - return m_message; -} - - -/*! - * @brief This function sets a value in member wasFast - * @param _wasFast New value for member wasFast - */ -void FlowControlExample::wasFast( - char _wasFast) -{ - m_wasFast = _wasFast; -} - -/*! - * @brief This function returns the value of member wasFast - * @return Value of member wasFast - */ -char FlowControlExample::wasFast() const -{ - return m_wasFast; -} - -/*! - * @brief This function returns a reference to member wasFast - * @return Reference to member wasFast - */ -char& FlowControlExample::wasFast() -{ - return m_wasFast; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "FlowControlExampleCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/FlowControlExample/FlowControlExample.h b/examples/cpp/dds/FlowControlExample/FlowControlExample.hpp similarity index 70% rename from examples/cpp/dds/FlowControlExample/FlowControlExample.h rename to examples/cpp/dds/FlowControlExample/FlowControlExample.hpp index f73d6e41c08..0ac31cfac56 100644 --- a/examples/cpp/dds/FlowControlExample/FlowControlExample.h +++ b/examples/cpp/dds/FlowControlExample/FlowControlExample.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file FlowControlExample.h + * @file FlowControlExample.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "FlowControlExamplev1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_FLOWCONTROLEXAMPLE_H_ -#define _FAST_DDS_GENERATED_FLOWCONTROLEXAMPLE_H_ +#ifndef _FAST_DDS_GENERATED_FLOWCONTROLEXAMPLE_HPP_ +#define _FAST_DDS_GENERATED_FLOWCONTROLEXAMPLE_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define FLOWCONTROLEXAMPLE_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,100 +73,155 @@ class FlowControlExample /*! * @brief Default constructor. */ - eProsima_user_DllExport FlowControlExample(); + eProsima_user_DllExport FlowControlExample() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~FlowControlExample(); + eProsima_user_DllExport ~FlowControlExample() + { + } /*! * @brief Copy constructor. * @param x Reference to the object FlowControlExample that will be copied. */ eProsima_user_DllExport FlowControlExample( - const FlowControlExample& x); + const FlowControlExample& x) + { + m_message = x.m_message; + + m_wasFast = x.m_wasFast; + + } /*! * @brief Move constructor. * @param x Reference to the object FlowControlExample that will be copied. */ eProsima_user_DllExport FlowControlExample( - FlowControlExample&& x) noexcept; + FlowControlExample&& x) noexcept + { + m_message = std::move(x.m_message); + m_wasFast = x.m_wasFast; + } /*! * @brief Copy assignment. * @param x Reference to the object FlowControlExample that will be copied. */ eProsima_user_DllExport FlowControlExample& operator =( - const FlowControlExample& x); + const FlowControlExample& x) + { + + m_message = x.m_message; + + m_wasFast = x.m_wasFast; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object FlowControlExample that will be copied. */ eProsima_user_DllExport FlowControlExample& operator =( - FlowControlExample&& x) noexcept; + FlowControlExample&& x) noexcept + { + + m_message = std::move(x.m_message); + m_wasFast = x.m_wasFast; + return *this; + } /*! * @brief Comparison operator. * @param x FlowControlExample object to compare. */ eProsima_user_DllExport bool operator ==( - const FlowControlExample& x) const; + const FlowControlExample& x) const + { + return (m_message == x.m_message && + m_wasFast == x.m_wasFast); + } /*! * @brief Comparison operator. * @param x FlowControlExample object to compare. */ eProsima_user_DllExport bool operator !=( - const FlowControlExample& x) const; + const FlowControlExample& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member message * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::array& _message); + const std::array& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::array&& _message); + std::array&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::array& message() const; + eProsima_user_DllExport const std::array& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::array& message(); - + eProsima_user_DllExport std::array& message() + { + return m_message; + } /*! * @brief This function sets a value in member wasFast * @param _wasFast New value for member wasFast */ eProsima_user_DllExport void wasFast( - char _wasFast); + char _wasFast) + { + m_wasFast = _wasFast; + } /*! * @brief This function returns the value of member wasFast * @return Value of member wasFast */ - eProsima_user_DllExport char wasFast() const; + eProsima_user_DllExport char wasFast() const + { + return m_wasFast; + } /*! * @brief This function returns a reference to member wasFast * @return Reference to member wasFast */ - eProsima_user_DllExport char& wasFast(); + eProsima_user_DllExport char& wasFast() + { + return m_wasFast; + } private: @@ -188,8 +230,6 @@ class FlowControlExample }; -#endif // _FAST_DDS_GENERATED_FLOWCONTROLEXAMPLE_H_ - +#endif // _FAST_DDS_GENERATED_FLOWCONTROLEXAMPLE_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/FlowControlExample/FlowControlExampleCdrAux.hpp b/examples/cpp/dds/FlowControlExample/FlowControlExampleCdrAux.hpp index 4ef8e609e19..7c0df55fd7f 100644 --- a/examples/cpp/dds/FlowControlExample/FlowControlExampleCdrAux.hpp +++ b/examples/cpp/dds/FlowControlExample/FlowControlExampleCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_FLOWCONTROLEXAMPLECDRAUX_HPP_ #define _FAST_DDS_GENERATED_FLOWCONTROLEXAMPLECDRAUX_HPP_ -#include "FlowControlExample.h" +#include "FlowControlExample.hpp" constexpr uint32_t FlowControlExample_max_cdr_typesize {600005UL}; constexpr uint32_t FlowControlExample_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/FlowControlExample/FlowControlExamplePubSubTypes.cxx b/examples/cpp/dds/FlowControlExample/FlowControlExamplePubSubTypes.cxx index 1d375cfbfe3..95ae70651df 100644 --- a/examples/cpp/dds/FlowControlExample/FlowControlExamplePubSubTypes.cxx +++ b/examples/cpp/dds/FlowControlExample/FlowControlExamplePubSubTypes.cxx @@ -219,3 +219,6 @@ bool FlowControlExamplePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "FlowControlExampleCdrAux.ipp" diff --git a/examples/cpp/dds/FlowControlExample/FlowControlExamplePubSubTypes.h b/examples/cpp/dds/FlowControlExample/FlowControlExamplePubSubTypes.h index f47b513e629..b409107da1b 100644 --- a/examples/cpp/dds/FlowControlExample/FlowControlExamplePubSubTypes.h +++ b/examples/cpp/dds/FlowControlExample/FlowControlExamplePubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "FlowControlExample.h" +#include "FlowControlExample.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/FlowControlExample/FlowControlExamplev1.cxx b/examples/cpp/dds/FlowControlExample/FlowControlExamplev1.cxx deleted file mode 100644 index 8da82aa6d10..00000000000 --- a/examples/cpp/dds/FlowControlExample/FlowControlExamplev1.cxx +++ /dev/null @@ -1,288 +0,0 @@ -// 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 FlowControlExample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "FlowControlExample.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define FlowControlExample_max_cdr_typesize 600005ULL; - - - - -FlowControlExample::FlowControlExample() -{ - // char m_message - memset(&m_message, 0, ((600000)) * 1); - // char m_wasFast - m_wasFast = 0; - -} - -FlowControlExample::~FlowControlExample() -{ -} - -FlowControlExample::FlowControlExample( - const FlowControlExample& x) -{ - m_message = x.m_message; - - - m_wasFast = x.m_wasFast; - -} - -FlowControlExample::FlowControlExample( - FlowControlExample&& x) noexcept -{ - m_message = std::move(x.m_message); - - - m_wasFast = x.m_wasFast; - -} - -FlowControlExample& FlowControlExample::operator =( - const FlowControlExample& x) -{ - m_message = x.m_message; - - - m_wasFast = x.m_wasFast; - - return *this; -} - -FlowControlExample& FlowControlExample::operator =( - FlowControlExample&& x) noexcept -{ - m_message = std::move(x.m_message); - - - m_wasFast = x.m_wasFast; - - return *this; -} - -bool FlowControlExample::operator ==( - const FlowControlExample& x) const -{ - return (m_message == x.m_message && - m_wasFast == x.m_wasFast); -} - -bool FlowControlExample::operator !=( - const FlowControlExample& x) const -{ - return !(*this == x); -} - -size_t FlowControlExample::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return FlowControlExample_max_cdr_typesize; -} - -size_t FlowControlExample::getCdrSerializedSize( - const FlowControlExample& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((600000)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - return current_alignment - initial_alignment; -} - - -void FlowControlExample::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_message; - - - scdr << m_wasFast; - -} - -void FlowControlExample::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_message; - - - - dcdr >> m_wasFast; - - -} - - -bool FlowControlExample::isKeyDefined() -{ - return false; -} - -void FlowControlExample::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void FlowControlExample::message( - const std::array& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void FlowControlExample::message( - std::array&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::array& FlowControlExample::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::array& FlowControlExample::message() -{ - return m_message; -} - - -/*! - * @brief This function sets a value in member wasFast - * @param _wasFast New value for member wasFast - */ -void FlowControlExample::wasFast( - char _wasFast) -{ - m_wasFast = _wasFast; -} - -/*! - * @brief This function returns the value of member wasFast - * @return Value of member wasFast - */ -char FlowControlExample::wasFast() const -{ - return m_wasFast; -} - -/*! - * @brief This function returns a reference to member wasFast - * @return Reference to member wasFast - */ -char& FlowControlExample::wasFast() -{ - return m_wasFast; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/FlowControlExample/FlowControlExamplev1.h b/examples/cpp/dds/FlowControlExample/FlowControlExamplev1.h deleted file mode 100644 index f945a894288..00000000000 --- a/examples/cpp/dds/FlowControlExample/FlowControlExamplev1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 FlowControlExample.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_FLOWCONTROLEXAMPLE_H_ -#define _FAST_DDS_GENERATED_FLOWCONTROLEXAMPLE_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(FLOWCONTROLEXAMPLE_SOURCE) -#define FLOWCONTROLEXAMPLE_DllAPI __declspec( dllexport ) -#else -#define FLOWCONTROLEXAMPLE_DllAPI __declspec( dllimport ) -#endif // FLOWCONTROLEXAMPLE_SOURCE -#else -#define FLOWCONTROLEXAMPLE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define FLOWCONTROLEXAMPLE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure FlowControlExample defined by the user in the IDL file. - * @ingroup FlowControlExample - */ -class FlowControlExample -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport FlowControlExample(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~FlowControlExample(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object FlowControlExample that will be copied. - */ - eProsima_user_DllExport FlowControlExample( - const FlowControlExample& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object FlowControlExample that will be copied. - */ - eProsima_user_DllExport FlowControlExample( - FlowControlExample&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object FlowControlExample that will be copied. - */ - eProsima_user_DllExport FlowControlExample& operator =( - const FlowControlExample& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object FlowControlExample that will be copied. - */ - eProsima_user_DllExport FlowControlExample& operator =( - FlowControlExample&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x FlowControlExample object to compare. - */ - eProsima_user_DllExport bool operator ==( - const FlowControlExample& x) const; - - /*! - * @brief Comparison operator. - * @param x FlowControlExample object to compare. - */ - eProsima_user_DllExport bool operator !=( - const FlowControlExample& x) const; - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::array& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::array&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::array& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::array& message(); - - - /*! - * @brief This function sets a value in member wasFast - * @param _wasFast New value for member wasFast - */ - eProsima_user_DllExport void wasFast( - char _wasFast); - - /*! - * @brief This function returns the value of member wasFast - * @return Value of member wasFast - */ - eProsima_user_DllExport char wasFast() const; - - /*! - * @brief This function returns a reference to member wasFast - * @return Reference to member wasFast - */ - eProsima_user_DllExport char& wasFast(); - - - /*! - * @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 FlowControlExample& 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 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: - - std::array m_message; - char m_wasFast; - -}; - - -#endif // _FAST_DDS_GENERATED_FLOWCONTROLEXAMPLE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/HelloWorldExample/HelloWorld.cxx b/examples/cpp/dds/HelloWorldExample/HelloWorld.cxx deleted file mode 100644 index 4b415d67769..00000000000 --- a/examples/cpp/dds/HelloWorldExample/HelloWorld.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -HelloWorld::HelloWorld() -{ -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "HelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorld.h b/examples/cpp/dds/HelloWorldExample/HelloWorld.hpp similarity index 69% rename from examples/cpp/dds/HelloWorldExampleTCP/HelloWorld.h rename to examples/cpp/dds/HelloWorldExample/HelloWorld.hpp index 5cd0ddba511..b6f1afb22bf 100644 --- a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorld.h +++ b/examples/cpp/dds/HelloWorldExample/HelloWorld.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file HelloWorld.h + * @file HelloWorld.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "HelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLD_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define HELLOWORLD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class HelloWorld /*! * @brief Default constructor. */ - eProsima_user_DllExport HelloWorld(); + eProsima_user_DllExport HelloWorld() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~HelloWorld(); + eProsima_user_DllExport ~HelloWorld() + { + } /*! * @brief Copy constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - const HelloWorld& x); + const HelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); + const HelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class HelloWorld * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::string& _message); + const std::string& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::string&& _message); + std::string&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::string& message() const; + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::string& message(); + eProsima_user_DllExport std::string& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class HelloWorld }; -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - +#endif // _FAST_DDS_GENERATED_HELLOWORLD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/HelloWorldExample/HelloWorldCdrAux.hpp b/examples/cpp/dds/HelloWorldExample/HelloWorldCdrAux.hpp index 9f346d306be..ca17b2a5507 100644 --- a/examples/cpp/dds/HelloWorldExample/HelloWorldCdrAux.hpp +++ b/examples/cpp/dds/HelloWorldExample/HelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ -#include "HelloWorld.h" +#include "HelloWorld.hpp" constexpr uint32_t HelloWorld_max_cdr_typesize {268UL}; constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/HelloWorldExample/HelloWorldPubSubTypes.cxx b/examples/cpp/dds/HelloWorldExample/HelloWorldPubSubTypes.cxx index 85cb477896e..9eaca1f74a9 100644 --- a/examples/cpp/dds/HelloWorldExample/HelloWorldPubSubTypes.cxx +++ b/examples/cpp/dds/HelloWorldExample/HelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool HelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" diff --git a/examples/cpp/dds/HelloWorldExample/HelloWorldPubSubTypes.h b/examples/cpp/dds/HelloWorldExample/HelloWorldPubSubTypes.h index cb61cd6ba23..8a3697d4308 100644 --- a/examples/cpp/dds/HelloWorldExample/HelloWorldPubSubTypes.h +++ b/examples/cpp/dds/HelloWorldExample/HelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/HelloWorldExample/HelloWorldv1.cxx b/examples/cpp/dds/HelloWorldExample/HelloWorldv1.cxx deleted file mode 100644 index 90e82ea88a7..00000000000 --- a/examples/cpp/dds/HelloWorldExample/HelloWorldv1.cxx +++ /dev/null @@ -1,286 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define HelloWorld_max_cdr_typesize 268ULL; - - - - -HelloWorld::HelloWorld() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -size_t HelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return HelloWorld_max_cdr_typesize; -} - -size_t HelloWorld::getCdrSerializedSize( - const HelloWorld& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void HelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void HelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool HelloWorld::isKeyDefined() -{ - return false; -} - -void HelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/HelloWorldExample/HelloWorldv1.h b/examples/cpp/dds/HelloWorldExample/HelloWorldv1.h deleted file mode 100644 index 7758cd793fd..00000000000 --- a/examples/cpp/dds/HelloWorldExample/HelloWorldv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @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 HelloWorld& 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 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: - - uint32_t m_index; - std::string m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorld.cxx b/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorld.cxx deleted file mode 100644 index 3622c2401de..00000000000 --- a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorld.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -HelloWorld::HelloWorld() -{ -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const eprosima::fastcdr::fixed_string<20>& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - eprosima::fastcdr::fixed_string<20>&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const eprosima::fastcdr::fixed_string<20>& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -eprosima::fastcdr::fixed_string<20>& HelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "HelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorld.h b/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorld.hpp similarity index 72% rename from examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorld.h rename to examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorld.hpp index 3488835aafe..9561c0d09a9 100644 --- a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorld.h +++ b/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorld.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file HelloWorld.h + * @file HelloWorld.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "HelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLD_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define HELLOWORLD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class HelloWorld /*! * @brief Default constructor. */ - eProsima_user_DllExport HelloWorld(); + eProsima_user_DllExport HelloWorld() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~HelloWorld(); + eProsima_user_DllExport ~HelloWorld() + { + } /*! * @brief Copy constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - const HelloWorld& x); + const HelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); + const HelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class HelloWorld * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const eprosima::fastcdr::fixed_string<20>& _message); + const eprosima::fastcdr::fixed_string<20>& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - eprosima::fastcdr::fixed_string<20>&& _message); + eprosima::fastcdr::fixed_string<20>&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const eprosima::fastcdr::fixed_string<20>& message() const; + eProsima_user_DllExport const eprosima::fastcdr::fixed_string<20>& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport eprosima::fastcdr::fixed_string<20>& message(); + eProsima_user_DllExport eprosima::fastcdr::fixed_string<20>& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class HelloWorld }; -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - +#endif // _FAST_DDS_GENERATED_HELLOWORLD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldCdrAux.hpp b/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldCdrAux.hpp index b0d081fe956..a3cbd5f3b13 100644 --- a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldCdrAux.hpp +++ b/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ -#include "HelloWorld.h" +#include "HelloWorld.hpp" constexpr uint32_t HelloWorld_max_cdr_typesize {33UL}; constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldPubSubTypes.cxx b/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldPubSubTypes.cxx index 85cb477896e..9eaca1f74a9 100644 --- a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldPubSubTypes.cxx +++ b/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool HelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" diff --git a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldPubSubTypes.h b/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldPubSubTypes.h index ddbfbab5db6..c9b70273375 100644 --- a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldPubSubTypes.h +++ b/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldv1.cxx b/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldv1.cxx deleted file mode 100644 index 27e02c6c6d3..00000000000 --- a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldv1.cxx +++ /dev/null @@ -1,290 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define HelloWorld_max_cdr_typesize 33ULL; - - - - -HelloWorld::HelloWorld() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -size_t HelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return HelloWorld_max_cdr_typesize; -} - -size_t HelloWorld::getCdrSerializedSize( - const HelloWorld& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void HelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void HelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - { - std::string aux; - dcdr >> aux; - m_message = aux.c_str(); - } - - -} - - -bool HelloWorld::isKeyDefined() -{ - return false; -} - -void HelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const eprosima::fastrtps::fixed_string<20>& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - eprosima::fastrtps::fixed_string<20>&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const eprosima::fastrtps::fixed_string<20>& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -eprosima::fastrtps::fixed_string<20>& HelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldv1.h b/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldv1.h deleted file mode 100644 index ed5646c8cfa..00000000000 --- a/examples/cpp/dds/HelloWorldExampleDataSharing/HelloWorldv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const eprosima::fastrtps::fixed_string<20>& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - eprosima::fastrtps::fixed_string<20>&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const eprosima::fastrtps::fixed_string<20>& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport eprosima::fastrtps::fixed_string<20>& message(); - - - /*! - * @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 HelloWorld& 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 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: - - uint32_t m_index; - eprosima::fastrtps::fixed_string<20> m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorld.cxx b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorld.cxx deleted file mode 100644 index 68c604b6588..00000000000 --- a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorld.cxx +++ /dev/null @@ -1,212 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -HelloWorld::HelloWorld() -{ -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; - m_data = x.m_data; -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); - m_data = std::move(x.m_data); -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - m_data = x.m_data; - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - m_data = std::move(x.m_data); - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message && - m_data == x.m_data); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - -/*! - * @brief This function copies the value in member data - * @param _data New value to be copied in member data - */ -void HelloWorld::data( - const std::array& _data) -{ - m_data = _data; -} - -/*! - * @brief This function moves the value in member data - * @param _data New value to be moved in member data - */ -void HelloWorld::data( - std::array&& _data) -{ - m_data = std::move(_data); -} - -/*! - * @brief This function returns a constant reference to member data - * @return Constant reference to member data - */ -const std::array& HelloWorld::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -std::array& HelloWorld::data() -{ - return m_data; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "HelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorld.h b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorld.hpp similarity index 67% rename from examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorld.h rename to examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorld.hpp index deb44d359b1..f8b056738fa 100644 --- a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorld.h +++ b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorld.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file HelloWorld.h + * @file HelloWorld.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "HelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLD_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define HELLOWORLD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,124 @@ class HelloWorld /*! * @brief Default constructor. */ - eProsima_user_DllExport HelloWorld(); + eProsima_user_DllExport HelloWorld() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~HelloWorld(); + eProsima_user_DllExport ~HelloWorld() + { + } /*! * @brief Copy constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - const HelloWorld& x); + const HelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + m_data = x.m_data; + + } /*! * @brief Move constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + m_data = std::move(x.m_data); + } /*! * @brief Copy assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); + const HelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + m_data = x.m_data; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + m_data = std::move(x.m_data); + return *this; + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message && + m_data == x.m_data); + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +198,38 @@ class HelloWorld * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::string& _message); + const std::string& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::string&& _message); + std::string&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::string& message() const; + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::string& message(); + eProsima_user_DllExport std::string& message() + { + return m_message; + } /*! @@ -187,26 +237,40 @@ class HelloWorld * @param _data New value to be copied in member data */ eProsima_user_DllExport void data( - const std::array& _data); + const std::array& _data) + { + m_data = _data; + } /*! * @brief This function moves the value in member data * @param _data New value to be moved in member data */ eProsima_user_DllExport void data( - std::array&& _data); + std::array&& _data) + { + m_data = std::move(_data); + } /*! * @brief This function returns a constant reference to member data * @return Constant reference to member data */ - eProsima_user_DllExport const std::array& data() const; + eProsima_user_DllExport const std::array& data() const + { + return m_data; + } /*! * @brief This function returns a reference to member data * @return Reference to member data */ - eProsima_user_DllExport std::array& data(); + eProsima_user_DllExport std::array& data() + { + return m_data; + } + + private: @@ -216,8 +280,6 @@ class HelloWorld }; -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - +#endif // _FAST_DDS_GENERATED_HELLOWORLD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldCdrAux.hpp b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldCdrAux.hpp index 77b8e2a63aa..c93c6e1dc70 100644 --- a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldCdrAux.hpp +++ b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ -#include "HelloWorld.h" +#include "HelloWorld.hpp" constexpr uint32_t HelloWorld_max_cdr_typesize {1048844UL}; constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPubSubTypes.cxx b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPubSubTypes.cxx index 85cb477896e..9eaca1f74a9 100644 --- a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPubSubTypes.cxx +++ b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool HelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" diff --git a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPubSubTypes.h b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPubSubTypes.h index cb61cd6ba23..8a3697d4308 100644 --- a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPubSubTypes.h +++ b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPublisher.h b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPublisher.h index b3728ca47ad..ef37aa5f383 100644 --- a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPublisher.h +++ b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldPublisher.h @@ -28,7 +28,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" class HelloWorldPublisher { diff --git a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldSubscriber.h b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldSubscriber.h index d6be44aaf28..706ca6ada3d 100644 --- a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldSubscriber.h +++ b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldSubscriber.h @@ -28,7 +28,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" class HelloWorldSubscriber { diff --git a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldv1.cxx b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldv1.cxx deleted file mode 100644 index 0136d21e4c7..00000000000 --- a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldv1.cxx +++ /dev/null @@ -1,351 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define HelloWorld_max_cdr_typesize 1048844ULL; - - - - -HelloWorld::HelloWorld() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - // char m_data - memset(&m_data, 0, ((1024*1024)) * 1); - -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - - m_data = x.m_data; - -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - - m_data = std::move(x.m_data); - -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - - m_data = x.m_data; - - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - - m_data = std::move(x.m_data); - - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message && - m_data == x.m_data); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -size_t HelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return HelloWorld_max_cdr_typesize; -} - -size_t HelloWorld::getCdrSerializedSize( - const HelloWorld& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - current_alignment += (((1024*1024)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void HelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - - scdr << m_data; - - -} - -void HelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - - - dcdr >> m_data; - - -} - - -bool HelloWorld::isKeyDefined() -{ - return false; -} - -void HelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - -/*! - * @brief This function copies the value in member data - * @param _data New value to be copied in member data - */ -void HelloWorld::data( - const std::array& _data) -{ - m_data = _data; -} - -/*! - * @brief This function moves the value in member data - * @param _data New value to be moved in member data - */ -void HelloWorld::data( - std::array&& _data) -{ - m_data = std::move(_data); -} - -/*! - * @brief This function returns a constant reference to member data - * @return Constant reference to member data - */ -const std::array& HelloWorld::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -std::array& HelloWorld::data() -{ - return m_data; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldv1.h b/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldv1.h deleted file mode 100644 index dbe1c673dc3..00000000000 --- a/examples/cpp/dds/HelloWorldExampleSharedMem/HelloWorldv1.h +++ /dev/null @@ -1,271 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @brief This function copies the value in member data - * @param _data New value to be copied in member data - */ - eProsima_user_DllExport void data( - const std::array& _data); - - /*! - * @brief This function moves the value in member data - * @param _data New value to be moved in member data - */ - eProsima_user_DllExport void data( - std::array&& _data); - - /*! - * @brief This function returns a constant reference to member data - * @return Constant reference to member data - */ - eProsima_user_DllExport const std::array& data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport std::array& data(); - - - /*! - * @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 HelloWorld& 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 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: - - uint32_t m_index; - std::string m_message; - std::array m_data; - -}; - - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorld.cxx b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorld.cxx deleted file mode 100644 index 4b415d67769..00000000000 --- a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorld.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -HelloWorld::HelloWorld() -{ -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "HelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorld.h b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorld.hpp similarity index 69% rename from examples/cpp/dds/ContentFilteredTopicExample/HelloWorld.h rename to examples/cpp/dds/HelloWorldExampleTCP/HelloWorld.hpp index 5cd0ddba511..b6f1afb22bf 100644 --- a/examples/cpp/dds/ContentFilteredTopicExample/HelloWorld.h +++ b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorld.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file HelloWorld.h + * @file HelloWorld.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "HelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLD_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define HELLOWORLD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class HelloWorld /*! * @brief Default constructor. */ - eProsima_user_DllExport HelloWorld(); + eProsima_user_DllExport HelloWorld() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~HelloWorld(); + eProsima_user_DllExport ~HelloWorld() + { + } /*! * @brief Copy constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - const HelloWorld& x); + const HelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); + const HelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class HelloWorld * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::string& _message); + const std::string& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::string&& _message); + std::string&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::string& message() const; + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::string& message(); + eProsima_user_DllExport std::string& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class HelloWorld }; -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - +#endif // _FAST_DDS_GENERATED_HELLOWORLD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldCdrAux.hpp b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldCdrAux.hpp index 9f346d306be..ca17b2a5507 100644 --- a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldCdrAux.hpp +++ b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ -#include "HelloWorld.h" +#include "HelloWorld.hpp" constexpr uint32_t HelloWorld_max_cdr_typesize {268UL}; constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPubSubTypes.cxx b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPubSubTypes.cxx index 85cb477896e..9eaca1f74a9 100644 --- a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPubSubTypes.cxx +++ b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool HelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" diff --git a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPubSubTypes.h b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPubSubTypes.h index cb61cd6ba23..8a3697d4308 100644 --- a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPubSubTypes.h +++ b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPublisher.h b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPublisher.h index 1301ec490dd..63a228fe286 100644 --- a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPublisher.h +++ b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPublisher.h @@ -28,7 +28,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #include diff --git a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldSubscriber.h b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldSubscriber.h index 9f3c4c2eb10..15133e2ba63 100644 --- a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldSubscriber.h +++ b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldSubscriber.h @@ -28,7 +28,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #include diff --git a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldv1.cxx b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldv1.cxx deleted file mode 100644 index 90e82ea88a7..00000000000 --- a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldv1.cxx +++ /dev/null @@ -1,286 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define HelloWorld_max_cdr_typesize 268ULL; - - - - -HelloWorld::HelloWorld() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -size_t HelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return HelloWorld_max_cdr_typesize; -} - -size_t HelloWorld::getCdrSerializedSize( - const HelloWorld& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void HelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void HelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool HelloWorld::isKeyDefined() -{ - return false; -} - -void HelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldv1.h b/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldv1.h deleted file mode 100644 index 7758cd793fd..00000000000 --- a/examples/cpp/dds/HelloWorldExampleTCP/HelloWorldv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @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 HelloWorld& 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 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: - - uint32_t m_index; - std::string m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/HistoryKind/sample.cxx b/examples/cpp/dds/HistoryKind/sample.cxx deleted file mode 100644 index 360d4a1b2b2..00000000000 --- a/examples/cpp/dds/HistoryKind/sample.cxx +++ /dev/null @@ -1,158 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -sample::sample() -{ -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample& sample::operator =( - const sample& x) -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "sampleCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/Keys/sample.h b/examples/cpp/dds/HistoryKind/sample.hpp similarity index 70% rename from examples/cpp/dds/Keys/sample.h rename to examples/cpp/dds/HistoryKind/sample.hpp index c050c8527cc..d8a5b01cf2f 100644 --- a/examples/cpp/dds/Keys/sample.h +++ b/examples/cpp/dds/HistoryKind/sample.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file sample.h + * @file sample.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "samplev1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ +#ifndef _FAST_DDS_GENERATED_SAMPLE_HPP_ +#define _FAST_DDS_GENERATED_SAMPLE_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define SAMPLE_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class sample /*! * @brief Default constructor. */ - eProsima_user_DllExport sample(); + eProsima_user_DllExport sample() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~sample(); + eProsima_user_DllExport ~sample() + { + } /*! * @brief Copy constructor. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample( - const sample& x); + const sample& x) + { + m_index = x.m_index; + + m_key_value = x.m_key_value; + + } /*! * @brief Move constructor. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample( - sample&& x) noexcept; + sample&& x) noexcept + { + m_index = x.m_index; + m_key_value = x.m_key_value; + } /*! * @brief Copy assignment. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample& operator =( - const sample& x); + const sample& x) + { + + m_index = x.m_index; + + m_key_value = x.m_key_value; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; + sample&& x) noexcept + { + + m_index = x.m_index; + m_key_value = x.m_key_value; + return *this; + } /*! * @brief Comparison operator. * @param x sample object to compare. */ eProsima_user_DllExport bool operator ==( - const sample& x) const; + const sample& x) const + { + return (m_index == x.m_index && + m_key_value == x.m_key_value); + } /*! * @brief Comparison operator. * @param x sample object to compare. */ eProsima_user_DllExport bool operator !=( - const sample& x) const; + const sample& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint8_t _index); + uint8_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint8_t index() const; + eProsima_user_DllExport uint8_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint8_t& index(); + eProsima_user_DllExport uint8_t& index() + { + return m_index; + } /*! @@ -160,19 +191,30 @@ class sample * @param _key_value New value for member key_value */ eProsima_user_DllExport void key_value( - uint8_t _key_value); + uint8_t _key_value) + { + m_key_value = _key_value; + } /*! * @brief This function returns the value of member key_value * @return Value of member key_value */ - eProsima_user_DllExport uint8_t key_value() const; + eProsima_user_DllExport uint8_t key_value() const + { + return m_key_value; + } /*! * @brief This function returns a reference to member key_value * @return Reference to member key_value */ - eProsima_user_DllExport uint8_t& key_value(); + eProsima_user_DllExport uint8_t& key_value() + { + return m_key_value; + } + + private: @@ -181,8 +223,6 @@ class sample }; -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - +#endif // _FAST_DDS_GENERATED_SAMPLE_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/HistoryKind/sampleCdrAux.hpp b/examples/cpp/dds/HistoryKind/sampleCdrAux.hpp index 18ed5857add..12ba74bf0ec 100644 --- a/examples/cpp/dds/HistoryKind/sampleCdrAux.hpp +++ b/examples/cpp/dds/HistoryKind/sampleCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ #define _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ -#include "sample.h" +#include "sample.hpp" constexpr uint32_t sample_max_cdr_typesize {6UL}; constexpr uint32_t sample_max_key_cdr_typesize {1UL}; diff --git a/examples/cpp/dds/HistoryKind/samplePubSubTypes.cxx b/examples/cpp/dds/HistoryKind/samplePubSubTypes.cxx index 9095d77083a..f60945627b4 100644 --- a/examples/cpp/dds/HistoryKind/samplePubSubTypes.cxx +++ b/examples/cpp/dds/HistoryKind/samplePubSubTypes.cxx @@ -219,3 +219,6 @@ bool samplePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "sampleCdrAux.ipp" diff --git a/examples/cpp/dds/HistoryKind/samplePubSubTypes.h b/examples/cpp/dds/HistoryKind/samplePubSubTypes.h index ec881115211..5f858658dec 100644 --- a/examples/cpp/dds/HistoryKind/samplePubSubTypes.h +++ b/examples/cpp/dds/HistoryKind/samplePubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "sample.h" +#include "sample.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/HistoryKind/samplev1.cxx b/examples/cpp/dds/HistoryKind/samplev1.cxx deleted file mode 100644 index 3b735befaf8..00000000000 --- a/examples/cpp/dds/HistoryKind/samplev1.cxx +++ /dev/null @@ -1,280 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define sample_max_cdr_typesize 6ULL; - - - - -sample::sample() -{ - // octet m_index - m_index = 0; - // octet m_key_value - m_key_value = 0; - -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample& sample::operator =( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -size_t sample::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return sample_max_cdr_typesize; -} - -size_t sample::getCdrSerializedSize( - const sample& 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); - - - return current_alignment - initial_alignment; -} - - -void sample::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_key_value; - -} - -void sample::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_key_value; - - -} - - -bool sample::isKeyDefined() -{ - return true; -} - -void sample::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - - - scdr << m_key_value; - -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/HistoryKind/samplev1.h b/examples/cpp/dds/HistoryKind/samplev1.h deleted file mode 100644 index 97613067c8b..00000000000 --- a/examples/cpp/dds/HistoryKind/samplev1.h +++ /dev/null @@ -1,236 +0,0 @@ -// 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 sample.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(SAMPLE_SOURCE) -#define SAMPLE_DllAPI __declspec( dllexport ) -#else -#define SAMPLE_DllAPI __declspec( dllimport ) -#endif // SAMPLE_SOURCE -#else -#define SAMPLE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define SAMPLE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure sample defined by the user in the IDL file. - * @ingroup sample - */ -class sample -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport sample(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~sample(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - const sample& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - sample&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - const sample& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator ==( - const sample& x) const; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator !=( - const sample& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint8_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint8_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint8_t& index(); - - - /*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ - eProsima_user_DllExport void key_value( - uint8_t _key_value); - - /*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ - eProsima_user_DllExport uint8_t key_value() const; - - /*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ - eProsima_user_DllExport uint8_t& key_value(); - - - /*! - * @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 sample& 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 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: - - uint8_t m_index; - uint8_t m_key_value; - -}; - - -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/Keys/sample.cxx b/examples/cpp/dds/Keys/sample.cxx deleted file mode 100644 index 360d4a1b2b2..00000000000 --- a/examples/cpp/dds/Keys/sample.cxx +++ /dev/null @@ -1,158 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -sample::sample() -{ -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample& sample::operator =( - const sample& x) -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "sampleCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/Configurability/sample.h b/examples/cpp/dds/Keys/sample.hpp similarity index 70% rename from examples/cpp/dds/Configurability/sample.h rename to examples/cpp/dds/Keys/sample.hpp index c050c8527cc..d8a5b01cf2f 100644 --- a/examples/cpp/dds/Configurability/sample.h +++ b/examples/cpp/dds/Keys/sample.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file sample.h + * @file sample.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "samplev1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ +#ifndef _FAST_DDS_GENERATED_SAMPLE_HPP_ +#define _FAST_DDS_GENERATED_SAMPLE_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define SAMPLE_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class sample /*! * @brief Default constructor. */ - eProsima_user_DllExport sample(); + eProsima_user_DllExport sample() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~sample(); + eProsima_user_DllExport ~sample() + { + } /*! * @brief Copy constructor. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample( - const sample& x); + const sample& x) + { + m_index = x.m_index; + + m_key_value = x.m_key_value; + + } /*! * @brief Move constructor. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample( - sample&& x) noexcept; + sample&& x) noexcept + { + m_index = x.m_index; + m_key_value = x.m_key_value; + } /*! * @brief Copy assignment. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample& operator =( - const sample& x); + const sample& x) + { + + m_index = x.m_index; + + m_key_value = x.m_key_value; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; + sample&& x) noexcept + { + + m_index = x.m_index; + m_key_value = x.m_key_value; + return *this; + } /*! * @brief Comparison operator. * @param x sample object to compare. */ eProsima_user_DllExport bool operator ==( - const sample& x) const; + const sample& x) const + { + return (m_index == x.m_index && + m_key_value == x.m_key_value); + } /*! * @brief Comparison operator. * @param x sample object to compare. */ eProsima_user_DllExport bool operator !=( - const sample& x) const; + const sample& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint8_t _index); + uint8_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint8_t index() const; + eProsima_user_DllExport uint8_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint8_t& index(); + eProsima_user_DllExport uint8_t& index() + { + return m_index; + } /*! @@ -160,19 +191,30 @@ class sample * @param _key_value New value for member key_value */ eProsima_user_DllExport void key_value( - uint8_t _key_value); + uint8_t _key_value) + { + m_key_value = _key_value; + } /*! * @brief This function returns the value of member key_value * @return Value of member key_value */ - eProsima_user_DllExport uint8_t key_value() const; + eProsima_user_DllExport uint8_t key_value() const + { + return m_key_value; + } /*! * @brief This function returns a reference to member key_value * @return Reference to member key_value */ - eProsima_user_DllExport uint8_t& key_value(); + eProsima_user_DllExport uint8_t& key_value() + { + return m_key_value; + } + + private: @@ -181,8 +223,6 @@ class sample }; -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - +#endif // _FAST_DDS_GENERATED_SAMPLE_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/Keys/sampleCdrAux.hpp b/examples/cpp/dds/Keys/sampleCdrAux.hpp index 18ed5857add..12ba74bf0ec 100644 --- a/examples/cpp/dds/Keys/sampleCdrAux.hpp +++ b/examples/cpp/dds/Keys/sampleCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ #define _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ -#include "sample.h" +#include "sample.hpp" constexpr uint32_t sample_max_cdr_typesize {6UL}; constexpr uint32_t sample_max_key_cdr_typesize {1UL}; diff --git a/examples/cpp/dds/Keys/samplePubSubTypes.cxx b/examples/cpp/dds/Keys/samplePubSubTypes.cxx index 9095d77083a..f60945627b4 100644 --- a/examples/cpp/dds/Keys/samplePubSubTypes.cxx +++ b/examples/cpp/dds/Keys/samplePubSubTypes.cxx @@ -219,3 +219,6 @@ bool samplePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "sampleCdrAux.ipp" diff --git a/examples/cpp/dds/Keys/samplePubSubTypes.h b/examples/cpp/dds/Keys/samplePubSubTypes.h index ec881115211..5f858658dec 100644 --- a/examples/cpp/dds/Keys/samplePubSubTypes.h +++ b/examples/cpp/dds/Keys/samplePubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "sample.h" +#include "sample.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/Keys/samplev1.cxx b/examples/cpp/dds/Keys/samplev1.cxx deleted file mode 100644 index 3b735befaf8..00000000000 --- a/examples/cpp/dds/Keys/samplev1.cxx +++ /dev/null @@ -1,280 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define sample_max_cdr_typesize 6ULL; - - - - -sample::sample() -{ - // octet m_index - m_index = 0; - // octet m_key_value - m_key_value = 0; - -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample& sample::operator =( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -size_t sample::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return sample_max_cdr_typesize; -} - -size_t sample::getCdrSerializedSize( - const sample& 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); - - - return current_alignment - initial_alignment; -} - - -void sample::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_key_value; - -} - -void sample::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_key_value; - - -} - - -bool sample::isKeyDefined() -{ - return true; -} - -void sample::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - - - scdr << m_key_value; - -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/Keys/samplev1.h b/examples/cpp/dds/Keys/samplev1.h deleted file mode 100644 index 97613067c8b..00000000000 --- a/examples/cpp/dds/Keys/samplev1.h +++ /dev/null @@ -1,236 +0,0 @@ -// 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 sample.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(SAMPLE_SOURCE) -#define SAMPLE_DllAPI __declspec( dllexport ) -#else -#define SAMPLE_DllAPI __declspec( dllimport ) -#endif // SAMPLE_SOURCE -#else -#define SAMPLE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define SAMPLE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure sample defined by the user in the IDL file. - * @ingroup sample - */ -class sample -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport sample(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~sample(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - const sample& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - sample&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - const sample& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator ==( - const sample& x) const; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator !=( - const sample& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint8_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint8_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint8_t& index(); - - - /*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ - eProsima_user_DllExport void key_value( - uint8_t _key_value); - - /*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ - eProsima_user_DllExport uint8_t key_value() const; - - /*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ - eProsima_user_DllExport uint8_t& key_value(); - - - /*! - * @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 sample& 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 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: - - uint8_t m_index; - uint8_t m_key_value; - -}; - - -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/LateJoiners/sample.cxx b/examples/cpp/dds/LateJoiners/sample.cxx deleted file mode 100644 index 360d4a1b2b2..00000000000 --- a/examples/cpp/dds/LateJoiners/sample.cxx +++ /dev/null @@ -1,158 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -sample::sample() -{ -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample& sample::operator =( - const sample& x) -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "sampleCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/LateJoiners/sample.h b/examples/cpp/dds/LateJoiners/sample.hpp similarity index 70% rename from examples/cpp/dds/LateJoiners/sample.h rename to examples/cpp/dds/LateJoiners/sample.hpp index c050c8527cc..d8a5b01cf2f 100644 --- a/examples/cpp/dds/LateJoiners/sample.h +++ b/examples/cpp/dds/LateJoiners/sample.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file sample.h + * @file sample.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "samplev1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ +#ifndef _FAST_DDS_GENERATED_SAMPLE_HPP_ +#define _FAST_DDS_GENERATED_SAMPLE_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define SAMPLE_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class sample /*! * @brief Default constructor. */ - eProsima_user_DllExport sample(); + eProsima_user_DllExport sample() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~sample(); + eProsima_user_DllExport ~sample() + { + } /*! * @brief Copy constructor. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample( - const sample& x); + const sample& x) + { + m_index = x.m_index; + + m_key_value = x.m_key_value; + + } /*! * @brief Move constructor. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample( - sample&& x) noexcept; + sample&& x) noexcept + { + m_index = x.m_index; + m_key_value = x.m_key_value; + } /*! * @brief Copy assignment. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample& operator =( - const sample& x); + const sample& x) + { + + m_index = x.m_index; + + m_key_value = x.m_key_value; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object sample that will be copied. */ eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; + sample&& x) noexcept + { + + m_index = x.m_index; + m_key_value = x.m_key_value; + return *this; + } /*! * @brief Comparison operator. * @param x sample object to compare. */ eProsima_user_DllExport bool operator ==( - const sample& x) const; + const sample& x) const + { + return (m_index == x.m_index && + m_key_value == x.m_key_value); + } /*! * @brief Comparison operator. * @param x sample object to compare. */ eProsima_user_DllExport bool operator !=( - const sample& x) const; + const sample& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint8_t _index); + uint8_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint8_t index() const; + eProsima_user_DllExport uint8_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint8_t& index(); + eProsima_user_DllExport uint8_t& index() + { + return m_index; + } /*! @@ -160,19 +191,30 @@ class sample * @param _key_value New value for member key_value */ eProsima_user_DllExport void key_value( - uint8_t _key_value); + uint8_t _key_value) + { + m_key_value = _key_value; + } /*! * @brief This function returns the value of member key_value * @return Value of member key_value */ - eProsima_user_DllExport uint8_t key_value() const; + eProsima_user_DllExport uint8_t key_value() const + { + return m_key_value; + } /*! * @brief This function returns a reference to member key_value * @return Reference to member key_value */ - eProsima_user_DllExport uint8_t& key_value(); + eProsima_user_DllExport uint8_t& key_value() + { + return m_key_value; + } + + private: @@ -181,8 +223,6 @@ class sample }; -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - +#endif // _FAST_DDS_GENERATED_SAMPLE_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/LateJoiners/sampleCdrAux.hpp b/examples/cpp/dds/LateJoiners/sampleCdrAux.hpp index 18ed5857add..12ba74bf0ec 100644 --- a/examples/cpp/dds/LateJoiners/sampleCdrAux.hpp +++ b/examples/cpp/dds/LateJoiners/sampleCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ #define _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ -#include "sample.h" +#include "sample.hpp" constexpr uint32_t sample_max_cdr_typesize {6UL}; constexpr uint32_t sample_max_key_cdr_typesize {1UL}; diff --git a/examples/cpp/dds/LateJoiners/samplePubSubTypes.cxx b/examples/cpp/dds/LateJoiners/samplePubSubTypes.cxx index 9095d77083a..f60945627b4 100644 --- a/examples/cpp/dds/LateJoiners/samplePubSubTypes.cxx +++ b/examples/cpp/dds/LateJoiners/samplePubSubTypes.cxx @@ -219,3 +219,6 @@ bool samplePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "sampleCdrAux.ipp" diff --git a/examples/cpp/dds/LateJoiners/samplePubSubTypes.h b/examples/cpp/dds/LateJoiners/samplePubSubTypes.h index ec881115211..5f858658dec 100644 --- a/examples/cpp/dds/LateJoiners/samplePubSubTypes.h +++ b/examples/cpp/dds/LateJoiners/samplePubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "sample.h" +#include "sample.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/LateJoiners/samplev1.cxx b/examples/cpp/dds/LateJoiners/samplev1.cxx deleted file mode 100644 index 3b735befaf8..00000000000 --- a/examples/cpp/dds/LateJoiners/samplev1.cxx +++ /dev/null @@ -1,280 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define sample_max_cdr_typesize 6ULL; - - - - -sample::sample() -{ - // octet m_index - m_index = 0; - // octet m_key_value - m_key_value = 0; - -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample& sample::operator =( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -size_t sample::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return sample_max_cdr_typesize; -} - -size_t sample::getCdrSerializedSize( - const sample& 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); - - - return current_alignment - initial_alignment; -} - - -void sample::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_key_value; - -} - -void sample::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_key_value; - - -} - - -bool sample::isKeyDefined() -{ - return true; -} - -void sample::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - - - scdr << m_key_value; - -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/LateJoiners/samplev1.h b/examples/cpp/dds/LateJoiners/samplev1.h deleted file mode 100644 index 97613067c8b..00000000000 --- a/examples/cpp/dds/LateJoiners/samplev1.h +++ /dev/null @@ -1,236 +0,0 @@ -// 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 sample.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(SAMPLE_SOURCE) -#define SAMPLE_DllAPI __declspec( dllexport ) -#else -#define SAMPLE_DllAPI __declspec( dllimport ) -#endif // SAMPLE_SOURCE -#else -#define SAMPLE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define SAMPLE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure sample defined by the user in the IDL file. - * @ingroup sample - */ -class sample -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport sample(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~sample(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - const sample& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - sample&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - const sample& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator ==( - const sample& x) const; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator !=( - const sample& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint8_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint8_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint8_t& index(); - - - /*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ - eProsima_user_DllExport void key_value( - uint8_t _key_value); - - /*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ - eProsima_user_DllExport uint8_t key_value() const; - - /*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ - eProsima_user_DllExport uint8_t& key_value(); - - - /*! - * @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 sample& 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 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: - - uint8_t m_index; - uint8_t m_key_value; - -}; - - -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/LifespanQoSExample/Lifespan.cxx b/examples/cpp/dds/LifespanQoSExample/Lifespan.cxx deleted file mode 100644 index 66c85b61161..00000000000 --- a/examples/cpp/dds/LifespanQoSExample/Lifespan.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 Lifespan.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Lifespan.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -Lifespan::Lifespan() -{ -} - -Lifespan::~Lifespan() -{ -} - -Lifespan::Lifespan( - const Lifespan& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -Lifespan::Lifespan( - Lifespan&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -Lifespan& Lifespan::operator =( - const Lifespan& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -Lifespan& Lifespan::operator =( - Lifespan&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool Lifespan::operator ==( - const Lifespan& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool Lifespan::operator !=( - const Lifespan& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void Lifespan::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t Lifespan::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& Lifespan::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void Lifespan::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void Lifespan::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& Lifespan::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& Lifespan::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "LifespanCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/LifespanQoSExample/Lifespan.h b/examples/cpp/dds/LifespanQoSExample/Lifespan.hpp similarity index 69% rename from examples/cpp/dds/LifespanQoSExample/Lifespan.h rename to examples/cpp/dds/LifespanQoSExample/Lifespan.hpp index 5d6e5da9c5c..1f1fe47f843 100644 --- a/examples/cpp/dds/LifespanQoSExample/Lifespan.h +++ b/examples/cpp/dds/LifespanQoSExample/Lifespan.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file Lifespan.h + * @file Lifespan.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "Lifespanv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_LIFESPAN_H_ -#define _FAST_DDS_GENERATED_LIFESPAN_H_ +#ifndef _FAST_DDS_GENERATED_LIFESPAN_HPP_ +#define _FAST_DDS_GENERATED_LIFESPAN_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define LIFESPAN_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class Lifespan /*! * @brief Default constructor. */ - eProsima_user_DllExport Lifespan(); + eProsima_user_DllExport Lifespan() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~Lifespan(); + eProsima_user_DllExport ~Lifespan() + { + } /*! * @brief Copy constructor. * @param x Reference to the object Lifespan that will be copied. */ eProsima_user_DllExport Lifespan( - const Lifespan& x); + const Lifespan& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object Lifespan that will be copied. */ eProsima_user_DllExport Lifespan( - Lifespan&& x) noexcept; + Lifespan&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object Lifespan that will be copied. */ eProsima_user_DllExport Lifespan& operator =( - const Lifespan& x); + const Lifespan& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object Lifespan that will be copied. */ eProsima_user_DllExport Lifespan& operator =( - Lifespan&& x) noexcept; + Lifespan&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x Lifespan object to compare. */ eProsima_user_DllExport bool operator ==( - const Lifespan& x) const; + const Lifespan& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x Lifespan object to compare. */ eProsima_user_DllExport bool operator !=( - const Lifespan& x) const; + const Lifespan& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class Lifespan * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::string& _message); + const std::string& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::string&& _message); + std::string&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::string& message() const; + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::string& message(); + eProsima_user_DllExport std::string& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class Lifespan }; -#endif // _FAST_DDS_GENERATED_LIFESPAN_H_ - +#endif // _FAST_DDS_GENERATED_LIFESPAN_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/LifespanQoSExample/LifespanCdrAux.hpp b/examples/cpp/dds/LifespanQoSExample/LifespanCdrAux.hpp index 770a53f6a14..0dc7d9a21b1 100644 --- a/examples/cpp/dds/LifespanQoSExample/LifespanCdrAux.hpp +++ b/examples/cpp/dds/LifespanQoSExample/LifespanCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_LIFESPANCDRAUX_HPP_ #define _FAST_DDS_GENERATED_LIFESPANCDRAUX_HPP_ -#include "Lifespan.h" +#include "Lifespan.hpp" constexpr uint32_t Lifespan_max_cdr_typesize {268UL}; constexpr uint32_t Lifespan_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/LifespanQoSExample/LifespanPubSubTypes.cxx b/examples/cpp/dds/LifespanQoSExample/LifespanPubSubTypes.cxx index 05b7ea5970c..eef69ef3643 100644 --- a/examples/cpp/dds/LifespanQoSExample/LifespanPubSubTypes.cxx +++ b/examples/cpp/dds/LifespanQoSExample/LifespanPubSubTypes.cxx @@ -219,3 +219,6 @@ bool LifespanPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "LifespanCdrAux.ipp" diff --git a/examples/cpp/dds/LifespanQoSExample/LifespanPubSubTypes.h b/examples/cpp/dds/LifespanQoSExample/LifespanPubSubTypes.h index 01b48528ed9..416e3371ba5 100644 --- a/examples/cpp/dds/LifespanQoSExample/LifespanPubSubTypes.h +++ b/examples/cpp/dds/LifespanQoSExample/LifespanPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "Lifespan.h" +#include "Lifespan.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/LifespanQoSExample/LifespanPublisher.h b/examples/cpp/dds/LifespanQoSExample/LifespanPublisher.h index cb0db6fab53..a737941258e 100644 --- a/examples/cpp/dds/LifespanQoSExample/LifespanPublisher.h +++ b/examples/cpp/dds/LifespanQoSExample/LifespanPublisher.h @@ -20,7 +20,7 @@ #ifndef HELLOWORLDPUBLISHER_H_ #define HELLOWORLDPUBLISHER_H_ -#include "Lifespan.h" +#include "Lifespan.hpp" #include "LifespanPubSubTypes.h" #include diff --git a/examples/cpp/dds/LifespanQoSExample/LifespanSubscriber.h b/examples/cpp/dds/LifespanQoSExample/LifespanSubscriber.h index 64434c34bc9..2ba5f0392b9 100644 --- a/examples/cpp/dds/LifespanQoSExample/LifespanSubscriber.h +++ b/examples/cpp/dds/LifespanQoSExample/LifespanSubscriber.h @@ -20,8 +20,8 @@ #ifndef HELLOWORLDSUBSCRIBER_H_ #define HELLOWORLDSUBSCRIBER_H_ +#include "Lifespan.hpp" #include "LifespanPubSubTypes.h" -#include "Lifespan.h" #include #include diff --git a/examples/cpp/dds/LifespanQoSExample/Lifespanv1.cxx b/examples/cpp/dds/LifespanQoSExample/Lifespanv1.cxx deleted file mode 100644 index 81eaa4dd19b..00000000000 --- a/examples/cpp/dds/LifespanQoSExample/Lifespanv1.cxx +++ /dev/null @@ -1,286 +0,0 @@ -// 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 Lifespan.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Lifespan.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define Lifespan_max_cdr_typesize 268ULL; - - - - -Lifespan::Lifespan() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - -} - -Lifespan::~Lifespan() -{ -} - -Lifespan::Lifespan( - const Lifespan& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -Lifespan::Lifespan( - Lifespan&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -Lifespan& Lifespan::operator =( - const Lifespan& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -Lifespan& Lifespan::operator =( - Lifespan&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool Lifespan::operator ==( - const Lifespan& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool Lifespan::operator !=( - const Lifespan& x) const -{ - return !(*this == x); -} - -size_t Lifespan::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return Lifespan_max_cdr_typesize; -} - -size_t Lifespan::getCdrSerializedSize( - const Lifespan& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void Lifespan::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void Lifespan::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool Lifespan::isKeyDefined() -{ - return false; -} - -void Lifespan::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void Lifespan::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t Lifespan::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& Lifespan::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void Lifespan::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void Lifespan::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& Lifespan::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& Lifespan::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/LifespanQoSExample/Lifespanv1.h b/examples/cpp/dds/LifespanQoSExample/Lifespanv1.h deleted file mode 100644 index 5c47027b0c6..00000000000 --- a/examples/cpp/dds/LifespanQoSExample/Lifespanv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 Lifespan.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_LIFESPAN_H_ -#define _FAST_DDS_GENERATED_LIFESPAN_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(LIFESPAN_SOURCE) -#define LIFESPAN_DllAPI __declspec( dllexport ) -#else -#define LIFESPAN_DllAPI __declspec( dllimport ) -#endif // LIFESPAN_SOURCE -#else -#define LIFESPAN_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define LIFESPAN_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure Lifespan defined by the user in the IDL file. - * @ingroup Lifespan - */ -class Lifespan -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Lifespan(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Lifespan(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object Lifespan that will be copied. - */ - eProsima_user_DllExport Lifespan( - const Lifespan& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object Lifespan that will be copied. - */ - eProsima_user_DllExport Lifespan( - Lifespan&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object Lifespan that will be copied. - */ - eProsima_user_DllExport Lifespan& operator =( - const Lifespan& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object Lifespan that will be copied. - */ - eProsima_user_DllExport Lifespan& operator =( - Lifespan&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x Lifespan object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Lifespan& x) const; - - /*! - * @brief Comparison operator. - * @param x Lifespan object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Lifespan& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @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 Lifespan& 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 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: - - uint32_t m_index; - std::string m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_LIFESPAN_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/LivelinessQoS/LivelinessPublisher.h b/examples/cpp/dds/LivelinessQoS/LivelinessPublisher.h index 5efec3fec94..1c7a5251d4c 100644 --- a/examples/cpp/dds/LivelinessQoS/LivelinessPublisher.h +++ b/examples/cpp/dds/LivelinessQoS/LivelinessPublisher.h @@ -21,7 +21,7 @@ #define LivelinessPublisher_H_ #include "TopicPubSubTypes.h" -#include "Topic.h" +#include "Topic.hpp" #include #include diff --git a/examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h b/examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h index 2dc110e0fe9..2584443d778 100644 --- a/examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h +++ b/examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h @@ -21,7 +21,7 @@ #define LIVELINESSSUBSCRIBER_H_ #include "TopicPubSubTypes.h" -#include "Topic.h" +#include "Topic.hpp" #include #include diff --git a/examples/cpp/dds/LivelinessQoS/Topic.cxx b/examples/cpp/dds/LivelinessQoS/Topic.cxx deleted file mode 100644 index ca86d176ba1..00000000000 --- a/examples/cpp/dds/LivelinessQoS/Topic.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 Topic.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Topic.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -Topic::Topic() -{ -} - -Topic::~Topic() -{ -} - -Topic::Topic( - const Topic& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -Topic::Topic( - Topic&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -Topic& Topic::operator =( - const Topic& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -Topic& Topic::operator =( - Topic&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool Topic::operator ==( - const Topic& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool Topic::operator !=( - const Topic& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void Topic::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t Topic::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& Topic::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void Topic::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void Topic::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& Topic::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& Topic::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "TopicCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/CustomListenerExample/Topic.h b/examples/cpp/dds/LivelinessQoS/Topic.hpp similarity index 70% rename from examples/cpp/dds/CustomListenerExample/Topic.h rename to examples/cpp/dds/LivelinessQoS/Topic.hpp index 2596f317a1e..e171b930e79 100644 --- a/examples/cpp/dds/CustomListenerExample/Topic.h +++ b/examples/cpp/dds/LivelinessQoS/Topic.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file Topic.h + * @file Topic.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "Topicv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_TOPIC_H_ -#define _FAST_DDS_GENERATED_TOPIC_H_ +#ifndef _FAST_DDS_GENERATED_TOPIC_HPP_ +#define _FAST_DDS_GENERATED_TOPIC_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define TOPIC_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class Topic /*! * @brief Default constructor. */ - eProsima_user_DllExport Topic(); + eProsima_user_DllExport Topic() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~Topic(); + eProsima_user_DllExport ~Topic() + { + } /*! * @brief Copy constructor. * @param x Reference to the object Topic that will be copied. */ eProsima_user_DllExport Topic( - const Topic& x); + const Topic& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object Topic that will be copied. */ eProsima_user_DllExport Topic( - Topic&& x) noexcept; + Topic&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object Topic that will be copied. */ eProsima_user_DllExport Topic& operator =( - const Topic& x); + const Topic& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object Topic that will be copied. */ eProsima_user_DllExport Topic& operator =( - Topic&& x) noexcept; + Topic&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x Topic object to compare. */ eProsima_user_DllExport bool operator ==( - const Topic& x) const; + const Topic& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x Topic object to compare. */ eProsima_user_DllExport bool operator !=( - const Topic& x) const; + const Topic& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class Topic * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::string& _message); + const std::string& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::string&& _message); + std::string&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::string& message() const; + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::string& message(); + eProsima_user_DllExport std::string& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class Topic }; -#endif // _FAST_DDS_GENERATED_TOPIC_H_ - +#endif // _FAST_DDS_GENERATED_TOPIC_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/LivelinessQoS/TopicCdrAux.hpp b/examples/cpp/dds/LivelinessQoS/TopicCdrAux.hpp index 619cdbbb7b8..eeddc162206 100644 --- a/examples/cpp/dds/LivelinessQoS/TopicCdrAux.hpp +++ b/examples/cpp/dds/LivelinessQoS/TopicCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_TOPICCDRAUX_HPP_ #define _FAST_DDS_GENERATED_TOPICCDRAUX_HPP_ -#include "Topic.h" +#include "Topic.hpp" constexpr uint32_t Topic_max_cdr_typesize {268UL}; constexpr uint32_t Topic_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/LivelinessQoS/TopicPubSubTypes.cxx b/examples/cpp/dds/LivelinessQoS/TopicPubSubTypes.cxx index ce688064a0e..200e7fb3057 100644 --- a/examples/cpp/dds/LivelinessQoS/TopicPubSubTypes.cxx +++ b/examples/cpp/dds/LivelinessQoS/TopicPubSubTypes.cxx @@ -219,3 +219,6 @@ bool TopicPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "TopicCdrAux.ipp" diff --git a/examples/cpp/dds/LivelinessQoS/TopicPubSubTypes.h b/examples/cpp/dds/LivelinessQoS/TopicPubSubTypes.h index b9100bacbe9..15658c08f39 100644 --- a/examples/cpp/dds/LivelinessQoS/TopicPubSubTypes.h +++ b/examples/cpp/dds/LivelinessQoS/TopicPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "Topic.h" +#include "Topic.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/LivelinessQoS/Topicv1.cxx b/examples/cpp/dds/LivelinessQoS/Topicv1.cxx deleted file mode 100644 index a3e85584242..00000000000 --- a/examples/cpp/dds/LivelinessQoS/Topicv1.cxx +++ /dev/null @@ -1,286 +0,0 @@ -// 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 Topic.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Topic.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define Topic_max_cdr_typesize 268ULL; - - - - -Topic::Topic() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - -} - -Topic::~Topic() -{ -} - -Topic::Topic( - const Topic& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -Topic::Topic( - Topic&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -Topic& Topic::operator =( - const Topic& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -Topic& Topic::operator =( - Topic&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool Topic::operator ==( - const Topic& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool Topic::operator !=( - const Topic& x) const -{ - return !(*this == x); -} - -size_t Topic::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return Topic_max_cdr_typesize; -} - -size_t Topic::getCdrSerializedSize( - const Topic& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void Topic::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void Topic::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool Topic::isKeyDefined() -{ - return false; -} - -void Topic::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void Topic::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t Topic::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& Topic::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void Topic::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void Topic::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& Topic::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& Topic::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/LivelinessQoS/Topicv1.h b/examples/cpp/dds/LivelinessQoS/Topicv1.h deleted file mode 100644 index 9a6dfa97b4d..00000000000 --- a/examples/cpp/dds/LivelinessQoS/Topicv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 Topic.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_TOPIC_H_ -#define _FAST_DDS_GENERATED_TOPIC_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(TOPIC_SOURCE) -#define TOPIC_DllAPI __declspec( dllexport ) -#else -#define TOPIC_DllAPI __declspec( dllimport ) -#endif // TOPIC_SOURCE -#else -#define TOPIC_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define TOPIC_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure Topic defined by the user in the IDL file. - * @ingroup Topic - */ -class Topic -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Topic(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Topic(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object Topic that will be copied. - */ - eProsima_user_DllExport Topic( - const Topic& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object Topic that will be copied. - */ - eProsima_user_DllExport Topic( - Topic&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object Topic that will be copied. - */ - eProsima_user_DllExport Topic& operator =( - const Topic& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object Topic that will be copied. - */ - eProsima_user_DllExport Topic& operator =( - Topic&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x Topic object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Topic& x) const; - - /*! - * @brief Comparison operator. - * @param x Topic object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Topic& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @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 Topic& 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 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: - - uint32_t m_index; - std::string m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_TOPIC_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrength.cxx b/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrength.cxx deleted file mode 100644 index c566d2aa145..00000000000 --- a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrength.cxx +++ /dev/null @@ -1,202 +0,0 @@ -// 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 OwnershipStrength.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "OwnershipStrength.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -ExampleMessage::ExampleMessage() -{ -} - -ExampleMessage::~ExampleMessage() -{ -} - -ExampleMessage::ExampleMessage( - const ExampleMessage& x) -{ - m_index = x.m_index; - m_ownershipStrength = x.m_ownershipStrength; - m_message = x.m_message; -} - -ExampleMessage::ExampleMessage( - ExampleMessage&& x) noexcept -{ - m_index = x.m_index; - m_ownershipStrength = x.m_ownershipStrength; - m_message = std::move(x.m_message); -} - -ExampleMessage& ExampleMessage::operator =( - const ExampleMessage& x) -{ - - m_index = x.m_index; - m_ownershipStrength = x.m_ownershipStrength; - m_message = x.m_message; - return *this; -} - -ExampleMessage& ExampleMessage::operator =( - ExampleMessage&& x) noexcept -{ - - m_index = x.m_index; - m_ownershipStrength = x.m_ownershipStrength; - m_message = std::move(x.m_message); - return *this; -} - -bool ExampleMessage::operator ==( - const ExampleMessage& x) const -{ - return (m_index == x.m_index && - m_ownershipStrength == x.m_ownershipStrength && - m_message == x.m_message); -} - -bool ExampleMessage::operator !=( - const ExampleMessage& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void ExampleMessage::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t ExampleMessage::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& ExampleMessage::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member ownershipStrength - * @param _ownershipStrength New value for member ownershipStrength - */ -void ExampleMessage::ownershipStrength( - uint32_t _ownershipStrength) -{ - m_ownershipStrength = _ownershipStrength; -} - -/*! - * @brief This function returns the value of member ownershipStrength - * @return Value of member ownershipStrength - */ -uint32_t ExampleMessage::ownershipStrength() const -{ - return m_ownershipStrength; -} - -/*! - * @brief This function returns a reference to member ownershipStrength - * @return Reference to member ownershipStrength - */ -uint32_t& ExampleMessage::ownershipStrength() -{ - return m_ownershipStrength; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void ExampleMessage::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void ExampleMessage::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& ExampleMessage::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& ExampleMessage::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "OwnershipStrengthCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrength.h b/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrength.hpp similarity index 65% rename from examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrength.h rename to examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrength.hpp index 2ce1eddefa3..d1b401267b4 100644 --- a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrength.h +++ b/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrength.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file OwnershipStrength.h + * @file OwnershipStrength.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "OwnershipStrengthv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_OWNERSHIPSTRENGTH_H_ -#define _FAST_DDS_GENERATED_OWNERSHIPSTRENGTH_H_ +#ifndef _FAST_DDS_GENERATED_OWNERSHIPSTRENGTH_HPP_ +#define _FAST_DDS_GENERATED_OWNERSHIPSTRENGTH_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define OWNERSHIPSTRENGTH_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,124 @@ class ExampleMessage /*! * @brief Default constructor. */ - eProsima_user_DllExport ExampleMessage(); + eProsima_user_DllExport ExampleMessage() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ExampleMessage(); + eProsima_user_DllExport ~ExampleMessage() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ExampleMessage that will be copied. */ eProsima_user_DllExport ExampleMessage( - const ExampleMessage& x); + const ExampleMessage& x) + { + m_index = x.m_index; + + m_ownershipStrength = x.m_ownershipStrength; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object ExampleMessage that will be copied. */ eProsima_user_DllExport ExampleMessage( - ExampleMessage&& x) noexcept; + ExampleMessage&& x) noexcept + { + m_index = x.m_index; + m_ownershipStrength = x.m_ownershipStrength; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object ExampleMessage that will be copied. */ eProsima_user_DllExport ExampleMessage& operator =( - const ExampleMessage& x); + const ExampleMessage& x) + { + + m_index = x.m_index; + + m_ownershipStrength = x.m_ownershipStrength; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ExampleMessage that will be copied. */ eProsima_user_DllExport ExampleMessage& operator =( - ExampleMessage&& x) noexcept; + ExampleMessage&& x) noexcept + { + + m_index = x.m_index; + m_ownershipStrength = x.m_ownershipStrength; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x ExampleMessage object to compare. */ eProsima_user_DllExport bool operator ==( - const ExampleMessage& x) const; + const ExampleMessage& x) const + { + return (m_index == x.m_index && + m_ownershipStrength == x.m_ownershipStrength && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x ExampleMessage object to compare. */ eProsima_user_DllExport bool operator !=( - const ExampleMessage& x) const; + const ExampleMessage& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,19 +198,28 @@ class ExampleMessage * @param _ownershipStrength New value for member ownershipStrength */ eProsima_user_DllExport void ownershipStrength( - uint32_t _ownershipStrength); + uint32_t _ownershipStrength) + { + m_ownershipStrength = _ownershipStrength; + } /*! * @brief This function returns the value of member ownershipStrength * @return Value of member ownershipStrength */ - eProsima_user_DllExport uint32_t ownershipStrength() const; + eProsima_user_DllExport uint32_t ownershipStrength() const + { + return m_ownershipStrength; + } /*! * @brief This function returns a reference to member ownershipStrength * @return Reference to member ownershipStrength */ - eProsima_user_DllExport uint32_t& ownershipStrength(); + eProsima_user_DllExport uint32_t& ownershipStrength() + { + return m_ownershipStrength; + } /*! @@ -180,26 +227,40 @@ class ExampleMessage * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::string& _message); + const std::string& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::string&& _message); + std::string&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::string& message() const; + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::string& message(); + eProsima_user_DllExport std::string& message() + { + return m_message; + } + + private: @@ -209,8 +270,6 @@ class ExampleMessage }; -#endif // _FAST_DDS_GENERATED_OWNERSHIPSTRENGTH_H_ - +#endif // _FAST_DDS_GENERATED_OWNERSHIPSTRENGTH_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthCdrAux.hpp b/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthCdrAux.hpp index d0eed4b0f5f..761e8313f92 100644 --- a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthCdrAux.hpp +++ b/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_OWNERSHIPSTRENGTHCDRAUX_HPP_ #define _FAST_DDS_GENERATED_OWNERSHIPSTRENGTHCDRAUX_HPP_ -#include "OwnershipStrength.h" +#include "OwnershipStrength.hpp" constexpr uint32_t ExampleMessage_max_cdr_typesize {272UL}; constexpr uint32_t ExampleMessage_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthPubSubTypes.cxx b/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthPubSubTypes.cxx index 279bcd498c4..53583040279 100644 --- a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthPubSubTypes.cxx +++ b/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthPubSubTypes.cxx @@ -219,3 +219,6 @@ bool ExampleMessagePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "OwnershipStrengthCdrAux.ipp" diff --git a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthPubSubTypes.h b/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthPubSubTypes.h index 0ab6652c4ee..cd3ca26139b 100644 --- a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthPubSubTypes.h +++ b/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "OwnershipStrength.h" +#include "OwnershipStrength.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthv1.cxx b/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthv1.cxx deleted file mode 100644 index b98d38c3f26..00000000000 --- a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthv1.cxx +++ /dev/null @@ -1,339 +0,0 @@ -// 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 OwnershipStrength.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "OwnershipStrength.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define ExampleMessage_max_cdr_typesize 272ULL; - - - - -ExampleMessage::ExampleMessage() -{ - // unsigned long m_index - m_index = 0; - // unsigned long m_ownershipStrength - m_ownershipStrength = 0; - // /type_d() m_message - - -} - -ExampleMessage::~ExampleMessage() -{ -} - -ExampleMessage::ExampleMessage( - const ExampleMessage& x) -{ - m_index = x.m_index; - - - m_ownershipStrength = x.m_ownershipStrength; - - - m_message = x.m_message; - -} - -ExampleMessage::ExampleMessage( - ExampleMessage&& x) noexcept -{ - m_index = x.m_index; - - - m_ownershipStrength = x.m_ownershipStrength; - - - m_message = std::move(x.m_message); - -} - -ExampleMessage& ExampleMessage::operator =( - const ExampleMessage& x) -{ - m_index = x.m_index; - - - m_ownershipStrength = x.m_ownershipStrength; - - - m_message = x.m_message; - - return *this; -} - -ExampleMessage& ExampleMessage::operator =( - ExampleMessage&& x) noexcept -{ - m_index = x.m_index; - - - m_ownershipStrength = x.m_ownershipStrength; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool ExampleMessage::operator ==( - const ExampleMessage& x) const -{ - return (m_index == x.m_index && - m_ownershipStrength == x.m_ownershipStrength && - m_message == x.m_message); -} - -bool ExampleMessage::operator !=( - const ExampleMessage& x) const -{ - return !(*this == x); -} - -size_t ExampleMessage::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ExampleMessage_max_cdr_typesize; -} - -size_t ExampleMessage::getCdrSerializedSize( - const ExampleMessage& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void ExampleMessage::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_ownershipStrength; - - scdr << m_message.c_str(); - -} - -void ExampleMessage::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_ownershipStrength; - - - - dcdr >> m_message; - - -} - - -bool ExampleMessage::isKeyDefined() -{ - return false; -} - -void ExampleMessage::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void ExampleMessage::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t ExampleMessage::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& ExampleMessage::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member ownershipStrength - * @param _ownershipStrength New value for member ownershipStrength - */ -void ExampleMessage::ownershipStrength( - uint32_t _ownershipStrength) -{ - m_ownershipStrength = _ownershipStrength; -} - -/*! - * @brief This function returns the value of member ownershipStrength - * @return Value of member ownershipStrength - */ -uint32_t ExampleMessage::ownershipStrength() const -{ - return m_ownershipStrength; -} - -/*! - * @brief This function returns a reference to member ownershipStrength - * @return Reference to member ownershipStrength - */ -uint32_t& ExampleMessage::ownershipStrength() -{ - return m_ownershipStrength; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void ExampleMessage::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void ExampleMessage::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& ExampleMessage::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& ExampleMessage::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthv1.h b/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthv1.h deleted file mode 100644 index 4f7eb44a631..00000000000 --- a/examples/cpp/dds/OwnershipStrengthQoSExample/OwnershipStrengthv1.h +++ /dev/null @@ -1,264 +0,0 @@ -// 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 OwnershipStrength.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_OWNERSHIPSTRENGTH_H_ -#define _FAST_DDS_GENERATED_OWNERSHIPSTRENGTH_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(OWNERSHIPSTRENGTH_SOURCE) -#define OWNERSHIPSTRENGTH_DllAPI __declspec( dllexport ) -#else -#define OWNERSHIPSTRENGTH_DllAPI __declspec( dllimport ) -#endif // OWNERSHIPSTRENGTH_SOURCE -#else -#define OWNERSHIPSTRENGTH_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define OWNERSHIPSTRENGTH_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure ExampleMessage defined by the user in the IDL file. - * @ingroup OwnershipStrength - */ -class ExampleMessage -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ExampleMessage(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ExampleMessage(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ExampleMessage that will be copied. - */ - eProsima_user_DllExport ExampleMessage( - const ExampleMessage& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ExampleMessage that will be copied. - */ - eProsima_user_DllExport ExampleMessage( - ExampleMessage&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ExampleMessage that will be copied. - */ - eProsima_user_DllExport ExampleMessage& operator =( - const ExampleMessage& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ExampleMessage that will be copied. - */ - eProsima_user_DllExport ExampleMessage& operator =( - ExampleMessage&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ExampleMessage object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ExampleMessage& x) const; - - /*! - * @brief Comparison operator. - * @param x ExampleMessage object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ExampleMessage& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function sets a value in member ownershipStrength - * @param _ownershipStrength New value for member ownershipStrength - */ - eProsima_user_DllExport void ownershipStrength( - uint32_t _ownershipStrength); - - /*! - * @brief This function returns the value of member ownershipStrength - * @return Value of member ownershipStrength - */ - eProsima_user_DllExport uint32_t ownershipStrength() const; - - /*! - * @brief This function returns a reference to member ownershipStrength - * @return Reference to member ownershipStrength - */ - eProsima_user_DllExport uint32_t& ownershipStrength(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @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 ExampleMessage& 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 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: - - uint32_t m_index; - uint32_t m_ownershipStrength; - std::string m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_OWNERSHIPSTRENGTH_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/RequestReplyExample/CMakeLists.txt b/examples/cpp/dds/RequestReplyExample/CMakeLists.txt index 1af4ae77aad..330972dc23b 100644 --- a/examples/cpp/dds/RequestReplyExample/CMakeLists.txt +++ b/examples/cpp/dds/RequestReplyExample/CMakeLists.txt @@ -36,8 +36,6 @@ endif() message(STATUS "Configuring Request-Reply example...") set(DDS_REQUEST_REPLY_EXAMPLE_COMMON_SOURCES - Calculator.cxx - Calculatorv1.cxx CalculatorPubSubTypes.cxx ) set( DDS_REQUEST_REPLY_EXAMPLE_CLIENT_SOURCES diff --git a/examples/cpp/dds/RequestReplyExample/Calculator.cxx b/examples/cpp/dds/RequestReplyExample/Calculator.cxx deleted file mode 100644 index 664663c6180..00000000000 --- a/examples/cpp/dds/RequestReplyExample/Calculator.cxx +++ /dev/null @@ -1,271 +0,0 @@ -// 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 Calculator.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Calculator.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -RequestType::RequestType() -{ -} - -RequestType::~RequestType() -{ -} - -RequestType::RequestType( - const RequestType& x) -{ - m_operation = x.m_operation; - m_x = x.m_x; - m_y = x.m_y; -} - -RequestType::RequestType( - RequestType&& x) noexcept -{ - m_operation = x.m_operation; - m_x = x.m_x; - m_y = x.m_y; -} - -RequestType& RequestType::operator =( - const RequestType& x) -{ - - m_operation = x.m_operation; - m_x = x.m_x; - m_y = x.m_y; - return *this; -} - -RequestType& RequestType::operator =( - RequestType&& x) noexcept -{ - - m_operation = x.m_operation; - m_x = x.m_x; - m_y = x.m_y; - return *this; -} - -bool RequestType::operator ==( - const RequestType& x) const -{ - return (m_operation == x.m_operation && - m_x == x.m_x && - m_y == x.m_y); -} - -bool RequestType::operator !=( - const RequestType& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member operation - * @param _operation New value for member operation - */ -void RequestType::operation( - OperationType _operation) -{ - m_operation = _operation; -} - -/*! - * @brief This function returns the value of member operation - * @return Value of member operation - */ -OperationType RequestType::operation() const -{ - return m_operation; -} - -/*! - * @brief This function returns a reference to member operation - * @return Reference to member operation - */ -OperationType& RequestType::operation() -{ - return m_operation; -} - - -/*! - * @brief This function sets a value in member x - * @param _x New value for member x - */ -void RequestType::x( - int32_t _x) -{ - m_x = _x; -} - -/*! - * @brief This function returns the value of member x - * @return Value of member x - */ -int32_t RequestType::x() const -{ - return m_x; -} - -/*! - * @brief This function returns a reference to member x - * @return Reference to member x - */ -int32_t& RequestType::x() -{ - return m_x; -} - - -/*! - * @brief This function sets a value in member y - * @param _y New value for member y - */ -void RequestType::y( - int32_t _y) -{ - m_y = _y; -} - -/*! - * @brief This function returns the value of member y - * @return Value of member y - */ -int32_t RequestType::y() const -{ - return m_y; -} - -/*! - * @brief This function returns a reference to member y - * @return Reference to member y - */ -int32_t& RequestType::y() -{ - return m_y; -} - - - - -ReplyType::ReplyType() -{ -} - -ReplyType::~ReplyType() -{ -} - -ReplyType::ReplyType( - const ReplyType& x) -{ - m_z = x.m_z; -} - -ReplyType::ReplyType( - ReplyType&& x) noexcept -{ - m_z = x.m_z; -} - -ReplyType& ReplyType::operator =( - const ReplyType& x) -{ - - m_z = x.m_z; - return *this; -} - -ReplyType& ReplyType::operator =( - ReplyType&& x) noexcept -{ - - m_z = x.m_z; - return *this; -} - -bool ReplyType::operator ==( - const ReplyType& x) const -{ - return (m_z == x.m_z); -} - -bool ReplyType::operator !=( - const ReplyType& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member z - * @param _z New value for member z - */ -void ReplyType::z( - int64_t _z) -{ - m_z = _z; -} - -/*! - * @brief This function returns the value of member z - * @return Value of member z - */ -int64_t ReplyType::z() const -{ - return m_z; -} - -/*! - * @brief This function returns a reference to member z - * @return Reference to member z - */ -int64_t& ReplyType::z() -{ - return m_z; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "CalculatorCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/RequestReplyExample/Calculator.h b/examples/cpp/dds/RequestReplyExample/Calculator.hpp similarity index 68% rename from examples/cpp/dds/RequestReplyExample/Calculator.h rename to examples/cpp/dds/RequestReplyExample/Calculator.hpp index 945af396175..5a2c23d1d6f 100644 --- a/examples/cpp/dds/RequestReplyExample/Calculator.h +++ b/examples/cpp/dds/RequestReplyExample/Calculator.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file Calculator.h + * @file Calculator.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "Calculatorv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_CALCULATOR_H_ -#define _FAST_DDS_GENERATED_CALCULATOR_H_ +#ifndef _FAST_DDS_GENERATED_CALCULATOR_HPP_ +#define _FAST_DDS_GENERATED_CALCULATOR_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define CALCULATOR_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! * @brief This class represents the enumeration OperationType defined by the user in the IDL file. * @ingroup Calculator @@ -97,73 +84,124 @@ class RequestType /*! * @brief Default constructor. */ - eProsima_user_DllExport RequestType(); + eProsima_user_DllExport RequestType() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~RequestType(); + eProsima_user_DllExport ~RequestType() + { + } /*! * @brief Copy constructor. * @param x Reference to the object RequestType that will be copied. */ eProsima_user_DllExport RequestType( - const RequestType& x); + const RequestType& x) + { + m_operation = x.m_operation; + + m_x = x.m_x; + + m_y = x.m_y; + + } /*! * @brief Move constructor. * @param x Reference to the object RequestType that will be copied. */ eProsima_user_DllExport RequestType( - RequestType&& x) noexcept; + RequestType&& x) noexcept + { + m_operation = x.m_operation; + m_x = x.m_x; + m_y = x.m_y; + } /*! * @brief Copy assignment. * @param x Reference to the object RequestType that will be copied. */ eProsima_user_DllExport RequestType& operator =( - const RequestType& x); + const RequestType& x) + { + + m_operation = x.m_operation; + + m_x = x.m_x; + + m_y = x.m_y; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object RequestType that will be copied. */ eProsima_user_DllExport RequestType& operator =( - RequestType&& x) noexcept; + RequestType&& x) noexcept + { + + m_operation = x.m_operation; + m_x = x.m_x; + m_y = x.m_y; + return *this; + } /*! * @brief Comparison operator. * @param x RequestType object to compare. */ eProsima_user_DllExport bool operator ==( - const RequestType& x) const; + const RequestType& x) const + { + return (m_operation == x.m_operation && + m_x == x.m_x && + m_y == x.m_y); + } /*! * @brief Comparison operator. * @param x RequestType object to compare. */ eProsima_user_DllExport bool operator !=( - const RequestType& x) const; + const RequestType& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member operation * @param _operation New value for member operation */ eProsima_user_DllExport void operation( - OperationType _operation); + OperationType _operation) + { + m_operation = _operation; + } /*! * @brief This function returns the value of member operation * @return Value of member operation */ - eProsima_user_DllExport OperationType operation() const; + eProsima_user_DllExport OperationType operation() const + { + return m_operation; + } /*! * @brief This function returns a reference to member operation * @return Reference to member operation */ - eProsima_user_DllExport OperationType& operation(); + eProsima_user_DllExport OperationType& operation() + { + return m_operation; + } /*! @@ -171,19 +209,28 @@ class RequestType * @param _x New value for member x */ eProsima_user_DllExport void x( - int32_t _x); + int32_t _x) + { + m_x = _x; + } /*! * @brief This function returns the value of member x * @return Value of member x */ - eProsima_user_DllExport int32_t x() const; + eProsima_user_DllExport int32_t x() const + { + return m_x; + } /*! * @brief This function returns a reference to member x * @return Reference to member x */ - eProsima_user_DllExport int32_t& x(); + eProsima_user_DllExport int32_t& x() + { + return m_x; + } /*! @@ -191,19 +238,30 @@ class RequestType * @param _y New value for member y */ eProsima_user_DllExport void y( - int32_t _y); + int32_t _y) + { + m_y = _y; + } /*! * @brief This function returns the value of member y * @return Value of member y */ - eProsima_user_DllExport int32_t y() const; + eProsima_user_DllExport int32_t y() const + { + return m_y; + } /*! * @brief This function returns a reference to member y * @return Reference to member y */ - eProsima_user_DllExport int32_t& y(); + eProsima_user_DllExport int32_t& y() + { + return m_y; + } + + private: @@ -225,73 +283,112 @@ class ReplyType /*! * @brief Default constructor. */ - eProsima_user_DllExport ReplyType(); + eProsima_user_DllExport ReplyType() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ReplyType(); + eProsima_user_DllExport ~ReplyType() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ReplyType that will be copied. */ eProsima_user_DllExport ReplyType( - const ReplyType& x); + const ReplyType& x) + { + m_z = x.m_z; + + } /*! * @brief Move constructor. * @param x Reference to the object ReplyType that will be copied. */ eProsima_user_DllExport ReplyType( - ReplyType&& x) noexcept; + ReplyType&& x) noexcept + { + m_z = x.m_z; + } /*! * @brief Copy assignment. * @param x Reference to the object ReplyType that will be copied. */ eProsima_user_DllExport ReplyType& operator =( - const ReplyType& x); + const ReplyType& x) + { + + m_z = x.m_z; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ReplyType that will be copied. */ eProsima_user_DllExport ReplyType& operator =( - ReplyType&& x) noexcept; + ReplyType&& x) noexcept + { + + m_z = x.m_z; + return *this; + } /*! * @brief Comparison operator. * @param x ReplyType object to compare. */ eProsima_user_DllExport bool operator ==( - const ReplyType& x) const; + const ReplyType& x) const + { + return (m_z == x.m_z); + } /*! * @brief Comparison operator. * @param x ReplyType object to compare. */ eProsima_user_DllExport bool operator !=( - const ReplyType& x) const; + const ReplyType& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member z * @param _z New value for member z */ eProsima_user_DllExport void z( - int64_t _z); + int64_t _z) + { + m_z = _z; + } /*! * @brief This function returns the value of member z * @return Value of member z */ - eProsima_user_DllExport int64_t z() const; + eProsima_user_DllExport int64_t z() const + { + return m_z; + } /*! * @brief This function returns a reference to member z * @return Reference to member z */ - eProsima_user_DllExport int64_t& z(); + eProsima_user_DllExport int64_t& z() + { + return m_z; + } + + private: @@ -299,8 +396,6 @@ class ReplyType }; -#endif // _FAST_DDS_GENERATED_CALCULATOR_H_ - +#endif // _FAST_DDS_GENERATED_CALCULATOR_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/RequestReplyExample/CalculatorCdrAux.hpp b/examples/cpp/dds/RequestReplyExample/CalculatorCdrAux.hpp index ca610452fdb..ea56f73c27b 100644 --- a/examples/cpp/dds/RequestReplyExample/CalculatorCdrAux.hpp +++ b/examples/cpp/dds/RequestReplyExample/CalculatorCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_CALCULATORCDRAUX_HPP_ #define _FAST_DDS_GENERATED_CALCULATORCDRAUX_HPP_ -#include "Calculator.h" +#include "Calculator.hpp" constexpr uint32_t ReplyType_max_cdr_typesize {16UL}; constexpr uint32_t ReplyType_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/RequestReplyExample/CalculatorPubSubTypes.cxx b/examples/cpp/dds/RequestReplyExample/CalculatorPubSubTypes.cxx index e928e28c98d..e3cc6888b8c 100644 --- a/examples/cpp/dds/RequestReplyExample/CalculatorPubSubTypes.cxx +++ b/examples/cpp/dds/RequestReplyExample/CalculatorPubSubTypes.cxx @@ -409,3 +409,6 @@ bool ReplyTypePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "CalculatorCdrAux.ipp" diff --git a/examples/cpp/dds/RequestReplyExample/CalculatorPubSubTypes.h b/examples/cpp/dds/RequestReplyExample/CalculatorPubSubTypes.h index ae4b2b39e8d..9d1d75c987b 100644 --- a/examples/cpp/dds/RequestReplyExample/CalculatorPubSubTypes.h +++ b/examples/cpp/dds/RequestReplyExample/CalculatorPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "Calculator.h" +#include "Calculator.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/RequestReplyExample/Calculatorv1.cxx b/examples/cpp/dds/RequestReplyExample/Calculatorv1.cxx deleted file mode 100644 index 50874dc3bc9..00000000000 --- a/examples/cpp/dds/RequestReplyExample/Calculatorv1.cxx +++ /dev/null @@ -1,467 +0,0 @@ -// 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 Calculator.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Calculator.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define ReplyType_max_cdr_typesize 16ULL; -#define RequestType_max_cdr_typesize 16ULL; - - - - -RequestType::RequestType() -{ - // OperationType m_operation - m_operation = ::ADDITION; - // long m_x - m_x = 0; - // long m_y - m_y = 0; - -} - -RequestType::~RequestType() -{ -} - -RequestType::RequestType( - const RequestType& x) -{ - m_operation = x.m_operation; - - - m_x = x.m_x; - - - m_y = x.m_y; - -} - -RequestType::RequestType( - RequestType&& x) noexcept -{ - m_operation = x.m_operation; - - - m_x = x.m_x; - - - m_y = x.m_y; - -} - -RequestType& RequestType::operator =( - const RequestType& x) -{ - m_operation = x.m_operation; - - - m_x = x.m_x; - - - m_y = x.m_y; - - return *this; -} - -RequestType& RequestType::operator =( - RequestType&& x) noexcept -{ - m_operation = x.m_operation; - - - m_x = x.m_x; - - - m_y = x.m_y; - - return *this; -} - -bool RequestType::operator ==( - const RequestType& x) const -{ - return (m_operation == x.m_operation && - m_x == x.m_x && - m_y == x.m_y); -} - -bool RequestType::operator !=( - const RequestType& x) const -{ - return !(*this == x); -} - -size_t RequestType::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return RequestType_max_cdr_typesize; -} - -size_t RequestType::getCdrSerializedSize( - const RequestType& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void RequestType::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m_operation; - - scdr << m_x; - - scdr << m_y; - -} - -void RequestType::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_operation = (OperationType)enum_value; - } - - - - dcdr >> m_x; - - - - dcdr >> m_y; - - -} - - -bool RequestType::isKeyDefined() -{ - return false; -} - -void RequestType::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member operation - * @param _operation New value for member operation - */ -void RequestType::operation( - OperationType _operation) -{ - m_operation = _operation; -} - -/*! - * @brief This function returns the value of member operation - * @return Value of member operation - */ -OperationType RequestType::operation() const -{ - return m_operation; -} - -/*! - * @brief This function returns a reference to member operation - * @return Reference to member operation - */ -OperationType& RequestType::operation() -{ - return m_operation; -} - - -/*! - * @brief This function sets a value in member x - * @param _x New value for member x - */ -void RequestType::x( - int32_t _x) -{ - m_x = _x; -} - -/*! - * @brief This function returns the value of member x - * @return Value of member x - */ -int32_t RequestType::x() const -{ - return m_x; -} - -/*! - * @brief This function returns a reference to member x - * @return Reference to member x - */ -int32_t& RequestType::x() -{ - return m_x; -} - - -/*! - * @brief This function sets a value in member y - * @param _y New value for member y - */ -void RequestType::y( - int32_t _y) -{ - m_y = _y; -} - -/*! - * @brief This function returns the value of member y - * @return Value of member y - */ -int32_t RequestType::y() const -{ - return m_y; -} - -/*! - * @brief This function returns a reference to member y - * @return Reference to member y - */ -int32_t& RequestType::y() -{ - return m_y; -} - - - - - -ReplyType::ReplyType() -{ - // long long m_z - m_z = 0; - -} - -ReplyType::~ReplyType() -{ -} - -ReplyType::ReplyType( - const ReplyType& x) -{ - m_z = x.m_z; - -} - -ReplyType::ReplyType( - ReplyType&& x) noexcept -{ - m_z = x.m_z; - -} - -ReplyType& ReplyType::operator =( - const ReplyType& x) -{ - m_z = x.m_z; - - return *this; -} - -ReplyType& ReplyType::operator =( - ReplyType&& x) noexcept -{ - m_z = x.m_z; - - return *this; -} - -bool ReplyType::operator ==( - const ReplyType& x) const -{ - return (m_z == x.m_z); -} - -bool ReplyType::operator !=( - const ReplyType& x) const -{ - return !(*this == x); -} - -size_t ReplyType::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ReplyType_max_cdr_typesize; -} - -size_t ReplyType::getCdrSerializedSize( - const ReplyType& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - return current_alignment - initial_alignment; -} - - -void ReplyType::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_z; - -} - -void ReplyType::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_z; - - -} - - -bool ReplyType::isKeyDefined() -{ - return false; -} - -void ReplyType::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member z - * @param _z New value for member z - */ -void ReplyType::z( - int64_t _z) -{ - m_z = _z; -} - -/*! - * @brief This function returns the value of member z - * @return Value of member z - */ -int64_t ReplyType::z() const -{ - return m_z; -} - -/*! - * @brief This function returns a reference to member z - * @return Reference to member z - */ -int64_t& ReplyType::z() -{ - return m_z; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/RequestReplyExample/Calculatorv1.h b/examples/cpp/dds/RequestReplyExample/Calculatorv1.h deleted file mode 100644 index d0af12a2c6f..00000000000 --- a/examples/cpp/dds/RequestReplyExample/Calculatorv1.h +++ /dev/null @@ -1,407 +0,0 @@ -// 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 Calculator.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_CALCULATOR_H_ -#define _FAST_DDS_GENERATED_CALCULATOR_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(CALCULATOR_SOURCE) -#define CALCULATOR_DllAPI __declspec( dllexport ) -#else -#define CALCULATOR_DllAPI __declspec( dllimport ) -#endif // CALCULATOR_SOURCE -#else -#define CALCULATOR_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define CALCULATOR_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - -/*! - * @brief This class represents the enumeration OperationType defined by the user in the IDL file. - * @ingroup Calculator - */ -enum OperationType : uint32_t -{ - ADDITION, - SUBTRACTION, - MULTIPLICATION, - DIVISION -}; - - -/*! - * @brief This class represents the structure RequestType defined by the user in the IDL file. - * @ingroup Calculator - */ -class RequestType -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport RequestType(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~RequestType(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object RequestType that will be copied. - */ - eProsima_user_DllExport RequestType( - const RequestType& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object RequestType that will be copied. - */ - eProsima_user_DllExport RequestType( - RequestType&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object RequestType that will be copied. - */ - eProsima_user_DllExport RequestType& operator =( - const RequestType& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object RequestType that will be copied. - */ - eProsima_user_DllExport RequestType& operator =( - RequestType&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x RequestType object to compare. - */ - eProsima_user_DllExport bool operator ==( - const RequestType& x) const; - - /*! - * @brief Comparison operator. - * @param x RequestType object to compare. - */ - eProsima_user_DllExport bool operator !=( - const RequestType& x) const; - - /*! - * @brief This function sets a value in member operation - * @param _operation New value for member operation - */ - eProsima_user_DllExport void operation( - OperationType _operation); - - /*! - * @brief This function returns the value of member operation - * @return Value of member operation - */ - eProsima_user_DllExport OperationType operation() const; - - /*! - * @brief This function returns a reference to member operation - * @return Reference to member operation - */ - eProsima_user_DllExport OperationType& operation(); - - - /*! - * @brief This function sets a value in member x - * @param _x New value for member x - */ - eProsima_user_DllExport void x( - int32_t _x); - - /*! - * @brief This function returns the value of member x - * @return Value of member x - */ - eProsima_user_DllExport int32_t x() const; - - /*! - * @brief This function returns a reference to member x - * @return Reference to member x - */ - eProsima_user_DllExport int32_t& x(); - - - /*! - * @brief This function sets a value in member y - * @param _y New value for member y - */ - eProsima_user_DllExport void y( - int32_t _y); - - /*! - * @brief This function returns the value of member y - * @return Value of member y - */ - eProsima_user_DllExport int32_t y() const; - - /*! - * @brief This function returns a reference to member y - * @return Reference to member y - */ - eProsima_user_DllExport int32_t& y(); - - - /*! - * @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 RequestType& 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 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: - - OperationType m_operation; - int32_t m_x; - int32_t m_y; - -}; - - - -/*! - * @brief This class represents the structure ReplyType defined by the user in the IDL file. - * @ingroup Calculator - */ -class ReplyType -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ReplyType(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ReplyType(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ReplyType that will be copied. - */ - eProsima_user_DllExport ReplyType( - const ReplyType& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ReplyType that will be copied. - */ - eProsima_user_DllExport ReplyType( - ReplyType&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ReplyType that will be copied. - */ - eProsima_user_DllExport ReplyType& operator =( - const ReplyType& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ReplyType that will be copied. - */ - eProsima_user_DllExport ReplyType& operator =( - ReplyType&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ReplyType object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ReplyType& x) const; - - /*! - * @brief Comparison operator. - * @param x ReplyType object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ReplyType& x) const; - - /*! - * @brief This function sets a value in member z - * @param _z New value for member z - */ - eProsima_user_DllExport void z( - int64_t _z); - - /*! - * @brief This function returns the value of member z - * @return Value of member z - */ - eProsima_user_DllExport int64_t z() const; - - /*! - * @brief This function returns a reference to member z - * @return Reference to member z - */ - eProsima_user_DllExport int64_t& z(); - - - /*! - * @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 ReplyType& 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 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: - - int64_t m_z; - -}; - - -#endif // _FAST_DDS_GENERATED_CALCULATOR_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/SampleConfig_Controller/sample.cxx b/examples/cpp/dds/SampleConfig_Controller/sample.cxx deleted file mode 100644 index 360d4a1b2b2..00000000000 --- a/examples/cpp/dds/SampleConfig_Controller/sample.cxx +++ /dev/null @@ -1,158 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -sample::sample() -{ -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample& sample::operator =( - const sample& x) -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "sampleCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/SampleConfig_Controller/sample.h b/examples/cpp/dds/SampleConfig_Controller/sample.h deleted file mode 100644 index c050c8527cc..00000000000 --- a/examples/cpp/dds/SampleConfig_Controller/sample.h +++ /dev/null @@ -1,188 +0,0 @@ -// 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 sample.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include -#include "samplev1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(SAMPLE_SOURCE) -#define SAMPLE_DllAPI __declspec( dllexport ) -#else -#define SAMPLE_DllAPI __declspec( dllimport ) -#endif // SAMPLE_SOURCE -#else -#define SAMPLE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define SAMPLE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure sample defined by the user in the IDL file. - * @ingroup sample - */ -class sample -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport sample(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~sample(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - const sample& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - sample&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - const sample& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator ==( - const sample& x) const; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator !=( - const sample& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint8_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint8_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint8_t& index(); - - - /*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ - eProsima_user_DllExport void key_value( - uint8_t _key_value); - - /*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ - eProsima_user_DllExport uint8_t key_value() const; - - /*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ - eProsima_user_DllExport uint8_t& key_value(); - -private: - - uint8_t m_index{0}; - uint8_t m_key_value{0}; - -}; - -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/SampleConfig_Controller/sample.hpp b/examples/cpp/dds/SampleConfig_Controller/sample.hpp new file mode 100644 index 00000000000..d8a5b01cf2f --- /dev/null +++ b/examples/cpp/dds/SampleConfig_Controller/sample.hpp @@ -0,0 +1,228 @@ +// 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 sample.hpp + * This header file contains the declaration of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_SAMPLE_HPP_ +#define _FAST_DDS_GENERATED_SAMPLE_HPP_ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#define eProsima_user_DllExport __declspec( dllexport ) +#else +#define eProsima_user_DllExport +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define eProsima_user_DllExport +#endif // _WIN32 + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#if defined(SAMPLE_SOURCE) +#define SAMPLE_DllAPI __declspec( dllexport ) +#else +#define SAMPLE_DllAPI __declspec( dllimport ) +#endif // SAMPLE_SOURCE +#else +#define SAMPLE_DllAPI +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define SAMPLE_DllAPI +#endif // _WIN32 + + + +/*! + * @brief This class represents the structure sample defined by the user in the IDL file. + * @ingroup sample + */ +class sample +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport sample() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~sample() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object sample that will be copied. + */ + eProsima_user_DllExport sample( + const sample& x) + { + m_index = x.m_index; + + m_key_value = x.m_key_value; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object sample that will be copied. + */ + eProsima_user_DllExport sample( + sample&& x) noexcept + { + m_index = x.m_index; + m_key_value = x.m_key_value; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object sample that will be copied. + */ + eProsima_user_DllExport sample& operator =( + const sample& x) + { + + m_index = x.m_index; + + m_key_value = x.m_key_value; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object sample that will be copied. + */ + eProsima_user_DllExport sample& operator =( + sample&& x) noexcept + { + + m_index = x.m_index; + m_key_value = x.m_key_value; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x sample object to compare. + */ + eProsima_user_DllExport bool operator ==( + const sample& x) const + { + return (m_index == x.m_index && + m_key_value == x.m_key_value); + } + + /*! + * @brief Comparison operator. + * @param x sample object to compare. + */ + eProsima_user_DllExport bool operator !=( + const sample& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member index + * @param _index New value for member index + */ + eProsima_user_DllExport void index( + uint8_t _index) + { + m_index = _index; + } + + /*! + * @brief This function returns the value of member index + * @return Value of member index + */ + eProsima_user_DllExport uint8_t index() const + { + return m_index; + } + + /*! + * @brief This function returns a reference to member index + * @return Reference to member index + */ + eProsima_user_DllExport uint8_t& index() + { + return m_index; + } + + + /*! + * @brief This function sets a value in member key_value + * @param _key_value New value for member key_value + */ + eProsima_user_DllExport void key_value( + uint8_t _key_value) + { + m_key_value = _key_value; + } + + /*! + * @brief This function returns the value of member key_value + * @return Value of member key_value + */ + eProsima_user_DllExport uint8_t key_value() const + { + return m_key_value; + } + + /*! + * @brief This function returns a reference to member key_value + * @return Reference to member key_value + */ + eProsima_user_DllExport uint8_t& key_value() + { + return m_key_value; + } + + + +private: + + uint8_t m_index{0}; + uint8_t m_key_value{0}; + +}; + +#endif // _FAST_DDS_GENERATED_SAMPLE_HPP_ + + diff --git a/examples/cpp/dds/SampleConfig_Controller/sampleCdrAux.hpp b/examples/cpp/dds/SampleConfig_Controller/sampleCdrAux.hpp index 18ed5857add..12ba74bf0ec 100644 --- a/examples/cpp/dds/SampleConfig_Controller/sampleCdrAux.hpp +++ b/examples/cpp/dds/SampleConfig_Controller/sampleCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ #define _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ -#include "sample.h" +#include "sample.hpp" constexpr uint32_t sample_max_cdr_typesize {6UL}; constexpr uint32_t sample_max_key_cdr_typesize {1UL}; diff --git a/examples/cpp/dds/SampleConfig_Controller/samplePubSubTypes.cxx b/examples/cpp/dds/SampleConfig_Controller/samplePubSubTypes.cxx index 9095d77083a..f60945627b4 100644 --- a/examples/cpp/dds/SampleConfig_Controller/samplePubSubTypes.cxx +++ b/examples/cpp/dds/SampleConfig_Controller/samplePubSubTypes.cxx @@ -219,3 +219,6 @@ bool samplePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "sampleCdrAux.ipp" diff --git a/examples/cpp/dds/SampleConfig_Controller/samplePubSubTypes.h b/examples/cpp/dds/SampleConfig_Controller/samplePubSubTypes.h index ec881115211..5f858658dec 100644 --- a/examples/cpp/dds/SampleConfig_Controller/samplePubSubTypes.h +++ b/examples/cpp/dds/SampleConfig_Controller/samplePubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "sample.h" +#include "sample.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/SampleConfig_Controller/samplev1.cxx b/examples/cpp/dds/SampleConfig_Controller/samplev1.cxx deleted file mode 100644 index 3b735befaf8..00000000000 --- a/examples/cpp/dds/SampleConfig_Controller/samplev1.cxx +++ /dev/null @@ -1,280 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define sample_max_cdr_typesize 6ULL; - - - - -sample::sample() -{ - // octet m_index - m_index = 0; - // octet m_key_value - m_key_value = 0; - -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample& sample::operator =( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -size_t sample::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return sample_max_cdr_typesize; -} - -size_t sample::getCdrSerializedSize( - const sample& 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); - - - return current_alignment - initial_alignment; -} - - -void sample::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_key_value; - -} - -void sample::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_key_value; - - -} - - -bool sample::isKeyDefined() -{ - return true; -} - -void sample::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - - - scdr << m_key_value; - -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/SampleConfig_Controller/samplev1.h b/examples/cpp/dds/SampleConfig_Controller/samplev1.h deleted file mode 100644 index 97613067c8b..00000000000 --- a/examples/cpp/dds/SampleConfig_Controller/samplev1.h +++ /dev/null @@ -1,236 +0,0 @@ -// 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 sample.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(SAMPLE_SOURCE) -#define SAMPLE_DllAPI __declspec( dllexport ) -#else -#define SAMPLE_DllAPI __declspec( dllimport ) -#endif // SAMPLE_SOURCE -#else -#define SAMPLE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define SAMPLE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure sample defined by the user in the IDL file. - * @ingroup sample - */ -class sample -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport sample(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~sample(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - const sample& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - sample&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - const sample& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator ==( - const sample& x) const; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator !=( - const sample& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint8_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint8_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint8_t& index(); - - - /*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ - eProsima_user_DllExport void key_value( - uint8_t _key_value); - - /*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ - eProsima_user_DllExport uint8_t key_value() const; - - /*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ - eProsima_user_DllExport uint8_t& key_value(); - - - /*! - * @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 sample& 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 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: - - uint8_t m_index; - uint8_t m_key_value; - -}; - - -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/SampleConfig_Events/sample.cxx b/examples/cpp/dds/SampleConfig_Events/sample.cxx deleted file mode 100644 index 360d4a1b2b2..00000000000 --- a/examples/cpp/dds/SampleConfig_Events/sample.cxx +++ /dev/null @@ -1,158 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -sample::sample() -{ -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample& sample::operator =( - const sample& x) -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "sampleCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/SampleConfig_Events/sample.h b/examples/cpp/dds/SampleConfig_Events/sample.h deleted file mode 100644 index c050c8527cc..00000000000 --- a/examples/cpp/dds/SampleConfig_Events/sample.h +++ /dev/null @@ -1,188 +0,0 @@ -// 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 sample.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include -#include "samplev1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(SAMPLE_SOURCE) -#define SAMPLE_DllAPI __declspec( dllexport ) -#else -#define SAMPLE_DllAPI __declspec( dllimport ) -#endif // SAMPLE_SOURCE -#else -#define SAMPLE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define SAMPLE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure sample defined by the user in the IDL file. - * @ingroup sample - */ -class sample -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport sample(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~sample(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - const sample& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - sample&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - const sample& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator ==( - const sample& x) const; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator !=( - const sample& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint8_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint8_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint8_t& index(); - - - /*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ - eProsima_user_DllExport void key_value( - uint8_t _key_value); - - /*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ - eProsima_user_DllExport uint8_t key_value() const; - - /*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ - eProsima_user_DllExport uint8_t& key_value(); - -private: - - uint8_t m_index{0}; - uint8_t m_key_value{0}; - -}; - -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/SampleConfig_Events/sample.hpp b/examples/cpp/dds/SampleConfig_Events/sample.hpp new file mode 100644 index 00000000000..d8a5b01cf2f --- /dev/null +++ b/examples/cpp/dds/SampleConfig_Events/sample.hpp @@ -0,0 +1,228 @@ +// 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 sample.hpp + * This header file contains the declaration of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_SAMPLE_HPP_ +#define _FAST_DDS_GENERATED_SAMPLE_HPP_ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#define eProsima_user_DllExport __declspec( dllexport ) +#else +#define eProsima_user_DllExport +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define eProsima_user_DllExport +#endif // _WIN32 + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#if defined(SAMPLE_SOURCE) +#define SAMPLE_DllAPI __declspec( dllexport ) +#else +#define SAMPLE_DllAPI __declspec( dllimport ) +#endif // SAMPLE_SOURCE +#else +#define SAMPLE_DllAPI +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define SAMPLE_DllAPI +#endif // _WIN32 + + + +/*! + * @brief This class represents the structure sample defined by the user in the IDL file. + * @ingroup sample + */ +class sample +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport sample() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~sample() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object sample that will be copied. + */ + eProsima_user_DllExport sample( + const sample& x) + { + m_index = x.m_index; + + m_key_value = x.m_key_value; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object sample that will be copied. + */ + eProsima_user_DllExport sample( + sample&& x) noexcept + { + m_index = x.m_index; + m_key_value = x.m_key_value; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object sample that will be copied. + */ + eProsima_user_DllExport sample& operator =( + const sample& x) + { + + m_index = x.m_index; + + m_key_value = x.m_key_value; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object sample that will be copied. + */ + eProsima_user_DllExport sample& operator =( + sample&& x) noexcept + { + + m_index = x.m_index; + m_key_value = x.m_key_value; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x sample object to compare. + */ + eProsima_user_DllExport bool operator ==( + const sample& x) const + { + return (m_index == x.m_index && + m_key_value == x.m_key_value); + } + + /*! + * @brief Comparison operator. + * @param x sample object to compare. + */ + eProsima_user_DllExport bool operator !=( + const sample& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member index + * @param _index New value for member index + */ + eProsima_user_DllExport void index( + uint8_t _index) + { + m_index = _index; + } + + /*! + * @brief This function returns the value of member index + * @return Value of member index + */ + eProsima_user_DllExport uint8_t index() const + { + return m_index; + } + + /*! + * @brief This function returns a reference to member index + * @return Reference to member index + */ + eProsima_user_DllExport uint8_t& index() + { + return m_index; + } + + + /*! + * @brief This function sets a value in member key_value + * @param _key_value New value for member key_value + */ + eProsima_user_DllExport void key_value( + uint8_t _key_value) + { + m_key_value = _key_value; + } + + /*! + * @brief This function returns the value of member key_value + * @return Value of member key_value + */ + eProsima_user_DllExport uint8_t key_value() const + { + return m_key_value; + } + + /*! + * @brief This function returns a reference to member key_value + * @return Reference to member key_value + */ + eProsima_user_DllExport uint8_t& key_value() + { + return m_key_value; + } + + + +private: + + uint8_t m_index{0}; + uint8_t m_key_value{0}; + +}; + +#endif // _FAST_DDS_GENERATED_SAMPLE_HPP_ + + diff --git a/examples/cpp/dds/SampleConfig_Events/sampleCdrAux.hpp b/examples/cpp/dds/SampleConfig_Events/sampleCdrAux.hpp index 18ed5857add..12ba74bf0ec 100644 --- a/examples/cpp/dds/SampleConfig_Events/sampleCdrAux.hpp +++ b/examples/cpp/dds/SampleConfig_Events/sampleCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ #define _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ -#include "sample.h" +#include "sample.hpp" constexpr uint32_t sample_max_cdr_typesize {6UL}; constexpr uint32_t sample_max_key_cdr_typesize {1UL}; diff --git a/examples/cpp/dds/SampleConfig_Events/samplePubSubTypes.cxx b/examples/cpp/dds/SampleConfig_Events/samplePubSubTypes.cxx index 9095d77083a..f60945627b4 100644 --- a/examples/cpp/dds/SampleConfig_Events/samplePubSubTypes.cxx +++ b/examples/cpp/dds/SampleConfig_Events/samplePubSubTypes.cxx @@ -219,3 +219,6 @@ bool samplePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "sampleCdrAux.ipp" diff --git a/examples/cpp/dds/SampleConfig_Events/samplePubSubTypes.h b/examples/cpp/dds/SampleConfig_Events/samplePubSubTypes.h index ec881115211..5f858658dec 100644 --- a/examples/cpp/dds/SampleConfig_Events/samplePubSubTypes.h +++ b/examples/cpp/dds/SampleConfig_Events/samplePubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "sample.h" +#include "sample.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/SampleConfig_Events/samplev1.cxx b/examples/cpp/dds/SampleConfig_Events/samplev1.cxx deleted file mode 100644 index 3b735befaf8..00000000000 --- a/examples/cpp/dds/SampleConfig_Events/samplev1.cxx +++ /dev/null @@ -1,280 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define sample_max_cdr_typesize 6ULL; - - - - -sample::sample() -{ - // octet m_index - m_index = 0; - // octet m_key_value - m_key_value = 0; - -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample& sample::operator =( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -size_t sample::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return sample_max_cdr_typesize; -} - -size_t sample::getCdrSerializedSize( - const sample& 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); - - - return current_alignment - initial_alignment; -} - - -void sample::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_key_value; - -} - -void sample::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_key_value; - - -} - - -bool sample::isKeyDefined() -{ - return true; -} - -void sample::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - - - scdr << m_key_value; - -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/SampleConfig_Events/samplev1.h b/examples/cpp/dds/SampleConfig_Events/samplev1.h deleted file mode 100644 index 97613067c8b..00000000000 --- a/examples/cpp/dds/SampleConfig_Events/samplev1.h +++ /dev/null @@ -1,236 +0,0 @@ -// 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 sample.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(SAMPLE_SOURCE) -#define SAMPLE_DllAPI __declspec( dllexport ) -#else -#define SAMPLE_DllAPI __declspec( dllimport ) -#endif // SAMPLE_SOURCE -#else -#define SAMPLE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define SAMPLE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure sample defined by the user in the IDL file. - * @ingroup sample - */ -class sample -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport sample(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~sample(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - const sample& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - sample&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - const sample& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator ==( - const sample& x) const; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator !=( - const sample& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint8_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint8_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint8_t& index(); - - - /*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ - eProsima_user_DllExport void key_value( - uint8_t _key_value); - - /*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ - eProsima_user_DllExport uint8_t key_value() const; - - /*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ - eProsima_user_DllExport uint8_t& key_value(); - - - /*! - * @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 sample& 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 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: - - uint8_t m_index; - uint8_t m_key_value; - -}; - - -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/SampleConfig_Multimedia/sample.cxx b/examples/cpp/dds/SampleConfig_Multimedia/sample.cxx deleted file mode 100644 index 360d4a1b2b2..00000000000 --- a/examples/cpp/dds/SampleConfig_Multimedia/sample.cxx +++ /dev/null @@ -1,158 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -sample::sample() -{ -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - m_key_value = x.m_key_value; -} - -sample& sample::operator =( - const sample& x) -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - - m_index = x.m_index; - m_key_value = x.m_key_value; - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "sampleCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/SampleConfig_Multimedia/sample.h b/examples/cpp/dds/SampleConfig_Multimedia/sample.h deleted file mode 100644 index c050c8527cc..00000000000 --- a/examples/cpp/dds/SampleConfig_Multimedia/sample.h +++ /dev/null @@ -1,188 +0,0 @@ -// 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 sample.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include -#include "samplev1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(SAMPLE_SOURCE) -#define SAMPLE_DllAPI __declspec( dllexport ) -#else -#define SAMPLE_DllAPI __declspec( dllimport ) -#endif // SAMPLE_SOURCE -#else -#define SAMPLE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define SAMPLE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure sample defined by the user in the IDL file. - * @ingroup sample - */ -class sample -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport sample(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~sample(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - const sample& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - sample&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - const sample& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator ==( - const sample& x) const; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator !=( - const sample& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint8_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint8_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint8_t& index(); - - - /*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ - eProsima_user_DllExport void key_value( - uint8_t _key_value); - - /*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ - eProsima_user_DllExport uint8_t key_value() const; - - /*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ - eProsima_user_DllExport uint8_t& key_value(); - -private: - - uint8_t m_index{0}; - uint8_t m_key_value{0}; - -}; - -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/SampleConfig_Multimedia/sample.hpp b/examples/cpp/dds/SampleConfig_Multimedia/sample.hpp new file mode 100644 index 00000000000..d8a5b01cf2f --- /dev/null +++ b/examples/cpp/dds/SampleConfig_Multimedia/sample.hpp @@ -0,0 +1,228 @@ +// 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 sample.hpp + * This header file contains the declaration of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_SAMPLE_HPP_ +#define _FAST_DDS_GENERATED_SAMPLE_HPP_ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#define eProsima_user_DllExport __declspec( dllexport ) +#else +#define eProsima_user_DllExport +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define eProsima_user_DllExport +#endif // _WIN32 + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#if defined(SAMPLE_SOURCE) +#define SAMPLE_DllAPI __declspec( dllexport ) +#else +#define SAMPLE_DllAPI __declspec( dllimport ) +#endif // SAMPLE_SOURCE +#else +#define SAMPLE_DllAPI +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define SAMPLE_DllAPI +#endif // _WIN32 + + + +/*! + * @brief This class represents the structure sample defined by the user in the IDL file. + * @ingroup sample + */ +class sample +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport sample() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~sample() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object sample that will be copied. + */ + eProsima_user_DllExport sample( + const sample& x) + { + m_index = x.m_index; + + m_key_value = x.m_key_value; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object sample that will be copied. + */ + eProsima_user_DllExport sample( + sample&& x) noexcept + { + m_index = x.m_index; + m_key_value = x.m_key_value; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object sample that will be copied. + */ + eProsima_user_DllExport sample& operator =( + const sample& x) + { + + m_index = x.m_index; + + m_key_value = x.m_key_value; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object sample that will be copied. + */ + eProsima_user_DllExport sample& operator =( + sample&& x) noexcept + { + + m_index = x.m_index; + m_key_value = x.m_key_value; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x sample object to compare. + */ + eProsima_user_DllExport bool operator ==( + const sample& x) const + { + return (m_index == x.m_index && + m_key_value == x.m_key_value); + } + + /*! + * @brief Comparison operator. + * @param x sample object to compare. + */ + eProsima_user_DllExport bool operator !=( + const sample& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member index + * @param _index New value for member index + */ + eProsima_user_DllExport void index( + uint8_t _index) + { + m_index = _index; + } + + /*! + * @brief This function returns the value of member index + * @return Value of member index + */ + eProsima_user_DllExport uint8_t index() const + { + return m_index; + } + + /*! + * @brief This function returns a reference to member index + * @return Reference to member index + */ + eProsima_user_DllExport uint8_t& index() + { + return m_index; + } + + + /*! + * @brief This function sets a value in member key_value + * @param _key_value New value for member key_value + */ + eProsima_user_DllExport void key_value( + uint8_t _key_value) + { + m_key_value = _key_value; + } + + /*! + * @brief This function returns the value of member key_value + * @return Value of member key_value + */ + eProsima_user_DllExport uint8_t key_value() const + { + return m_key_value; + } + + /*! + * @brief This function returns a reference to member key_value + * @return Reference to member key_value + */ + eProsima_user_DllExport uint8_t& key_value() + { + return m_key_value; + } + + + +private: + + uint8_t m_index{0}; + uint8_t m_key_value{0}; + +}; + +#endif // _FAST_DDS_GENERATED_SAMPLE_HPP_ + + diff --git a/examples/cpp/dds/SampleConfig_Multimedia/sampleCdrAux.hpp b/examples/cpp/dds/SampleConfig_Multimedia/sampleCdrAux.hpp index 18ed5857add..12ba74bf0ec 100644 --- a/examples/cpp/dds/SampleConfig_Multimedia/sampleCdrAux.hpp +++ b/examples/cpp/dds/SampleConfig_Multimedia/sampleCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ #define _FAST_DDS_GENERATED_SAMPLECDRAUX_HPP_ -#include "sample.h" +#include "sample.hpp" constexpr uint32_t sample_max_cdr_typesize {6UL}; constexpr uint32_t sample_max_key_cdr_typesize {1UL}; diff --git a/examples/cpp/dds/SampleConfig_Multimedia/samplePubSubTypes.cxx b/examples/cpp/dds/SampleConfig_Multimedia/samplePubSubTypes.cxx index 9095d77083a..f60945627b4 100644 --- a/examples/cpp/dds/SampleConfig_Multimedia/samplePubSubTypes.cxx +++ b/examples/cpp/dds/SampleConfig_Multimedia/samplePubSubTypes.cxx @@ -219,3 +219,6 @@ bool samplePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "sampleCdrAux.ipp" diff --git a/examples/cpp/dds/SampleConfig_Multimedia/samplePubSubTypes.h b/examples/cpp/dds/SampleConfig_Multimedia/samplePubSubTypes.h index ec881115211..5f858658dec 100644 --- a/examples/cpp/dds/SampleConfig_Multimedia/samplePubSubTypes.h +++ b/examples/cpp/dds/SampleConfig_Multimedia/samplePubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "sample.h" +#include "sample.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/SampleConfig_Multimedia/samplev1.cxx b/examples/cpp/dds/SampleConfig_Multimedia/samplev1.cxx deleted file mode 100644 index 3b735befaf8..00000000000 --- a/examples/cpp/dds/SampleConfig_Multimedia/samplev1.cxx +++ /dev/null @@ -1,280 +0,0 @@ -// 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 sample.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "sample.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define sample_max_cdr_typesize 6ULL; - - - - -sample::sample() -{ - // octet m_index - m_index = 0; - // octet m_key_value - m_key_value = 0; - -} - -sample::~sample() -{ -} - -sample::sample( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample::sample( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - -} - -sample& sample::operator =( - const sample& x) -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -sample& sample::operator =( - sample&& x) noexcept -{ - m_index = x.m_index; - - - m_key_value = x.m_key_value; - - return *this; -} - -bool sample::operator ==( - const sample& x) const -{ - return (m_index == x.m_index && - m_key_value == x.m_key_value); -} - -bool sample::operator !=( - const sample& x) const -{ - return !(*this == x); -} - -size_t sample::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return sample_max_cdr_typesize; -} - -size_t sample::getCdrSerializedSize( - const sample& 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); - - - return current_alignment - initial_alignment; -} - - -void sample::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_key_value; - -} - -void sample::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_key_value; - - -} - - -bool sample::isKeyDefined() -{ - return true; -} - -void sample::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - - - scdr << m_key_value; - -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void sample::index( - uint8_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint8_t sample::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint8_t& sample::index() -{ - return m_index; -} - - -/*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ -void sample::key_value( - uint8_t _key_value) -{ - m_key_value = _key_value; -} - -/*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ -uint8_t sample::key_value() const -{ - return m_key_value; -} - -/*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ -uint8_t& sample::key_value() -{ - return m_key_value; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/SampleConfig_Multimedia/samplev1.h b/examples/cpp/dds/SampleConfig_Multimedia/samplev1.h deleted file mode 100644 index 97613067c8b..00000000000 --- a/examples/cpp/dds/SampleConfig_Multimedia/samplev1.h +++ /dev/null @@ -1,236 +0,0 @@ -// 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 sample.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_SAMPLE_H_ -#define _FAST_DDS_GENERATED_SAMPLE_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(SAMPLE_SOURCE) -#define SAMPLE_DllAPI __declspec( dllexport ) -#else -#define SAMPLE_DllAPI __declspec( dllimport ) -#endif // SAMPLE_SOURCE -#else -#define SAMPLE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define SAMPLE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure sample defined by the user in the IDL file. - * @ingroup sample - */ -class sample -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport sample(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~sample(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - const sample& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample( - sample&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - const sample& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object sample that will be copied. - */ - eProsima_user_DllExport sample& operator =( - sample&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator ==( - const sample& x) const; - - /*! - * @brief Comparison operator. - * @param x sample object to compare. - */ - eProsima_user_DllExport bool operator !=( - const sample& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint8_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint8_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint8_t& index(); - - - /*! - * @brief This function sets a value in member key_value - * @param _key_value New value for member key_value - */ - eProsima_user_DllExport void key_value( - uint8_t _key_value); - - /*! - * @brief This function returns the value of member key_value - * @return Value of member key_value - */ - eProsima_user_DllExport uint8_t key_value() const; - - /*! - * @brief This function returns a reference to member key_value - * @return Reference to member key_value - */ - eProsima_user_DllExport uint8_t& key_value(); - - - /*! - * @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 sample& 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 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: - - uint8_t m_index; - uint8_t m_key_value; - -}; - - -#endif // _FAST_DDS_GENERATED_SAMPLE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/SecureHelloWorldExample/HelloWorld.cxx b/examples/cpp/dds/SecureHelloWorldExample/HelloWorld.cxx deleted file mode 100644 index 4b415d67769..00000000000 --- a/examples/cpp/dds/SecureHelloWorldExample/HelloWorld.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -HelloWorld::HelloWorld() -{ -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "HelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/SecureHelloWorldExample/HelloWorld.h b/examples/cpp/dds/SecureHelloWorldExample/HelloWorld.h deleted file mode 100644 index 5cd0ddba511..00000000000 --- a/examples/cpp/dds/SecureHelloWorldExample/HelloWorld.h +++ /dev/null @@ -1,195 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include -#include "HelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - -private: - - uint32_t m_index{0}; - std::string m_message; - -}; - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorld.h b/examples/cpp/dds/SecureHelloWorldExample/HelloWorld.hpp similarity index 69% rename from examples/cpp/dds/DiscoveryServerExample/types/HelloWorld.h rename to examples/cpp/dds/SecureHelloWorldExample/HelloWorld.hpp index 5cd0ddba511..b6f1afb22bf 100644 --- a/examples/cpp/dds/DiscoveryServerExample/types/HelloWorld.h +++ b/examples/cpp/dds/SecureHelloWorldExample/HelloWorld.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file HelloWorld.h + * @file HelloWorld.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "HelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLD_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define HELLOWORLD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class HelloWorld /*! * @brief Default constructor. */ - eProsima_user_DllExport HelloWorld(); + eProsima_user_DllExport HelloWorld() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~HelloWorld(); + eProsima_user_DllExport ~HelloWorld() + { + } /*! * @brief Copy constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - const HelloWorld& x); + const HelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); + const HelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class HelloWorld * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::string& _message); + const std::string& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::string&& _message); + std::string&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::string& message() const; + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::string& message(); + eProsima_user_DllExport std::string& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class HelloWorld }; -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - +#endif // _FAST_DDS_GENERATED_HELLOWORLD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldCdrAux.hpp b/examples/cpp/dds/SecureHelloWorldExample/HelloWorldCdrAux.hpp index 9f346d306be..ca17b2a5507 100644 --- a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldCdrAux.hpp +++ b/examples/cpp/dds/SecureHelloWorldExample/HelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ -#include "HelloWorld.h" +#include "HelloWorld.hpp" constexpr uint32_t HelloWorld_max_cdr_typesize {268UL}; constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldPubSubTypes.cxx b/examples/cpp/dds/SecureHelloWorldExample/HelloWorldPubSubTypes.cxx index 85cb477896e..9eaca1f74a9 100644 --- a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldPubSubTypes.cxx +++ b/examples/cpp/dds/SecureHelloWorldExample/HelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool HelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" diff --git a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldPubSubTypes.h b/examples/cpp/dds/SecureHelloWorldExample/HelloWorldPubSubTypes.h index cb61cd6ba23..8a3697d4308 100644 --- a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldPubSubTypes.h +++ b/examples/cpp/dds/SecureHelloWorldExample/HelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldPublisher.h b/examples/cpp/dds/SecureHelloWorldExample/HelloWorldPublisher.h index ca01551f3c3..220e10338ce 100644 --- a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldPublisher.h +++ b/examples/cpp/dds/SecureHelloWorldExample/HelloWorldPublisher.h @@ -29,7 +29,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" class HelloWorldPublisher { diff --git a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldSubscriber.h b/examples/cpp/dds/SecureHelloWorldExample/HelloWorldSubscriber.h index 1c5c45faa0d..0d5cb38bfae 100644 --- a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldSubscriber.h +++ b/examples/cpp/dds/SecureHelloWorldExample/HelloWorldSubscriber.h @@ -28,7 +28,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" class HelloWorldSubscriber { diff --git a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldv1.cxx b/examples/cpp/dds/SecureHelloWorldExample/HelloWorldv1.cxx deleted file mode 100644 index 90e82ea88a7..00000000000 --- a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldv1.cxx +++ /dev/null @@ -1,286 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define HelloWorld_max_cdr_typesize 268ULL; - - - - -HelloWorld::HelloWorld() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -size_t HelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return HelloWorld_max_cdr_typesize; -} - -size_t HelloWorld::getCdrSerializedSize( - const HelloWorld& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void HelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void HelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool HelloWorld::isKeyDefined() -{ - return false; -} - -void HelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldv1.h b/examples/cpp/dds/SecureHelloWorldExample/HelloWorldv1.h deleted file mode 100644 index 7758cd793fd..00000000000 --- a/examples/cpp/dds/SecureHelloWorldExample/HelloWorldv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @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 HelloWorld& 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 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: - - uint32_t m_index; - std::string m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/StaticHelloWorldExample/HelloWorld.cxx b/examples/cpp/dds/StaticHelloWorldExample/HelloWorld.cxx deleted file mode 100644 index 4b415d67769..00000000000 --- a/examples/cpp/dds/StaticHelloWorldExample/HelloWorld.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -HelloWorld::HelloWorld() -{ -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "HelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/StaticHelloWorldExample/HelloWorld.h b/examples/cpp/dds/StaticHelloWorldExample/HelloWorld.h deleted file mode 100644 index 5cd0ddba511..00000000000 --- a/examples/cpp/dds/StaticHelloWorldExample/HelloWorld.h +++ /dev/null @@ -1,195 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include -#include "HelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - -private: - - uint32_t m_index{0}; - std::string m_message; - -}; - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/StaticHelloWorldExample/HelloWorld.hpp b/examples/cpp/dds/StaticHelloWorldExample/HelloWorld.hpp new file mode 100644 index 00000000000..b6f1afb22bf --- /dev/null +++ b/examples/cpp/dds/StaticHelloWorldExample/HelloWorld.hpp @@ -0,0 +1,238 @@ +// 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 HelloWorld.hpp + * This header file contains the declaration of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLD_HPP_ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#define eProsima_user_DllExport __declspec( dllexport ) +#else +#define eProsima_user_DllExport +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define eProsima_user_DllExport +#endif // _WIN32 + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#if defined(HELLOWORLD_SOURCE) +#define HELLOWORLD_DllAPI __declspec( dllexport ) +#else +#define HELLOWORLD_DllAPI __declspec( dllimport ) +#endif // HELLOWORLD_SOURCE +#else +#define HELLOWORLD_DllAPI +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define HELLOWORLD_DllAPI +#endif // _WIN32 + + + +/*! + * @brief This class represents the structure HelloWorld defined by the user in the IDL file. + * @ingroup HelloWorld + */ +class HelloWorld +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport HelloWorld() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~HelloWorld() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld( + const HelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld( + HelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld& operator =( + const HelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld& operator =( + HelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x HelloWorld object to compare. + */ + eProsima_user_DllExport bool operator ==( + const HelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } + + /*! + * @brief Comparison operator. + * @param x HelloWorld object to compare. + */ + eProsima_user_DllExport bool operator !=( + const HelloWorld& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member index + * @param _index New value for member index + */ + eProsima_user_DllExport void index( + uint32_t _index) + { + m_index = _index; + } + + /*! + * @brief This function returns the value of member index + * @return Value of member index + */ + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } + + /*! + * @brief This function returns a reference to member index + * @return Reference to member index + */ + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } + + + /*! + * @brief This function copies the value in member message + * @param _message New value to be copied in member message + */ + eProsima_user_DllExport void message( + const std::string& _message) + { + m_message = _message; + } + + /*! + * @brief This function moves the value in member message + * @param _message New value to be moved in member message + */ + eProsima_user_DllExport void message( + std::string&& _message) + { + m_message = std::move(_message); + } + + /*! + * @brief This function returns a constant reference to member message + * @return Constant reference to member message + */ + eProsima_user_DllExport const std::string& message() const + { + return m_message; + } + + /*! + * @brief This function returns a reference to member message + * @return Reference to member message + */ + eProsima_user_DllExport std::string& message() + { + return m_message; + } + + + +private: + + uint32_t m_index{0}; + std::string m_message; + +}; + +#endif // _FAST_DDS_GENERATED_HELLOWORLD_HPP_ + + diff --git a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldCdrAux.hpp b/examples/cpp/dds/StaticHelloWorldExample/HelloWorldCdrAux.hpp index 9f346d306be..ca17b2a5507 100644 --- a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldCdrAux.hpp +++ b/examples/cpp/dds/StaticHelloWorldExample/HelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ -#include "HelloWorld.h" +#include "HelloWorld.hpp" constexpr uint32_t HelloWorld_max_cdr_typesize {268UL}; constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldPubSubTypes.cxx b/examples/cpp/dds/StaticHelloWorldExample/HelloWorldPubSubTypes.cxx index 85cb477896e..9eaca1f74a9 100644 --- a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldPubSubTypes.cxx +++ b/examples/cpp/dds/StaticHelloWorldExample/HelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool HelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" diff --git a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldPubSubTypes.h b/examples/cpp/dds/StaticHelloWorldExample/HelloWorldPubSubTypes.h index cb61cd6ba23..8a3697d4308 100644 --- a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldPubSubTypes.h +++ b/examples/cpp/dds/StaticHelloWorldExample/HelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldPublisher.h b/examples/cpp/dds/StaticHelloWorldExample/HelloWorldPublisher.h index 6f37d220749..ec1b5312bcc 100644 --- a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldPublisher.h +++ b/examples/cpp/dds/StaticHelloWorldExample/HelloWorldPublisher.h @@ -26,8 +26,7 @@ #include #include - -#include "HelloWorld.h" +#include "HelloWorld.hpp" class HelloWorldPublisher { diff --git a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldSubscriber.h b/examples/cpp/dds/StaticHelloWorldExample/HelloWorldSubscriber.h index 6d45aadc167..5395d10e642 100644 --- a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldSubscriber.h +++ b/examples/cpp/dds/StaticHelloWorldExample/HelloWorldSubscriber.h @@ -27,7 +27,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" class HelloWorldSubscriber { diff --git a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldv1.cxx b/examples/cpp/dds/StaticHelloWorldExample/HelloWorldv1.cxx deleted file mode 100644 index 90e82ea88a7..00000000000 --- a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldv1.cxx +++ /dev/null @@ -1,286 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define HelloWorld_max_cdr_typesize 268ULL; - - - - -HelloWorld::HelloWorld() -{ - // unsigned long m_index - m_index = 0; - // /type_d() m_message - - -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -size_t HelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return HelloWorld_max_cdr_typesize; -} - -size_t HelloWorld::getCdrSerializedSize( - const HelloWorld& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void HelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void HelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool HelloWorld::isKeyDefined() -{ - return false; -} - -void HelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const std::string& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - std::string&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::string& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::string& HelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldv1.h b/examples/cpp/dds/StaticHelloWorldExample/HelloWorldv1.h deleted file mode 100644 index 7758cd793fd..00000000000 --- a/examples/cpp/dds/StaticHelloWorldExample/HelloWorldv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::string& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::string&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::string& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::string& message(); - - - /*! - * @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 HelloWorld& 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 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: - - uint32_t m_index; - std::string m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorld.cxx b/examples/cpp/dds/WriterLoansExample/LoanableHelloWorld.cxx deleted file mode 100644 index 54ca2b05ab0..00000000000 --- a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorld.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 LoanableHelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "LoanableHelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -LoanableHelloWorld::LoanableHelloWorld() -{ -} - -LoanableHelloWorld::~LoanableHelloWorld() -{ -} - -LoanableHelloWorld::LoanableHelloWorld( - const LoanableHelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -LoanableHelloWorld::LoanableHelloWorld( - LoanableHelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -LoanableHelloWorld& LoanableHelloWorld::operator =( - const LoanableHelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -LoanableHelloWorld& LoanableHelloWorld::operator =( - LoanableHelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool LoanableHelloWorld::operator ==( - const LoanableHelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool LoanableHelloWorld::operator !=( - const LoanableHelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void LoanableHelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t LoanableHelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& LoanableHelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void LoanableHelloWorld::message( - const std::array& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void LoanableHelloWorld::message( - std::array&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::array& LoanableHelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::array& LoanableHelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "LoanableHelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorld.h b/examples/cpp/dds/WriterLoansExample/LoanableHelloWorld.hpp similarity index 70% rename from examples/cpp/dds/ZeroCopyExample/LoanableHelloWorld.h rename to examples/cpp/dds/WriterLoansExample/LoanableHelloWorld.hpp index 80d8feaca9b..6e65b82eacc 100644 --- a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorld.h +++ b/examples/cpp/dds/WriterLoansExample/LoanableHelloWorld.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file LoanableHelloWorld.h + * @file LoanableHelloWorld.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "LoanableHelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_H_ -#define _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_H_ +#ifndef _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define LOANABLEHELLOWORLD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class LoanableHelloWorld /*! * @brief Default constructor. */ - eProsima_user_DllExport LoanableHelloWorld(); + eProsima_user_DllExport LoanableHelloWorld() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~LoanableHelloWorld(); + eProsima_user_DllExport ~LoanableHelloWorld() + { + } /*! * @brief Copy constructor. * @param x Reference to the object LoanableHelloWorld that will be copied. */ eProsima_user_DllExport LoanableHelloWorld( - const LoanableHelloWorld& x); + const LoanableHelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object LoanableHelloWorld that will be copied. */ eProsima_user_DllExport LoanableHelloWorld( - LoanableHelloWorld&& x) noexcept; + LoanableHelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object LoanableHelloWorld that will be copied. */ eProsima_user_DllExport LoanableHelloWorld& operator =( - const LoanableHelloWorld& x); + const LoanableHelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object LoanableHelloWorld that will be copied. */ eProsima_user_DllExport LoanableHelloWorld& operator =( - LoanableHelloWorld&& x) noexcept; + LoanableHelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x LoanableHelloWorld object to compare. */ eProsima_user_DllExport bool operator ==( - const LoanableHelloWorld& x) const; + const LoanableHelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x LoanableHelloWorld object to compare. */ eProsima_user_DllExport bool operator !=( - const LoanableHelloWorld& x) const; + const LoanableHelloWorld& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class LoanableHelloWorld * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::array& _message); + const std::array& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::array&& _message); + std::array&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::array& message() const; + eProsima_user_DllExport const std::array& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::array& message(); + eProsima_user_DllExport std::array& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class LoanableHelloWorld }; -#endif // _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_H_ - +#endif // _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldCdrAux.hpp b/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldCdrAux.hpp index c29aaedaaff..769e4b4da2d 100644 --- a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldCdrAux.hpp +++ b/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_LOANABLEHELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_LOANABLEHELLOWORLDCDRAUX_HPP_ -#include "LoanableHelloWorld.h" +#include "LoanableHelloWorld.hpp" constexpr uint32_t LoanableHelloWorld_max_cdr_typesize {260UL}; constexpr uint32_t LoanableHelloWorld_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldPubSubTypes.cxx b/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldPubSubTypes.cxx index 668ff484ea0..34920530952 100644 --- a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldPubSubTypes.cxx +++ b/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool LoanableHelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "LoanableHelloWorldCdrAux.ipp" diff --git a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldPubSubTypes.h b/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldPubSubTypes.h index 06ba8663ef8..4c4ef0c244f 100644 --- a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldPubSubTypes.h +++ b/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "LoanableHelloWorld.h" +#include "LoanableHelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldv1.cxx b/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldv1.cxx deleted file mode 100644 index 63da3dfddbc..00000000000 --- a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldv1.cxx +++ /dev/null @@ -1,288 +0,0 @@ -// 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 LoanableHelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "LoanableHelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define LoanableHelloWorld_max_cdr_typesize 260ULL; - - - - -LoanableHelloWorld::LoanableHelloWorld() -{ - // unsigned long m_index - m_index = 0; - // char m_message - memset(&m_message, 0, ((256)) * 1); - -} - -LoanableHelloWorld::~LoanableHelloWorld() -{ -} - -LoanableHelloWorld::LoanableHelloWorld( - const LoanableHelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -LoanableHelloWorld::LoanableHelloWorld( - LoanableHelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -LoanableHelloWorld& LoanableHelloWorld::operator =( - const LoanableHelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -LoanableHelloWorld& LoanableHelloWorld::operator =( - LoanableHelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool LoanableHelloWorld::operator ==( - const LoanableHelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool LoanableHelloWorld::operator !=( - const LoanableHelloWorld& x) const -{ - return !(*this == x); -} - -size_t LoanableHelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return LoanableHelloWorld_max_cdr_typesize; -} - -size_t LoanableHelloWorld::getCdrSerializedSize( - const LoanableHelloWorld& 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 += (((256)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void LoanableHelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message; - - -} - -void LoanableHelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool LoanableHelloWorld::isKeyDefined() -{ - return false; -} - -void LoanableHelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void LoanableHelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t LoanableHelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& LoanableHelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void LoanableHelloWorld::message( - const std::array& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void LoanableHelloWorld::message( - std::array&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::array& LoanableHelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::array& LoanableHelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldv1.h b/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldv1.h deleted file mode 100644 index 2c3cedf747b..00000000000 --- a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorldv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 LoanableHelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_H_ -#define _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(LOANABLEHELLOWORLD_SOURCE) -#define LOANABLEHELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define LOANABLEHELLOWORLD_DllAPI __declspec( dllimport ) -#endif // LOANABLEHELLOWORLD_SOURCE -#else -#define LOANABLEHELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define LOANABLEHELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure LoanableHelloWorld defined by the user in the IDL file. - * @ingroup LoanableHelloWorld - */ -class LoanableHelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport LoanableHelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~LoanableHelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object LoanableHelloWorld that will be copied. - */ - eProsima_user_DllExport LoanableHelloWorld( - const LoanableHelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object LoanableHelloWorld that will be copied. - */ - eProsima_user_DllExport LoanableHelloWorld( - LoanableHelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object LoanableHelloWorld that will be copied. - */ - eProsima_user_DllExport LoanableHelloWorld& operator =( - const LoanableHelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object LoanableHelloWorld that will be copied. - */ - eProsima_user_DllExport LoanableHelloWorld& operator =( - LoanableHelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x LoanableHelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const LoanableHelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x LoanableHelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const LoanableHelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::array& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::array&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::array& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::array& message(); - - - /*! - * @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 LoanableHelloWorld& 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 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: - - uint32_t m_index; - std::array m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorld.cxx b/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorld.cxx deleted file mode 100644 index 54ca2b05ab0..00000000000 --- a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorld.cxx +++ /dev/null @@ -1,168 +0,0 @@ -// 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 LoanableHelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "LoanableHelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -LoanableHelloWorld::LoanableHelloWorld() -{ -} - -LoanableHelloWorld::~LoanableHelloWorld() -{ -} - -LoanableHelloWorld::LoanableHelloWorld( - const LoanableHelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -LoanableHelloWorld::LoanableHelloWorld( - LoanableHelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -LoanableHelloWorld& LoanableHelloWorld::operator =( - const LoanableHelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -LoanableHelloWorld& LoanableHelloWorld::operator =( - LoanableHelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool LoanableHelloWorld::operator ==( - const LoanableHelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool LoanableHelloWorld::operator !=( - const LoanableHelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void LoanableHelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t LoanableHelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& LoanableHelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void LoanableHelloWorld::message( - const std::array& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void LoanableHelloWorld::message( - std::array&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::array& LoanableHelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::array& LoanableHelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "LoanableHelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorld.h b/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorld.hpp similarity index 70% rename from examples/cpp/dds/WriterLoansExample/LoanableHelloWorld.h rename to examples/cpp/dds/ZeroCopyExample/LoanableHelloWorld.hpp index 80d8feaca9b..6e65b82eacc 100644 --- a/examples/cpp/dds/WriterLoansExample/LoanableHelloWorld.h +++ b/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorld.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file LoanableHelloWorld.h + * @file LoanableHelloWorld.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "LoanableHelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_H_ -#define _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_H_ +#ifndef _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define LOANABLEHELLOWORLD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,117 @@ class LoanableHelloWorld /*! * @brief Default constructor. */ - eProsima_user_DllExport LoanableHelloWorld(); + eProsima_user_DllExport LoanableHelloWorld() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~LoanableHelloWorld(); + eProsima_user_DllExport ~LoanableHelloWorld() + { + } /*! * @brief Copy constructor. * @param x Reference to the object LoanableHelloWorld that will be copied. */ eProsima_user_DllExport LoanableHelloWorld( - const LoanableHelloWorld& x); + const LoanableHelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object LoanableHelloWorld that will be copied. */ eProsima_user_DllExport LoanableHelloWorld( - LoanableHelloWorld&& x) noexcept; + LoanableHelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object LoanableHelloWorld that will be copied. */ eProsima_user_DllExport LoanableHelloWorld& operator =( - const LoanableHelloWorld& x); + const LoanableHelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object LoanableHelloWorld that will be copied. */ eProsima_user_DllExport LoanableHelloWorld& operator =( - LoanableHelloWorld&& x) noexcept; + LoanableHelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x LoanableHelloWorld object to compare. */ eProsima_user_DllExport bool operator ==( - const LoanableHelloWorld& x) const; + const LoanableHelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x LoanableHelloWorld object to compare. */ eProsima_user_DllExport bool operator !=( - const LoanableHelloWorld& x) const; + const LoanableHelloWorld& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } /*! @@ -160,26 +191,40 @@ class LoanableHelloWorld * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const std::array& _message); + const std::array& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - std::array&& _message); + std::array&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const std::array& message() const; + eProsima_user_DllExport const std::array& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport std::array& message(); + eProsima_user_DllExport std::array& message() + { + return m_message; + } + + private: @@ -188,8 +233,6 @@ class LoanableHelloWorld }; -#endif // _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_H_ - +#endif // _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldCdrAux.hpp b/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldCdrAux.hpp index c29aaedaaff..769e4b4da2d 100644 --- a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldCdrAux.hpp +++ b/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_LOANABLEHELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_LOANABLEHELLOWORLDCDRAUX_HPP_ -#include "LoanableHelloWorld.h" +#include "LoanableHelloWorld.hpp" constexpr uint32_t LoanableHelloWorld_max_cdr_typesize {260UL}; constexpr uint32_t LoanableHelloWorld_max_key_cdr_typesize {0UL}; diff --git a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldPubSubTypes.cxx b/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldPubSubTypes.cxx index 668ff484ea0..34920530952 100644 --- a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldPubSubTypes.cxx +++ b/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool LoanableHelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "LoanableHelloWorldCdrAux.ipp" diff --git a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldPubSubTypes.h b/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldPubSubTypes.h index 06ba8663ef8..4c4ef0c244f 100644 --- a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldPubSubTypes.h +++ b/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "LoanableHelloWorld.h" +#include "LoanableHelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldv1.cxx b/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldv1.cxx deleted file mode 100644 index 63da3dfddbc..00000000000 --- a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldv1.cxx +++ /dev/null @@ -1,288 +0,0 @@ -// 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 LoanableHelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "LoanableHelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define LoanableHelloWorld_max_cdr_typesize 260ULL; - - - - -LoanableHelloWorld::LoanableHelloWorld() -{ - // unsigned long m_index - m_index = 0; - // char m_message - memset(&m_message, 0, ((256)) * 1); - -} - -LoanableHelloWorld::~LoanableHelloWorld() -{ -} - -LoanableHelloWorld::LoanableHelloWorld( - const LoanableHelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -LoanableHelloWorld::LoanableHelloWorld( - LoanableHelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -LoanableHelloWorld& LoanableHelloWorld::operator =( - const LoanableHelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -LoanableHelloWorld& LoanableHelloWorld::operator =( - LoanableHelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool LoanableHelloWorld::operator ==( - const LoanableHelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool LoanableHelloWorld::operator !=( - const LoanableHelloWorld& x) const -{ - return !(*this == x); -} - -size_t LoanableHelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return LoanableHelloWorld_max_cdr_typesize; -} - -size_t LoanableHelloWorld::getCdrSerializedSize( - const LoanableHelloWorld& 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 += (((256)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void LoanableHelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message; - - -} - -void LoanableHelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - dcdr >> m_message; - - -} - - -bool LoanableHelloWorld::isKeyDefined() -{ - return false; -} - -void LoanableHelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void LoanableHelloWorld::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t LoanableHelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& LoanableHelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void LoanableHelloWorld::message( - const std::array& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void LoanableHelloWorld::message( - std::array&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const std::array& LoanableHelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -std::array& LoanableHelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldv1.h b/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldv1.h deleted file mode 100644 index 2c3cedf747b..00000000000 --- a/examples/cpp/dds/ZeroCopyExample/LoanableHelloWorldv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 LoanableHelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_H_ -#define _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(LOANABLEHELLOWORLD_SOURCE) -#define LOANABLEHELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define LOANABLEHELLOWORLD_DllAPI __declspec( dllimport ) -#endif // LOANABLEHELLOWORLD_SOURCE -#else -#define LOANABLEHELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define LOANABLEHELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure LoanableHelloWorld defined by the user in the IDL file. - * @ingroup LoanableHelloWorld - */ -class LoanableHelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport LoanableHelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~LoanableHelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object LoanableHelloWorld that will be copied. - */ - eProsima_user_DllExport LoanableHelloWorld( - const LoanableHelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object LoanableHelloWorld that will be copied. - */ - eProsima_user_DllExport LoanableHelloWorld( - LoanableHelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object LoanableHelloWorld that will be copied. - */ - eProsima_user_DllExport LoanableHelloWorld& operator =( - const LoanableHelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object LoanableHelloWorld that will be copied. - */ - eProsima_user_DllExport LoanableHelloWorld& operator =( - LoanableHelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x LoanableHelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const LoanableHelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x LoanableHelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const LoanableHelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const std::array& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - std::array&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const std::array& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport std::array& message(); - - - /*! - * @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 LoanableHelloWorld& 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 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: - - uint32_t m_index; - std::array m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_LOANABLEHELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/include/fastdds/dds/core/condition/GuardCondition.hpp b/include/fastdds/dds/core/condition/GuardCondition.hpp index 1912fb8c92f..7a4b4b786cc 100644 --- a/include/fastdds/dds/core/condition/GuardCondition.hpp +++ b/include/fastdds/dds/core/condition/GuardCondition.hpp @@ -26,8 +26,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastdds { namespace dds { diff --git a/include/fastdds/dds/core/condition/StatusCondition.hpp b/include/fastdds/dds/core/condition/StatusCondition.hpp index 49fd0adc920..ed4dc3f97ff 100644 --- a/include/fastdds/dds/core/condition/StatusCondition.hpp +++ b/include/fastdds/dds/core/condition/StatusCondition.hpp @@ -21,11 +21,9 @@ #define _FASTDDS_STATUS_CONDITION_HPP_ #include +#include #include #include -#include - -using eprosima::fastrtps::types::ReturnCode_t; namespace eprosima { namespace fastdds { diff --git a/include/fastdds/dds/core/condition/WaitSet.hpp b/include/fastdds/dds/core/condition/WaitSet.hpp index 2066aaede7f..00c9d72e0cc 100644 --- a/include/fastdds/dds/core/condition/WaitSet.hpp +++ b/include/fastdds/dds/core/condition/WaitSet.hpp @@ -23,11 +23,9 @@ #include #include +#include #include #include -#include - -using eprosima::fastrtps::types::ReturnCode_t; namespace eprosima { namespace fastdds { diff --git a/include/fastdds/dds/domain/DomainParticipant.hpp b/include/fastdds/dds/domain/DomainParticipant.hpp index 7ac5f4b8998..09acc5890f9 100644 --- a/include/fastdds/dds/domain/DomainParticipant.hpp +++ b/include/fastdds/dds/domain/DomainParticipant.hpp @@ -42,8 +42,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace dds { namespace domain { class DomainParticipant; diff --git a/include/fastdds/dds/domain/DomainParticipantFactory.hpp b/include/fastdds/dds/domain/DomainParticipantFactory.hpp index 475b36a8a54..9d240c3c41f 100644 --- a/include/fastdds/dds/domain/DomainParticipantFactory.hpp +++ b/include/fastdds/dds/domain/DomainParticipantFactory.hpp @@ -30,8 +30,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastrtps { diff --git a/include/fastdds/dds/publisher/DataWriter.hpp b/include/fastdds/dds/publisher/DataWriter.hpp index 239e9ee5851..ca5ad23deba 100644 --- a/include/fastdds/dds/publisher/DataWriter.hpp +++ b/include/fastdds/dds/publisher/DataWriter.hpp @@ -35,8 +35,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastrtps { namespace rtps { diff --git a/include/fastdds/dds/publisher/Publisher.hpp b/include/fastdds/dds/publisher/Publisher.hpp index 5006e144d9b..5fa2237c923 100644 --- a/include/fastdds/dds/publisher/Publisher.hpp +++ b/include/fastdds/dds/publisher/Publisher.hpp @@ -29,8 +29,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace dds { namespace pub { class Publisher; diff --git a/include/fastdds/dds/subscriber/DataReader.hpp b/include/fastdds/dds/subscriber/DataReader.hpp index ad7eaee01ae..81b714dc53a 100644 --- a/include/fastdds/dds/subscriber/DataReader.hpp +++ b/include/fastdds/dds/subscriber/DataReader.hpp @@ -44,8 +44,6 @@ #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace dds { namespace sub { diff --git a/include/fastdds/dds/subscriber/Subscriber.hpp b/include/fastdds/dds/subscriber/Subscriber.hpp index 5cb5e21e55e..490126a9450 100644 --- a/include/fastdds/dds/subscriber/Subscriber.hpp +++ b/include/fastdds/dds/subscriber/Subscriber.hpp @@ -30,8 +30,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace dds { namespace sub { diff --git a/include/fastdds/dds/topic/ContentFilteredTopic.hpp b/include/fastdds/dds/topic/ContentFilteredTopic.hpp index 0935c408a48..bd750f8ed92 100644 --- a/include/fastdds/dds/topic/ContentFilteredTopic.hpp +++ b/include/fastdds/dds/topic/ContentFilteredTopic.hpp @@ -25,8 +25,6 @@ #define FASTDDS_SQLFILTER_NAME eprosima::fastdds::dds::sqlfilter_name -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastdds { namespace dds { diff --git a/include/fastdds/dds/topic/IContentFilterFactory.hpp b/include/fastdds/dds/topic/IContentFilterFactory.hpp index 598767b1b81..a0b842aab68 100644 --- a/include/fastdds/dds/topic/IContentFilterFactory.hpp +++ b/include/fastdds/dds/topic/IContentFilterFactory.hpp @@ -36,7 +36,6 @@ namespace dds { */ struct IContentFilterFactory { - using ReturnCode_t = eprosima::fastrtps::types::ReturnCode_t; using ParameterSeq = LoanableTypedCollection; using TypeDescriptor = eprosima::fastrtps::types::TypeDescriptor; diff --git a/include/fastdds/dds/topic/Topic.hpp b/include/fastdds/dds/topic/Topic.hpp index e44afb4e605..cc10cfd08db 100644 --- a/include/fastdds/dds/topic/Topic.hpp +++ b/include/fastdds/dds/topic/Topic.hpp @@ -25,8 +25,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace dds { namespace topic { diff --git a/include/fastdds/dds/topic/TypeSupport.hpp b/include/fastdds/dds/topic/TypeSupport.hpp index 549dcd03e79..c262da519b4 100644 --- a/include/fastdds/dds/topic/TypeSupport.hpp +++ b/include/fastdds/dds/topic/TypeSupport.hpp @@ -46,8 +46,6 @@ class TypeSupport : public std::shared_ptr { public: - using ReturnCode_t = eprosima::fastrtps::types::ReturnCode_t; - using Base = std::shared_ptr; /** diff --git a/include/fastdds/statistics/dds/domain/DomainParticipant.hpp b/include/fastdds/statistics/dds/domain/DomainParticipant.hpp index e74aebb8492..90f9b8c04db 100644 --- a/include/fastdds/statistics/dds/domain/DomainParticipant.hpp +++ b/include/fastdds/statistics/dds/domain/DomainParticipant.hpp @@ -27,8 +27,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastdds { namespace statistics { @@ -56,7 +54,7 @@ class DomainParticipant : public eprosima::fastdds::dds::DomainParticipant * RETCODE_OK if the DataWriter has been created or if it has been created previously, * and RETCODE_ERROR otherwise */ - RTPS_DllAPI ReturnCode_t enable_statistics_datawriter( + RTPS_DllAPI eprosima::fastdds::dds::ReturnCode_t enable_statistics_datawriter( const std::string& topic_name, const eprosima::fastdds::dds::DataWriterQos& dwqos); @@ -71,7 +69,7 @@ class DomainParticipant : public eprosima::fastdds::dds::DomainParticipant * RETCODE_OK if the DataWriter has been created or if it has been created previously, * and RETCODE_ERROR otherwise */ - RTPS_DllAPI ReturnCode_t enable_statistics_datawriter_with_profile( + RTPS_DllAPI eprosima::fastdds::dds::ReturnCode_t enable_statistics_datawriter_with_profile( const std::string& profile_name, const std::string& topic_name); @@ -83,7 +81,7 @@ class DomainParticipant : public eprosima::fastdds::dds::DomainParticipant * RETCODE_OK if the DataWriter has been correctly deleted or does not exist, * and RETCODE_ERROR otherwise */ - RTPS_DllAPI ReturnCode_t disable_statistics_datawriter( + RTPS_DllAPI eprosima::fastdds::dds::ReturnCode_t disable_statistics_datawriter( const std::string& topic_name); /** diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt index b3da097019a..e826071e7fe 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt @@ -262,8 +262,6 @@ if (FASTDDS_STATISTICS) statistics/rtps/reader/StatisticsReaderImpl.cpp statistics/rtps/writer/StatisticsWriterImpl.cpp statistics/types/typesPubSubTypes.cxx - statistics/types/types.cxx - statistics/types/typesv1.cxx ) list(APPEND ${PROJECT_NAME}_source_files diff --git a/src/cpp/dds/domain/DomainParticipant.cpp b/src/cpp/dds/domain/DomainParticipant.cpp index fcd7ce64849..74c52dd37f7 100644 --- a/src/cpp/dds/domain/DomainParticipant.cpp +++ b/src/cpp/dds/domain/DomainParticipant.cpp @@ -76,7 +76,7 @@ const dds::domain::qos::DomainParticipantQos& DomainParticipant::qos() const void DomainParticipant::qos( const dds::domain::qos::DomainParticipantQos& qos) { - ReturnCode_t code = this->delegate()->set_qos(qos); + eprosima::fastdds::dds::ReturnCode_t code = this->delegate()->set_qos(qos); if (code == eprosima::fastdds::dds::RETCODE_IMMUTABLE_POLICY) { throw dds::core::ImmutablePolicyError("Immutable Qos"); @@ -124,7 +124,8 @@ dds::domain::qos::DomainParticipantQos DomainParticipant::default_participant_qo void DomainParticipant::default_participant_qos( const ::dds::domain::qos::DomainParticipantQos& qos) { - ReturnCode_t code = eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->set_default_participant_qos( + eprosima::fastdds::dds::ReturnCode_t code = + eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->set_default_participant_qos( qos); if (code == eprosima::fastdds::dds::RETCODE_INCONSISTENT_POLICY) { @@ -144,7 +145,7 @@ dds::pub::qos::PublisherQos DomainParticipant::default_publisher_qos() const DomainParticipant& DomainParticipant::default_publisher_qos( const ::dds::pub::qos::PublisherQos& qos) { - ReturnCode_t code = this->delegate()->set_default_publisher_qos(qos); + eprosima::fastdds::dds::ReturnCode_t code = this->delegate()->set_default_publisher_qos(qos); if (code == eprosima::fastdds::dds::RETCODE_INCONSISTENT_POLICY) { throw dds::core::InconsistentPolicyError("Inconsistent Qos"); @@ -164,7 +165,7 @@ dds::sub::qos::SubscriberQos DomainParticipant::default_subscriber_qos() const DomainParticipant& DomainParticipant::default_subscriber_qos( const ::dds::sub::qos::SubscriberQos& qos) { - ReturnCode_t result = delegate()->set_default_subscriber_qos(qos); + eprosima::fastdds::dds::ReturnCode_t result = delegate()->set_default_subscriber_qos(qos); if (result == eprosima::fastdds::dds::RETCODE_INCONSISTENT_POLICY) { throw dds::core::InconsistentPolicyError("Inconsistent Qos"); @@ -184,7 +185,7 @@ dds::topic::qos::TopicQos DomainParticipant::default_topic_qos() const DomainParticipant& DomainParticipant::default_topic_qos( const dds::topic::qos::TopicQos& qos) { - ReturnCode_t ret_code = this->delegate()->set_default_topic_qos(qos); + eprosima::fastdds::dds::ReturnCode_t ret_code = this->delegate()->set_default_topic_qos(qos); if (ret_code == eprosima::fastdds::dds::RETCODE_INCONSISTENT_POLICY) { throw dds::core::InconsistentPolicyError("Inconsistent Qos"); diff --git a/src/cpp/dds/pub/AnyDataWriter.cpp b/src/cpp/dds/pub/AnyDataWriter.cpp index 85bfc743a84..c37feda852e 100644 --- a/src/cpp/dds/pub/AnyDataWriter.cpp +++ b/src/cpp/dds/pub/AnyDataWriter.cpp @@ -62,7 +62,7 @@ template void TAnyDataWriter::qos( const qos::DataWriterQos& qos) { - ReturnCode_t code = this->delegate()->set_qos(qos); + eprosima::fastdds::dds::ReturnCode_t code = this->delegate()->set_qos(qos); if (code == eprosima::fastdds::dds::RETCODE_INCONSISTENT_POLICY) { throw dds::core::InconsistentPolicyError("Inconsistent Qos"); diff --git a/src/cpp/dds/pub/Publisher.cpp b/src/cpp/dds/pub/Publisher.cpp index 6650470c389..c432ffd5019 100644 --- a/src/cpp/dds/pub/Publisher.cpp +++ b/src/cpp/dds/pub/Publisher.cpp @@ -64,7 +64,7 @@ const qos::PublisherQos& Publisher::qos() const void Publisher::qos( const qos::PublisherQos& pqos) { - ReturnCode_t code = this->delegate()->set_qos(pqos); + eprosima::fastdds::dds::ReturnCode_t code = this->delegate()->set_qos(pqos); if (code == eprosima::fastdds::dds::RETCODE_IMMUTABLE_POLICY) { throw dds::core::ImmutablePolicyError("Immutable Qos"); @@ -96,7 +96,7 @@ Publisher& Publisher::operator >>( Publisher& Publisher::default_datawriter_qos( const qos::DataWriterQos& dwqos) { - ReturnCode_t code = this->delegate()->set_default_datawriter_qos(dwqos); + eprosima::fastdds::dds::ReturnCode_t code = this->delegate()->set_default_datawriter_qos(dwqos); if (code == eprosima::fastdds::dds::RETCODE_INCONSISTENT_POLICY) { throw dds::core::InconsistentPolicyError("Inconsistent Qos"); diff --git a/src/cpp/dds/sub/Subscriber.cpp b/src/cpp/dds/sub/Subscriber.cpp index 9ae808c9d40..831cd2b59fa 100644 --- a/src/cpp/dds/sub/Subscriber.cpp +++ b/src/cpp/dds/sub/Subscriber.cpp @@ -64,7 +64,7 @@ const qos::SubscriberQos& Subscriber::qos() const void Subscriber::qos( const qos::SubscriberQos& pqos) { - ReturnCode_t result = delegate()->set_qos(pqos); + eprosima::fastdds::dds::ReturnCode_t result = delegate()->set_qos(pqos); if (result == eprosima::fastdds::dds::RETCODE_IMMUTABLE_POLICY) { throw dds::core::ImmutablePolicyError("Immutable Qos"); @@ -96,7 +96,7 @@ Subscriber& Subscriber::operator >>( Subscriber& Subscriber::default_datareader_qos( const qos::DataReaderQos& drqos) { - ReturnCode_t result = delegate()->set_default_datareader_qos(drqos); + eprosima::fastdds::dds::ReturnCode_t result = delegate()->set_default_datareader_qos(drqos); if ( result == eprosima::fastdds::dds::RETCODE_INCONSISTENT_POLICY) { throw dds::core::InconsistentPolicyError("Inconsistent Qos"); diff --git a/src/cpp/fastdds/core/condition/StatusCondition.cpp b/src/cpp/fastdds/core/condition/StatusCondition.cpp index f7615b90aaf..40e577186e6 100644 --- a/src/cpp/fastdds/core/condition/StatusCondition.cpp +++ b/src/cpp/fastdds/core/condition/StatusCondition.cpp @@ -26,8 +26,6 @@ namespace eprosima { namespace fastdds { namespace dds { -using eprosima::fastrtps::types::ReturnCode_t; - StatusCondition::StatusCondition( Entity* parent) : Condition() diff --git a/src/cpp/fastdds/core/condition/StatusConditionImpl.hpp b/src/cpp/fastdds/core/condition/StatusConditionImpl.hpp index a08c52efaf8..4d35d2bbc47 100644 --- a/src/cpp/fastdds/core/condition/StatusConditionImpl.hpp +++ b/src/cpp/fastdds/core/condition/StatusConditionImpl.hpp @@ -26,8 +26,6 @@ #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastdds { namespace dds { diff --git a/src/cpp/fastdds/core/condition/WaitSet.cpp b/src/cpp/fastdds/core/condition/WaitSet.cpp index 16b339f3a17..16b755eaeef 100644 --- a/src/cpp/fastdds/core/condition/WaitSet.cpp +++ b/src/cpp/fastdds/core/condition/WaitSet.cpp @@ -18,7 +18,6 @@ */ #include -#include #include @@ -26,8 +25,6 @@ namespace eprosima { namespace fastdds { namespace dds { -using eprosima::fastrtps::types::ReturnCode_t; - WaitSet::WaitSet() : impl_(new detail::WaitSetImpl()) { diff --git a/src/cpp/fastdds/core/condition/WaitSetImpl.cpp b/src/cpp/fastdds/core/condition/WaitSetImpl.cpp index cf4053b0bbf..ae4e9e091de 100644 --- a/src/cpp/fastdds/core/condition/WaitSetImpl.cpp +++ b/src/cpp/fastdds/core/condition/WaitSetImpl.cpp @@ -27,8 +27,6 @@ #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastdds { namespace dds { diff --git a/src/cpp/fastdds/core/condition/WaitSetImpl.hpp b/src/cpp/fastdds/core/condition/WaitSetImpl.hpp index d3e5fc187b0..fc19b0b3a4d 100644 --- a/src/cpp/fastdds/core/condition/WaitSetImpl.hpp +++ b/src/cpp/fastdds/core/condition/WaitSetImpl.hpp @@ -27,8 +27,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastdds { namespace dds { diff --git a/src/cpp/fastdds/domain/DomainParticipantImpl.hpp b/src/cpp/fastdds/domain/DomainParticipantImpl.hpp index dffd601c48e..e53de64e88d 100644 --- a/src/cpp/fastdds/domain/DomainParticipantImpl.hpp +++ b/src/cpp/fastdds/domain/DomainParticipantImpl.hpp @@ -44,8 +44,6 @@ #include "fastdds/topic/DDSSQLFilter/DDSFilterFactory.hpp" #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastrtps { diff --git a/src/cpp/fastdds/publisher/DataWriterImpl.hpp b/src/cpp/fastdds/publisher/DataWriterImpl.hpp index 3498b51740d..18dd08c83ff 100644 --- a/src/cpp/fastdds/publisher/DataWriterImpl.hpp +++ b/src/cpp/fastdds/publisher/DataWriterImpl.hpp @@ -50,8 +50,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastrtps { namespace rtps { diff --git a/src/cpp/fastdds/publisher/PublisherImpl.hpp b/src/cpp/fastdds/publisher/PublisherImpl.hpp index 475dbb2c616..122a451b630 100644 --- a/src/cpp/fastdds/publisher/PublisherImpl.hpp +++ b/src/cpp/fastdds/publisher/PublisherImpl.hpp @@ -35,8 +35,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastrtps { namespace rtps { diff --git a/src/cpp/fastdds/subscriber/DataReaderImpl.cpp b/src/cpp/fastdds/subscriber/DataReaderImpl.cpp index a6035f0cc13..d7161a686c4 100644 --- a/src/cpp/fastdds/subscriber/DataReaderImpl.cpp +++ b/src/cpp/fastdds/subscriber/DataReaderImpl.cpp @@ -67,8 +67,6 @@ using eprosima::fastrtps::c_TimeInfinite; using namespace eprosima::fastrtps::rtps; using namespace std::chrono; -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastdds { namespace dds { diff --git a/src/cpp/fastdds/subscriber/DataReaderImpl/DataReaderLoanManager.hpp b/src/cpp/fastdds/subscriber/DataReaderImpl/DataReaderLoanManager.hpp index aad9ccfa2cc..fc3ffe3a0c2 100644 --- a/src/cpp/fastdds/subscriber/DataReaderImpl/DataReaderLoanManager.hpp +++ b/src/cpp/fastdds/subscriber/DataReaderImpl/DataReaderLoanManager.hpp @@ -39,7 +39,6 @@ namespace detail { struct DataReaderLoanManager { using SampleInfoSeq = LoanableTypedCollection; - using ReturnCode_t = eprosima::fastrtps::types::ReturnCode_t; explicit DataReaderLoanManager( const DataReaderQos& qos) diff --git a/src/cpp/fastdds/subscriber/DataReaderImpl/ReadTakeCommand.hpp b/src/cpp/fastdds/subscriber/DataReaderImpl/ReadTakeCommand.hpp index 067227c807f..eb9713eee93 100644 --- a/src/cpp/fastdds/subscriber/DataReaderImpl/ReadTakeCommand.hpp +++ b/src/cpp/fastdds/subscriber/DataReaderImpl/ReadTakeCommand.hpp @@ -50,7 +50,6 @@ namespace detail { struct ReadTakeCommand { - using ReturnCode_t = eprosima::fastrtps::types::ReturnCode_t; using history_type = eprosima::fastdds::dds::detail::DataReaderHistory; using CacheChange_t = eprosima::fastrtps::rtps::CacheChange_t; using RTPSReader = eprosima::fastrtps::rtps::RTPSReader; diff --git a/src/cpp/fastdds/subscriber/DataReaderImpl/SampleInfoPool.hpp b/src/cpp/fastdds/subscriber/DataReaderImpl/SampleInfoPool.hpp index dc5242f9c36..efd7c394544 100644 --- a/src/cpp/fastdds/subscriber/DataReaderImpl/SampleInfoPool.hpp +++ b/src/cpp/fastdds/subscriber/DataReaderImpl/SampleInfoPool.hpp @@ -38,8 +38,6 @@ namespace detail { struct SampleInfoPool { - using ReturnCode_t = eprosima::fastrtps::types::ReturnCode_t; - explicit SampleInfoPool( const DataReaderQos& qos) : free_items_(qos.reader_resource_limits().sample_infos_allocation) diff --git a/src/cpp/fastdds/subscriber/DataReaderImpl/SampleLoanManager.hpp b/src/cpp/fastdds/subscriber/DataReaderImpl/SampleLoanManager.hpp index fc3d7aeeb32..37ca6a40fba 100644 --- a/src/cpp/fastdds/subscriber/DataReaderImpl/SampleLoanManager.hpp +++ b/src/cpp/fastdds/subscriber/DataReaderImpl/SampleLoanManager.hpp @@ -45,7 +45,6 @@ struct SampleLoanManager using CacheChange_t = eprosima::fastrtps::rtps::CacheChange_t; using IPayloadPool = eprosima::fastrtps::rtps::IPayloadPool; using PoolConfig = eprosima::fastrtps::rtps::PoolConfig; - using ReturnCode_t = eprosima::fastrtps::types::ReturnCode_t; using SampleIdentity = eprosima::fastrtps::rtps::SampleIdentity; using SerializedPayload_t = eprosima::fastrtps::rtps::SerializedPayload_t; diff --git a/src/cpp/fastdds/subscriber/SubscriberImpl.hpp b/src/cpp/fastdds/subscriber/SubscriberImpl.hpp index 42e9c45c366..d6951e27929 100644 --- a/src/cpp/fastdds/subscriber/SubscriberImpl.hpp +++ b/src/cpp/fastdds/subscriber/SubscriberImpl.hpp @@ -32,8 +32,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastrtps { namespace rtps { diff --git a/src/cpp/fastdds/topic/DDSSQLFilter/DDSFilterFactory.cpp b/src/cpp/fastdds/topic/DDSSQLFilter/DDSFilterFactory.cpp index 714f407ae34..7baef5d548f 100644 --- a/src/cpp/fastdds/topic/DDSSQLFilter/DDSFilterFactory.cpp +++ b/src/cpp/fastdds/topic/DDSSQLFilter/DDSFilterFactory.cpp @@ -49,7 +49,7 @@ namespace fastdds { namespace dds { namespace DDSSQLFilter { -static IContentFilterFactory::ReturnCode_t transform_enum( +static ReturnCode_t transform_enum( std::shared_ptr& value, const eprosima::fastrtps::types::TypeIdentifier* type, const eprosima::fastrtps::string_255& string_value) @@ -69,7 +69,7 @@ static IContentFilterFactory::ReturnCode_t transform_enum( return RETCODE_BAD_PARAMETER; } -static IContentFilterFactory::ReturnCode_t transform_enums( +static ReturnCode_t transform_enums( std::shared_ptr& left_value, const eprosima::fastrtps::types::TypeIdentifier* left_type, std::shared_ptr& right_value, @@ -201,14 +201,14 @@ struct ExpressionParsingState }; template<> -IContentFilterFactory::ReturnCode_t DDSFilterFactory::convert_tree( +ReturnCode_t DDSFilterFactory::convert_tree( ExpressionParsingState& state, std::unique_ptr& condition, const parser::ParseNode& node); template<> -IContentFilterFactory::ReturnCode_t DDSFilterFactory::convert_tree( +ReturnCode_t DDSFilterFactory::convert_tree( ExpressionParsingState& state, std::shared_ptr& value, const parser::ParseNode& node) @@ -259,7 +259,7 @@ IContentFilterFactory::ReturnCode_t DDSFilterFactory::convert_tree -IContentFilterFactory::ReturnCode_t DDSFilterFactory::convert_tree( +ReturnCode_t DDSFilterFactory::convert_tree( ExpressionParsingState& state, std::unique_ptr& condition, const parser::ParseNode& node) @@ -309,7 +309,7 @@ IContentFilterFactory::ReturnCode_t DDSFilterFactory::convert_tree -IContentFilterFactory::ReturnCode_t DDSFilterFactory::convert_tree( +ReturnCode_t DDSFilterFactory::convert_tree( ExpressionParsingState& state, std::unique_ptr& condition, const parser::ParseNode& node) @@ -375,7 +375,7 @@ IContentFilterFactory::ReturnCode_t DDSFilterFactory::convert_tree( } template<> -IContentFilterFactory::ReturnCode_t DDSFilterFactory::convert_tree( +ReturnCode_t DDSFilterFactory::convert_tree( ExpressionParsingState& state, std::unique_ptr& condition, const parser::ParseNode& node) @@ -422,7 +422,7 @@ IContentFilterFactory::ReturnCode_t DDSFilterFactory::convert_tree -IContentFilterFactory::ReturnCode_t DDSFilterFactory::convert_tree( +ReturnCode_t DDSFilterFactory::convert_tree( ExpressionParsingState& state, std::unique_ptr& condition, const parser::ParseNode& node) @@ -449,7 +449,7 @@ DDSFilterFactory::~DDSFilterFactory() pool.clear(); } -IContentFilterFactory::ReturnCode_t DDSFilterFactory::create_content_filter( +ReturnCode_t DDSFilterFactory::create_content_filter( const char* filter_class_name, const char* type_name, const TopicDataType* data_type, @@ -560,7 +560,7 @@ IContentFilterFactory::ReturnCode_t DDSFilterFactory::create_content_filter( return ret; } -IContentFilterFactory::ReturnCode_t DDSFilterFactory::delete_content_filter( +ReturnCode_t DDSFilterFactory::delete_content_filter( const char* filter_class_name, IContentFilter* filter_instance) { diff --git a/src/cpp/fastdds/topic/TopicImpl.hpp b/src/cpp/fastdds/topic/TopicImpl.hpp index f02dcfe20cd..157ce0564d2 100644 --- a/src/cpp/fastdds/topic/TopicImpl.hpp +++ b/src/cpp/fastdds/topic/TopicImpl.hpp @@ -27,8 +27,6 @@ #include #include -using eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastdds { namespace dds { diff --git a/src/cpp/statistics/fastdds/domain/DomainParticipantImpl.cpp b/src/cpp/statistics/fastdds/domain/DomainParticipantImpl.cpp index 25b94a0e920..baf6efc5902 100644 --- a/src/cpp/statistics/fastdds/domain/DomainParticipantImpl.cpp +++ b/src/cpp/statistics/fastdds/domain/DomainParticipantImpl.cpp @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/cpp/statistics/fastdds/domain/DomainParticipantImpl.hpp b/src/cpp/statistics/fastdds/domain/DomainParticipantImpl.hpp index 72fd2542ab1..b92311950c2 100644 --- a/src/cpp/statistics/fastdds/domain/DomainParticipantImpl.hpp +++ b/src/cpp/statistics/fastdds/domain/DomainParticipantImpl.hpp @@ -42,8 +42,6 @@ namespace efd = eprosima::fastdds::dds; -using ReturnCode_t = eprosima::fastrtps::types::ReturnCode_t; - namespace eprosima { namespace fastdds { namespace statistics { @@ -65,7 +63,7 @@ class DomainParticipantImpl : public efd::DomainParticipantImpl * RETCODE_OK if the DataWriter has been created or if it has been created previously, * and RETCODE_ERROR otherwise */ - ReturnCode_t enable_statistics_datawriter( + efd::ReturnCode_t enable_statistics_datawriter( const std::string& topic_name, const efd::DataWriterQos& dwqos); @@ -79,7 +77,7 @@ class DomainParticipantImpl : public efd::DomainParticipantImpl * RETCODE_OK if the DataWriter has been created or if it has been created previously, * and RETCODE_ERROR otherwise */ - ReturnCode_t enable_statistics_datawriter_with_profile( + efd::ReturnCode_t enable_statistics_datawriter_with_profile( const std::string& profile_name, const std::string& topic_name); @@ -92,7 +90,7 @@ class DomainParticipantImpl : public efd::DomainParticipantImpl * RETCODE_OK if the DataWriter has been correctly deleted or does not exist, * and RETCODE_ERROR otherwise */ - ReturnCode_t disable_statistics_datawriter( + efd::ReturnCode_t disable_statistics_datawriter( const std::string& topic_name); /** @@ -100,7 +98,7 @@ class DomainParticipantImpl : public efd::DomainParticipantImpl * * @return RETCODE_OK if successful */ - ReturnCode_t enable() override; + efd::ReturnCode_t enable() override; void disable() override; @@ -117,7 +115,7 @@ class DomainParticipantImpl : public efd::DomainParticipantImpl * * @return RETCODE_OK if successful */ - ReturnCode_t delete_contained_entities() override; + efd::ReturnCode_t delete_contained_entities() override; protected: diff --git a/src/cpp/statistics/fastdds/domain/DomainParticipantStatisticsListener.cpp b/src/cpp/statistics/fastdds/domain/DomainParticipantStatisticsListener.cpp index 0fb381db791..302026db8eb 100644 --- a/src/cpp/statistics/fastdds/domain/DomainParticipantStatisticsListener.cpp +++ b/src/cpp/statistics/fastdds/domain/DomainParticipantStatisticsListener.cpp @@ -22,7 +22,6 @@ #include -#include namespace eprosima { namespace fastdds { namespace statistics { diff --git a/src/cpp/statistics/fastdds/domain/DomainParticipantStatisticsListener.hpp b/src/cpp/statistics/fastdds/domain/DomainParticipantStatisticsListener.hpp index eb45f0d8de7..d5b50dd36a6 100644 --- a/src/cpp/statistics/fastdds/domain/DomainParticipantStatisticsListener.hpp +++ b/src/cpp/statistics/fastdds/domain/DomainParticipantStatisticsListener.hpp @@ -31,7 +31,7 @@ #include #include -#include +#include namespace eprosima { namespace fastdds { diff --git a/src/cpp/statistics/rtps/GuidUtils.hpp b/src/cpp/statistics/rtps/GuidUtils.hpp index 31dbd62eebf..6e885cd9281 100644 --- a/src/cpp/statistics/rtps/GuidUtils.hpp +++ b/src/cpp/statistics/rtps/GuidUtils.hpp @@ -23,7 +23,7 @@ #include -#include +#include namespace eprosima { namespace fastdds { diff --git a/src/cpp/statistics/rtps/StatisticsBase.hpp b/src/cpp/statistics/rtps/StatisticsBase.hpp index 059d8e45af0..54ed456ff15 100644 --- a/src/cpp/statistics/rtps/StatisticsBase.hpp +++ b/src/cpp/statistics/rtps/StatisticsBase.hpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include namespace eprosima { diff --git a/src/cpp/statistics/rtps/reader/StatisticsReaderImpl.cpp b/src/cpp/statistics/rtps/reader/StatisticsReaderImpl.cpp index 721974dbc9c..cf9acb32aec 100644 --- a/src/cpp/statistics/rtps/reader/StatisticsReaderImpl.cpp +++ b/src/cpp/statistics/rtps/reader/StatisticsReaderImpl.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include using eprosima::fastrtps::RecursiveTimedMutex; using eprosima::fastrtps::rtps::RTPSReader; diff --git a/src/cpp/statistics/rtps/writer/StatisticsWriterImpl.cpp b/src/cpp/statistics/rtps/writer/StatisticsWriterImpl.cpp index 1e289668ac1..caa3e35a026 100644 --- a/src/cpp/statistics/rtps/writer/StatisticsWriterImpl.cpp +++ b/src/cpp/statistics/rtps/writer/StatisticsWriterImpl.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include using eprosima::fastrtps::RecursiveTimedMutex; using eprosima::fastrtps::rtps::RTPSWriter; diff --git a/src/cpp/statistics/types/types.cxx b/src/cpp/statistics/types/types.cxx deleted file mode 100644 index 9dcb86ef67b..00000000000 --- a/src/cpp/statistics/types/types.cxx +++ /dev/null @@ -1,3211 +0,0 @@ -// 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 types.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "types.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - -namespace eprosima { - -namespace fastdds { - -namespace statistics { - -namespace detail { - - - -EntityId_s::EntityId_s() -{ -} - -EntityId_s::~EntityId_s() -{ -} - -EntityId_s::EntityId_s( - const EntityId_s& x) -{ - m_value = x.m_value; -} - -EntityId_s::EntityId_s( - EntityId_s&& x) noexcept -{ - m_value = std::move(x.m_value); -} - -EntityId_s& EntityId_s::operator =( - const EntityId_s& x) -{ - - m_value = x.m_value; - return *this; -} - -EntityId_s& EntityId_s::operator =( - EntityId_s&& x) noexcept -{ - - m_value = std::move(x.m_value); - return *this; -} - -bool EntityId_s::operator ==( - const EntityId_s& x) const -{ - return (m_value == x.m_value); -} - -bool EntityId_s::operator !=( - const EntityId_s& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ -void EntityId_s::value( - const std::array& _value) -{ - m_value = _value; -} - -/*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ -void EntityId_s::value( - std::array&& _value) -{ - m_value = std::move(_value); -} - -/*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ -const std::array& EntityId_s::value() const -{ - return m_value; -} - -/*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ -std::array& EntityId_s::value() -{ - return m_value; -} - - - - -GuidPrefix_s::GuidPrefix_s() -{ -} - -GuidPrefix_s::~GuidPrefix_s() -{ -} - -GuidPrefix_s::GuidPrefix_s( - const GuidPrefix_s& x) -{ - m_value = x.m_value; -} - -GuidPrefix_s::GuidPrefix_s( - GuidPrefix_s&& x) noexcept -{ - m_value = std::move(x.m_value); -} - -GuidPrefix_s& GuidPrefix_s::operator =( - const GuidPrefix_s& x) -{ - - m_value = x.m_value; - return *this; -} - -GuidPrefix_s& GuidPrefix_s::operator =( - GuidPrefix_s&& x) noexcept -{ - - m_value = std::move(x.m_value); - return *this; -} - -bool GuidPrefix_s::operator ==( - const GuidPrefix_s& x) const -{ - return (m_value == x.m_value); -} - -bool GuidPrefix_s::operator !=( - const GuidPrefix_s& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ -void GuidPrefix_s::value( - const std::array& _value) -{ - m_value = _value; -} - -/*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ -void GuidPrefix_s::value( - std::array&& _value) -{ - m_value = std::move(_value); -} - -/*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ -const std::array& GuidPrefix_s::value() const -{ - return m_value; -} - -/*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ -std::array& GuidPrefix_s::value() -{ - return m_value; -} - - - - -GUID_s::GUID_s() -{ -} - -GUID_s::~GUID_s() -{ -} - -GUID_s::GUID_s( - const GUID_s& x) -{ - m_guidPrefix = x.m_guidPrefix; - m_entityId = x.m_entityId; -} - -GUID_s::GUID_s( - GUID_s&& x) noexcept -{ - m_guidPrefix = std::move(x.m_guidPrefix); - m_entityId = std::move(x.m_entityId); -} - -GUID_s& GUID_s::operator =( - const GUID_s& x) -{ - - m_guidPrefix = x.m_guidPrefix; - m_entityId = x.m_entityId; - return *this; -} - -GUID_s& GUID_s::operator =( - GUID_s&& x) noexcept -{ - - m_guidPrefix = std::move(x.m_guidPrefix); - m_entityId = std::move(x.m_entityId); - return *this; -} - -bool GUID_s::operator ==( - const GUID_s& x) const -{ - return (m_guidPrefix == x.m_guidPrefix && - m_entityId == x.m_entityId); -} - -bool GUID_s::operator !=( - const GUID_s& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member guidPrefix - * @param _guidPrefix New value to be copied in member guidPrefix - */ -void GUID_s::guidPrefix( - const eprosima::fastdds::statistics::detail::GuidPrefix_s& _guidPrefix) -{ - m_guidPrefix = _guidPrefix; -} - -/*! - * @brief This function moves the value in member guidPrefix - * @param _guidPrefix New value to be moved in member guidPrefix - */ -void GUID_s::guidPrefix( - eprosima::fastdds::statistics::detail::GuidPrefix_s&& _guidPrefix) -{ - m_guidPrefix = std::move(_guidPrefix); -} - -/*! - * @brief This function returns a constant reference to member guidPrefix - * @return Constant reference to member guidPrefix - */ -const eprosima::fastdds::statistics::detail::GuidPrefix_s& GUID_s::guidPrefix() const -{ - return m_guidPrefix; -} - -/*! - * @brief This function returns a reference to member guidPrefix - * @return Reference to member guidPrefix - */ -eprosima::fastdds::statistics::detail::GuidPrefix_s& GUID_s::guidPrefix() -{ - return m_guidPrefix; -} - - -/*! - * @brief This function copies the value in member entityId - * @param _entityId New value to be copied in member entityId - */ -void GUID_s::entityId( - const eprosima::fastdds::statistics::detail::EntityId_s& _entityId) -{ - m_entityId = _entityId; -} - -/*! - * @brief This function moves the value in member entityId - * @param _entityId New value to be moved in member entityId - */ -void GUID_s::entityId( - eprosima::fastdds::statistics::detail::EntityId_s&& _entityId) -{ - m_entityId = std::move(_entityId); -} - -/*! - * @brief This function returns a constant reference to member entityId - * @return Constant reference to member entityId - */ -const eprosima::fastdds::statistics::detail::EntityId_s& GUID_s::entityId() const -{ - return m_entityId; -} - -/*! - * @brief This function returns a reference to member entityId - * @return Reference to member entityId - */ -eprosima::fastdds::statistics::detail::EntityId_s& GUID_s::entityId() -{ - return m_entityId; -} - - - - -SequenceNumber_s::SequenceNumber_s() -{ -} - -SequenceNumber_s::~SequenceNumber_s() -{ -} - -SequenceNumber_s::SequenceNumber_s( - const SequenceNumber_s& x) -{ - m_high = x.m_high; - m_low = x.m_low; -} - -SequenceNumber_s::SequenceNumber_s( - SequenceNumber_s&& x) noexcept -{ - m_high = x.m_high; - m_low = x.m_low; -} - -SequenceNumber_s& SequenceNumber_s::operator =( - const SequenceNumber_s& x) -{ - - m_high = x.m_high; - m_low = x.m_low; - return *this; -} - -SequenceNumber_s& SequenceNumber_s::operator =( - SequenceNumber_s&& x) noexcept -{ - - m_high = x.m_high; - m_low = x.m_low; - return *this; -} - -bool SequenceNumber_s::operator ==( - const SequenceNumber_s& x) const -{ - return (m_high == x.m_high && - m_low == x.m_low); -} - -bool SequenceNumber_s::operator !=( - const SequenceNumber_s& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member high - * @param _high New value for member high - */ -void SequenceNumber_s::high( - int32_t _high) -{ - m_high = _high; -} - -/*! - * @brief This function returns the value of member high - * @return Value of member high - */ -int32_t SequenceNumber_s::high() const -{ - return m_high; -} - -/*! - * @brief This function returns a reference to member high - * @return Reference to member high - */ -int32_t& SequenceNumber_s::high() -{ - return m_high; -} - - -/*! - * @brief This function sets a value in member low - * @param _low New value for member low - */ -void SequenceNumber_s::low( - uint32_t _low) -{ - m_low = _low; -} - -/*! - * @brief This function returns the value of member low - * @return Value of member low - */ -uint32_t SequenceNumber_s::low() const -{ - return m_low; -} - -/*! - * @brief This function returns a reference to member low - * @return Reference to member low - */ -uint32_t& SequenceNumber_s::low() -{ - return m_low; -} - - - - -SampleIdentity_s::SampleIdentity_s() -{ -} - -SampleIdentity_s::~SampleIdentity_s() -{ -} - -SampleIdentity_s::SampleIdentity_s( - const SampleIdentity_s& x) -{ - m_writer_guid = x.m_writer_guid; - m_sequence_number = x.m_sequence_number; -} - -SampleIdentity_s::SampleIdentity_s( - SampleIdentity_s&& x) noexcept -{ - m_writer_guid = std::move(x.m_writer_guid); - m_sequence_number = std::move(x.m_sequence_number); -} - -SampleIdentity_s& SampleIdentity_s::operator =( - const SampleIdentity_s& x) -{ - - m_writer_guid = x.m_writer_guid; - m_sequence_number = x.m_sequence_number; - return *this; -} - -SampleIdentity_s& SampleIdentity_s::operator =( - SampleIdentity_s&& x) noexcept -{ - - m_writer_guid = std::move(x.m_writer_guid); - m_sequence_number = std::move(x.m_sequence_number); - return *this; -} - -bool SampleIdentity_s::operator ==( - const SampleIdentity_s& x) const -{ - return (m_writer_guid == x.m_writer_guid && - m_sequence_number == x.m_sequence_number); -} - -bool SampleIdentity_s::operator !=( - const SampleIdentity_s& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ -void SampleIdentity_s::writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid) -{ - m_writer_guid = _writer_guid; -} - -/*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ -void SampleIdentity_s::writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid) -{ - m_writer_guid = std::move(_writer_guid); -} - -/*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& SampleIdentity_s::writer_guid() const -{ - return m_writer_guid; -} - -/*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& SampleIdentity_s::writer_guid() -{ - return m_writer_guid; -} - - -/*! - * @brief This function copies the value in member sequence_number - * @param _sequence_number New value to be copied in member sequence_number - */ -void SampleIdentity_s::sequence_number( - const eprosima::fastdds::statistics::detail::SequenceNumber_s& _sequence_number) -{ - m_sequence_number = _sequence_number; -} - -/*! - * @brief This function moves the value in member sequence_number - * @param _sequence_number New value to be moved in member sequence_number - */ -void SampleIdentity_s::sequence_number( - eprosima::fastdds::statistics::detail::SequenceNumber_s&& _sequence_number) -{ - m_sequence_number = std::move(_sequence_number); -} - -/*! - * @brief This function returns a constant reference to member sequence_number - * @return Constant reference to member sequence_number - */ -const eprosima::fastdds::statistics::detail::SequenceNumber_s& SampleIdentity_s::sequence_number() const -{ - return m_sequence_number; -} - -/*! - * @brief This function returns a reference to member sequence_number - * @return Reference to member sequence_number - */ -eprosima::fastdds::statistics::detail::SequenceNumber_s& SampleIdentity_s::sequence_number() -{ - return m_sequence_number; -} - - - - -Locator_s::Locator_s() -{ -} - -Locator_s::~Locator_s() -{ -} - -Locator_s::Locator_s( - const Locator_s& x) -{ - m_kind = x.m_kind; - m_port = x.m_port; - m_address = x.m_address; -} - -Locator_s::Locator_s( - Locator_s&& x) noexcept -{ - m_kind = x.m_kind; - m_port = x.m_port; - m_address = std::move(x.m_address); -} - -Locator_s& Locator_s::operator =( - const Locator_s& x) -{ - - m_kind = x.m_kind; - m_port = x.m_port; - m_address = x.m_address; - return *this; -} - -Locator_s& Locator_s::operator =( - Locator_s&& x) noexcept -{ - - m_kind = x.m_kind; - m_port = x.m_port; - m_address = std::move(x.m_address); - return *this; -} - -bool Locator_s::operator ==( - const Locator_s& x) const -{ - return (m_kind == x.m_kind && - m_port == x.m_port && - m_address == x.m_address); -} - -bool Locator_s::operator !=( - const Locator_s& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member kind - * @param _kind New value for member kind - */ -void Locator_s::kind( - int32_t _kind) -{ - m_kind = _kind; -} - -/*! - * @brief This function returns the value of member kind - * @return Value of member kind - */ -int32_t Locator_s::kind() const -{ - return m_kind; -} - -/*! - * @brief This function returns a reference to member kind - * @return Reference to member kind - */ -int32_t& Locator_s::kind() -{ - return m_kind; -} - - -/*! - * @brief This function sets a value in member port - * @param _port New value for member port - */ -void Locator_s::port( - uint32_t _port) -{ - m_port = _port; -} - -/*! - * @brief This function returns the value of member port - * @return Value of member port - */ -uint32_t Locator_s::port() const -{ - return m_port; -} - -/*! - * @brief This function returns a reference to member port - * @return Reference to member port - */ -uint32_t& Locator_s::port() -{ - return m_port; -} - - -/*! - * @brief This function copies the value in member address - * @param _address New value to be copied in member address - */ -void Locator_s::address( - const std::array& _address) -{ - m_address = _address; -} - -/*! - * @brief This function moves the value in member address - * @param _address New value to be moved in member address - */ -void Locator_s::address( - std::array&& _address) -{ - m_address = std::move(_address); -} - -/*! - * @brief This function returns a constant reference to member address - * @return Constant reference to member address - */ -const std::array& Locator_s::address() const -{ - return m_address; -} - -/*! - * @brief This function returns a reference to member address - * @return Reference to member address - */ -std::array& Locator_s::address() -{ - return m_address; -} - - - - -} // namespace detail - - -DiscoveryTime::DiscoveryTime() -{ -} - -DiscoveryTime::~DiscoveryTime() -{ -} - -DiscoveryTime::DiscoveryTime( - const DiscoveryTime& x) -{ - m_local_participant_guid = x.m_local_participant_guid; - m_remote_entity_guid = x.m_remote_entity_guid; - m_time = x.m_time; - m_host = x.m_host; - m_user = x.m_user; - m_process = x.m_process; -} - -DiscoveryTime::DiscoveryTime( - DiscoveryTime&& x) noexcept -{ - m_local_participant_guid = std::move(x.m_local_participant_guid); - m_remote_entity_guid = std::move(x.m_remote_entity_guid); - m_time = x.m_time; - m_host = std::move(x.m_host); - m_user = std::move(x.m_user); - m_process = std::move(x.m_process); -} - -DiscoveryTime& DiscoveryTime::operator =( - const DiscoveryTime& x) -{ - - m_local_participant_guid = x.m_local_participant_guid; - m_remote_entity_guid = x.m_remote_entity_guid; - m_time = x.m_time; - m_host = x.m_host; - m_user = x.m_user; - m_process = x.m_process; - return *this; -} - -DiscoveryTime& DiscoveryTime::operator =( - DiscoveryTime&& x) noexcept -{ - - m_local_participant_guid = std::move(x.m_local_participant_guid); - m_remote_entity_guid = std::move(x.m_remote_entity_guid); - m_time = x.m_time; - m_host = std::move(x.m_host); - m_user = std::move(x.m_user); - m_process = std::move(x.m_process); - return *this; -} - -bool DiscoveryTime::operator ==( - const DiscoveryTime& x) const -{ - return (m_local_participant_guid == x.m_local_participant_guid && - m_remote_entity_guid == x.m_remote_entity_guid && - m_time == x.m_time && - m_host == x.m_host && - m_user == x.m_user && - m_process == x.m_process); -} - -bool DiscoveryTime::operator !=( - const DiscoveryTime& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member local_participant_guid - * @param _local_participant_guid New value to be copied in member local_participant_guid - */ -void DiscoveryTime::local_participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _local_participant_guid) -{ - m_local_participant_guid = _local_participant_guid; -} - -/*! - * @brief This function moves the value in member local_participant_guid - * @param _local_participant_guid New value to be moved in member local_participant_guid - */ -void DiscoveryTime::local_participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _local_participant_guid) -{ - m_local_participant_guid = std::move(_local_participant_guid); -} - -/*! - * @brief This function returns a constant reference to member local_participant_guid - * @return Constant reference to member local_participant_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::local_participant_guid() const -{ - return m_local_participant_guid; -} - -/*! - * @brief This function returns a reference to member local_participant_guid - * @return Reference to member local_participant_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::local_participant_guid() -{ - return m_local_participant_guid; -} - - -/*! - * @brief This function copies the value in member remote_entity_guid - * @param _remote_entity_guid New value to be copied in member remote_entity_guid - */ -void DiscoveryTime::remote_entity_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _remote_entity_guid) -{ - m_remote_entity_guid = _remote_entity_guid; -} - -/*! - * @brief This function moves the value in member remote_entity_guid - * @param _remote_entity_guid New value to be moved in member remote_entity_guid - */ -void DiscoveryTime::remote_entity_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _remote_entity_guid) -{ - m_remote_entity_guid = std::move(_remote_entity_guid); -} - -/*! - * @brief This function returns a constant reference to member remote_entity_guid - * @return Constant reference to member remote_entity_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::remote_entity_guid() const -{ - return m_remote_entity_guid; -} - -/*! - * @brief This function returns a reference to member remote_entity_guid - * @return Reference to member remote_entity_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::remote_entity_guid() -{ - return m_remote_entity_guid; -} - - -/*! - * @brief This function sets a value in member time - * @param _time New value for member time - */ -void DiscoveryTime::time( - uint64_t _time) -{ - m_time = _time; -} - -/*! - * @brief This function returns the value of member time - * @return Value of member time - */ -uint64_t DiscoveryTime::time() const -{ - return m_time; -} - -/*! - * @brief This function returns a reference to member time - * @return Reference to member time - */ -uint64_t& DiscoveryTime::time() -{ - return m_time; -} - - -/*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ -void DiscoveryTime::host( - const std::string& _host) -{ - m_host = _host; -} - -/*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ -void DiscoveryTime::host( - std::string&& _host) -{ - m_host = std::move(_host); -} - -/*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ -const std::string& DiscoveryTime::host() const -{ - return m_host; -} - -/*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ -std::string& DiscoveryTime::host() -{ - return m_host; -} - - -/*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ -void DiscoveryTime::user( - const std::string& _user) -{ - m_user = _user; -} - -/*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ -void DiscoveryTime::user( - std::string&& _user) -{ - m_user = std::move(_user); -} - -/*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ -const std::string& DiscoveryTime::user() const -{ - return m_user; -} - -/*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ -std::string& DiscoveryTime::user() -{ - return m_user; -} - - -/*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ -void DiscoveryTime::process( - const std::string& _process) -{ - m_process = _process; -} - -/*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ -void DiscoveryTime::process( - std::string&& _process) -{ - m_process = std::move(_process); -} - -/*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ -const std::string& DiscoveryTime::process() const -{ - return m_process; -} - -/*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ -std::string& DiscoveryTime::process() -{ - return m_process; -} - - - - -EntityCount::EntityCount() -{ -} - -EntityCount::~EntityCount() -{ -} - -EntityCount::EntityCount( - const EntityCount& x) -{ - m_guid = x.m_guid; - m_count = x.m_count; -} - -EntityCount::EntityCount( - EntityCount&& x) noexcept -{ - m_guid = std::move(x.m_guid); - m_count = x.m_count; -} - -EntityCount& EntityCount::operator =( - const EntityCount& x) -{ - - m_guid = x.m_guid; - m_count = x.m_count; - return *this; -} - -EntityCount& EntityCount::operator =( - EntityCount&& x) noexcept -{ - - m_guid = std::move(x.m_guid); - m_count = x.m_count; - return *this; -} - -bool EntityCount::operator ==( - const EntityCount& x) const -{ - return (m_guid == x.m_guid && - m_count == x.m_count); -} - -bool EntityCount::operator !=( - const EntityCount& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ -void EntityCount::guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid) -{ - m_guid = _guid; -} - -/*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ -void EntityCount::guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid) -{ - m_guid = std::move(_guid); -} - -/*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& EntityCount::guid() const -{ - return m_guid; -} - -/*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ -eprosima::fastdds::statistics::detail::GUID_s& EntityCount::guid() -{ - return m_guid; -} - - -/*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ -void EntityCount::count( - uint64_t _count) -{ - m_count = _count; -} - -/*! - * @brief This function returns the value of member count - * @return Value of member count - */ -uint64_t EntityCount::count() const -{ - return m_count; -} - -/*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ -uint64_t& EntityCount::count() -{ - return m_count; -} - - - - -SampleIdentityCount::SampleIdentityCount() -{ -} - -SampleIdentityCount::~SampleIdentityCount() -{ -} - -SampleIdentityCount::SampleIdentityCount( - const SampleIdentityCount& x) -{ - m_sample_id = x.m_sample_id; - m_count = x.m_count; -} - -SampleIdentityCount::SampleIdentityCount( - SampleIdentityCount&& x) noexcept -{ - m_sample_id = std::move(x.m_sample_id); - m_count = x.m_count; -} - -SampleIdentityCount& SampleIdentityCount::operator =( - const SampleIdentityCount& x) -{ - - m_sample_id = x.m_sample_id; - m_count = x.m_count; - return *this; -} - -SampleIdentityCount& SampleIdentityCount::operator =( - SampleIdentityCount&& x) noexcept -{ - - m_sample_id = std::move(x.m_sample_id); - m_count = x.m_count; - return *this; -} - -bool SampleIdentityCount::operator ==( - const SampleIdentityCount& x) const -{ - return (m_sample_id == x.m_sample_id && - m_count == x.m_count); -} - -bool SampleIdentityCount::operator !=( - const SampleIdentityCount& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member sample_id - * @param _sample_id New value to be copied in member sample_id - */ -void SampleIdentityCount::sample_id( - const eprosima::fastdds::statistics::detail::SampleIdentity_s& _sample_id) -{ - m_sample_id = _sample_id; -} - -/*! - * @brief This function moves the value in member sample_id - * @param _sample_id New value to be moved in member sample_id - */ -void SampleIdentityCount::sample_id( - eprosima::fastdds::statistics::detail::SampleIdentity_s&& _sample_id) -{ - m_sample_id = std::move(_sample_id); -} - -/*! - * @brief This function returns a constant reference to member sample_id - * @return Constant reference to member sample_id - */ -const eprosima::fastdds::statistics::detail::SampleIdentity_s& SampleIdentityCount::sample_id() const -{ - return m_sample_id; -} - -/*! - * @brief This function returns a reference to member sample_id - * @return Reference to member sample_id - */ -eprosima::fastdds::statistics::detail::SampleIdentity_s& SampleIdentityCount::sample_id() -{ - return m_sample_id; -} - - -/*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ -void SampleIdentityCount::count( - uint64_t _count) -{ - m_count = _count; -} - -/*! - * @brief This function returns the value of member count - * @return Value of member count - */ -uint64_t SampleIdentityCount::count() const -{ - return m_count; -} - -/*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ -uint64_t& SampleIdentityCount::count() -{ - return m_count; -} - - - - -Entity2LocatorTraffic::Entity2LocatorTraffic() -{ -} - -Entity2LocatorTraffic::~Entity2LocatorTraffic() -{ -} - -Entity2LocatorTraffic::Entity2LocatorTraffic( - const Entity2LocatorTraffic& x) -{ - m_src_guid = x.m_src_guid; - m_dst_locator = x.m_dst_locator; - m_packet_count = x.m_packet_count; - m_byte_count = x.m_byte_count; - m_byte_magnitude_order = x.m_byte_magnitude_order; -} - -Entity2LocatorTraffic::Entity2LocatorTraffic( - Entity2LocatorTraffic&& x) noexcept -{ - m_src_guid = std::move(x.m_src_guid); - m_dst_locator = std::move(x.m_dst_locator); - m_packet_count = x.m_packet_count; - m_byte_count = x.m_byte_count; - m_byte_magnitude_order = x.m_byte_magnitude_order; -} - -Entity2LocatorTraffic& Entity2LocatorTraffic::operator =( - const Entity2LocatorTraffic& x) -{ - - m_src_guid = x.m_src_guid; - m_dst_locator = x.m_dst_locator; - m_packet_count = x.m_packet_count; - m_byte_count = x.m_byte_count; - m_byte_magnitude_order = x.m_byte_magnitude_order; - return *this; -} - -Entity2LocatorTraffic& Entity2LocatorTraffic::operator =( - Entity2LocatorTraffic&& x) noexcept -{ - - m_src_guid = std::move(x.m_src_guid); - m_dst_locator = std::move(x.m_dst_locator); - m_packet_count = x.m_packet_count; - m_byte_count = x.m_byte_count; - m_byte_magnitude_order = x.m_byte_magnitude_order; - return *this; -} - -bool Entity2LocatorTraffic::operator ==( - const Entity2LocatorTraffic& x) const -{ - return (m_src_guid == x.m_src_guid && - m_dst_locator == x.m_dst_locator && - m_packet_count == x.m_packet_count && - m_byte_count == x.m_byte_count && - m_byte_magnitude_order == x.m_byte_magnitude_order); -} - -bool Entity2LocatorTraffic::operator !=( - const Entity2LocatorTraffic& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member src_guid - * @param _src_guid New value to be copied in member src_guid - */ -void Entity2LocatorTraffic::src_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _src_guid) -{ - m_src_guid = _src_guid; -} - -/*! - * @brief This function moves the value in member src_guid - * @param _src_guid New value to be moved in member src_guid - */ -void Entity2LocatorTraffic::src_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _src_guid) -{ - m_src_guid = std::move(_src_guid); -} - -/*! - * @brief This function returns a constant reference to member src_guid - * @return Constant reference to member src_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& Entity2LocatorTraffic::src_guid() const -{ - return m_src_guid; -} - -/*! - * @brief This function returns a reference to member src_guid - * @return Reference to member src_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& Entity2LocatorTraffic::src_guid() -{ - return m_src_guid; -} - - -/*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ -void Entity2LocatorTraffic::dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator) -{ - m_dst_locator = _dst_locator; -} - -/*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ -void Entity2LocatorTraffic::dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator) -{ - m_dst_locator = std::move(_dst_locator); -} - -/*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ -const eprosima::fastdds::statistics::detail::Locator_s& Entity2LocatorTraffic::dst_locator() const -{ - return m_dst_locator; -} - -/*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ -eprosima::fastdds::statistics::detail::Locator_s& Entity2LocatorTraffic::dst_locator() -{ - return m_dst_locator; -} - - -/*! - * @brief This function sets a value in member packet_count - * @param _packet_count New value for member packet_count - */ -void Entity2LocatorTraffic::packet_count( - uint64_t _packet_count) -{ - m_packet_count = _packet_count; -} - -/*! - * @brief This function returns the value of member packet_count - * @return Value of member packet_count - */ -uint64_t Entity2LocatorTraffic::packet_count() const -{ - return m_packet_count; -} - -/*! - * @brief This function returns a reference to member packet_count - * @return Reference to member packet_count - */ -uint64_t& Entity2LocatorTraffic::packet_count() -{ - return m_packet_count; -} - - -/*! - * @brief This function sets a value in member byte_count - * @param _byte_count New value for member byte_count - */ -void Entity2LocatorTraffic::byte_count( - uint64_t _byte_count) -{ - m_byte_count = _byte_count; -} - -/*! - * @brief This function returns the value of member byte_count - * @return Value of member byte_count - */ -uint64_t Entity2LocatorTraffic::byte_count() const -{ - return m_byte_count; -} - -/*! - * @brief This function returns a reference to member byte_count - * @return Reference to member byte_count - */ -uint64_t& Entity2LocatorTraffic::byte_count() -{ - return m_byte_count; -} - - -/*! - * @brief This function sets a value in member byte_magnitude_order - * @param _byte_magnitude_order New value for member byte_magnitude_order - */ -void Entity2LocatorTraffic::byte_magnitude_order( - int16_t _byte_magnitude_order) -{ - m_byte_magnitude_order = _byte_magnitude_order; -} - -/*! - * @brief This function returns the value of member byte_magnitude_order - * @return Value of member byte_magnitude_order - */ -int16_t Entity2LocatorTraffic::byte_magnitude_order() const -{ - return m_byte_magnitude_order; -} - -/*! - * @brief This function returns a reference to member byte_magnitude_order - * @return Reference to member byte_magnitude_order - */ -int16_t& Entity2LocatorTraffic::byte_magnitude_order() -{ - return m_byte_magnitude_order; -} - - - - -WriterReaderData::WriterReaderData() -{ -} - -WriterReaderData::~WriterReaderData() -{ -} - -WriterReaderData::WriterReaderData( - const WriterReaderData& x) -{ - m_writer_guid = x.m_writer_guid; - m_reader_guid = x.m_reader_guid; - m_data = x.m_data; -} - -WriterReaderData::WriterReaderData( - WriterReaderData&& x) noexcept -{ - m_writer_guid = std::move(x.m_writer_guid); - m_reader_guid = std::move(x.m_reader_guid); - m_data = x.m_data; -} - -WriterReaderData& WriterReaderData::operator =( - const WriterReaderData& x) -{ - - m_writer_guid = x.m_writer_guid; - m_reader_guid = x.m_reader_guid; - m_data = x.m_data; - return *this; -} - -WriterReaderData& WriterReaderData::operator =( - WriterReaderData&& x) noexcept -{ - - m_writer_guid = std::move(x.m_writer_guid); - m_reader_guid = std::move(x.m_reader_guid); - m_data = x.m_data; - return *this; -} - -bool WriterReaderData::operator ==( - const WriterReaderData& x) const -{ - return (m_writer_guid == x.m_writer_guid && - m_reader_guid == x.m_reader_guid && - m_data == x.m_data); -} - -bool WriterReaderData::operator !=( - const WriterReaderData& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ -void WriterReaderData::writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid) -{ - m_writer_guid = _writer_guid; -} - -/*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ -void WriterReaderData::writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid) -{ - m_writer_guid = std::move(_writer_guid); -} - -/*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::writer_guid() const -{ - return m_writer_guid; -} - -/*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::writer_guid() -{ - return m_writer_guid; -} - - -/*! - * @brief This function copies the value in member reader_guid - * @param _reader_guid New value to be copied in member reader_guid - */ -void WriterReaderData::reader_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _reader_guid) -{ - m_reader_guid = _reader_guid; -} - -/*! - * @brief This function moves the value in member reader_guid - * @param _reader_guid New value to be moved in member reader_guid - */ -void WriterReaderData::reader_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _reader_guid) -{ - m_reader_guid = std::move(_reader_guid); -} - -/*! - * @brief This function returns a constant reference to member reader_guid - * @return Constant reference to member reader_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::reader_guid() const -{ - return m_reader_guid; -} - -/*! - * @brief This function returns a reference to member reader_guid - * @return Reference to member reader_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::reader_guid() -{ - return m_reader_guid; -} - - -/*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ -void WriterReaderData::data( - float _data) -{ - m_data = _data; -} - -/*! - * @brief This function returns the value of member data - * @return Value of member data - */ -float WriterReaderData::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -float& WriterReaderData::data() -{ - return m_data; -} - - - - -Locator2LocatorData::Locator2LocatorData() -{ -} - -Locator2LocatorData::~Locator2LocatorData() -{ -} - -Locator2LocatorData::Locator2LocatorData( - const Locator2LocatorData& x) -{ - m_src_locator = x.m_src_locator; - m_dst_locator = x.m_dst_locator; - m_data = x.m_data; -} - -Locator2LocatorData::Locator2LocatorData( - Locator2LocatorData&& x) noexcept -{ - m_src_locator = std::move(x.m_src_locator); - m_dst_locator = std::move(x.m_dst_locator); - m_data = x.m_data; -} - -Locator2LocatorData& Locator2LocatorData::operator =( - const Locator2LocatorData& x) -{ - - m_src_locator = x.m_src_locator; - m_dst_locator = x.m_dst_locator; - m_data = x.m_data; - return *this; -} - -Locator2LocatorData& Locator2LocatorData::operator =( - Locator2LocatorData&& x) noexcept -{ - - m_src_locator = std::move(x.m_src_locator); - m_dst_locator = std::move(x.m_dst_locator); - m_data = x.m_data; - return *this; -} - -bool Locator2LocatorData::operator ==( - const Locator2LocatorData& x) const -{ - return (m_src_locator == x.m_src_locator && - m_dst_locator == x.m_dst_locator && - m_data == x.m_data); -} - -bool Locator2LocatorData::operator !=( - const Locator2LocatorData& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member src_locator - * @param _src_locator New value to be copied in member src_locator - */ -void Locator2LocatorData::src_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _src_locator) -{ - m_src_locator = _src_locator; -} - -/*! - * @brief This function moves the value in member src_locator - * @param _src_locator New value to be moved in member src_locator - */ -void Locator2LocatorData::src_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _src_locator) -{ - m_src_locator = std::move(_src_locator); -} - -/*! - * @brief This function returns a constant reference to member src_locator - * @return Constant reference to member src_locator - */ -const eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::src_locator() const -{ - return m_src_locator; -} - -/*! - * @brief This function returns a reference to member src_locator - * @return Reference to member src_locator - */ -eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::src_locator() -{ - return m_src_locator; -} - - -/*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ -void Locator2LocatorData::dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator) -{ - m_dst_locator = _dst_locator; -} - -/*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ -void Locator2LocatorData::dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator) -{ - m_dst_locator = std::move(_dst_locator); -} - -/*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ -const eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::dst_locator() const -{ - return m_dst_locator; -} - -/*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ -eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::dst_locator() -{ - return m_dst_locator; -} - - -/*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ -void Locator2LocatorData::data( - float _data) -{ - m_data = _data; -} - -/*! - * @brief This function returns the value of member data - * @return Value of member data - */ -float Locator2LocatorData::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -float& Locator2LocatorData::data() -{ - return m_data; -} - - - - -EntityData::EntityData() -{ -} - -EntityData::~EntityData() -{ -} - -EntityData::EntityData( - const EntityData& x) -{ - m_guid = x.m_guid; - m_data = x.m_data; -} - -EntityData::EntityData( - EntityData&& x) noexcept -{ - m_guid = std::move(x.m_guid); - m_data = x.m_data; -} - -EntityData& EntityData::operator =( - const EntityData& x) -{ - - m_guid = x.m_guid; - m_data = x.m_data; - return *this; -} - -EntityData& EntityData::operator =( - EntityData&& x) noexcept -{ - - m_guid = std::move(x.m_guid); - m_data = x.m_data; - return *this; -} - -bool EntityData::operator ==( - const EntityData& x) const -{ - return (m_guid == x.m_guid && - m_data == x.m_data); -} - -bool EntityData::operator !=( - const EntityData& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ -void EntityData::guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid) -{ - m_guid = _guid; -} - -/*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ -void EntityData::guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid) -{ - m_guid = std::move(_guid); -} - -/*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& EntityData::guid() const -{ - return m_guid; -} - -/*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ -eprosima::fastdds::statistics::detail::GUID_s& EntityData::guid() -{ - return m_guid; -} - - -/*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ -void EntityData::data( - float _data) -{ - m_data = _data; -} - -/*! - * @brief This function returns the value of member data - * @return Value of member data - */ -float EntityData::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -float& EntityData::data() -{ - return m_data; -} - - - - -PhysicalData::PhysicalData() -{ -} - -PhysicalData::~PhysicalData() -{ -} - -PhysicalData::PhysicalData( - const PhysicalData& x) -{ - m_participant_guid = x.m_participant_guid; - m_host = x.m_host; - m_user = x.m_user; - m_process = x.m_process; -} - -PhysicalData::PhysicalData( - PhysicalData&& x) noexcept -{ - m_participant_guid = std::move(x.m_participant_guid); - m_host = std::move(x.m_host); - m_user = std::move(x.m_user); - m_process = std::move(x.m_process); -} - -PhysicalData& PhysicalData::operator =( - const PhysicalData& x) -{ - - m_participant_guid = x.m_participant_guid; - m_host = x.m_host; - m_user = x.m_user; - m_process = x.m_process; - return *this; -} - -PhysicalData& PhysicalData::operator =( - PhysicalData&& x) noexcept -{ - - m_participant_guid = std::move(x.m_participant_guid); - m_host = std::move(x.m_host); - m_user = std::move(x.m_user); - m_process = std::move(x.m_process); - return *this; -} - -bool PhysicalData::operator ==( - const PhysicalData& x) const -{ - return (m_participant_guid == x.m_participant_guid && - m_host == x.m_host && - m_user == x.m_user && - m_process == x.m_process); -} - -bool PhysicalData::operator !=( - const PhysicalData& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member participant_guid - * @param _participant_guid New value to be copied in member participant_guid - */ -void PhysicalData::participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _participant_guid) -{ - m_participant_guid = _participant_guid; -} - -/*! - * @brief This function moves the value in member participant_guid - * @param _participant_guid New value to be moved in member participant_guid - */ -void PhysicalData::participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _participant_guid) -{ - m_participant_guid = std::move(_participant_guid); -} - -/*! - * @brief This function returns a constant reference to member participant_guid - * @return Constant reference to member participant_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& PhysicalData::participant_guid() const -{ - return m_participant_guid; -} - -/*! - * @brief This function returns a reference to member participant_guid - * @return Reference to member participant_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& PhysicalData::participant_guid() -{ - return m_participant_guid; -} - - -/*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ -void PhysicalData::host( - const std::string& _host) -{ - m_host = _host; -} - -/*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ -void PhysicalData::host( - std::string&& _host) -{ - m_host = std::move(_host); -} - -/*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ -const std::string& PhysicalData::host() const -{ - return m_host; -} - -/*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ -std::string& PhysicalData::host() -{ - return m_host; -} - - -/*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ -void PhysicalData::user( - const std::string& _user) -{ - m_user = _user; -} - -/*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ -void PhysicalData::user( - std::string&& _user) -{ - m_user = std::move(_user); -} - -/*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ -const std::string& PhysicalData::user() const -{ - return m_user; -} - -/*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ -std::string& PhysicalData::user() -{ - return m_user; -} - - -/*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ -void PhysicalData::process( - const std::string& _process) -{ - m_process = _process; -} - -/*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ -void PhysicalData::process( - std::string&& _process) -{ - m_process = std::move(_process); -} - -/*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ -const std::string& PhysicalData::process() const -{ - return m_process; -} - -/*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ -std::string& PhysicalData::process() -{ - return m_process; -} - - - - - -Data::Data() -{ - m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; -} - -Data::~Data() -{ -} - -Data::Data( - const Data& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = x.m_writer_reader_data; - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = x.m_locator2locator_data; - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = x.m_entity_data; - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = x.m_entity2locator_traffic; - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = x.m_entity_count; - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = x.m_discovery_time; - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = x.m_sample_identity_count; - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = x.m_physical_data; - break; - - default: - break; - } -} - -Data::Data( - Data&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = std::move(x.m_writer_reader_data); - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = std::move(x.m_locator2locator_data); - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = std::move(x.m_entity_data); - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = std::move(x.m_entity2locator_traffic); - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = std::move(x.m_entity_count); - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = std::move(x.m_discovery_time); - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = std::move(x.m_sample_identity_count); - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = std::move(x.m_physical_data); - - break; - - default: - break; - } -} - -Data& Data::operator =( - const Data& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = x.m_writer_reader_data; - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = x.m_locator2locator_data; - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = x.m_entity_data; - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = x.m_entity2locator_traffic; - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = x.m_entity_count; - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = x.m_discovery_time; - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = x.m_sample_identity_count; - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = x.m_physical_data; - break; - - default: - break; - } - - return *this; -} - -Data& Data::operator =( - Data&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = std::move(x.m_writer_reader_data); - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = std::move(x.m_locator2locator_data); - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = std::move(x.m_entity_data); - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = std::move(x.m_entity2locator_traffic); - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = std::move(x.m_entity_count); - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = std::move(x.m_discovery_time); - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = std::move(x.m_sample_identity_count); - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = std::move(x.m_physical_data); - - break; - - default: - break; - } - - return *this; -} - -bool Data::operator ==( - const Data& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - return (m_writer_reader_data == x.m_writer_reader_data); - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - return (m_locator2locator_data == x.m_locator2locator_data); - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - return (m_entity_data == x.m_entity_data); - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - return (m_entity2locator_traffic == x.m_entity2locator_traffic); - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - return (m_entity_count == x.m_entity_count); - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - return (m_discovery_time == x.m_discovery_time); - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - return (m_sample_identity_count == x.m_sample_identity_count); - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - return (m_physical_data == x.m_physical_data); - break; - - default: - break; - } - return false; -} - -bool Data::operator !=( - const Data& x) const -{ - return !(*this == x); -} - -void Data::_d( - eprosima::fastdds::statistics::EventKind __d) -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - switch (__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - switch (__d) - { - case eprosima::fastdds::statistics::NETWORK_LATENCY: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - switch (__d) - { - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - switch (__d) - { - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - switch (__d) - { - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - switch (__d) - { - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - switch (__d) - { - case eprosima::fastdds::statistics::SAMPLE_DATAS: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - switch (__d) - { - case eprosima::fastdds::statistics::PHYSICAL_DATA: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -eprosima::fastdds::statistics::EventKind Data::_d() const -{ - return m__d; -} - -eprosima::fastdds::statistics::EventKind& Data::_d() -{ - return m__d; -} - -void Data::writer_reader_data( - const eprosima::fastdds::statistics::WriterReaderData& _writer_reader_data) -{ - m_writer_reader_data = _writer_reader_data; - m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; - -} - -void Data::writer_reader_data( - eprosima::fastdds::statistics::WriterReaderData&& _writer_reader_data) -{ - m_writer_reader_data = std::move(_writer_reader_data); - m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; - -} - -const eprosima::fastdds::statistics::WriterReaderData& Data::writer_reader_data() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_writer_reader_data; -} - -eprosima::fastdds::statistics::WriterReaderData& Data::writer_reader_data() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_writer_reader_data; -} - - -void Data::locator2locator_data( - const eprosima::fastdds::statistics::Locator2LocatorData& _locator2locator_data) -{ - m_locator2locator_data = _locator2locator_data; - m__d = eprosima::fastdds::statistics::NETWORK_LATENCY; - -} - -void Data::locator2locator_data( - eprosima::fastdds::statistics::Locator2LocatorData&& _locator2locator_data) -{ - m_locator2locator_data = std::move(_locator2locator_data); - m__d = eprosima::fastdds::statistics::NETWORK_LATENCY; - -} - -const eprosima::fastdds::statistics::Locator2LocatorData& Data::locator2locator_data() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::NETWORK_LATENCY: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_locator2locator_data; -} - -eprosima::fastdds::statistics::Locator2LocatorData& Data::locator2locator_data() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::NETWORK_LATENCY: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_locator2locator_data; -} - - -void Data::entity_data( - const eprosima::fastdds::statistics::EntityData& _entity_data) -{ - m_entity_data = _entity_data; - m__d = eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT; - -} - -void Data::entity_data( - eprosima::fastdds::statistics::EntityData&& _entity_data) -{ - m_entity_data = std::move(_entity_data); - m__d = eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT; - -} - -const eprosima::fastdds::statistics::EntityData& Data::entity_data() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_data; -} - -eprosima::fastdds::statistics::EntityData& Data::entity_data() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_data; -} - - -void Data::entity2locator_traffic( - const eprosima::fastdds::statistics::Entity2LocatorTraffic& _entity2locator_traffic) -{ - m_entity2locator_traffic = _entity2locator_traffic; - m__d = eprosima::fastdds::statistics::RTPS_SENT; - -} - -void Data::entity2locator_traffic( - eprosima::fastdds::statistics::Entity2LocatorTraffic&& _entity2locator_traffic) -{ - m_entity2locator_traffic = std::move(_entity2locator_traffic); - m__d = eprosima::fastdds::statistics::RTPS_SENT; - -} - -const eprosima::fastdds::statistics::Entity2LocatorTraffic& Data::entity2locator_traffic() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity2locator_traffic; -} - -eprosima::fastdds::statistics::Entity2LocatorTraffic& Data::entity2locator_traffic() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity2locator_traffic; -} - - -void Data::entity_count( - const eprosima::fastdds::statistics::EntityCount& _entity_count) -{ - m_entity_count = _entity_count; - m__d = eprosima::fastdds::statistics::RESENT_DATAS; - -} - -void Data::entity_count( - eprosima::fastdds::statistics::EntityCount&& _entity_count) -{ - m_entity_count = std::move(_entity_count); - m__d = eprosima::fastdds::statistics::RESENT_DATAS; - -} - -const eprosima::fastdds::statistics::EntityCount& Data::entity_count() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_count; -} - -eprosima::fastdds::statistics::EntityCount& Data::entity_count() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_count; -} - - -void Data::discovery_time( - const eprosima::fastdds::statistics::DiscoveryTime& _discovery_time) -{ - m_discovery_time = _discovery_time; - m__d = eprosima::fastdds::statistics::DISCOVERED_ENTITY; - -} - -void Data::discovery_time( - eprosima::fastdds::statistics::DiscoveryTime&& _discovery_time) -{ - m_discovery_time = std::move(_discovery_time); - m__d = eprosima::fastdds::statistics::DISCOVERED_ENTITY; - -} - -const eprosima::fastdds::statistics::DiscoveryTime& Data::discovery_time() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_discovery_time; -} - -eprosima::fastdds::statistics::DiscoveryTime& Data::discovery_time() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_discovery_time; -} - - -void Data::sample_identity_count( - const eprosima::fastdds::statistics::SampleIdentityCount& _sample_identity_count) -{ - m_sample_identity_count = _sample_identity_count; - m__d = eprosima::fastdds::statistics::SAMPLE_DATAS; - -} - -void Data::sample_identity_count( - eprosima::fastdds::statistics::SampleIdentityCount&& _sample_identity_count) -{ - m_sample_identity_count = std::move(_sample_identity_count); - m__d = eprosima::fastdds::statistics::SAMPLE_DATAS; - -} - -const eprosima::fastdds::statistics::SampleIdentityCount& Data::sample_identity_count() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::SAMPLE_DATAS: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_sample_identity_count; -} - -eprosima::fastdds::statistics::SampleIdentityCount& Data::sample_identity_count() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::SAMPLE_DATAS: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_sample_identity_count; -} - - -void Data::physical_data( - const eprosima::fastdds::statistics::PhysicalData& _physical_data) -{ - m_physical_data = _physical_data; - m__d = eprosima::fastdds::statistics::PHYSICAL_DATA; - -} - -void Data::physical_data( - eprosima::fastdds::statistics::PhysicalData&& _physical_data) -{ - m_physical_data = std::move(_physical_data); - m__d = eprosima::fastdds::statistics::PHYSICAL_DATA; - -} - -const eprosima::fastdds::statistics::PhysicalData& Data::physical_data() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::PHYSICAL_DATA: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_physical_data; -} - -eprosima::fastdds::statistics::PhysicalData& Data::physical_data() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::PHYSICAL_DATA: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_physical_data; -} - - - - -} // namespace statistics - - -} // namespace fastdds - - -} // namespace eprosima -// Include auxiliary functions like for serializing/deserializing. -#include "typesCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/src/cpp/statistics/types/types.h b/src/cpp/statistics/types/types.h deleted file mode 100644 index c51a79f2044..00000000000 --- a/src/cpp/statistics/types/types.h +++ /dev/null @@ -1,2331 +0,0 @@ -// 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 types.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include -#include "typesv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_H_ -#define _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_H_ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(TYPES_SOURCE) -#define TYPES_DllAPI __declspec( dllexport ) -#else -#define TYPES_DllAPI __declspec( dllimport ) -#endif // TYPES_SOURCE -#else -#define TYPES_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define TYPES_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - -namespace eprosima { - -namespace fastdds { - -namespace statistics { - -namespace detail { - - - -/*! - * @brief This class represents the structure EntityId_s defined by the user in the IDL file. - * @ingroup types - */ -class EntityId_s -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EntityId_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EntityId_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s( - const EntityId_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s( - EntityId_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s& operator =( - const EntityId_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s& operator =( - EntityId_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::EntityId_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EntityId_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::EntityId_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EntityId_s& x) const; - - /*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ - eProsima_user_DllExport void value( - const std::array& _value); - - /*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ - eProsima_user_DllExport void value( - std::array&& _value); - - /*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ - eProsima_user_DllExport const std::array& value() const; - - /*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ - eProsima_user_DllExport std::array& value(); - -private: - - std::array m_value{0}; - -}; - - -/*! - * @brief This class represents the structure GuidPrefix_s defined by the user in the IDL file. - * @ingroup types - */ -class GuidPrefix_s -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport GuidPrefix_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~GuidPrefix_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s( - const GuidPrefix_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s( - GuidPrefix_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s& operator =( - const GuidPrefix_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s& operator =( - GuidPrefix_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GuidPrefix_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const GuidPrefix_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GuidPrefix_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const GuidPrefix_s& x) const; - - /*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ - eProsima_user_DllExport void value( - const std::array& _value); - - /*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ - eProsima_user_DllExport void value( - std::array&& _value); - - /*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ - eProsima_user_DllExport const std::array& value() const; - - /*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ - eProsima_user_DllExport std::array& value(); - -private: - - std::array m_value{0}; - -}; - - -/*! - * @brief This class represents the structure GUID_s defined by the user in the IDL file. - * @ingroup types - */ -class GUID_s -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport GUID_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~GUID_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s( - const GUID_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s( - GUID_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s& operator =( - const GUID_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s& operator =( - GUID_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GUID_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const GUID_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GUID_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const GUID_s& x) const; - - /*! - * @brief This function copies the value in member guidPrefix - * @param _guidPrefix New value to be copied in member guidPrefix - */ - eProsima_user_DllExport void guidPrefix( - const eprosima::fastdds::statistics::detail::GuidPrefix_s& _guidPrefix); - - /*! - * @brief This function moves the value in member guidPrefix - * @param _guidPrefix New value to be moved in member guidPrefix - */ - eProsima_user_DllExport void guidPrefix( - eprosima::fastdds::statistics::detail::GuidPrefix_s&& _guidPrefix); - - /*! - * @brief This function returns a constant reference to member guidPrefix - * @return Constant reference to member guidPrefix - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GuidPrefix_s& guidPrefix() const; - - /*! - * @brief This function returns a reference to member guidPrefix - * @return Reference to member guidPrefix - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GuidPrefix_s& guidPrefix(); - - - /*! - * @brief This function copies the value in member entityId - * @param _entityId New value to be copied in member entityId - */ - eProsima_user_DllExport void entityId( - const eprosima::fastdds::statistics::detail::EntityId_s& _entityId); - - /*! - * @brief This function moves the value in member entityId - * @param _entityId New value to be moved in member entityId - */ - eProsima_user_DllExport void entityId( - eprosima::fastdds::statistics::detail::EntityId_s&& _entityId); - - /*! - * @brief This function returns a constant reference to member entityId - * @return Constant reference to member entityId - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::EntityId_s& entityId() const; - - /*! - * @brief This function returns a reference to member entityId - * @return Reference to member entityId - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::EntityId_s& entityId(); - -private: - - eprosima::fastdds::statistics::detail::GuidPrefix_s m_guidPrefix; - eprosima::fastdds::statistics::detail::EntityId_s m_entityId; - -}; - - -/*! - * @brief This class represents the structure SequenceNumber_s defined by the user in the IDL file. - * @ingroup types - */ -class SequenceNumber_s -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceNumber_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceNumber_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s( - const SequenceNumber_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s( - SequenceNumber_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s& operator =( - const SequenceNumber_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s& operator =( - SequenceNumber_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SequenceNumber_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceNumber_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SequenceNumber_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceNumber_s& x) const; - - /*! - * @brief This function sets a value in member high - * @param _high New value for member high - */ - eProsima_user_DllExport void high( - int32_t _high); - - /*! - * @brief This function returns the value of member high - * @return Value of member high - */ - eProsima_user_DllExport int32_t high() const; - - /*! - * @brief This function returns a reference to member high - * @return Reference to member high - */ - eProsima_user_DllExport int32_t& high(); - - - /*! - * @brief This function sets a value in member low - * @param _low New value for member low - */ - eProsima_user_DllExport void low( - uint32_t _low); - - /*! - * @brief This function returns the value of member low - * @return Value of member low - */ - eProsima_user_DllExport uint32_t low() const; - - /*! - * @brief This function returns a reference to member low - * @return Reference to member low - */ - eProsima_user_DllExport uint32_t& low(); - -private: - - int32_t m_high{0}; - uint32_t m_low{0}; - -}; - - -/*! - * @brief This class represents the structure SampleIdentity_s defined by the user in the IDL file. - * @ingroup types - */ -class SampleIdentity_s -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SampleIdentity_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SampleIdentity_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s( - const SampleIdentity_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s( - SampleIdentity_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s& operator =( - const SampleIdentity_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s& operator =( - SampleIdentity_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SampleIdentity_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SampleIdentity_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SampleIdentity_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SampleIdentity_s& x) const; - - /*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid); - - /*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid); - - /*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& writer_guid() const; - - /*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& writer_guid(); - - - /*! - * @brief This function copies the value in member sequence_number - * @param _sequence_number New value to be copied in member sequence_number - */ - eProsima_user_DllExport void sequence_number( - const eprosima::fastdds::statistics::detail::SequenceNumber_s& _sequence_number); - - /*! - * @brief This function moves the value in member sequence_number - * @param _sequence_number New value to be moved in member sequence_number - */ - eProsima_user_DllExport void sequence_number( - eprosima::fastdds::statistics::detail::SequenceNumber_s&& _sequence_number); - - /*! - * @brief This function returns a constant reference to member sequence_number - * @return Constant reference to member sequence_number - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::SequenceNumber_s& sequence_number() const; - - /*! - * @brief This function returns a reference to member sequence_number - * @return Reference to member sequence_number - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::SequenceNumber_s& sequence_number(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_writer_guid; - eprosima::fastdds::statistics::detail::SequenceNumber_s m_sequence_number; - -}; - - -/*! - * @brief This class represents the structure Locator_s defined by the user in the IDL file. - * @ingroup types - */ -class Locator_s -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Locator_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Locator_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s( - const Locator_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s( - Locator_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s& operator =( - const Locator_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s& operator =( - Locator_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::Locator_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Locator_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::Locator_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Locator_s& x) const; - - /*! - * @brief This function sets a value in member kind - * @param _kind New value for member kind - */ - eProsima_user_DllExport void kind( - int32_t _kind); - - /*! - * @brief This function returns the value of member kind - * @return Value of member kind - */ - eProsima_user_DllExport int32_t kind() const; - - /*! - * @brief This function returns a reference to member kind - * @return Reference to member kind - */ - eProsima_user_DllExport int32_t& kind(); - - - /*! - * @brief This function sets a value in member port - * @param _port New value for member port - */ - eProsima_user_DllExport void port( - uint32_t _port); - - /*! - * @brief This function returns the value of member port - * @return Value of member port - */ - eProsima_user_DllExport uint32_t port() const; - - /*! - * @brief This function returns a reference to member port - * @return Reference to member port - */ - eProsima_user_DllExport uint32_t& port(); - - - /*! - * @brief This function copies the value in member address - * @param _address New value to be copied in member address - */ - eProsima_user_DllExport void address( - const std::array& _address); - - /*! - * @brief This function moves the value in member address - * @param _address New value to be moved in member address - */ - eProsima_user_DllExport void address( - std::array&& _address); - - /*! - * @brief This function returns a constant reference to member address - * @return Constant reference to member address - */ - eProsima_user_DllExport const std::array& address() const; - - /*! - * @brief This function returns a reference to member address - * @return Reference to member address - */ - eProsima_user_DllExport std::array& address(); - -private: - - int32_t m_kind{0}; - uint32_t m_port{0}; - std::array m_address{0}; - -}; - -} // namespace detail - - -/*! - * @brief This class represents the structure DiscoveryTime defined by the user in the IDL file. - * @ingroup types - */ -class DiscoveryTime -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport DiscoveryTime(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~DiscoveryTime(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime( - const DiscoveryTime& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime( - DiscoveryTime&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime& operator =( - const DiscoveryTime& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime& operator =( - DiscoveryTime&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::DiscoveryTime object to compare. - */ - eProsima_user_DllExport bool operator ==( - const DiscoveryTime& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::DiscoveryTime object to compare. - */ - eProsima_user_DllExport bool operator !=( - const DiscoveryTime& x) const; - - /*! - * @brief This function copies the value in member local_participant_guid - * @param _local_participant_guid New value to be copied in member local_participant_guid - */ - eProsima_user_DllExport void local_participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _local_participant_guid); - - /*! - * @brief This function moves the value in member local_participant_guid - * @param _local_participant_guid New value to be moved in member local_participant_guid - */ - eProsima_user_DllExport void local_participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _local_participant_guid); - - /*! - * @brief This function returns a constant reference to member local_participant_guid - * @return Constant reference to member local_participant_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& local_participant_guid() const; - - /*! - * @brief This function returns a reference to member local_participant_guid - * @return Reference to member local_participant_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& local_participant_guid(); - - - /*! - * @brief This function copies the value in member remote_entity_guid - * @param _remote_entity_guid New value to be copied in member remote_entity_guid - */ - eProsima_user_DllExport void remote_entity_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _remote_entity_guid); - - /*! - * @brief This function moves the value in member remote_entity_guid - * @param _remote_entity_guid New value to be moved in member remote_entity_guid - */ - eProsima_user_DllExport void remote_entity_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _remote_entity_guid); - - /*! - * @brief This function returns a constant reference to member remote_entity_guid - * @return Constant reference to member remote_entity_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& remote_entity_guid() const; - - /*! - * @brief This function returns a reference to member remote_entity_guid - * @return Reference to member remote_entity_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& remote_entity_guid(); - - - /*! - * @brief This function sets a value in member time - * @param _time New value for member time - */ - eProsima_user_DllExport void time( - uint64_t _time); - - /*! - * @brief This function returns the value of member time - * @return Value of member time - */ - eProsima_user_DllExport uint64_t time() const; - - /*! - * @brief This function returns a reference to member time - * @return Reference to member time - */ - eProsima_user_DllExport uint64_t& time(); - - - /*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ - eProsima_user_DllExport void host( - const std::string& _host); - - /*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ - eProsima_user_DllExport void host( - std::string&& _host); - - /*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ - eProsima_user_DllExport const std::string& host() const; - - /*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ - eProsima_user_DllExport std::string& host(); - - - /*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ - eProsima_user_DllExport void user( - const std::string& _user); - - /*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ - eProsima_user_DllExport void user( - std::string&& _user); - - /*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ - eProsima_user_DllExport const std::string& user() const; - - /*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ - eProsima_user_DllExport std::string& user(); - - - /*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ - eProsima_user_DllExport void process( - const std::string& _process); - - /*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ - eProsima_user_DllExport void process( - std::string&& _process); - - /*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ - eProsima_user_DllExport const std::string& process() const; - - /*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ - eProsima_user_DllExport std::string& process(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_local_participant_guid; - eprosima::fastdds::statistics::detail::GUID_s m_remote_entity_guid; - uint64_t m_time{0}; - std::string m_host; - std::string m_user; - std::string m_process; - -}; - - -/*! - * @brief This class represents the structure EntityCount defined by the user in the IDL file. - * @ingroup types - */ -class EntityCount -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EntityCount(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EntityCount(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount( - const EntityCount& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount( - EntityCount&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount& operator =( - const EntityCount& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount& operator =( - EntityCount&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityCount object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EntityCount& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityCount object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EntityCount& x) const; - - /*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ - eProsima_user_DllExport void guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid); - - /*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ - eProsima_user_DllExport void guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid); - - /*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& guid() const; - - /*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& guid(); - - - /*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ - eProsima_user_DllExport void count( - uint64_t _count); - - /*! - * @brief This function returns the value of member count - * @return Value of member count - */ - eProsima_user_DllExport uint64_t count() const; - - /*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ - eProsima_user_DllExport uint64_t& count(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_guid; - uint64_t m_count{0}; - -}; - - -/*! - * @brief This class represents the structure SampleIdentityCount defined by the user in the IDL file. - * @ingroup types - */ -class SampleIdentityCount -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SampleIdentityCount(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SampleIdentityCount(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount( - const SampleIdentityCount& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount( - SampleIdentityCount&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount& operator =( - const SampleIdentityCount& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount& operator =( - SampleIdentityCount&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::SampleIdentityCount object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SampleIdentityCount& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::SampleIdentityCount object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SampleIdentityCount& x) const; - - /*! - * @brief This function copies the value in member sample_id - * @param _sample_id New value to be copied in member sample_id - */ - eProsima_user_DllExport void sample_id( - const eprosima::fastdds::statistics::detail::SampleIdentity_s& _sample_id); - - /*! - * @brief This function moves the value in member sample_id - * @param _sample_id New value to be moved in member sample_id - */ - eProsima_user_DllExport void sample_id( - eprosima::fastdds::statistics::detail::SampleIdentity_s&& _sample_id); - - /*! - * @brief This function returns a constant reference to member sample_id - * @return Constant reference to member sample_id - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::SampleIdentity_s& sample_id() const; - - /*! - * @brief This function returns a reference to member sample_id - * @return Reference to member sample_id - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::SampleIdentity_s& sample_id(); - - - /*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ - eProsima_user_DllExport void count( - uint64_t _count); - - /*! - * @brief This function returns the value of member count - * @return Value of member count - */ - eProsima_user_DllExport uint64_t count() const; - - /*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ - eProsima_user_DllExport uint64_t& count(); - -private: - - eprosima::fastdds::statistics::detail::SampleIdentity_s m_sample_id; - uint64_t m_count{0}; - -}; - - -/*! - * @brief This class represents the structure Entity2LocatorTraffic defined by the user in the IDL file. - * @ingroup types - */ -class Entity2LocatorTraffic -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Entity2LocatorTraffic(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Entity2LocatorTraffic(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic( - const Entity2LocatorTraffic& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic( - Entity2LocatorTraffic&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic& operator =( - const Entity2LocatorTraffic& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic& operator =( - Entity2LocatorTraffic&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Entity2LocatorTraffic object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Entity2LocatorTraffic& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Entity2LocatorTraffic object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Entity2LocatorTraffic& x) const; - - /*! - * @brief This function copies the value in member src_guid - * @param _src_guid New value to be copied in member src_guid - */ - eProsima_user_DllExport void src_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _src_guid); - - /*! - * @brief This function moves the value in member src_guid - * @param _src_guid New value to be moved in member src_guid - */ - eProsima_user_DllExport void src_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _src_guid); - - /*! - * @brief This function returns a constant reference to member src_guid - * @return Constant reference to member src_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& src_guid() const; - - /*! - * @brief This function returns a reference to member src_guid - * @return Reference to member src_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& src_guid(); - - - /*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator); - - /*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator); - - /*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::Locator_s& dst_locator() const; - - /*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::Locator_s& dst_locator(); - - - /*! - * @brief This function sets a value in member packet_count - * @param _packet_count New value for member packet_count - */ - eProsima_user_DllExport void packet_count( - uint64_t _packet_count); - - /*! - * @brief This function returns the value of member packet_count - * @return Value of member packet_count - */ - eProsima_user_DllExport uint64_t packet_count() const; - - /*! - * @brief This function returns a reference to member packet_count - * @return Reference to member packet_count - */ - eProsima_user_DllExport uint64_t& packet_count(); - - - /*! - * @brief This function sets a value in member byte_count - * @param _byte_count New value for member byte_count - */ - eProsima_user_DllExport void byte_count( - uint64_t _byte_count); - - /*! - * @brief This function returns the value of member byte_count - * @return Value of member byte_count - */ - eProsima_user_DllExport uint64_t byte_count() const; - - /*! - * @brief This function returns a reference to member byte_count - * @return Reference to member byte_count - */ - eProsima_user_DllExport uint64_t& byte_count(); - - - /*! - * @brief This function sets a value in member byte_magnitude_order - * @param _byte_magnitude_order New value for member byte_magnitude_order - */ - eProsima_user_DllExport void byte_magnitude_order( - int16_t _byte_magnitude_order); - - /*! - * @brief This function returns the value of member byte_magnitude_order - * @return Value of member byte_magnitude_order - */ - eProsima_user_DllExport int16_t byte_magnitude_order() const; - - /*! - * @brief This function returns a reference to member byte_magnitude_order - * @return Reference to member byte_magnitude_order - */ - eProsima_user_DllExport int16_t& byte_magnitude_order(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_src_guid; - eprosima::fastdds::statistics::detail::Locator_s m_dst_locator; - uint64_t m_packet_count{0}; - uint64_t m_byte_count{0}; - int16_t m_byte_magnitude_order{0}; - -}; - - -/*! - * @brief This class represents the structure WriterReaderData defined by the user in the IDL file. - * @ingroup types - */ -class WriterReaderData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport WriterReaderData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~WriterReaderData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData( - const WriterReaderData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData( - WriterReaderData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData& operator =( - const WriterReaderData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData& operator =( - WriterReaderData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::WriterReaderData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const WriterReaderData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::WriterReaderData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const WriterReaderData& x) const; - - /*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid); - - /*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid); - - /*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& writer_guid() const; - - /*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& writer_guid(); - - - /*! - * @brief This function copies the value in member reader_guid - * @param _reader_guid New value to be copied in member reader_guid - */ - eProsima_user_DllExport void reader_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _reader_guid); - - /*! - * @brief This function moves the value in member reader_guid - * @param _reader_guid New value to be moved in member reader_guid - */ - eProsima_user_DllExport void reader_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _reader_guid); - - /*! - * @brief This function returns a constant reference to member reader_guid - * @return Constant reference to member reader_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& reader_guid() const; - - /*! - * @brief This function returns a reference to member reader_guid - * @return Reference to member reader_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& reader_guid(); - - - /*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ - eProsima_user_DllExport void data( - float _data); - - /*! - * @brief This function returns the value of member data - * @return Value of member data - */ - eProsima_user_DllExport float data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport float& data(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_writer_guid; - eprosima::fastdds::statistics::detail::GUID_s m_reader_guid; - float m_data{0.0}; - -}; - - -/*! - * @brief This class represents the structure Locator2LocatorData defined by the user in the IDL file. - * @ingroup types - */ -class Locator2LocatorData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Locator2LocatorData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Locator2LocatorData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData( - const Locator2LocatorData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData( - Locator2LocatorData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData& operator =( - const Locator2LocatorData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData& operator =( - Locator2LocatorData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Locator2LocatorData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Locator2LocatorData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Locator2LocatorData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Locator2LocatorData& x) const; - - /*! - * @brief This function copies the value in member src_locator - * @param _src_locator New value to be copied in member src_locator - */ - eProsima_user_DllExport void src_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _src_locator); - - /*! - * @brief This function moves the value in member src_locator - * @param _src_locator New value to be moved in member src_locator - */ - eProsima_user_DllExport void src_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _src_locator); - - /*! - * @brief This function returns a constant reference to member src_locator - * @return Constant reference to member src_locator - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::Locator_s& src_locator() const; - - /*! - * @brief This function returns a reference to member src_locator - * @return Reference to member src_locator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::Locator_s& src_locator(); - - - /*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator); - - /*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator); - - /*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::Locator_s& dst_locator() const; - - /*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::Locator_s& dst_locator(); - - - /*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ - eProsima_user_DllExport void data( - float _data); - - /*! - * @brief This function returns the value of member data - * @return Value of member data - */ - eProsima_user_DllExport float data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport float& data(); - -private: - - eprosima::fastdds::statistics::detail::Locator_s m_src_locator; - eprosima::fastdds::statistics::detail::Locator_s m_dst_locator; - float m_data{0.0}; - -}; - - -/*! - * @brief This class represents the structure EntityData defined by the user in the IDL file. - * @ingroup types - */ -class EntityData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EntityData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EntityData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData( - const EntityData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData( - EntityData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData& operator =( - const EntityData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData& operator =( - EntityData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EntityData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EntityData& x) const; - - /*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ - eProsima_user_DllExport void guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid); - - /*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ - eProsima_user_DllExport void guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid); - - /*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& guid() const; - - /*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& guid(); - - - /*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ - eProsima_user_DllExport void data( - float _data); - - /*! - * @brief This function returns the value of member data - * @return Value of member data - */ - eProsima_user_DllExport float data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport float& data(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_guid; - float m_data{0.0}; - -}; - - -/*! - * @brief This class represents the structure PhysicalData defined by the user in the IDL file. - * @ingroup types - */ -class PhysicalData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport PhysicalData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~PhysicalData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData( - const PhysicalData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData( - PhysicalData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData& operator =( - const PhysicalData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData& operator =( - PhysicalData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::PhysicalData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const PhysicalData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::PhysicalData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const PhysicalData& x) const; - - /*! - * @brief This function copies the value in member participant_guid - * @param _participant_guid New value to be copied in member participant_guid - */ - eProsima_user_DllExport void participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _participant_guid); - - /*! - * @brief This function moves the value in member participant_guid - * @param _participant_guid New value to be moved in member participant_guid - */ - eProsima_user_DllExport void participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _participant_guid); - - /*! - * @brief This function returns a constant reference to member participant_guid - * @return Constant reference to member participant_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& participant_guid() const; - - /*! - * @brief This function returns a reference to member participant_guid - * @return Reference to member participant_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& participant_guid(); - - - /*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ - eProsima_user_DllExport void host( - const std::string& _host); - - /*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ - eProsima_user_DllExport void host( - std::string&& _host); - - /*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ - eProsima_user_DllExport const std::string& host() const; - - /*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ - eProsima_user_DllExport std::string& host(); - - - /*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ - eProsima_user_DllExport void user( - const std::string& _user); - - /*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ - eProsima_user_DllExport void user( - std::string&& _user); - - /*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ - eProsima_user_DllExport const std::string& user() const; - - /*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ - eProsima_user_DllExport std::string& user(); - - - /*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ - eProsima_user_DllExport void process( - const std::string& _process); - - /*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ - eProsima_user_DllExport void process( - std::string&& _process); - - /*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ - eProsima_user_DllExport const std::string& process() const; - - /*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ - eProsima_user_DllExport std::string& process(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_participant_guid; - std::string m_host; - std::string m_user; - std::string m_process; - -}; -/*! - * @brief This enumeration represents the EventKind bitflags defined by the user in the IDL file. - * @ingroup types - */ -enum EventKindBits : uint32_t -{ - HISTORY2HISTORY_LATENCY = 0x01ull << 0, - NETWORK_LATENCY = 0x01ull << 1, - PUBLICATION_THROUGHPUT = 0x01ull << 2, - SUBSCRIPTION_THROUGHPUT = 0x01ull << 3, - RTPS_SENT = 0x01ull << 4, - RTPS_LOST = 0x01ull << 5, - RESENT_DATAS = 0x01ull << 6, - HEARTBEAT_COUNT = 0x01ull << 7, - ACKNACK_COUNT = 0x01ull << 8, - NACKFRAG_COUNT = 0x01ull << 9, - GAP_COUNT = 0x01ull << 10, - DATA_COUNT = 0x01ull << 11, - PDP_PACKETS = 0x01ull << 12, - EDP_PACKETS = 0x01ull << 13, - DISCOVERED_ENTITY = 0x01ull << 14, - SAMPLE_DATAS = 0x01ull << 15, - PHYSICAL_DATA = 0x01ull << 16 -}; -typedef uint32_t EventKind; - - -/*! - * @brief This class represents the union Data defined by the user in the IDL file. - * @ingroup types - */ -class Data -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Data(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Data(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data( - const Data& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data( - Data&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data& operator =( - const Data& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data& operator =( - Data&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Data object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Data& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Data object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Data& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - eprosima::fastdds::statistics::EventKind __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EventKind _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EventKind& _d(); - - /*! - * @brief This function copies the value in member writer_reader_data - * @param _writer_reader_data New value to be copied in member writer_reader_data - */ - eProsima_user_DllExport void writer_reader_data( - const eprosima::fastdds::statistics::WriterReaderData& _writer_reader_data); - - /*! - * @brief This function moves the value in member writer_reader_data - * @param _writer_reader_data New value to be moved in member writer_reader_data - */ - eProsima_user_DllExport void writer_reader_data( - eprosima::fastdds::statistics::WriterReaderData&& _writer_reader_data); - - /*! - * @brief This function returns a constant reference to member writer_reader_data - * @return Constant reference to member writer_reader_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::WriterReaderData& writer_reader_data() const; - - /*! - * @brief This function returns a reference to member writer_reader_data - * @return Reference to member writer_reader_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::WriterReaderData& writer_reader_data(); - - - /*! - * @brief This function copies the value in member locator2locator_data - * @param _locator2locator_data New value to be copied in member locator2locator_data - */ - eProsima_user_DllExport void locator2locator_data( - const eprosima::fastdds::statistics::Locator2LocatorData& _locator2locator_data); - - /*! - * @brief This function moves the value in member locator2locator_data - * @param _locator2locator_data New value to be moved in member locator2locator_data - */ - eProsima_user_DllExport void locator2locator_data( - eprosima::fastdds::statistics::Locator2LocatorData&& _locator2locator_data); - - /*! - * @brief This function returns a constant reference to member locator2locator_data - * @return Constant reference to member locator2locator_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::Locator2LocatorData& locator2locator_data() const; - - /*! - * @brief This function returns a reference to member locator2locator_data - * @return Reference to member locator2locator_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::Locator2LocatorData& locator2locator_data(); - - - /*! - * @brief This function copies the value in member entity_data - * @param _entity_data New value to be copied in member entity_data - */ - eProsima_user_DllExport void entity_data( - const eprosima::fastdds::statistics::EntityData& _entity_data); - - /*! - * @brief This function moves the value in member entity_data - * @param _entity_data New value to be moved in member entity_data - */ - eProsima_user_DllExport void entity_data( - eprosima::fastdds::statistics::EntityData&& _entity_data); - - /*! - * @brief This function returns a constant reference to member entity_data - * @return Constant reference to member entity_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::EntityData& entity_data() const; - - /*! - * @brief This function returns a reference to member entity_data - * @return Reference to member entity_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EntityData& entity_data(); - - - /*! - * @brief This function copies the value in member entity2locator_traffic - * @param _entity2locator_traffic New value to be copied in member entity2locator_traffic - */ - eProsima_user_DllExport void entity2locator_traffic( - const eprosima::fastdds::statistics::Entity2LocatorTraffic& _entity2locator_traffic); - - /*! - * @brief This function moves the value in member entity2locator_traffic - * @param _entity2locator_traffic New value to be moved in member entity2locator_traffic - */ - eProsima_user_DllExport void entity2locator_traffic( - eprosima::fastdds::statistics::Entity2LocatorTraffic&& _entity2locator_traffic); - - /*! - * @brief This function returns a constant reference to member entity2locator_traffic - * @return Constant reference to member entity2locator_traffic - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::Entity2LocatorTraffic& entity2locator_traffic() const; - - /*! - * @brief This function returns a reference to member entity2locator_traffic - * @return Reference to member entity2locator_traffic - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::Entity2LocatorTraffic& entity2locator_traffic(); - - - /*! - * @brief This function copies the value in member entity_count - * @param _entity_count New value to be copied in member entity_count - */ - eProsima_user_DllExport void entity_count( - const eprosima::fastdds::statistics::EntityCount& _entity_count); - - /*! - * @brief This function moves the value in member entity_count - * @param _entity_count New value to be moved in member entity_count - */ - eProsima_user_DllExport void entity_count( - eprosima::fastdds::statistics::EntityCount&& _entity_count); - - /*! - * @brief This function returns a constant reference to member entity_count - * @return Constant reference to member entity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::EntityCount& entity_count() const; - - /*! - * @brief This function returns a reference to member entity_count - * @return Reference to member entity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EntityCount& entity_count(); - - - /*! - * @brief This function copies the value in member discovery_time - * @param _discovery_time New value to be copied in member discovery_time - */ - eProsima_user_DllExport void discovery_time( - const eprosima::fastdds::statistics::DiscoveryTime& _discovery_time); - - /*! - * @brief This function moves the value in member discovery_time - * @param _discovery_time New value to be moved in member discovery_time - */ - eProsima_user_DllExport void discovery_time( - eprosima::fastdds::statistics::DiscoveryTime&& _discovery_time); - - /*! - * @brief This function returns a constant reference to member discovery_time - * @return Constant reference to member discovery_time - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::DiscoveryTime& discovery_time() const; - - /*! - * @brief This function returns a reference to member discovery_time - * @return Reference to member discovery_time - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::DiscoveryTime& discovery_time(); - - - /*! - * @brief This function copies the value in member sample_identity_count - * @param _sample_identity_count New value to be copied in member sample_identity_count - */ - eProsima_user_DllExport void sample_identity_count( - const eprosima::fastdds::statistics::SampleIdentityCount& _sample_identity_count); - - /*! - * @brief This function moves the value in member sample_identity_count - * @param _sample_identity_count New value to be moved in member sample_identity_count - */ - eProsima_user_DllExport void sample_identity_count( - eprosima::fastdds::statistics::SampleIdentityCount&& _sample_identity_count); - - /*! - * @brief This function returns a constant reference to member sample_identity_count - * @return Constant reference to member sample_identity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::SampleIdentityCount& sample_identity_count() const; - - /*! - * @brief This function returns a reference to member sample_identity_count - * @return Reference to member sample_identity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::SampleIdentityCount& sample_identity_count(); - - - /*! - * @brief This function copies the value in member physical_data - * @param _physical_data New value to be copied in member physical_data - */ - eProsima_user_DllExport void physical_data( - const eprosima::fastdds::statistics::PhysicalData& _physical_data); - - /*! - * @brief This function moves the value in member physical_data - * @param _physical_data New value to be moved in member physical_data - */ - eProsima_user_DllExport void physical_data( - eprosima::fastdds::statistics::PhysicalData&& _physical_data); - - /*! - * @brief This function returns a constant reference to member physical_data - * @return Constant reference to member physical_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::PhysicalData& physical_data() const; - - /*! - * @brief This function returns a reference to member physical_data - * @return Reference to member physical_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::PhysicalData& physical_data(); - -private: - - eprosima::fastdds::statistics::EventKind m__d; - - eprosima::fastdds::statistics::WriterReaderData m_writer_reader_data; - eprosima::fastdds::statistics::Locator2LocatorData m_locator2locator_data; - eprosima::fastdds::statistics::EntityData m_entity_data; - eprosima::fastdds::statistics::Entity2LocatorTraffic m_entity2locator_traffic; - eprosima::fastdds::statistics::EntityCount m_entity_count; - eprosima::fastdds::statistics::DiscoveryTime m_discovery_time; - eprosima::fastdds::statistics::SampleIdentityCount m_sample_identity_count; - eprosima::fastdds::statistics::PhysicalData m_physical_data; -}; - -} // namespace statistics - -} // namespace fastdds - -} // namespace eprosima - -#endif // _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_H_ - - - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/src/cpp/statistics/types/types.hpp b/src/cpp/statistics/types/types.hpp new file mode 100644 index 00000000000..dcbf1fb35f9 --- /dev/null +++ b/src/cpp/statistics/types/types.hpp @@ -0,0 +1,4177 @@ +// 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 types.hpp + * This header file contains the declaration of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_HPP_ +#define _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_HPP_ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#define eProsima_user_DllExport __declspec( dllexport ) +#else +#define eProsima_user_DllExport +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define eProsima_user_DllExport +#endif // _WIN32 + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#if defined(TYPES_SOURCE) +#define TYPES_DllAPI __declspec( dllexport ) +#else +#define TYPES_DllAPI __declspec( dllimport ) +#endif // TYPES_SOURCE +#else +#define TYPES_DllAPI +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define TYPES_DllAPI +#endif // _WIN32 + +namespace eprosima { + +namespace fastdds { + +namespace statistics { + +namespace detail { + + + +/*! + * @brief This class represents the structure EntityId_s defined by the user in the IDL file. + * @ingroup types + */ +class EntityId_s +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport EntityId_s() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~EntityId_s() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object EntityId_s that will be copied. + */ + eProsima_user_DllExport EntityId_s( + const EntityId_s& x) + { + m_value = x.m_value; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object EntityId_s that will be copied. + */ + eProsima_user_DllExport EntityId_s( + EntityId_s&& x) noexcept + { + m_value = std::move(x.m_value); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object EntityId_s that will be copied. + */ + eProsima_user_DllExport EntityId_s& operator =( + const EntityId_s& x) + { + + m_value = x.m_value; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object EntityId_s that will be copied. + */ + eProsima_user_DllExport EntityId_s& operator =( + EntityId_s&& x) noexcept + { + + m_value = std::move(x.m_value); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x EntityId_s object to compare. + */ + eProsima_user_DllExport bool operator ==( + const EntityId_s& x) const + { + return (m_value == x.m_value); + } + + /*! + * @brief Comparison operator. + * @param x EntityId_s object to compare. + */ + eProsima_user_DllExport bool operator !=( + const EntityId_s& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member value + * @param _value New value to be copied in member value + */ + eProsima_user_DllExport void value( + const std::array& _value) + { + m_value = _value; + } + + /*! + * @brief This function moves the value in member value + * @param _value New value to be moved in member value + */ + eProsima_user_DllExport void value( + std::array&& _value) + { + m_value = std::move(_value); + } + + /*! + * @brief This function returns a constant reference to member value + * @return Constant reference to member value + */ + eProsima_user_DllExport const std::array& value() const + { + return m_value; + } + + /*! + * @brief This function returns a reference to member value + * @return Reference to member value + */ + eProsima_user_DllExport std::array& value() + { + return m_value; + } + + + +private: + + std::array m_value{0}; + +}; + + +/*! + * @brief This class represents the structure GuidPrefix_s defined by the user in the IDL file. + * @ingroup types + */ +class GuidPrefix_s +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport GuidPrefix_s() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~GuidPrefix_s() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object GuidPrefix_s that will be copied. + */ + eProsima_user_DllExport GuidPrefix_s( + const GuidPrefix_s& x) + { + m_value = x.m_value; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object GuidPrefix_s that will be copied. + */ + eProsima_user_DllExport GuidPrefix_s( + GuidPrefix_s&& x) noexcept + { + m_value = std::move(x.m_value); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object GuidPrefix_s that will be copied. + */ + eProsima_user_DllExport GuidPrefix_s& operator =( + const GuidPrefix_s& x) + { + + m_value = x.m_value; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object GuidPrefix_s that will be copied. + */ + eProsima_user_DllExport GuidPrefix_s& operator =( + GuidPrefix_s&& x) noexcept + { + + m_value = std::move(x.m_value); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x GuidPrefix_s object to compare. + */ + eProsima_user_DllExport bool operator ==( + const GuidPrefix_s& x) const + { + return (m_value == x.m_value); + } + + /*! + * @brief Comparison operator. + * @param x GuidPrefix_s object to compare. + */ + eProsima_user_DllExport bool operator !=( + const GuidPrefix_s& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member value + * @param _value New value to be copied in member value + */ + eProsima_user_DllExport void value( + const std::array& _value) + { + m_value = _value; + } + + /*! + * @brief This function moves the value in member value + * @param _value New value to be moved in member value + */ + eProsima_user_DllExport void value( + std::array&& _value) + { + m_value = std::move(_value); + } + + /*! + * @brief This function returns a constant reference to member value + * @return Constant reference to member value + */ + eProsima_user_DllExport const std::array& value() const + { + return m_value; + } + + /*! + * @brief This function returns a reference to member value + * @return Reference to member value + */ + eProsima_user_DllExport std::array& value() + { + return m_value; + } + + + +private: + + std::array m_value{0}; + +}; + + +/*! + * @brief This class represents the structure GUID_s defined by the user in the IDL file. + * @ingroup types + */ +class GUID_s +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport GUID_s() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~GUID_s() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object GUID_s that will be copied. + */ + eProsima_user_DllExport GUID_s( + const GUID_s& x) + { + m_guidPrefix = x.m_guidPrefix; + + m_entityId = x.m_entityId; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object GUID_s that will be copied. + */ + eProsima_user_DllExport GUID_s( + GUID_s&& x) noexcept + { + m_guidPrefix = std::move(x.m_guidPrefix); + m_entityId = std::move(x.m_entityId); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object GUID_s that will be copied. + */ + eProsima_user_DllExport GUID_s& operator =( + const GUID_s& x) + { + + m_guidPrefix = x.m_guidPrefix; + + m_entityId = x.m_entityId; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object GUID_s that will be copied. + */ + eProsima_user_DllExport GUID_s& operator =( + GUID_s&& x) noexcept + { + + m_guidPrefix = std::move(x.m_guidPrefix); + m_entityId = std::move(x.m_entityId); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x GUID_s object to compare. + */ + eProsima_user_DllExport bool operator ==( + const GUID_s& x) const + { + return (m_guidPrefix == x.m_guidPrefix && + m_entityId == x.m_entityId); + } + + /*! + * @brief Comparison operator. + * @param x GUID_s object to compare. + */ + eProsima_user_DllExport bool operator !=( + const GUID_s& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member guidPrefix + * @param _guidPrefix New value to be copied in member guidPrefix + */ + eProsima_user_DllExport void guidPrefix( + const GuidPrefix_s& _guidPrefix) + { + m_guidPrefix = _guidPrefix; + } + + /*! + * @brief This function moves the value in member guidPrefix + * @param _guidPrefix New value to be moved in member guidPrefix + */ + eProsima_user_DllExport void guidPrefix( + GuidPrefix_s&& _guidPrefix) + { + m_guidPrefix = std::move(_guidPrefix); + } + + /*! + * @brief This function returns a constant reference to member guidPrefix + * @return Constant reference to member guidPrefix + */ + eProsima_user_DllExport const GuidPrefix_s& guidPrefix() const + { + return m_guidPrefix; + } + + /*! + * @brief This function returns a reference to member guidPrefix + * @return Reference to member guidPrefix + */ + eProsima_user_DllExport GuidPrefix_s& guidPrefix() + { + return m_guidPrefix; + } + + + /*! + * @brief This function copies the value in member entityId + * @param _entityId New value to be copied in member entityId + */ + eProsima_user_DllExport void entityId( + const EntityId_s& _entityId) + { + m_entityId = _entityId; + } + + /*! + * @brief This function moves the value in member entityId + * @param _entityId New value to be moved in member entityId + */ + eProsima_user_DllExport void entityId( + EntityId_s&& _entityId) + { + m_entityId = std::move(_entityId); + } + + /*! + * @brief This function returns a constant reference to member entityId + * @return Constant reference to member entityId + */ + eProsima_user_DllExport const EntityId_s& entityId() const + { + return m_entityId; + } + + /*! + * @brief This function returns a reference to member entityId + * @return Reference to member entityId + */ + eProsima_user_DllExport EntityId_s& entityId() + { + return m_entityId; + } + + + +private: + + GuidPrefix_s m_guidPrefix; + EntityId_s m_entityId; + +}; + + +/*! + * @brief This class represents the structure SequenceNumber_s defined by the user in the IDL file. + * @ingroup types + */ +class SequenceNumber_s +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport SequenceNumber_s() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~SequenceNumber_s() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object SequenceNumber_s that will be copied. + */ + eProsima_user_DllExport SequenceNumber_s( + const SequenceNumber_s& x) + { + m_high = x.m_high; + + m_low = x.m_low; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object SequenceNumber_s that will be copied. + */ + eProsima_user_DllExport SequenceNumber_s( + SequenceNumber_s&& x) noexcept + { + m_high = x.m_high; + m_low = x.m_low; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object SequenceNumber_s that will be copied. + */ + eProsima_user_DllExport SequenceNumber_s& operator =( + const SequenceNumber_s& x) + { + + m_high = x.m_high; + + m_low = x.m_low; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object SequenceNumber_s that will be copied. + */ + eProsima_user_DllExport SequenceNumber_s& operator =( + SequenceNumber_s&& x) noexcept + { + + m_high = x.m_high; + m_low = x.m_low; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x SequenceNumber_s object to compare. + */ + eProsima_user_DllExport bool operator ==( + const SequenceNumber_s& x) const + { + return (m_high == x.m_high && + m_low == x.m_low); + } + + /*! + * @brief Comparison operator. + * @param x SequenceNumber_s object to compare. + */ + eProsima_user_DllExport bool operator !=( + const SequenceNumber_s& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member high + * @param _high New value for member high + */ + eProsima_user_DllExport void high( + int32_t _high) + { + m_high = _high; + } + + /*! + * @brief This function returns the value of member high + * @return Value of member high + */ + eProsima_user_DllExport int32_t high() const + { + return m_high; + } + + /*! + * @brief This function returns a reference to member high + * @return Reference to member high + */ + eProsima_user_DllExport int32_t& high() + { + return m_high; + } + + + /*! + * @brief This function sets a value in member low + * @param _low New value for member low + */ + eProsima_user_DllExport void low( + uint32_t _low) + { + m_low = _low; + } + + /*! + * @brief This function returns the value of member low + * @return Value of member low + */ + eProsima_user_DllExport uint32_t low() const + { + return m_low; + } + + /*! + * @brief This function returns a reference to member low + * @return Reference to member low + */ + eProsima_user_DllExport uint32_t& low() + { + return m_low; + } + + + +private: + + int32_t m_high{0}; + uint32_t m_low{0}; + +}; + + +/*! + * @brief This class represents the structure SampleIdentity_s defined by the user in the IDL file. + * @ingroup types + */ +class SampleIdentity_s +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport SampleIdentity_s() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~SampleIdentity_s() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object SampleIdentity_s that will be copied. + */ + eProsima_user_DllExport SampleIdentity_s( + const SampleIdentity_s& x) + { + m_writer_guid = x.m_writer_guid; + + m_sequence_number = x.m_sequence_number; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object SampleIdentity_s that will be copied. + */ + eProsima_user_DllExport SampleIdentity_s( + SampleIdentity_s&& x) noexcept + { + m_writer_guid = std::move(x.m_writer_guid); + m_sequence_number = std::move(x.m_sequence_number); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object SampleIdentity_s that will be copied. + */ + eProsima_user_DllExport SampleIdentity_s& operator =( + const SampleIdentity_s& x) + { + + m_writer_guid = x.m_writer_guid; + + m_sequence_number = x.m_sequence_number; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object SampleIdentity_s that will be copied. + */ + eProsima_user_DllExport SampleIdentity_s& operator =( + SampleIdentity_s&& x) noexcept + { + + m_writer_guid = std::move(x.m_writer_guid); + m_sequence_number = std::move(x.m_sequence_number); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x SampleIdentity_s object to compare. + */ + eProsima_user_DllExport bool operator ==( + const SampleIdentity_s& x) const + { + return (m_writer_guid == x.m_writer_guid && + m_sequence_number == x.m_sequence_number); + } + + /*! + * @brief Comparison operator. + * @param x SampleIdentity_s object to compare. + */ + eProsima_user_DllExport bool operator !=( + const SampleIdentity_s& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member writer_guid + * @param _writer_guid New value to be copied in member writer_guid + */ + eProsima_user_DllExport void writer_guid( + const GUID_s& _writer_guid) + { + m_writer_guid = _writer_guid; + } + + /*! + * @brief This function moves the value in member writer_guid + * @param _writer_guid New value to be moved in member writer_guid + */ + eProsima_user_DllExport void writer_guid( + GUID_s&& _writer_guid) + { + m_writer_guid = std::move(_writer_guid); + } + + /*! + * @brief This function returns a constant reference to member writer_guid + * @return Constant reference to member writer_guid + */ + eProsima_user_DllExport const GUID_s& writer_guid() const + { + return m_writer_guid; + } + + /*! + * @brief This function returns a reference to member writer_guid + * @return Reference to member writer_guid + */ + eProsima_user_DllExport GUID_s& writer_guid() + { + return m_writer_guid; + } + + + /*! + * @brief This function copies the value in member sequence_number + * @param _sequence_number New value to be copied in member sequence_number + */ + eProsima_user_DllExport void sequence_number( + const SequenceNumber_s& _sequence_number) + { + m_sequence_number = _sequence_number; + } + + /*! + * @brief This function moves the value in member sequence_number + * @param _sequence_number New value to be moved in member sequence_number + */ + eProsima_user_DllExport void sequence_number( + SequenceNumber_s&& _sequence_number) + { + m_sequence_number = std::move(_sequence_number); + } + + /*! + * @brief This function returns a constant reference to member sequence_number + * @return Constant reference to member sequence_number + */ + eProsima_user_DllExport const SequenceNumber_s& sequence_number() const + { + return m_sequence_number; + } + + /*! + * @brief This function returns a reference to member sequence_number + * @return Reference to member sequence_number + */ + eProsima_user_DllExport SequenceNumber_s& sequence_number() + { + return m_sequence_number; + } + + + +private: + + GUID_s m_writer_guid; + SequenceNumber_s m_sequence_number; + +}; + + +/*! + * @brief This class represents the structure Locator_s defined by the user in the IDL file. + * @ingroup types + */ +class Locator_s +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport Locator_s() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~Locator_s() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object Locator_s that will be copied. + */ + eProsima_user_DllExport Locator_s( + const Locator_s& x) + { + m_kind = x.m_kind; + + m_port = x.m_port; + + m_address = x.m_address; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object Locator_s that will be copied. + */ + eProsima_user_DllExport Locator_s( + Locator_s&& x) noexcept + { + m_kind = x.m_kind; + m_port = x.m_port; + m_address = std::move(x.m_address); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object Locator_s that will be copied. + */ + eProsima_user_DllExport Locator_s& operator =( + const Locator_s& x) + { + + m_kind = x.m_kind; + + m_port = x.m_port; + + m_address = x.m_address; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object Locator_s that will be copied. + */ + eProsima_user_DllExport Locator_s& operator =( + Locator_s&& x) noexcept + { + + m_kind = x.m_kind; + m_port = x.m_port; + m_address = std::move(x.m_address); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x Locator_s object to compare. + */ + eProsima_user_DllExport bool operator ==( + const Locator_s& x) const + { + return (m_kind == x.m_kind && + m_port == x.m_port && + m_address == x.m_address); + } + + /*! + * @brief Comparison operator. + * @param x Locator_s object to compare. + */ + eProsima_user_DllExport bool operator !=( + const Locator_s& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member kind + * @param _kind New value for member kind + */ + eProsima_user_DllExport void kind( + int32_t _kind) + { + m_kind = _kind; + } + + /*! + * @brief This function returns the value of member kind + * @return Value of member kind + */ + eProsima_user_DllExport int32_t kind() const + { + return m_kind; + } + + /*! + * @brief This function returns a reference to member kind + * @return Reference to member kind + */ + eProsima_user_DllExport int32_t& kind() + { + return m_kind; + } + + + /*! + * @brief This function sets a value in member port + * @param _port New value for member port + */ + eProsima_user_DllExport void port( + uint32_t _port) + { + m_port = _port; + } + + /*! + * @brief This function returns the value of member port + * @return Value of member port + */ + eProsima_user_DllExport uint32_t port() const + { + return m_port; + } + + /*! + * @brief This function returns a reference to member port + * @return Reference to member port + */ + eProsima_user_DllExport uint32_t& port() + { + return m_port; + } + + + /*! + * @brief This function copies the value in member address + * @param _address New value to be copied in member address + */ + eProsima_user_DllExport void address( + const std::array& _address) + { + m_address = _address; + } + + /*! + * @brief This function moves the value in member address + * @param _address New value to be moved in member address + */ + eProsima_user_DllExport void address( + std::array&& _address) + { + m_address = std::move(_address); + } + + /*! + * @brief This function returns a constant reference to member address + * @return Constant reference to member address + */ + eProsima_user_DllExport const std::array& address() const + { + return m_address; + } + + /*! + * @brief This function returns a reference to member address + * @return Reference to member address + */ + eProsima_user_DllExport std::array& address() + { + return m_address; + } + + + +private: + + int32_t m_kind{0}; + uint32_t m_port{0}; + std::array m_address{0}; + +}; + +} // namespace detail + + +/*! + * @brief This class represents the structure DiscoveryTime defined by the user in the IDL file. + * @ingroup types + */ +class DiscoveryTime +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport DiscoveryTime() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~DiscoveryTime() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object DiscoveryTime that will be copied. + */ + eProsima_user_DllExport DiscoveryTime( + const DiscoveryTime& x) + { + m_local_participant_guid = x.m_local_participant_guid; + + m_remote_entity_guid = x.m_remote_entity_guid; + + m_time = x.m_time; + + m_host = x.m_host; + + m_user = x.m_user; + + m_process = x.m_process; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object DiscoveryTime that will be copied. + */ + eProsima_user_DllExport DiscoveryTime( + DiscoveryTime&& x) noexcept + { + m_local_participant_guid = std::move(x.m_local_participant_guid); + m_remote_entity_guid = std::move(x.m_remote_entity_guid); + m_time = x.m_time; + m_host = std::move(x.m_host); + m_user = std::move(x.m_user); + m_process = std::move(x.m_process); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object DiscoveryTime that will be copied. + */ + eProsima_user_DllExport DiscoveryTime& operator =( + const DiscoveryTime& x) + { + + m_local_participant_guid = x.m_local_participant_guid; + + m_remote_entity_guid = x.m_remote_entity_guid; + + m_time = x.m_time; + + m_host = x.m_host; + + m_user = x.m_user; + + m_process = x.m_process; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object DiscoveryTime that will be copied. + */ + eProsima_user_DllExport DiscoveryTime& operator =( + DiscoveryTime&& x) noexcept + { + + m_local_participant_guid = std::move(x.m_local_participant_guid); + m_remote_entity_guid = std::move(x.m_remote_entity_guid); + m_time = x.m_time; + m_host = std::move(x.m_host); + m_user = std::move(x.m_user); + m_process = std::move(x.m_process); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x DiscoveryTime object to compare. + */ + eProsima_user_DllExport bool operator ==( + const DiscoveryTime& x) const + { + return (m_local_participant_guid == x.m_local_participant_guid && + m_remote_entity_guid == x.m_remote_entity_guid && + m_time == x.m_time && + m_host == x.m_host && + m_user == x.m_user && + m_process == x.m_process); + } + + /*! + * @brief Comparison operator. + * @param x DiscoveryTime object to compare. + */ + eProsima_user_DllExport bool operator !=( + const DiscoveryTime& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member local_participant_guid + * @param _local_participant_guid New value to be copied in member local_participant_guid + */ + eProsima_user_DllExport void local_participant_guid( + const detail::GUID_s& _local_participant_guid) + { + m_local_participant_guid = _local_participant_guid; + } + + /*! + * @brief This function moves the value in member local_participant_guid + * @param _local_participant_guid New value to be moved in member local_participant_guid + */ + eProsima_user_DllExport void local_participant_guid( + detail::GUID_s&& _local_participant_guid) + { + m_local_participant_guid = std::move(_local_participant_guid); + } + + /*! + * @brief This function returns a constant reference to member local_participant_guid + * @return Constant reference to member local_participant_guid + */ + eProsima_user_DllExport const detail::GUID_s& local_participant_guid() const + { + return m_local_participant_guid; + } + + /*! + * @brief This function returns a reference to member local_participant_guid + * @return Reference to member local_participant_guid + */ + eProsima_user_DllExport detail::GUID_s& local_participant_guid() + { + return m_local_participant_guid; + } + + + /*! + * @brief This function copies the value in member remote_entity_guid + * @param _remote_entity_guid New value to be copied in member remote_entity_guid + */ + eProsima_user_DllExport void remote_entity_guid( + const detail::GUID_s& _remote_entity_guid) + { + m_remote_entity_guid = _remote_entity_guid; + } + + /*! + * @brief This function moves the value in member remote_entity_guid + * @param _remote_entity_guid New value to be moved in member remote_entity_guid + */ + eProsima_user_DllExport void remote_entity_guid( + detail::GUID_s&& _remote_entity_guid) + { + m_remote_entity_guid = std::move(_remote_entity_guid); + } + + /*! + * @brief This function returns a constant reference to member remote_entity_guid + * @return Constant reference to member remote_entity_guid + */ + eProsima_user_DllExport const detail::GUID_s& remote_entity_guid() const + { + return m_remote_entity_guid; + } + + /*! + * @brief This function returns a reference to member remote_entity_guid + * @return Reference to member remote_entity_guid + */ + eProsima_user_DllExport detail::GUID_s& remote_entity_guid() + { + return m_remote_entity_guid; + } + + + /*! + * @brief This function sets a value in member time + * @param _time New value for member time + */ + eProsima_user_DllExport void time( + uint64_t _time) + { + m_time = _time; + } + + /*! + * @brief This function returns the value of member time + * @return Value of member time + */ + eProsima_user_DllExport uint64_t time() const + { + return m_time; + } + + /*! + * @brief This function returns a reference to member time + * @return Reference to member time + */ + eProsima_user_DllExport uint64_t& time() + { + return m_time; + } + + + /*! + * @brief This function copies the value in member host + * @param _host New value to be copied in member host + */ + eProsima_user_DllExport void host( + const std::string& _host) + { + m_host = _host; + } + + /*! + * @brief This function moves the value in member host + * @param _host New value to be moved in member host + */ + eProsima_user_DllExport void host( + std::string&& _host) + { + m_host = std::move(_host); + } + + /*! + * @brief This function returns a constant reference to member host + * @return Constant reference to member host + */ + eProsima_user_DllExport const std::string& host() const + { + return m_host; + } + + /*! + * @brief This function returns a reference to member host + * @return Reference to member host + */ + eProsima_user_DllExport std::string& host() + { + return m_host; + } + + + /*! + * @brief This function copies the value in member user + * @param _user New value to be copied in member user + */ + eProsima_user_DllExport void user( + const std::string& _user) + { + m_user = _user; + } + + /*! + * @brief This function moves the value in member user + * @param _user New value to be moved in member user + */ + eProsima_user_DllExport void user( + std::string&& _user) + { + m_user = std::move(_user); + } + + /*! + * @brief This function returns a constant reference to member user + * @return Constant reference to member user + */ + eProsima_user_DllExport const std::string& user() const + { + return m_user; + } + + /*! + * @brief This function returns a reference to member user + * @return Reference to member user + */ + eProsima_user_DllExport std::string& user() + { + return m_user; + } + + + /*! + * @brief This function copies the value in member process + * @param _process New value to be copied in member process + */ + eProsima_user_DllExport void process( + const std::string& _process) + { + m_process = _process; + } + + /*! + * @brief This function moves the value in member process + * @param _process New value to be moved in member process + */ + eProsima_user_DllExport void process( + std::string&& _process) + { + m_process = std::move(_process); + } + + /*! + * @brief This function returns a constant reference to member process + * @return Constant reference to member process + */ + eProsima_user_DllExport const std::string& process() const + { + return m_process; + } + + /*! + * @brief This function returns a reference to member process + * @return Reference to member process + */ + eProsima_user_DllExport std::string& process() + { + return m_process; + } + + + +private: + + detail::GUID_s m_local_participant_guid; + detail::GUID_s m_remote_entity_guid; + uint64_t m_time{0}; + std::string m_host; + std::string m_user; + std::string m_process; + +}; + + +/*! + * @brief This class represents the structure EntityCount defined by the user in the IDL file. + * @ingroup types + */ +class EntityCount +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport EntityCount() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~EntityCount() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object EntityCount that will be copied. + */ + eProsima_user_DllExport EntityCount( + const EntityCount& x) + { + m_guid = x.m_guid; + + m_count = x.m_count; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object EntityCount that will be copied. + */ + eProsima_user_DllExport EntityCount( + EntityCount&& x) noexcept + { + m_guid = std::move(x.m_guid); + m_count = x.m_count; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object EntityCount that will be copied. + */ + eProsima_user_DllExport EntityCount& operator =( + const EntityCount& x) + { + + m_guid = x.m_guid; + + m_count = x.m_count; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object EntityCount that will be copied. + */ + eProsima_user_DllExport EntityCount& operator =( + EntityCount&& x) noexcept + { + + m_guid = std::move(x.m_guid); + m_count = x.m_count; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x EntityCount object to compare. + */ + eProsima_user_DllExport bool operator ==( + const EntityCount& x) const + { + return (m_guid == x.m_guid && + m_count == x.m_count); + } + + /*! + * @brief Comparison operator. + * @param x EntityCount object to compare. + */ + eProsima_user_DllExport bool operator !=( + const EntityCount& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member guid + * @param _guid New value to be copied in member guid + */ + eProsima_user_DllExport void guid( + const detail::GUID_s& _guid) + { + m_guid = _guid; + } + + /*! + * @brief This function moves the value in member guid + * @param _guid New value to be moved in member guid + */ + eProsima_user_DllExport void guid( + detail::GUID_s&& _guid) + { + m_guid = std::move(_guid); + } + + /*! + * @brief This function returns a constant reference to member guid + * @return Constant reference to member guid + */ + eProsima_user_DllExport const detail::GUID_s& guid() const + { + return m_guid; + } + + /*! + * @brief This function returns a reference to member guid + * @return Reference to member guid + */ + eProsima_user_DllExport detail::GUID_s& guid() + { + return m_guid; + } + + + /*! + * @brief This function sets a value in member count + * @param _count New value for member count + */ + eProsima_user_DllExport void count( + uint64_t _count) + { + m_count = _count; + } + + /*! + * @brief This function returns the value of member count + * @return Value of member count + */ + eProsima_user_DllExport uint64_t count() const + { + return m_count; + } + + /*! + * @brief This function returns a reference to member count + * @return Reference to member count + */ + eProsima_user_DllExport uint64_t& count() + { + return m_count; + } + + + +private: + + detail::GUID_s m_guid; + uint64_t m_count{0}; + +}; + + +/*! + * @brief This class represents the structure SampleIdentityCount defined by the user in the IDL file. + * @ingroup types + */ +class SampleIdentityCount +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport SampleIdentityCount() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~SampleIdentityCount() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object SampleIdentityCount that will be copied. + */ + eProsima_user_DllExport SampleIdentityCount( + const SampleIdentityCount& x) + { + m_sample_id = x.m_sample_id; + + m_count = x.m_count; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object SampleIdentityCount that will be copied. + */ + eProsima_user_DllExport SampleIdentityCount( + SampleIdentityCount&& x) noexcept + { + m_sample_id = std::move(x.m_sample_id); + m_count = x.m_count; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object SampleIdentityCount that will be copied. + */ + eProsima_user_DllExport SampleIdentityCount& operator =( + const SampleIdentityCount& x) + { + + m_sample_id = x.m_sample_id; + + m_count = x.m_count; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object SampleIdentityCount that will be copied. + */ + eProsima_user_DllExport SampleIdentityCount& operator =( + SampleIdentityCount&& x) noexcept + { + + m_sample_id = std::move(x.m_sample_id); + m_count = x.m_count; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x SampleIdentityCount object to compare. + */ + eProsima_user_DllExport bool operator ==( + const SampleIdentityCount& x) const + { + return (m_sample_id == x.m_sample_id && + m_count == x.m_count); + } + + /*! + * @brief Comparison operator. + * @param x SampleIdentityCount object to compare. + */ + eProsima_user_DllExport bool operator !=( + const SampleIdentityCount& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member sample_id + * @param _sample_id New value to be copied in member sample_id + */ + eProsima_user_DllExport void sample_id( + const detail::SampleIdentity_s& _sample_id) + { + m_sample_id = _sample_id; + } + + /*! + * @brief This function moves the value in member sample_id + * @param _sample_id New value to be moved in member sample_id + */ + eProsima_user_DllExport void sample_id( + detail::SampleIdentity_s&& _sample_id) + { + m_sample_id = std::move(_sample_id); + } + + /*! + * @brief This function returns a constant reference to member sample_id + * @return Constant reference to member sample_id + */ + eProsima_user_DllExport const detail::SampleIdentity_s& sample_id() const + { + return m_sample_id; + } + + /*! + * @brief This function returns a reference to member sample_id + * @return Reference to member sample_id + */ + eProsima_user_DllExport detail::SampleIdentity_s& sample_id() + { + return m_sample_id; + } + + + /*! + * @brief This function sets a value in member count + * @param _count New value for member count + */ + eProsima_user_DllExport void count( + uint64_t _count) + { + m_count = _count; + } + + /*! + * @brief This function returns the value of member count + * @return Value of member count + */ + eProsima_user_DllExport uint64_t count() const + { + return m_count; + } + + /*! + * @brief This function returns a reference to member count + * @return Reference to member count + */ + eProsima_user_DllExport uint64_t& count() + { + return m_count; + } + + + +private: + + detail::SampleIdentity_s m_sample_id; + uint64_t m_count{0}; + +}; + + +/*! + * @brief This class represents the structure Entity2LocatorTraffic defined by the user in the IDL file. + * @ingroup types + */ +class Entity2LocatorTraffic +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport Entity2LocatorTraffic() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~Entity2LocatorTraffic() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object Entity2LocatorTraffic that will be copied. + */ + eProsima_user_DllExport Entity2LocatorTraffic( + const Entity2LocatorTraffic& x) + { + m_src_guid = x.m_src_guid; + + m_dst_locator = x.m_dst_locator; + + m_packet_count = x.m_packet_count; + + m_byte_count = x.m_byte_count; + + m_byte_magnitude_order = x.m_byte_magnitude_order; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object Entity2LocatorTraffic that will be copied. + */ + eProsima_user_DllExport Entity2LocatorTraffic( + Entity2LocatorTraffic&& x) noexcept + { + m_src_guid = std::move(x.m_src_guid); + m_dst_locator = std::move(x.m_dst_locator); + m_packet_count = x.m_packet_count; + m_byte_count = x.m_byte_count; + m_byte_magnitude_order = x.m_byte_magnitude_order; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object Entity2LocatorTraffic that will be copied. + */ + eProsima_user_DllExport Entity2LocatorTraffic& operator =( + const Entity2LocatorTraffic& x) + { + + m_src_guid = x.m_src_guid; + + m_dst_locator = x.m_dst_locator; + + m_packet_count = x.m_packet_count; + + m_byte_count = x.m_byte_count; + + m_byte_magnitude_order = x.m_byte_magnitude_order; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object Entity2LocatorTraffic that will be copied. + */ + eProsima_user_DllExport Entity2LocatorTraffic& operator =( + Entity2LocatorTraffic&& x) noexcept + { + + m_src_guid = std::move(x.m_src_guid); + m_dst_locator = std::move(x.m_dst_locator); + m_packet_count = x.m_packet_count; + m_byte_count = x.m_byte_count; + m_byte_magnitude_order = x.m_byte_magnitude_order; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x Entity2LocatorTraffic object to compare. + */ + eProsima_user_DllExport bool operator ==( + const Entity2LocatorTraffic& x) const + { + return (m_src_guid == x.m_src_guid && + m_dst_locator == x.m_dst_locator && + m_packet_count == x.m_packet_count && + m_byte_count == x.m_byte_count && + m_byte_magnitude_order == x.m_byte_magnitude_order); + } + + /*! + * @brief Comparison operator. + * @param x Entity2LocatorTraffic object to compare. + */ + eProsima_user_DllExport bool operator !=( + const Entity2LocatorTraffic& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member src_guid + * @param _src_guid New value to be copied in member src_guid + */ + eProsima_user_DllExport void src_guid( + const detail::GUID_s& _src_guid) + { + m_src_guid = _src_guid; + } + + /*! + * @brief This function moves the value in member src_guid + * @param _src_guid New value to be moved in member src_guid + */ + eProsima_user_DllExport void src_guid( + detail::GUID_s&& _src_guid) + { + m_src_guid = std::move(_src_guid); + } + + /*! + * @brief This function returns a constant reference to member src_guid + * @return Constant reference to member src_guid + */ + eProsima_user_DllExport const detail::GUID_s& src_guid() const + { + return m_src_guid; + } + + /*! + * @brief This function returns a reference to member src_guid + * @return Reference to member src_guid + */ + eProsima_user_DllExport detail::GUID_s& src_guid() + { + return m_src_guid; + } + + + /*! + * @brief This function copies the value in member dst_locator + * @param _dst_locator New value to be copied in member dst_locator + */ + eProsima_user_DllExport void dst_locator( + const detail::Locator_s& _dst_locator) + { + m_dst_locator = _dst_locator; + } + + /*! + * @brief This function moves the value in member dst_locator + * @param _dst_locator New value to be moved in member dst_locator + */ + eProsima_user_DllExport void dst_locator( + detail::Locator_s&& _dst_locator) + { + m_dst_locator = std::move(_dst_locator); + } + + /*! + * @brief This function returns a constant reference to member dst_locator + * @return Constant reference to member dst_locator + */ + eProsima_user_DllExport const detail::Locator_s& dst_locator() const + { + return m_dst_locator; + } + + /*! + * @brief This function returns a reference to member dst_locator + * @return Reference to member dst_locator + */ + eProsima_user_DllExport detail::Locator_s& dst_locator() + { + return m_dst_locator; + } + + + /*! + * @brief This function sets a value in member packet_count + * @param _packet_count New value for member packet_count + */ + eProsima_user_DllExport void packet_count( + uint64_t _packet_count) + { + m_packet_count = _packet_count; + } + + /*! + * @brief This function returns the value of member packet_count + * @return Value of member packet_count + */ + eProsima_user_DllExport uint64_t packet_count() const + { + return m_packet_count; + } + + /*! + * @brief This function returns a reference to member packet_count + * @return Reference to member packet_count + */ + eProsima_user_DllExport uint64_t& packet_count() + { + return m_packet_count; + } + + + /*! + * @brief This function sets a value in member byte_count + * @param _byte_count New value for member byte_count + */ + eProsima_user_DllExport void byte_count( + uint64_t _byte_count) + { + m_byte_count = _byte_count; + } + + /*! + * @brief This function returns the value of member byte_count + * @return Value of member byte_count + */ + eProsima_user_DllExport uint64_t byte_count() const + { + return m_byte_count; + } + + /*! + * @brief This function returns a reference to member byte_count + * @return Reference to member byte_count + */ + eProsima_user_DllExport uint64_t& byte_count() + { + return m_byte_count; + } + + + /*! + * @brief This function sets a value in member byte_magnitude_order + * @param _byte_magnitude_order New value for member byte_magnitude_order + */ + eProsima_user_DllExport void byte_magnitude_order( + int16_t _byte_magnitude_order) + { + m_byte_magnitude_order = _byte_magnitude_order; + } + + /*! + * @brief This function returns the value of member byte_magnitude_order + * @return Value of member byte_magnitude_order + */ + eProsima_user_DllExport int16_t byte_magnitude_order() const + { + return m_byte_magnitude_order; + } + + /*! + * @brief This function returns a reference to member byte_magnitude_order + * @return Reference to member byte_magnitude_order + */ + eProsima_user_DllExport int16_t& byte_magnitude_order() + { + return m_byte_magnitude_order; + } + + + +private: + + detail::GUID_s m_src_guid; + detail::Locator_s m_dst_locator; + uint64_t m_packet_count{0}; + uint64_t m_byte_count{0}; + int16_t m_byte_magnitude_order{0}; + +}; + + +/*! + * @brief This class represents the structure WriterReaderData defined by the user in the IDL file. + * @ingroup types + */ +class WriterReaderData +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport WriterReaderData() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~WriterReaderData() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object WriterReaderData that will be copied. + */ + eProsima_user_DllExport WriterReaderData( + const WriterReaderData& x) + { + m_writer_guid = x.m_writer_guid; + + m_reader_guid = x.m_reader_guid; + + m_data = x.m_data; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object WriterReaderData that will be copied. + */ + eProsima_user_DllExport WriterReaderData( + WriterReaderData&& x) noexcept + { + m_writer_guid = std::move(x.m_writer_guid); + m_reader_guid = std::move(x.m_reader_guid); + m_data = x.m_data; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object WriterReaderData that will be copied. + */ + eProsima_user_DllExport WriterReaderData& operator =( + const WriterReaderData& x) + { + + m_writer_guid = x.m_writer_guid; + + m_reader_guid = x.m_reader_guid; + + m_data = x.m_data; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object WriterReaderData that will be copied. + */ + eProsima_user_DllExport WriterReaderData& operator =( + WriterReaderData&& x) noexcept + { + + m_writer_guid = std::move(x.m_writer_guid); + m_reader_guid = std::move(x.m_reader_guid); + m_data = x.m_data; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x WriterReaderData object to compare. + */ + eProsima_user_DllExport bool operator ==( + const WriterReaderData& x) const + { + return (m_writer_guid == x.m_writer_guid && + m_reader_guid == x.m_reader_guid && + m_data == x.m_data); + } + + /*! + * @brief Comparison operator. + * @param x WriterReaderData object to compare. + */ + eProsima_user_DllExport bool operator !=( + const WriterReaderData& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member writer_guid + * @param _writer_guid New value to be copied in member writer_guid + */ + eProsima_user_DllExport void writer_guid( + const detail::GUID_s& _writer_guid) + { + m_writer_guid = _writer_guid; + } + + /*! + * @brief This function moves the value in member writer_guid + * @param _writer_guid New value to be moved in member writer_guid + */ + eProsima_user_DllExport void writer_guid( + detail::GUID_s&& _writer_guid) + { + m_writer_guid = std::move(_writer_guid); + } + + /*! + * @brief This function returns a constant reference to member writer_guid + * @return Constant reference to member writer_guid + */ + eProsima_user_DllExport const detail::GUID_s& writer_guid() const + { + return m_writer_guid; + } + + /*! + * @brief This function returns a reference to member writer_guid + * @return Reference to member writer_guid + */ + eProsima_user_DllExport detail::GUID_s& writer_guid() + { + return m_writer_guid; + } + + + /*! + * @brief This function copies the value in member reader_guid + * @param _reader_guid New value to be copied in member reader_guid + */ + eProsima_user_DllExport void reader_guid( + const detail::GUID_s& _reader_guid) + { + m_reader_guid = _reader_guid; + } + + /*! + * @brief This function moves the value in member reader_guid + * @param _reader_guid New value to be moved in member reader_guid + */ + eProsima_user_DllExport void reader_guid( + detail::GUID_s&& _reader_guid) + { + m_reader_guid = std::move(_reader_guid); + } + + /*! + * @brief This function returns a constant reference to member reader_guid + * @return Constant reference to member reader_guid + */ + eProsima_user_DllExport const detail::GUID_s& reader_guid() const + { + return m_reader_guid; + } + + /*! + * @brief This function returns a reference to member reader_guid + * @return Reference to member reader_guid + */ + eProsima_user_DllExport detail::GUID_s& reader_guid() + { + return m_reader_guid; + } + + + /*! + * @brief This function sets a value in member data + * @param _data New value for member data + */ + eProsima_user_DllExport void data( + float _data) + { + m_data = _data; + } + + /*! + * @brief This function returns the value of member data + * @return Value of member data + */ + eProsima_user_DllExport float data() const + { + return m_data; + } + + /*! + * @brief This function returns a reference to member data + * @return Reference to member data + */ + eProsima_user_DllExport float& data() + { + return m_data; + } + + + +private: + + detail::GUID_s m_writer_guid; + detail::GUID_s m_reader_guid; + float m_data{0.0}; + +}; + + +/*! + * @brief This class represents the structure Locator2LocatorData defined by the user in the IDL file. + * @ingroup types + */ +class Locator2LocatorData +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport Locator2LocatorData() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~Locator2LocatorData() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object Locator2LocatorData that will be copied. + */ + eProsima_user_DllExport Locator2LocatorData( + const Locator2LocatorData& x) + { + m_src_locator = x.m_src_locator; + + m_dst_locator = x.m_dst_locator; + + m_data = x.m_data; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object Locator2LocatorData that will be copied. + */ + eProsima_user_DllExport Locator2LocatorData( + Locator2LocatorData&& x) noexcept + { + m_src_locator = std::move(x.m_src_locator); + m_dst_locator = std::move(x.m_dst_locator); + m_data = x.m_data; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object Locator2LocatorData that will be copied. + */ + eProsima_user_DllExport Locator2LocatorData& operator =( + const Locator2LocatorData& x) + { + + m_src_locator = x.m_src_locator; + + m_dst_locator = x.m_dst_locator; + + m_data = x.m_data; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object Locator2LocatorData that will be copied. + */ + eProsima_user_DllExport Locator2LocatorData& operator =( + Locator2LocatorData&& x) noexcept + { + + m_src_locator = std::move(x.m_src_locator); + m_dst_locator = std::move(x.m_dst_locator); + m_data = x.m_data; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x Locator2LocatorData object to compare. + */ + eProsima_user_DllExport bool operator ==( + const Locator2LocatorData& x) const + { + return (m_src_locator == x.m_src_locator && + m_dst_locator == x.m_dst_locator && + m_data == x.m_data); + } + + /*! + * @brief Comparison operator. + * @param x Locator2LocatorData object to compare. + */ + eProsima_user_DllExport bool operator !=( + const Locator2LocatorData& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member src_locator + * @param _src_locator New value to be copied in member src_locator + */ + eProsima_user_DllExport void src_locator( + const detail::Locator_s& _src_locator) + { + m_src_locator = _src_locator; + } + + /*! + * @brief This function moves the value in member src_locator + * @param _src_locator New value to be moved in member src_locator + */ + eProsima_user_DllExport void src_locator( + detail::Locator_s&& _src_locator) + { + m_src_locator = std::move(_src_locator); + } + + /*! + * @brief This function returns a constant reference to member src_locator + * @return Constant reference to member src_locator + */ + eProsima_user_DllExport const detail::Locator_s& src_locator() const + { + return m_src_locator; + } + + /*! + * @brief This function returns a reference to member src_locator + * @return Reference to member src_locator + */ + eProsima_user_DllExport detail::Locator_s& src_locator() + { + return m_src_locator; + } + + + /*! + * @brief This function copies the value in member dst_locator + * @param _dst_locator New value to be copied in member dst_locator + */ + eProsima_user_DllExport void dst_locator( + const detail::Locator_s& _dst_locator) + { + m_dst_locator = _dst_locator; + } + + /*! + * @brief This function moves the value in member dst_locator + * @param _dst_locator New value to be moved in member dst_locator + */ + eProsima_user_DllExport void dst_locator( + detail::Locator_s&& _dst_locator) + { + m_dst_locator = std::move(_dst_locator); + } + + /*! + * @brief This function returns a constant reference to member dst_locator + * @return Constant reference to member dst_locator + */ + eProsima_user_DllExport const detail::Locator_s& dst_locator() const + { + return m_dst_locator; + } + + /*! + * @brief This function returns a reference to member dst_locator + * @return Reference to member dst_locator + */ + eProsima_user_DllExport detail::Locator_s& dst_locator() + { + return m_dst_locator; + } + + + /*! + * @brief This function sets a value in member data + * @param _data New value for member data + */ + eProsima_user_DllExport void data( + float _data) + { + m_data = _data; + } + + /*! + * @brief This function returns the value of member data + * @return Value of member data + */ + eProsima_user_DllExport float data() const + { + return m_data; + } + + /*! + * @brief This function returns a reference to member data + * @return Reference to member data + */ + eProsima_user_DllExport float& data() + { + return m_data; + } + + + +private: + + detail::Locator_s m_src_locator; + detail::Locator_s m_dst_locator; + float m_data{0.0}; + +}; + + +/*! + * @brief This class represents the structure EntityData defined by the user in the IDL file. + * @ingroup types + */ +class EntityData +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport EntityData() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~EntityData() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object EntityData that will be copied. + */ + eProsima_user_DllExport EntityData( + const EntityData& x) + { + m_guid = x.m_guid; + + m_data = x.m_data; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object EntityData that will be copied. + */ + eProsima_user_DllExport EntityData( + EntityData&& x) noexcept + { + m_guid = std::move(x.m_guid); + m_data = x.m_data; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object EntityData that will be copied. + */ + eProsima_user_DllExport EntityData& operator =( + const EntityData& x) + { + + m_guid = x.m_guid; + + m_data = x.m_data; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object EntityData that will be copied. + */ + eProsima_user_DllExport EntityData& operator =( + EntityData&& x) noexcept + { + + m_guid = std::move(x.m_guid); + m_data = x.m_data; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x EntityData object to compare. + */ + eProsima_user_DllExport bool operator ==( + const EntityData& x) const + { + return (m_guid == x.m_guid && + m_data == x.m_data); + } + + /*! + * @brief Comparison operator. + * @param x EntityData object to compare. + */ + eProsima_user_DllExport bool operator !=( + const EntityData& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member guid + * @param _guid New value to be copied in member guid + */ + eProsima_user_DllExport void guid( + const detail::GUID_s& _guid) + { + m_guid = _guid; + } + + /*! + * @brief This function moves the value in member guid + * @param _guid New value to be moved in member guid + */ + eProsima_user_DllExport void guid( + detail::GUID_s&& _guid) + { + m_guid = std::move(_guid); + } + + /*! + * @brief This function returns a constant reference to member guid + * @return Constant reference to member guid + */ + eProsima_user_DllExport const detail::GUID_s& guid() const + { + return m_guid; + } + + /*! + * @brief This function returns a reference to member guid + * @return Reference to member guid + */ + eProsima_user_DllExport detail::GUID_s& guid() + { + return m_guid; + } + + + /*! + * @brief This function sets a value in member data + * @param _data New value for member data + */ + eProsima_user_DllExport void data( + float _data) + { + m_data = _data; + } + + /*! + * @brief This function returns the value of member data + * @return Value of member data + */ + eProsima_user_DllExport float data() const + { + return m_data; + } + + /*! + * @brief This function returns a reference to member data + * @return Reference to member data + */ + eProsima_user_DllExport float& data() + { + return m_data; + } + + + +private: + + detail::GUID_s m_guid; + float m_data{0.0}; + +}; + + +/*! + * @brief This class represents the structure PhysicalData defined by the user in the IDL file. + * @ingroup types + */ +class PhysicalData +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport PhysicalData() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~PhysicalData() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object PhysicalData that will be copied. + */ + eProsima_user_DllExport PhysicalData( + const PhysicalData& x) + { + m_participant_guid = x.m_participant_guid; + + m_host = x.m_host; + + m_user = x.m_user; + + m_process = x.m_process; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object PhysicalData that will be copied. + */ + eProsima_user_DllExport PhysicalData( + PhysicalData&& x) noexcept + { + m_participant_guid = std::move(x.m_participant_guid); + m_host = std::move(x.m_host); + m_user = std::move(x.m_user); + m_process = std::move(x.m_process); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object PhysicalData that will be copied. + */ + eProsima_user_DllExport PhysicalData& operator =( + const PhysicalData& x) + { + + m_participant_guid = x.m_participant_guid; + + m_host = x.m_host; + + m_user = x.m_user; + + m_process = x.m_process; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object PhysicalData that will be copied. + */ + eProsima_user_DllExport PhysicalData& operator =( + PhysicalData&& x) noexcept + { + + m_participant_guid = std::move(x.m_participant_guid); + m_host = std::move(x.m_host); + m_user = std::move(x.m_user); + m_process = std::move(x.m_process); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x PhysicalData object to compare. + */ + eProsima_user_DllExport bool operator ==( + const PhysicalData& x) const + { + return (m_participant_guid == x.m_participant_guid && + m_host == x.m_host && + m_user == x.m_user && + m_process == x.m_process); + } + + /*! + * @brief Comparison operator. + * @param x PhysicalData object to compare. + */ + eProsima_user_DllExport bool operator !=( + const PhysicalData& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member participant_guid + * @param _participant_guid New value to be copied in member participant_guid + */ + eProsima_user_DllExport void participant_guid( + const detail::GUID_s& _participant_guid) + { + m_participant_guid = _participant_guid; + } + + /*! + * @brief This function moves the value in member participant_guid + * @param _participant_guid New value to be moved in member participant_guid + */ + eProsima_user_DllExport void participant_guid( + detail::GUID_s&& _participant_guid) + { + m_participant_guid = std::move(_participant_guid); + } + + /*! + * @brief This function returns a constant reference to member participant_guid + * @return Constant reference to member participant_guid + */ + eProsima_user_DllExport const detail::GUID_s& participant_guid() const + { + return m_participant_guid; + } + + /*! + * @brief This function returns a reference to member participant_guid + * @return Reference to member participant_guid + */ + eProsima_user_DllExport detail::GUID_s& participant_guid() + { + return m_participant_guid; + } + + + /*! + * @brief This function copies the value in member host + * @param _host New value to be copied in member host + */ + eProsima_user_DllExport void host( + const std::string& _host) + { + m_host = _host; + } + + /*! + * @brief This function moves the value in member host + * @param _host New value to be moved in member host + */ + eProsima_user_DllExport void host( + std::string&& _host) + { + m_host = std::move(_host); + } + + /*! + * @brief This function returns a constant reference to member host + * @return Constant reference to member host + */ + eProsima_user_DllExport const std::string& host() const + { + return m_host; + } + + /*! + * @brief This function returns a reference to member host + * @return Reference to member host + */ + eProsima_user_DllExport std::string& host() + { + return m_host; + } + + + /*! + * @brief This function copies the value in member user + * @param _user New value to be copied in member user + */ + eProsima_user_DllExport void user( + const std::string& _user) + { + m_user = _user; + } + + /*! + * @brief This function moves the value in member user + * @param _user New value to be moved in member user + */ + eProsima_user_DllExport void user( + std::string&& _user) + { + m_user = std::move(_user); + } + + /*! + * @brief This function returns a constant reference to member user + * @return Constant reference to member user + */ + eProsima_user_DllExport const std::string& user() const + { + return m_user; + } + + /*! + * @brief This function returns a reference to member user + * @return Reference to member user + */ + eProsima_user_DllExport std::string& user() + { + return m_user; + } + + + /*! + * @brief This function copies the value in member process + * @param _process New value to be copied in member process + */ + eProsima_user_DllExport void process( + const std::string& _process) + { + m_process = _process; + } + + /*! + * @brief This function moves the value in member process + * @param _process New value to be moved in member process + */ + eProsima_user_DllExport void process( + std::string&& _process) + { + m_process = std::move(_process); + } + + /*! + * @brief This function returns a constant reference to member process + * @return Constant reference to member process + */ + eProsima_user_DllExport const std::string& process() const + { + return m_process; + } + + /*! + * @brief This function returns a reference to member process + * @return Reference to member process + */ + eProsima_user_DllExport std::string& process() + { + return m_process; + } + + + +private: + + detail::GUID_s m_participant_guid; + std::string m_host; + std::string m_user; + std::string m_process; + +}; +/*! + * @brief This enumeration represents the EventKind bitflags defined by the user in the IDL file. + * @ingroup types + */ +enum EventKindBits : uint32_t +{ + HISTORY2HISTORY_LATENCY = 0x01ull << 0, + NETWORK_LATENCY = 0x01ull << 1, + PUBLICATION_THROUGHPUT = 0x01ull << 2, + SUBSCRIPTION_THROUGHPUT = 0x01ull << 3, + RTPS_SENT = 0x01ull << 4, + RTPS_LOST = 0x01ull << 5, + RESENT_DATAS = 0x01ull << 6, + HEARTBEAT_COUNT = 0x01ull << 7, + ACKNACK_COUNT = 0x01ull << 8, + NACKFRAG_COUNT = 0x01ull << 9, + GAP_COUNT = 0x01ull << 10, + DATA_COUNT = 0x01ull << 11, + PDP_PACKETS = 0x01ull << 12, + EDP_PACKETS = 0x01ull << 13, + DISCOVERED_ENTITY = 0x01ull << 14, + SAMPLE_DATAS = 0x01ull << 15, + PHYSICAL_DATA = 0x01ull << 16 +}; +typedef uint32_t EventKind; + + +/*! + * @brief This class represents the union Data defined by the user in the IDL file. + * @ingroup types + */ +class Data +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport Data() + { + m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~Data() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object Data that will be copied. + */ + eProsima_user_DllExport Data( + const Data& x) + { + m__d = x.m__d; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + m_writer_reader_data = x.m_writer_reader_data; + break; + + + case eprosima::fastdds::statistics::NETWORK_LATENCY: + m_locator2locator_data = x.m_locator2locator_data; + break; + + + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + m_entity_data = x.m_entity_data; + break; + + + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + m_entity2locator_traffic = x.m_entity2locator_traffic; + break; + + + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + m_entity_count = x.m_entity_count; + break; + + + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + m_discovery_time = x.m_discovery_time; + break; + + + case eprosima::fastdds::statistics::SAMPLE_DATAS: + m_sample_identity_count = x.m_sample_identity_count; + break; + + + case eprosima::fastdds::statistics::PHYSICAL_DATA: + m_physical_data = x.m_physical_data; + break; + + default: + break; + } + } + + /*! + * @brief Move constructor. + * @param x Reference to the object Data that will be copied. + */ + eProsima_user_DllExport Data( + Data&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + m_writer_reader_data = std::move(x.m_writer_reader_data); + + break; + + + case eprosima::fastdds::statistics::NETWORK_LATENCY: + m_locator2locator_data = std::move(x.m_locator2locator_data); + + break; + + + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + m_entity_data = std::move(x.m_entity_data); + + break; + + + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + m_entity2locator_traffic = std::move(x.m_entity2locator_traffic); + + break; + + + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + m_entity_count = std::move(x.m_entity_count); + + break; + + + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + m_discovery_time = std::move(x.m_discovery_time); + + break; + + + case eprosima::fastdds::statistics::SAMPLE_DATAS: + m_sample_identity_count = std::move(x.m_sample_identity_count); + + break; + + + case eprosima::fastdds::statistics::PHYSICAL_DATA: + m_physical_data = std::move(x.m_physical_data); + + break; + + default: + break; + } + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object Data that will be copied. + */ + eProsima_user_DllExport Data& operator =( + const Data& x) + { + m__d = x.m__d; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + m_writer_reader_data = x.m_writer_reader_data; + break; + + + case eprosima::fastdds::statistics::NETWORK_LATENCY: + m_locator2locator_data = x.m_locator2locator_data; + break; + + + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + m_entity_data = x.m_entity_data; + break; + + + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + m_entity2locator_traffic = x.m_entity2locator_traffic; + break; + + + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + m_entity_count = x.m_entity_count; + break; + + + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + m_discovery_time = x.m_discovery_time; + break; + + + case eprosima::fastdds::statistics::SAMPLE_DATAS: + m_sample_identity_count = x.m_sample_identity_count; + break; + + + case eprosima::fastdds::statistics::PHYSICAL_DATA: + m_physical_data = x.m_physical_data; + break; + + default: + break; + } + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object Data that will be copied. + */ + eProsima_user_DllExport Data& operator =( + Data&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + m_writer_reader_data = std::move(x.m_writer_reader_data); + + break; + + + case eprosima::fastdds::statistics::NETWORK_LATENCY: + m_locator2locator_data = std::move(x.m_locator2locator_data); + + break; + + + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + m_entity_data = std::move(x.m_entity_data); + + break; + + + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + m_entity2locator_traffic = std::move(x.m_entity2locator_traffic); + + break; + + + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + m_entity_count = std::move(x.m_entity_count); + + break; + + + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + m_discovery_time = std::move(x.m_discovery_time); + + break; + + + case eprosima::fastdds::statistics::SAMPLE_DATAS: + m_sample_identity_count = std::move(x.m_sample_identity_count); + + break; + + + case eprosima::fastdds::statistics::PHYSICAL_DATA: + m_physical_data = std::move(x.m_physical_data); + + break; + + default: + break; + } + + return *this; + } + + /*! + * @brief Comparison operator. + * @param x Data object to compare. + */ + eProsima_user_DllExport bool operator ==( + const Data& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + return (m_writer_reader_data == x.m_writer_reader_data); + break; + + + case eprosima::fastdds::statistics::NETWORK_LATENCY: + return (m_locator2locator_data == x.m_locator2locator_data); + break; + + + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + return (m_entity_data == x.m_entity_data); + break; + + + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + return (m_entity2locator_traffic == x.m_entity2locator_traffic); + break; + + + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + return (m_entity_count == x.m_entity_count); + break; + + + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + return (m_discovery_time == x.m_discovery_time); + break; + + + case eprosima::fastdds::statistics::SAMPLE_DATAS: + return (m_sample_identity_count == x.m_sample_identity_count); + break; + + + case eprosima::fastdds::statistics::PHYSICAL_DATA: + return (m_physical_data == x.m_physical_data); + break; + + default: + break; + } + return false; + } + + /*! + * @brief Comparison operator. + * @param x Data object to compare. + */ + eProsima_user_DllExport bool operator !=( + const Data& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets the discriminator value. + * @param __d New value for the discriminator. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + */ + eProsima_user_DllExport void _d( + EventKind __d) + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + switch (__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::NETWORK_LATENCY: + switch (__d) + { + case eprosima::fastdds::statistics::NETWORK_LATENCY: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + switch (__d) + { + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + switch (__d) + { + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + switch (__d) + { + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + switch (__d) + { + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::SAMPLE_DATAS: + switch (__d) + { + case eprosima::fastdds::statistics::SAMPLE_DATAS: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::PHYSICAL_DATA: + switch (__d) + { + case eprosima::fastdds::statistics::PHYSICAL_DATA: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } + + /*! + * @brief This function returns the value of the discriminator. + * @return Value of the discriminator + */ + eProsima_user_DllExport EventKind _d() const + { + return m__d; + } + + /*! + * @brief This function returns a reference to the discriminator. + * @return Reference to the discriminator. + */ + eProsima_user_DllExport EventKind& _d() + { + return m__d; + } + + /*! + * @brief This function copies the value in member writer_reader_data + * @param _writer_reader_data New value to be copied in member writer_reader_data + */ + eProsima_user_DllExport void writer_reader_data( + const WriterReaderData& _writer_reader_data) + { + m_writer_reader_data = _writer_reader_data; + m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; + + } + + /*! + * @brief This function moves the value in member writer_reader_data + * @param _writer_reader_data New value to be moved in member writer_reader_data + */ + eProsima_user_DllExport void writer_reader_data( + WriterReaderData&& _writer_reader_data) + { + m_writer_reader_data = std::move(_writer_reader_data); + m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; + + } + + /*! + * @brief This function returns a constant reference to member writer_reader_data + * @return Constant reference to member writer_reader_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const WriterReaderData& writer_reader_data() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_writer_reader_data; + } + + /*! + * @brief This function returns a reference to member writer_reader_data + * @return Reference to member writer_reader_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport WriterReaderData& writer_reader_data() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_writer_reader_data; + } + + + /*! + * @brief This function copies the value in member locator2locator_data + * @param _locator2locator_data New value to be copied in member locator2locator_data + */ + eProsima_user_DllExport void locator2locator_data( + const Locator2LocatorData& _locator2locator_data) + { + m_locator2locator_data = _locator2locator_data; + m__d = eprosima::fastdds::statistics::NETWORK_LATENCY; + + } + + /*! + * @brief This function moves the value in member locator2locator_data + * @param _locator2locator_data New value to be moved in member locator2locator_data + */ + eProsima_user_DllExport void locator2locator_data( + Locator2LocatorData&& _locator2locator_data) + { + m_locator2locator_data = std::move(_locator2locator_data); + m__d = eprosima::fastdds::statistics::NETWORK_LATENCY; + + } + + /*! + * @brief This function returns a constant reference to member locator2locator_data + * @return Constant reference to member locator2locator_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const Locator2LocatorData& locator2locator_data() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::NETWORK_LATENCY: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_locator2locator_data; + } + + /*! + * @brief This function returns a reference to member locator2locator_data + * @return Reference to member locator2locator_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport Locator2LocatorData& locator2locator_data() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::NETWORK_LATENCY: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_locator2locator_data; + } + + + /*! + * @brief This function copies the value in member entity_data + * @param _entity_data New value to be copied in member entity_data + */ + eProsima_user_DllExport void entity_data( + const EntityData& _entity_data) + { + m_entity_data = _entity_data; + m__d = eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT; + + } + + /*! + * @brief This function moves the value in member entity_data + * @param _entity_data New value to be moved in member entity_data + */ + eProsima_user_DllExport void entity_data( + EntityData&& _entity_data) + { + m_entity_data = std::move(_entity_data); + m__d = eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT; + + } + + /*! + * @brief This function returns a constant reference to member entity_data + * @return Constant reference to member entity_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const EntityData& entity_data() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_entity_data; + } + + /*! + * @brief This function returns a reference to member entity_data + * @return Reference to member entity_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport EntityData& entity_data() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_entity_data; + } + + + /*! + * @brief This function copies the value in member entity2locator_traffic + * @param _entity2locator_traffic New value to be copied in member entity2locator_traffic + */ + eProsima_user_DllExport void entity2locator_traffic( + const Entity2LocatorTraffic& _entity2locator_traffic) + { + m_entity2locator_traffic = _entity2locator_traffic; + m__d = eprosima::fastdds::statistics::RTPS_SENT; + + } + + /*! + * @brief This function moves the value in member entity2locator_traffic + * @param _entity2locator_traffic New value to be moved in member entity2locator_traffic + */ + eProsima_user_DllExport void entity2locator_traffic( + Entity2LocatorTraffic&& _entity2locator_traffic) + { + m_entity2locator_traffic = std::move(_entity2locator_traffic); + m__d = eprosima::fastdds::statistics::RTPS_SENT; + + } + + /*! + * @brief This function returns a constant reference to member entity2locator_traffic + * @return Constant reference to member entity2locator_traffic + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const Entity2LocatorTraffic& entity2locator_traffic() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_entity2locator_traffic; + } + + /*! + * @brief This function returns a reference to member entity2locator_traffic + * @return Reference to member entity2locator_traffic + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport Entity2LocatorTraffic& entity2locator_traffic() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_entity2locator_traffic; + } + + + /*! + * @brief This function copies the value in member entity_count + * @param _entity_count New value to be copied in member entity_count + */ + eProsima_user_DllExport void entity_count( + const EntityCount& _entity_count) + { + m_entity_count = _entity_count; + m__d = eprosima::fastdds::statistics::RESENT_DATAS; + + } + + /*! + * @brief This function moves the value in member entity_count + * @param _entity_count New value to be moved in member entity_count + */ + eProsima_user_DllExport void entity_count( + EntityCount&& _entity_count) + { + m_entity_count = std::move(_entity_count); + m__d = eprosima::fastdds::statistics::RESENT_DATAS; + + } + + /*! + * @brief This function returns a constant reference to member entity_count + * @return Constant reference to member entity_count + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const EntityCount& entity_count() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_entity_count; + } + + /*! + * @brief This function returns a reference to member entity_count + * @return Reference to member entity_count + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport EntityCount& entity_count() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_entity_count; + } + + + /*! + * @brief This function copies the value in member discovery_time + * @param _discovery_time New value to be copied in member discovery_time + */ + eProsima_user_DllExport void discovery_time( + const DiscoveryTime& _discovery_time) + { + m_discovery_time = _discovery_time; + m__d = eprosima::fastdds::statistics::DISCOVERED_ENTITY; + + } + + /*! + * @brief This function moves the value in member discovery_time + * @param _discovery_time New value to be moved in member discovery_time + */ + eProsima_user_DllExport void discovery_time( + DiscoveryTime&& _discovery_time) + { + m_discovery_time = std::move(_discovery_time); + m__d = eprosima::fastdds::statistics::DISCOVERED_ENTITY; + + } + + /*! + * @brief This function returns a constant reference to member discovery_time + * @return Constant reference to member discovery_time + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const DiscoveryTime& discovery_time() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_discovery_time; + } + + /*! + * @brief This function returns a reference to member discovery_time + * @return Reference to member discovery_time + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport DiscoveryTime& discovery_time() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_discovery_time; + } + + + /*! + * @brief This function copies the value in member sample_identity_count + * @param _sample_identity_count New value to be copied in member sample_identity_count + */ + eProsima_user_DllExport void sample_identity_count( + const SampleIdentityCount& _sample_identity_count) + { + m_sample_identity_count = _sample_identity_count; + m__d = eprosima::fastdds::statistics::SAMPLE_DATAS; + + } + + /*! + * @brief This function moves the value in member sample_identity_count + * @param _sample_identity_count New value to be moved in member sample_identity_count + */ + eProsima_user_DllExport void sample_identity_count( + SampleIdentityCount&& _sample_identity_count) + { + m_sample_identity_count = std::move(_sample_identity_count); + m__d = eprosima::fastdds::statistics::SAMPLE_DATAS; + + } + + /*! + * @brief This function returns a constant reference to member sample_identity_count + * @return Constant reference to member sample_identity_count + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const SampleIdentityCount& sample_identity_count() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::SAMPLE_DATAS: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_sample_identity_count; + } + + /*! + * @brief This function returns a reference to member sample_identity_count + * @return Reference to member sample_identity_count + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport SampleIdentityCount& sample_identity_count() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::SAMPLE_DATAS: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_sample_identity_count; + } + + + /*! + * @brief This function copies the value in member physical_data + * @param _physical_data New value to be copied in member physical_data + */ + eProsima_user_DllExport void physical_data( + const PhysicalData& _physical_data) + { + m_physical_data = _physical_data; + m__d = eprosima::fastdds::statistics::PHYSICAL_DATA; + + } + + /*! + * @brief This function moves the value in member physical_data + * @param _physical_data New value to be moved in member physical_data + */ + eProsima_user_DllExport void physical_data( + PhysicalData&& _physical_data) + { + m_physical_data = std::move(_physical_data); + m__d = eprosima::fastdds::statistics::PHYSICAL_DATA; + + } + + /*! + * @brief This function returns a constant reference to member physical_data + * @return Constant reference to member physical_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const PhysicalData& physical_data() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::PHYSICAL_DATA: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_physical_data; + } + + /*! + * @brief This function returns a reference to member physical_data + * @return Reference to member physical_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport PhysicalData& physical_data() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::PHYSICAL_DATA: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_physical_data; + } + + + +private: + + EventKind m__d; + + WriterReaderData m_writer_reader_data; + Locator2LocatorData m_locator2locator_data; + EntityData m_entity_data; + Entity2LocatorTraffic m_entity2locator_traffic; + EntityCount m_entity_count; + DiscoveryTime m_discovery_time; + SampleIdentityCount m_sample_identity_count; + PhysicalData m_physical_data; +}; + +} // namespace statistics + +} // namespace fastdds + +} // namespace eprosima + +#endif // _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_HPP_ + + diff --git a/src/cpp/statistics/types/typesCdrAux.hpp b/src/cpp/statistics/types/typesCdrAux.hpp index 92b36ffa689..d6cf6299463 100644 --- a/src/cpp/statistics/types/typesCdrAux.hpp +++ b/src/cpp/statistics/types/typesCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPESCDRAUX_HPP_ #define _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPESCDRAUX_HPP_ -#include "types.h" +#include "types.hpp" constexpr uint32_t eprosima_fastdds_statistics_DiscoveryTime_max_cdr_typesize {852UL}; constexpr uint32_t eprosima_fastdds_statistics_DiscoveryTime_max_key_cdr_typesize {56UL}; @@ -113,7 +113,6 @@ eProsima_user_DllExport void serialize_key( - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const eprosima::fastdds::statistics::DiscoveryTime& data); @@ -164,11 +163,6 @@ eProsima_user_DllExport void serialize_key( - - - - - } // namespace fastcdr } // namespace eprosima diff --git a/src/cpp/statistics/types/typesCdrAux.ipp b/src/cpp/statistics/types/typesCdrAux.ipp index feec2a39a65..0f68f38bc16 100644 --- a/src/cpp/statistics/types/typesCdrAux.ipp +++ b/src/cpp/statistics/types/typesCdrAux.ipp @@ -592,7 +592,6 @@ void serialize_key( - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1692,9 +1691,6 @@ eProsima_user_DllExport void deserialize( } - - - } // namespace fastcdr } // namespace eprosima diff --git a/src/cpp/statistics/types/typesPubSubTypes.cxx b/src/cpp/statistics/types/typesPubSubTypes.cxx index 5d92b732491..9046fabb418 100644 --- a/src/cpp/statistics/types/typesPubSubTypes.cxx +++ b/src/cpp/statistics/types/typesPubSubTypes.cxx @@ -1173,8 +1173,7 @@ namespace eprosima { return true; } - - } //End of namespace detail + } // namespace detail @@ -2699,14 +2698,12 @@ namespace eprosima { + } // namespace statistics + } // namespace fastdds +} // namespace eprosima - } //End of namespace statistics - - - } //End of namespace fastdds - - -} //End of namespace eprosima +// Include auxiliary functions like for serializing/deserializing. +#include "typesCdrAux.ipp" diff --git a/src/cpp/statistics/types/typesPubSubTypes.h b/src/cpp/statistics/types/typesPubSubTypes.h index 33e545416c8..2094a912f4c 100644 --- a/src/cpp/statistics/types/typesPubSubTypes.h +++ b/src/cpp/statistics/types/typesPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "types.h" +#include "types.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -585,7 +585,7 @@ namespace eprosima unsigned char* m_keyBuffer; }; - } + } // namespace detail @@ -1309,11 +1309,9 @@ namespace eprosima - - - } - } -} + } // namespace statistics + } // namespace fastdds +} // namespace eprosima #endif // _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_PUBSUBTYPES_H_ diff --git a/src/cpp/statistics/types/typesv1.cxx b/src/cpp/statistics/types/typesv1.cxx deleted file mode 100644 index 80c55edc2e6..00000000000 --- a/src/cpp/statistics/types/typesv1.cxx +++ /dev/null @@ -1,4757 +0,0 @@ -// 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 types.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "types.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define eprosima_fastdds_statistics_DiscoveryTime_max_cdr_typesize 852ULL; -#define eprosima_fastdds_statistics_PhysicalData_max_cdr_typesize 812ULL; - -#define eprosima_fastdds_statistics_detail_Locator_s_max_cdr_typesize 28ULL; - -#define eprosima_fastdds_statistics_detail_GuidPrefix_s_max_cdr_typesize 16ULL; -#define eprosima_fastdds_statistics_detail_SampleIdentity_s_max_cdr_typesize 44ULL; -#define eprosima_fastdds_statistics_EntityData_max_cdr_typesize 36ULL; -#define eprosima_fastdds_statistics_Entity2LocatorTraffic_max_cdr_typesize 82ULL; -#define eprosima_fastdds_statistics_detail_EntityId_s_max_cdr_typesize 8ULL; -#define eprosima_fastdds_statistics_EntityCount_max_cdr_typesize 40ULL; -#define eprosima_fastdds_statistics_WriterReaderData_max_cdr_typesize 64ULL; -#define eprosima_fastdds_statistics_SampleIdentityCount_max_cdr_typesize 56ULL; -#define eprosima_fastdds_statistics_Locator2LocatorData_max_cdr_typesize 64ULL; -#define eprosima_fastdds_statistics_detail_GUID_s_max_cdr_typesize 28ULL; -#define eprosima_fastdds_statistics_detail_SequenceNumber_s_max_cdr_typesize 12ULL; - - -namespace eprosima { - -namespace fastdds { - -namespace statistics { - -namespace detail { - - - -EntityId_s::EntityId_s() -{ - // octet m_value - memset(&m_value, 0, ((4)) * 1); - -} - -EntityId_s::~EntityId_s() -{ -} - -EntityId_s::EntityId_s( - const EntityId_s& x) -{ - m_value = x.m_value; - -} - -EntityId_s::EntityId_s( - EntityId_s&& x) noexcept -{ - m_value = std::move(x.m_value); - -} - -EntityId_s& EntityId_s::operator =( - const EntityId_s& x) -{ - m_value = x.m_value; - - return *this; -} - -EntityId_s& EntityId_s::operator =( - EntityId_s&& x) noexcept -{ - m_value = std::move(x.m_value); - - return *this; -} - -bool EntityId_s::operator ==( - const EntityId_s& x) const -{ - return (m_value == x.m_value); -} - -bool EntityId_s::operator !=( - const EntityId_s& x) const -{ - return !(*this == x); -} - -size_t EntityId_s::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_detail_EntityId_s_max_cdr_typesize; -} - -size_t EntityId_s::getCdrSerializedSize( - const EntityId_s& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((4)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void EntityId_s::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_value; - - -} - -void EntityId_s::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_value; - - -} - - -bool EntityId_s::isKeyDefined() -{ - return false; -} - -void EntityId_s::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ -void EntityId_s::value( - const std::array& _value) -{ - m_value = _value; -} - -/*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ -void EntityId_s::value( - std::array&& _value) -{ - m_value = std::move(_value); -} - -/*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ -const std::array& EntityId_s::value() const -{ - return m_value; -} - -/*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ -std::array& EntityId_s::value() -{ - return m_value; -} - - - - - -GuidPrefix_s::GuidPrefix_s() -{ - // octet m_value - memset(&m_value, 0, ((12)) * 1); - -} - -GuidPrefix_s::~GuidPrefix_s() -{ -} - -GuidPrefix_s::GuidPrefix_s( - const GuidPrefix_s& x) -{ - m_value = x.m_value; - -} - -GuidPrefix_s::GuidPrefix_s( - GuidPrefix_s&& x) noexcept -{ - m_value = std::move(x.m_value); - -} - -GuidPrefix_s& GuidPrefix_s::operator =( - const GuidPrefix_s& x) -{ - m_value = x.m_value; - - return *this; -} - -GuidPrefix_s& GuidPrefix_s::operator =( - GuidPrefix_s&& x) noexcept -{ - m_value = std::move(x.m_value); - - return *this; -} - -bool GuidPrefix_s::operator ==( - const GuidPrefix_s& x) const -{ - return (m_value == x.m_value); -} - -bool GuidPrefix_s::operator !=( - const GuidPrefix_s& x) const -{ - return !(*this == x); -} - -size_t GuidPrefix_s::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_detail_GuidPrefix_s_max_cdr_typesize; -} - -size_t GuidPrefix_s::getCdrSerializedSize( - const GuidPrefix_s& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((12)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void GuidPrefix_s::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_value; - - -} - -void GuidPrefix_s::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_value; - - -} - - -bool GuidPrefix_s::isKeyDefined() -{ - return false; -} - -void GuidPrefix_s::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ -void GuidPrefix_s::value( - const std::array& _value) -{ - m_value = _value; -} - -/*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ -void GuidPrefix_s::value( - std::array&& _value) -{ - m_value = std::move(_value); -} - -/*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ -const std::array& GuidPrefix_s::value() const -{ - return m_value; -} - -/*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ -std::array& GuidPrefix_s::value() -{ - return m_value; -} - - - - - -GUID_s::GUID_s() -{ - // eprosima::fastdds::statistics::detail::GuidPrefix_s m_guidPrefix - - // eprosima::fastdds::statistics::detail::EntityId_s m_entityId - - -} - -GUID_s::~GUID_s() -{ -} - -GUID_s::GUID_s( - const GUID_s& x) -{ - m_guidPrefix = x.m_guidPrefix; - - - m_entityId = x.m_entityId; - -} - -GUID_s::GUID_s( - GUID_s&& x) noexcept -{ - m_guidPrefix = std::move(x.m_guidPrefix); - - - m_entityId = std::move(x.m_entityId); - -} - -GUID_s& GUID_s::operator =( - const GUID_s& x) -{ - m_guidPrefix = x.m_guidPrefix; - - - m_entityId = x.m_entityId; - - return *this; -} - -GUID_s& GUID_s::operator =( - GUID_s&& x) noexcept -{ - m_guidPrefix = std::move(x.m_guidPrefix); - - - m_entityId = std::move(x.m_entityId); - - return *this; -} - -bool GUID_s::operator ==( - const GUID_s& x) const -{ - return (m_guidPrefix == x.m_guidPrefix && - m_entityId == x.m_entityId); -} - -bool GUID_s::operator !=( - const GUID_s& x) const -{ - return !(*this == x); -} - -size_t GUID_s::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_detail_GUID_s_max_cdr_typesize; -} - -size_t GUID_s::getCdrSerializedSize( - const GUID_s& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GuidPrefix_s::getCdrSerializedSize(data.guidPrefix(), current_alignment); - - - current_alignment += eprosima::fastdds::statistics::detail::EntityId_s::getCdrSerializedSize(data.entityId(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void GUID_s::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_guidPrefix; - - scdr << m_entityId; - -} - -void GUID_s::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_guidPrefix; - - - - dcdr >> m_entityId; - - -} - - -bool GUID_s::isKeyDefined() -{ - return false; -} - -void GUID_s::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member guidPrefix - * @param _guidPrefix New value to be copied in member guidPrefix - */ -void GUID_s::guidPrefix( - const eprosima::fastdds::statistics::detail::GuidPrefix_s& _guidPrefix) -{ - m_guidPrefix = _guidPrefix; -} - -/*! - * @brief This function moves the value in member guidPrefix - * @param _guidPrefix New value to be moved in member guidPrefix - */ -void GUID_s::guidPrefix( - eprosima::fastdds::statistics::detail::GuidPrefix_s&& _guidPrefix) -{ - m_guidPrefix = std::move(_guidPrefix); -} - -/*! - * @brief This function returns a constant reference to member guidPrefix - * @return Constant reference to member guidPrefix - */ -const eprosima::fastdds::statistics::detail::GuidPrefix_s& GUID_s::guidPrefix() const -{ - return m_guidPrefix; -} - -/*! - * @brief This function returns a reference to member guidPrefix - * @return Reference to member guidPrefix - */ -eprosima::fastdds::statistics::detail::GuidPrefix_s& GUID_s::guidPrefix() -{ - return m_guidPrefix; -} - - -/*! - * @brief This function copies the value in member entityId - * @param _entityId New value to be copied in member entityId - */ -void GUID_s::entityId( - const eprosima::fastdds::statistics::detail::EntityId_s& _entityId) -{ - m_entityId = _entityId; -} - -/*! - * @brief This function moves the value in member entityId - * @param _entityId New value to be moved in member entityId - */ -void GUID_s::entityId( - eprosima::fastdds::statistics::detail::EntityId_s&& _entityId) -{ - m_entityId = std::move(_entityId); -} - -/*! - * @brief This function returns a constant reference to member entityId - * @return Constant reference to member entityId - */ -const eprosima::fastdds::statistics::detail::EntityId_s& GUID_s::entityId() const -{ - return m_entityId; -} - -/*! - * @brief This function returns a reference to member entityId - * @return Reference to member entityId - */ -eprosima::fastdds::statistics::detail::EntityId_s& GUID_s::entityId() -{ - return m_entityId; -} - - - - - -SequenceNumber_s::SequenceNumber_s() -{ - // long m_high - m_high = 0; - // unsigned long m_low - m_low = 0; - -} - -SequenceNumber_s::~SequenceNumber_s() -{ -} - -SequenceNumber_s::SequenceNumber_s( - const SequenceNumber_s& x) -{ - m_high = x.m_high; - - - m_low = x.m_low; - -} - -SequenceNumber_s::SequenceNumber_s( - SequenceNumber_s&& x) noexcept -{ - m_high = x.m_high; - - - m_low = x.m_low; - -} - -SequenceNumber_s& SequenceNumber_s::operator =( - const SequenceNumber_s& x) -{ - m_high = x.m_high; - - - m_low = x.m_low; - - return *this; -} - -SequenceNumber_s& SequenceNumber_s::operator =( - SequenceNumber_s&& x) noexcept -{ - m_high = x.m_high; - - - m_low = x.m_low; - - return *this; -} - -bool SequenceNumber_s::operator ==( - const SequenceNumber_s& x) const -{ - return (m_high == x.m_high && - m_low == x.m_low); -} - -bool SequenceNumber_s::operator !=( - const SequenceNumber_s& x) const -{ - return !(*this == x); -} - -size_t SequenceNumber_s::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_detail_SequenceNumber_s_max_cdr_typesize; -} - -size_t SequenceNumber_s::getCdrSerializedSize( - const SequenceNumber_s& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void SequenceNumber_s::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_high; - - scdr << m_low; - -} - -void SequenceNumber_s::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_high; - - - - dcdr >> m_low; - - -} - - -bool SequenceNumber_s::isKeyDefined() -{ - return false; -} - -void SequenceNumber_s::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member high - * @param _high New value for member high - */ -void SequenceNumber_s::high( - int32_t _high) -{ - m_high = _high; -} - -/*! - * @brief This function returns the value of member high - * @return Value of member high - */ -int32_t SequenceNumber_s::high() const -{ - return m_high; -} - -/*! - * @brief This function returns a reference to member high - * @return Reference to member high - */ -int32_t& SequenceNumber_s::high() -{ - return m_high; -} - - -/*! - * @brief This function sets a value in member low - * @param _low New value for member low - */ -void SequenceNumber_s::low( - uint32_t _low) -{ - m_low = _low; -} - -/*! - * @brief This function returns the value of member low - * @return Value of member low - */ -uint32_t SequenceNumber_s::low() const -{ - return m_low; -} - -/*! - * @brief This function returns a reference to member low - * @return Reference to member low - */ -uint32_t& SequenceNumber_s::low() -{ - return m_low; -} - - - - - -SampleIdentity_s::SampleIdentity_s() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_writer_guid - - // eprosima::fastdds::statistics::detail::SequenceNumber_s m_sequence_number - - -} - -SampleIdentity_s::~SampleIdentity_s() -{ -} - -SampleIdentity_s::SampleIdentity_s( - const SampleIdentity_s& x) -{ - m_writer_guid = x.m_writer_guid; - - - m_sequence_number = x.m_sequence_number; - -} - -SampleIdentity_s::SampleIdentity_s( - SampleIdentity_s&& x) noexcept -{ - m_writer_guid = std::move(x.m_writer_guid); - - - m_sequence_number = std::move(x.m_sequence_number); - -} - -SampleIdentity_s& SampleIdentity_s::operator =( - const SampleIdentity_s& x) -{ - m_writer_guid = x.m_writer_guid; - - - m_sequence_number = x.m_sequence_number; - - return *this; -} - -SampleIdentity_s& SampleIdentity_s::operator =( - SampleIdentity_s&& x) noexcept -{ - m_writer_guid = std::move(x.m_writer_guid); - - - m_sequence_number = std::move(x.m_sequence_number); - - return *this; -} - -bool SampleIdentity_s::operator ==( - const SampleIdentity_s& x) const -{ - return (m_writer_guid == x.m_writer_guid && - m_sequence_number == x.m_sequence_number); -} - -bool SampleIdentity_s::operator !=( - const SampleIdentity_s& x) const -{ - return !(*this == x); -} - -size_t SampleIdentity_s::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_detail_SampleIdentity_s_max_cdr_typesize; -} - -size_t SampleIdentity_s::getCdrSerializedSize( - const SampleIdentity_s& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.writer_guid(), current_alignment); - - - current_alignment += eprosima::fastdds::statistics::detail::SequenceNumber_s::getCdrSerializedSize(data.sequence_number(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SampleIdentity_s::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_writer_guid; - - scdr << m_sequence_number; - -} - -void SampleIdentity_s::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_writer_guid; - - - - dcdr >> m_sequence_number; - - -} - - -bool SampleIdentity_s::isKeyDefined() -{ - return false; -} - -void SampleIdentity_s::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ -void SampleIdentity_s::writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid) -{ - m_writer_guid = _writer_guid; -} - -/*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ -void SampleIdentity_s::writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid) -{ - m_writer_guid = std::move(_writer_guid); -} - -/*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& SampleIdentity_s::writer_guid() const -{ - return m_writer_guid; -} - -/*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& SampleIdentity_s::writer_guid() -{ - return m_writer_guid; -} - - -/*! - * @brief This function copies the value in member sequence_number - * @param _sequence_number New value to be copied in member sequence_number - */ -void SampleIdentity_s::sequence_number( - const eprosima::fastdds::statistics::detail::SequenceNumber_s& _sequence_number) -{ - m_sequence_number = _sequence_number; -} - -/*! - * @brief This function moves the value in member sequence_number - * @param _sequence_number New value to be moved in member sequence_number - */ -void SampleIdentity_s::sequence_number( - eprosima::fastdds::statistics::detail::SequenceNumber_s&& _sequence_number) -{ - m_sequence_number = std::move(_sequence_number); -} - -/*! - * @brief This function returns a constant reference to member sequence_number - * @return Constant reference to member sequence_number - */ -const eprosima::fastdds::statistics::detail::SequenceNumber_s& SampleIdentity_s::sequence_number() const -{ - return m_sequence_number; -} - -/*! - * @brief This function returns a reference to member sequence_number - * @return Reference to member sequence_number - */ -eprosima::fastdds::statistics::detail::SequenceNumber_s& SampleIdentity_s::sequence_number() -{ - return m_sequence_number; -} - - - - - -Locator_s::Locator_s() -{ - // long m_kind - m_kind = 0; - // unsigned long m_port - m_port = 0; - // octet m_address - memset(&m_address, 0, ((16)) * 1); - -} - -Locator_s::~Locator_s() -{ -} - -Locator_s::Locator_s( - const Locator_s& x) -{ - m_kind = x.m_kind; - - - m_port = x.m_port; - - - m_address = x.m_address; - -} - -Locator_s::Locator_s( - Locator_s&& x) noexcept -{ - m_kind = x.m_kind; - - - m_port = x.m_port; - - - m_address = std::move(x.m_address); - -} - -Locator_s& Locator_s::operator =( - const Locator_s& x) -{ - m_kind = x.m_kind; - - - m_port = x.m_port; - - - m_address = x.m_address; - - return *this; -} - -Locator_s& Locator_s::operator =( - Locator_s&& x) noexcept -{ - m_kind = x.m_kind; - - - m_port = x.m_port; - - - m_address = std::move(x.m_address); - - return *this; -} - -bool Locator_s::operator ==( - const Locator_s& x) const -{ - return (m_kind == x.m_kind && - m_port == x.m_port && - m_address == x.m_address); -} - -bool Locator_s::operator !=( - const Locator_s& x) const -{ - return !(*this == x); -} - -size_t Locator_s::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_detail_Locator_s_max_cdr_typesize; -} - -size_t Locator_s::getCdrSerializedSize( - const Locator_s& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += (((16)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void Locator_s::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_kind; - - scdr << m_port; - - scdr << m_address; - - -} - -void Locator_s::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_kind; - - - - dcdr >> m_port; - - - - dcdr >> m_address; - - -} - - -bool Locator_s::isKeyDefined() -{ - return false; -} - -void Locator_s::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member kind - * @param _kind New value for member kind - */ -void Locator_s::kind( - int32_t _kind) -{ - m_kind = _kind; -} - -/*! - * @brief This function returns the value of member kind - * @return Value of member kind - */ -int32_t Locator_s::kind() const -{ - return m_kind; -} - -/*! - * @brief This function returns a reference to member kind - * @return Reference to member kind - */ -int32_t& Locator_s::kind() -{ - return m_kind; -} - - -/*! - * @brief This function sets a value in member port - * @param _port New value for member port - */ -void Locator_s::port( - uint32_t _port) -{ - m_port = _port; -} - -/*! - * @brief This function returns the value of member port - * @return Value of member port - */ -uint32_t Locator_s::port() const -{ - return m_port; -} - -/*! - * @brief This function returns a reference to member port - * @return Reference to member port - */ -uint32_t& Locator_s::port() -{ - return m_port; -} - - -/*! - * @brief This function copies the value in member address - * @param _address New value to be copied in member address - */ -void Locator_s::address( - const std::array& _address) -{ - m_address = _address; -} - -/*! - * @brief This function moves the value in member address - * @param _address New value to be moved in member address - */ -void Locator_s::address( - std::array&& _address) -{ - m_address = std::move(_address); -} - -/*! - * @brief This function returns a constant reference to member address - * @return Constant reference to member address - */ -const std::array& Locator_s::address() const -{ - return m_address; -} - -/*! - * @brief This function returns a reference to member address - * @return Reference to member address - */ -std::array& Locator_s::address() -{ - return m_address; -} - - - - - -} // namespace detail - - -DiscoveryTime::DiscoveryTime() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_local_participant_guid - - // eprosima::fastdds::statistics::detail::GUID_s m_remote_entity_guid - - // unsigned long long m_time - m_time = 0; - // /type_d() m_host - - // /type_d() m_user - - // /type_d() m_process - - -} - -DiscoveryTime::~DiscoveryTime() -{ -} - -DiscoveryTime::DiscoveryTime( - const DiscoveryTime& x) -{ - m_local_participant_guid = x.m_local_participant_guid; - - - m_remote_entity_guid = x.m_remote_entity_guid; - - - m_time = x.m_time; - - - m_host = x.m_host; - - - m_user = x.m_user; - - - m_process = x.m_process; - -} - -DiscoveryTime::DiscoveryTime( - DiscoveryTime&& x) noexcept -{ - m_local_participant_guid = std::move(x.m_local_participant_guid); - - - m_remote_entity_guid = std::move(x.m_remote_entity_guid); - - - m_time = x.m_time; - - - m_host = std::move(x.m_host); - - - m_user = std::move(x.m_user); - - - m_process = std::move(x.m_process); - -} - -DiscoveryTime& DiscoveryTime::operator =( - const DiscoveryTime& x) -{ - m_local_participant_guid = x.m_local_participant_guid; - - - m_remote_entity_guid = x.m_remote_entity_guid; - - - m_time = x.m_time; - - - m_host = x.m_host; - - - m_user = x.m_user; - - - m_process = x.m_process; - - return *this; -} - -DiscoveryTime& DiscoveryTime::operator =( - DiscoveryTime&& x) noexcept -{ - m_local_participant_guid = std::move(x.m_local_participant_guid); - - - m_remote_entity_guid = std::move(x.m_remote_entity_guid); - - - m_time = x.m_time; - - - m_host = std::move(x.m_host); - - - m_user = std::move(x.m_user); - - - m_process = std::move(x.m_process); - - return *this; -} - -bool DiscoveryTime::operator ==( - const DiscoveryTime& x) const -{ - return (m_local_participant_guid == x.m_local_participant_guid && - m_remote_entity_guid == x.m_remote_entity_guid && - m_time == x.m_time && - m_host == x.m_host && - m_user == x.m_user && - m_process == x.m_process); -} - -bool DiscoveryTime::operator !=( - const DiscoveryTime& x) const -{ - return !(*this == x); -} - -size_t DiscoveryTime::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_DiscoveryTime_max_cdr_typesize; -} - -size_t DiscoveryTime::getCdrSerializedSize( - const DiscoveryTime& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.local_participant_guid(), current_alignment); - - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.remote_entity_guid(), current_alignment); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.host().size() + 1; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.user().size() + 1; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.process().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void DiscoveryTime::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_local_participant_guid; - - scdr << m_remote_entity_guid; - - scdr << m_time; - - scdr << m_host.c_str(); - - scdr << m_user.c_str(); - - scdr << m_process.c_str(); - -} - -void DiscoveryTime::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_local_participant_guid; - - - - dcdr >> m_remote_entity_guid; - - - - dcdr >> m_time; - - - - dcdr >> m_host; - - - - dcdr >> m_user; - - - - dcdr >> m_process; - - -} - - -bool DiscoveryTime::isKeyDefined() -{ - return true; -} - -void DiscoveryTime::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_local_participant_guid.serialize(scdr); - m_remote_entity_guid.serialize(scdr); - - - - -} - -/*! - * @brief This function copies the value in member local_participant_guid - * @param _local_participant_guid New value to be copied in member local_participant_guid - */ -void DiscoveryTime::local_participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _local_participant_guid) -{ - m_local_participant_guid = _local_participant_guid; -} - -/*! - * @brief This function moves the value in member local_participant_guid - * @param _local_participant_guid New value to be moved in member local_participant_guid - */ -void DiscoveryTime::local_participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _local_participant_guid) -{ - m_local_participant_guid = std::move(_local_participant_guid); -} - -/*! - * @brief This function returns a constant reference to member local_participant_guid - * @return Constant reference to member local_participant_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::local_participant_guid() const -{ - return m_local_participant_guid; -} - -/*! - * @brief This function returns a reference to member local_participant_guid - * @return Reference to member local_participant_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::local_participant_guid() -{ - return m_local_participant_guid; -} - - -/*! - * @brief This function copies the value in member remote_entity_guid - * @param _remote_entity_guid New value to be copied in member remote_entity_guid - */ -void DiscoveryTime::remote_entity_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _remote_entity_guid) -{ - m_remote_entity_guid = _remote_entity_guid; -} - -/*! - * @brief This function moves the value in member remote_entity_guid - * @param _remote_entity_guid New value to be moved in member remote_entity_guid - */ -void DiscoveryTime::remote_entity_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _remote_entity_guid) -{ - m_remote_entity_guid = std::move(_remote_entity_guid); -} - -/*! - * @brief This function returns a constant reference to member remote_entity_guid - * @return Constant reference to member remote_entity_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::remote_entity_guid() const -{ - return m_remote_entity_guid; -} - -/*! - * @brief This function returns a reference to member remote_entity_guid - * @return Reference to member remote_entity_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::remote_entity_guid() -{ - return m_remote_entity_guid; -} - - -/*! - * @brief This function sets a value in member time - * @param _time New value for member time - */ -void DiscoveryTime::time( - uint64_t _time) -{ - m_time = _time; -} - -/*! - * @brief This function returns the value of member time - * @return Value of member time - */ -uint64_t DiscoveryTime::time() const -{ - return m_time; -} - -/*! - * @brief This function returns a reference to member time - * @return Reference to member time - */ -uint64_t& DiscoveryTime::time() -{ - return m_time; -} - - -/*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ -void DiscoveryTime::host( - const std::string& _host) -{ - m_host = _host; -} - -/*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ -void DiscoveryTime::host( - std::string&& _host) -{ - m_host = std::move(_host); -} - -/*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ -const std::string& DiscoveryTime::host() const -{ - return m_host; -} - -/*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ -std::string& DiscoveryTime::host() -{ - return m_host; -} - - -/*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ -void DiscoveryTime::user( - const std::string& _user) -{ - m_user = _user; -} - -/*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ -void DiscoveryTime::user( - std::string&& _user) -{ - m_user = std::move(_user); -} - -/*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ -const std::string& DiscoveryTime::user() const -{ - return m_user; -} - -/*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ -std::string& DiscoveryTime::user() -{ - return m_user; -} - - -/*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ -void DiscoveryTime::process( - const std::string& _process) -{ - m_process = _process; -} - -/*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ -void DiscoveryTime::process( - std::string&& _process) -{ - m_process = std::move(_process); -} - -/*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ -const std::string& DiscoveryTime::process() const -{ - return m_process; -} - -/*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ -std::string& DiscoveryTime::process() -{ - return m_process; -} - - - - - -EntityCount::EntityCount() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_guid - - // unsigned long long m_count - m_count = 0; - -} - -EntityCount::~EntityCount() -{ -} - -EntityCount::EntityCount( - const EntityCount& x) -{ - m_guid = x.m_guid; - - - m_count = x.m_count; - -} - -EntityCount::EntityCount( - EntityCount&& x) noexcept -{ - m_guid = std::move(x.m_guid); - - - m_count = x.m_count; - -} - -EntityCount& EntityCount::operator =( - const EntityCount& x) -{ - m_guid = x.m_guid; - - - m_count = x.m_count; - - return *this; -} - -EntityCount& EntityCount::operator =( - EntityCount&& x) noexcept -{ - m_guid = std::move(x.m_guid); - - - m_count = x.m_count; - - return *this; -} - -bool EntityCount::operator ==( - const EntityCount& x) const -{ - return (m_guid == x.m_guid && - m_count == x.m_count); -} - -bool EntityCount::operator !=( - const EntityCount& x) const -{ - return !(*this == x); -} - -size_t EntityCount::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_EntityCount_max_cdr_typesize; -} - -size_t EntityCount::getCdrSerializedSize( - const EntityCount& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.guid(), current_alignment); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - return current_alignment - initial_alignment; -} - - -void EntityCount::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_guid; - - scdr << m_count; - -} - -void EntityCount::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_guid; - - - - dcdr >> m_count; - - -} - - -bool EntityCount::isKeyDefined() -{ - return true; -} - -void EntityCount::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_guid.serialize(scdr); - -} - -/*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ -void EntityCount::guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid) -{ - m_guid = _guid; -} - -/*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ -void EntityCount::guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid) -{ - m_guid = std::move(_guid); -} - -/*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& EntityCount::guid() const -{ - return m_guid; -} - -/*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ -eprosima::fastdds::statistics::detail::GUID_s& EntityCount::guid() -{ - return m_guid; -} - - -/*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ -void EntityCount::count( - uint64_t _count) -{ - m_count = _count; -} - -/*! - * @brief This function returns the value of member count - * @return Value of member count - */ -uint64_t EntityCount::count() const -{ - return m_count; -} - -/*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ -uint64_t& EntityCount::count() -{ - return m_count; -} - - - - - -SampleIdentityCount::SampleIdentityCount() -{ - // eprosima::fastdds::statistics::detail::SampleIdentity_s m_sample_id - - // unsigned long long m_count - m_count = 0; - -} - -SampleIdentityCount::~SampleIdentityCount() -{ -} - -SampleIdentityCount::SampleIdentityCount( - const SampleIdentityCount& x) -{ - m_sample_id = x.m_sample_id; - - - m_count = x.m_count; - -} - -SampleIdentityCount::SampleIdentityCount( - SampleIdentityCount&& x) noexcept -{ - m_sample_id = std::move(x.m_sample_id); - - - m_count = x.m_count; - -} - -SampleIdentityCount& SampleIdentityCount::operator =( - const SampleIdentityCount& x) -{ - m_sample_id = x.m_sample_id; - - - m_count = x.m_count; - - return *this; -} - -SampleIdentityCount& SampleIdentityCount::operator =( - SampleIdentityCount&& x) noexcept -{ - m_sample_id = std::move(x.m_sample_id); - - - m_count = x.m_count; - - return *this; -} - -bool SampleIdentityCount::operator ==( - const SampleIdentityCount& x) const -{ - return (m_sample_id == x.m_sample_id && - m_count == x.m_count); -} - -bool SampleIdentityCount::operator !=( - const SampleIdentityCount& x) const -{ - return !(*this == x); -} - -size_t SampleIdentityCount::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_SampleIdentityCount_max_cdr_typesize; -} - -size_t SampleIdentityCount::getCdrSerializedSize( - const SampleIdentityCount& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::SampleIdentity_s::getCdrSerializedSize(data.sample_id(), current_alignment); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - return current_alignment - initial_alignment; -} - - -void SampleIdentityCount::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_sample_id; - - scdr << m_count; - -} - -void SampleIdentityCount::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_sample_id; - - - - dcdr >> m_count; - - -} - - -bool SampleIdentityCount::isKeyDefined() -{ - return true; -} - -void SampleIdentityCount::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_sample_id.serialize(scdr); - -} - -/*! - * @brief This function copies the value in member sample_id - * @param _sample_id New value to be copied in member sample_id - */ -void SampleIdentityCount::sample_id( - const eprosima::fastdds::statistics::detail::SampleIdentity_s& _sample_id) -{ - m_sample_id = _sample_id; -} - -/*! - * @brief This function moves the value in member sample_id - * @param _sample_id New value to be moved in member sample_id - */ -void SampleIdentityCount::sample_id( - eprosima::fastdds::statistics::detail::SampleIdentity_s&& _sample_id) -{ - m_sample_id = std::move(_sample_id); -} - -/*! - * @brief This function returns a constant reference to member sample_id - * @return Constant reference to member sample_id - */ -const eprosima::fastdds::statistics::detail::SampleIdentity_s& SampleIdentityCount::sample_id() const -{ - return m_sample_id; -} - -/*! - * @brief This function returns a reference to member sample_id - * @return Reference to member sample_id - */ -eprosima::fastdds::statistics::detail::SampleIdentity_s& SampleIdentityCount::sample_id() -{ - return m_sample_id; -} - - -/*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ -void SampleIdentityCount::count( - uint64_t _count) -{ - m_count = _count; -} - -/*! - * @brief This function returns the value of member count - * @return Value of member count - */ -uint64_t SampleIdentityCount::count() const -{ - return m_count; -} - -/*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ -uint64_t& SampleIdentityCount::count() -{ - return m_count; -} - - - - - -Entity2LocatorTraffic::Entity2LocatorTraffic() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_src_guid - - // eprosima::fastdds::statistics::detail::Locator_s m_dst_locator - - // unsigned long long m_packet_count - m_packet_count = 0; - // unsigned long long m_byte_count - m_byte_count = 0; - // short m_byte_magnitude_order - m_byte_magnitude_order = 0; - -} - -Entity2LocatorTraffic::~Entity2LocatorTraffic() -{ -} - -Entity2LocatorTraffic::Entity2LocatorTraffic( - const Entity2LocatorTraffic& x) -{ - m_src_guid = x.m_src_guid; - - - m_dst_locator = x.m_dst_locator; - - - m_packet_count = x.m_packet_count; - - - m_byte_count = x.m_byte_count; - - - m_byte_magnitude_order = x.m_byte_magnitude_order; - -} - -Entity2LocatorTraffic::Entity2LocatorTraffic( - Entity2LocatorTraffic&& x) noexcept -{ - m_src_guid = std::move(x.m_src_guid); - - - m_dst_locator = std::move(x.m_dst_locator); - - - m_packet_count = x.m_packet_count; - - - m_byte_count = x.m_byte_count; - - - m_byte_magnitude_order = x.m_byte_magnitude_order; - -} - -Entity2LocatorTraffic& Entity2LocatorTraffic::operator =( - const Entity2LocatorTraffic& x) -{ - m_src_guid = x.m_src_guid; - - - m_dst_locator = x.m_dst_locator; - - - m_packet_count = x.m_packet_count; - - - m_byte_count = x.m_byte_count; - - - m_byte_magnitude_order = x.m_byte_magnitude_order; - - return *this; -} - -Entity2LocatorTraffic& Entity2LocatorTraffic::operator =( - Entity2LocatorTraffic&& x) noexcept -{ - m_src_guid = std::move(x.m_src_guid); - - - m_dst_locator = std::move(x.m_dst_locator); - - - m_packet_count = x.m_packet_count; - - - m_byte_count = x.m_byte_count; - - - m_byte_magnitude_order = x.m_byte_magnitude_order; - - return *this; -} - -bool Entity2LocatorTraffic::operator ==( - const Entity2LocatorTraffic& x) const -{ - return (m_src_guid == x.m_src_guid && - m_dst_locator == x.m_dst_locator && - m_packet_count == x.m_packet_count && - m_byte_count == x.m_byte_count && - m_byte_magnitude_order == x.m_byte_magnitude_order); -} - -bool Entity2LocatorTraffic::operator !=( - const Entity2LocatorTraffic& x) const -{ - return !(*this == x); -} - -size_t Entity2LocatorTraffic::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_Entity2LocatorTraffic_max_cdr_typesize; -} - -size_t Entity2LocatorTraffic::getCdrSerializedSize( - const Entity2LocatorTraffic& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.src_guid(), current_alignment); - - - current_alignment += eprosima::fastdds::statistics::detail::Locator_s::getCdrSerializedSize(data.dst_locator(), current_alignment); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - return current_alignment - initial_alignment; -} - - -void Entity2LocatorTraffic::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_src_guid; - - scdr << m_dst_locator; - - scdr << m_packet_count; - - scdr << m_byte_count; - - scdr << m_byte_magnitude_order; - -} - -void Entity2LocatorTraffic::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_src_guid; - - - - dcdr >> m_dst_locator; - - - - dcdr >> m_packet_count; - - - - dcdr >> m_byte_count; - - - - dcdr >> m_byte_magnitude_order; - - -} - - -bool Entity2LocatorTraffic::isKeyDefined() -{ - return true; -} - -void Entity2LocatorTraffic::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_src_guid.serialize(scdr); - m_dst_locator.serialize(scdr); - - - -} - -/*! - * @brief This function copies the value in member src_guid - * @param _src_guid New value to be copied in member src_guid - */ -void Entity2LocatorTraffic::src_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _src_guid) -{ - m_src_guid = _src_guid; -} - -/*! - * @brief This function moves the value in member src_guid - * @param _src_guid New value to be moved in member src_guid - */ -void Entity2LocatorTraffic::src_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _src_guid) -{ - m_src_guid = std::move(_src_guid); -} - -/*! - * @brief This function returns a constant reference to member src_guid - * @return Constant reference to member src_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& Entity2LocatorTraffic::src_guid() const -{ - return m_src_guid; -} - -/*! - * @brief This function returns a reference to member src_guid - * @return Reference to member src_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& Entity2LocatorTraffic::src_guid() -{ - return m_src_guid; -} - - -/*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ -void Entity2LocatorTraffic::dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator) -{ - m_dst_locator = _dst_locator; -} - -/*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ -void Entity2LocatorTraffic::dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator) -{ - m_dst_locator = std::move(_dst_locator); -} - -/*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ -const eprosima::fastdds::statistics::detail::Locator_s& Entity2LocatorTraffic::dst_locator() const -{ - return m_dst_locator; -} - -/*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ -eprosima::fastdds::statistics::detail::Locator_s& Entity2LocatorTraffic::dst_locator() -{ - return m_dst_locator; -} - - -/*! - * @brief This function sets a value in member packet_count - * @param _packet_count New value for member packet_count - */ -void Entity2LocatorTraffic::packet_count( - uint64_t _packet_count) -{ - m_packet_count = _packet_count; -} - -/*! - * @brief This function returns the value of member packet_count - * @return Value of member packet_count - */ -uint64_t Entity2LocatorTraffic::packet_count() const -{ - return m_packet_count; -} - -/*! - * @brief This function returns a reference to member packet_count - * @return Reference to member packet_count - */ -uint64_t& Entity2LocatorTraffic::packet_count() -{ - return m_packet_count; -} - - -/*! - * @brief This function sets a value in member byte_count - * @param _byte_count New value for member byte_count - */ -void Entity2LocatorTraffic::byte_count( - uint64_t _byte_count) -{ - m_byte_count = _byte_count; -} - -/*! - * @brief This function returns the value of member byte_count - * @return Value of member byte_count - */ -uint64_t Entity2LocatorTraffic::byte_count() const -{ - return m_byte_count; -} - -/*! - * @brief This function returns a reference to member byte_count - * @return Reference to member byte_count - */ -uint64_t& Entity2LocatorTraffic::byte_count() -{ - return m_byte_count; -} - - -/*! - * @brief This function sets a value in member byte_magnitude_order - * @param _byte_magnitude_order New value for member byte_magnitude_order - */ -void Entity2LocatorTraffic::byte_magnitude_order( - int16_t _byte_magnitude_order) -{ - m_byte_magnitude_order = _byte_magnitude_order; -} - -/*! - * @brief This function returns the value of member byte_magnitude_order - * @return Value of member byte_magnitude_order - */ -int16_t Entity2LocatorTraffic::byte_magnitude_order() const -{ - return m_byte_magnitude_order; -} - -/*! - * @brief This function returns a reference to member byte_magnitude_order - * @return Reference to member byte_magnitude_order - */ -int16_t& Entity2LocatorTraffic::byte_magnitude_order() -{ - return m_byte_magnitude_order; -} - - - - - -WriterReaderData::WriterReaderData() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_writer_guid - - // eprosima::fastdds::statistics::detail::GUID_s m_reader_guid - - // float m_data - m_data = 0.0; - -} - -WriterReaderData::~WriterReaderData() -{ -} - -WriterReaderData::WriterReaderData( - const WriterReaderData& x) -{ - m_writer_guid = x.m_writer_guid; - - - m_reader_guid = x.m_reader_guid; - - - m_data = x.m_data; - -} - -WriterReaderData::WriterReaderData( - WriterReaderData&& x) noexcept -{ - m_writer_guid = std::move(x.m_writer_guid); - - - m_reader_guid = std::move(x.m_reader_guid); - - - m_data = x.m_data; - -} - -WriterReaderData& WriterReaderData::operator =( - const WriterReaderData& x) -{ - m_writer_guid = x.m_writer_guid; - - - m_reader_guid = x.m_reader_guid; - - - m_data = x.m_data; - - return *this; -} - -WriterReaderData& WriterReaderData::operator =( - WriterReaderData&& x) noexcept -{ - m_writer_guid = std::move(x.m_writer_guid); - - - m_reader_guid = std::move(x.m_reader_guid); - - - m_data = x.m_data; - - return *this; -} - -bool WriterReaderData::operator ==( - const WriterReaderData& x) const -{ - return (m_writer_guid == x.m_writer_guid && - m_reader_guid == x.m_reader_guid && - m_data == x.m_data); -} - -bool WriterReaderData::operator !=( - const WriterReaderData& x) const -{ - return !(*this == x); -} - -size_t WriterReaderData::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_WriterReaderData_max_cdr_typesize; -} - -size_t WriterReaderData::getCdrSerializedSize( - const WriterReaderData& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.writer_guid(), current_alignment); - - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.reader_guid(), current_alignment); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void WriterReaderData::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_writer_guid; - - scdr << m_reader_guid; - - scdr << m_data; - -} - -void WriterReaderData::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_writer_guid; - - - - dcdr >> m_reader_guid; - - - - dcdr >> m_data; - - -} - - -bool WriterReaderData::isKeyDefined() -{ - return true; -} - -void WriterReaderData::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_writer_guid.serialize(scdr); - m_reader_guid.serialize(scdr); - -} - -/*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ -void WriterReaderData::writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid) -{ - m_writer_guid = _writer_guid; -} - -/*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ -void WriterReaderData::writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid) -{ - m_writer_guid = std::move(_writer_guid); -} - -/*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::writer_guid() const -{ - return m_writer_guid; -} - -/*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::writer_guid() -{ - return m_writer_guid; -} - - -/*! - * @brief This function copies the value in member reader_guid - * @param _reader_guid New value to be copied in member reader_guid - */ -void WriterReaderData::reader_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _reader_guid) -{ - m_reader_guid = _reader_guid; -} - -/*! - * @brief This function moves the value in member reader_guid - * @param _reader_guid New value to be moved in member reader_guid - */ -void WriterReaderData::reader_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _reader_guid) -{ - m_reader_guid = std::move(_reader_guid); -} - -/*! - * @brief This function returns a constant reference to member reader_guid - * @return Constant reference to member reader_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::reader_guid() const -{ - return m_reader_guid; -} - -/*! - * @brief This function returns a reference to member reader_guid - * @return Reference to member reader_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::reader_guid() -{ - return m_reader_guid; -} - - -/*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ -void WriterReaderData::data( - float _data) -{ - m_data = _data; -} - -/*! - * @brief This function returns the value of member data - * @return Value of member data - */ -float WriterReaderData::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -float& WriterReaderData::data() -{ - return m_data; -} - - - - - -Locator2LocatorData::Locator2LocatorData() -{ - // eprosima::fastdds::statistics::detail::Locator_s m_src_locator - - // eprosima::fastdds::statistics::detail::Locator_s m_dst_locator - - // float m_data - m_data = 0.0; - -} - -Locator2LocatorData::~Locator2LocatorData() -{ -} - -Locator2LocatorData::Locator2LocatorData( - const Locator2LocatorData& x) -{ - m_src_locator = x.m_src_locator; - - - m_dst_locator = x.m_dst_locator; - - - m_data = x.m_data; - -} - -Locator2LocatorData::Locator2LocatorData( - Locator2LocatorData&& x) noexcept -{ - m_src_locator = std::move(x.m_src_locator); - - - m_dst_locator = std::move(x.m_dst_locator); - - - m_data = x.m_data; - -} - -Locator2LocatorData& Locator2LocatorData::operator =( - const Locator2LocatorData& x) -{ - m_src_locator = x.m_src_locator; - - - m_dst_locator = x.m_dst_locator; - - - m_data = x.m_data; - - return *this; -} - -Locator2LocatorData& Locator2LocatorData::operator =( - Locator2LocatorData&& x) noexcept -{ - m_src_locator = std::move(x.m_src_locator); - - - m_dst_locator = std::move(x.m_dst_locator); - - - m_data = x.m_data; - - return *this; -} - -bool Locator2LocatorData::operator ==( - const Locator2LocatorData& x) const -{ - return (m_src_locator == x.m_src_locator && - m_dst_locator == x.m_dst_locator && - m_data == x.m_data); -} - -bool Locator2LocatorData::operator !=( - const Locator2LocatorData& x) const -{ - return !(*this == x); -} - -size_t Locator2LocatorData::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_Locator2LocatorData_max_cdr_typesize; -} - -size_t Locator2LocatorData::getCdrSerializedSize( - const Locator2LocatorData& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::Locator_s::getCdrSerializedSize(data.src_locator(), current_alignment); - - - current_alignment += eprosima::fastdds::statistics::detail::Locator_s::getCdrSerializedSize(data.dst_locator(), current_alignment); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void Locator2LocatorData::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_src_locator; - - scdr << m_dst_locator; - - scdr << m_data; - -} - -void Locator2LocatorData::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_src_locator; - - - - dcdr >> m_dst_locator; - - - - dcdr >> m_data; - - -} - - -bool Locator2LocatorData::isKeyDefined() -{ - return true; -} - -void Locator2LocatorData::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_src_locator.serialize(scdr); - m_dst_locator.serialize(scdr); - -} - -/*! - * @brief This function copies the value in member src_locator - * @param _src_locator New value to be copied in member src_locator - */ -void Locator2LocatorData::src_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _src_locator) -{ - m_src_locator = _src_locator; -} - -/*! - * @brief This function moves the value in member src_locator - * @param _src_locator New value to be moved in member src_locator - */ -void Locator2LocatorData::src_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _src_locator) -{ - m_src_locator = std::move(_src_locator); -} - -/*! - * @brief This function returns a constant reference to member src_locator - * @return Constant reference to member src_locator - */ -const eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::src_locator() const -{ - return m_src_locator; -} - -/*! - * @brief This function returns a reference to member src_locator - * @return Reference to member src_locator - */ -eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::src_locator() -{ - return m_src_locator; -} - - -/*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ -void Locator2LocatorData::dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator) -{ - m_dst_locator = _dst_locator; -} - -/*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ -void Locator2LocatorData::dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator) -{ - m_dst_locator = std::move(_dst_locator); -} - -/*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ -const eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::dst_locator() const -{ - return m_dst_locator; -} - -/*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ -eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::dst_locator() -{ - return m_dst_locator; -} - - -/*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ -void Locator2LocatorData::data( - float _data) -{ - m_data = _data; -} - -/*! - * @brief This function returns the value of member data - * @return Value of member data - */ -float Locator2LocatorData::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -float& Locator2LocatorData::data() -{ - return m_data; -} - - - - - -EntityData::EntityData() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_guid - - // float m_data - m_data = 0.0; - -} - -EntityData::~EntityData() -{ -} - -EntityData::EntityData( - const EntityData& x) -{ - m_guid = x.m_guid; - - - m_data = x.m_data; - -} - -EntityData::EntityData( - EntityData&& x) noexcept -{ - m_guid = std::move(x.m_guid); - - - m_data = x.m_data; - -} - -EntityData& EntityData::operator =( - const EntityData& x) -{ - m_guid = x.m_guid; - - - m_data = x.m_data; - - return *this; -} - -EntityData& EntityData::operator =( - EntityData&& x) noexcept -{ - m_guid = std::move(x.m_guid); - - - m_data = x.m_data; - - return *this; -} - -bool EntityData::operator ==( - const EntityData& x) const -{ - return (m_guid == x.m_guid && - m_data == x.m_data); -} - -bool EntityData::operator !=( - const EntityData& x) const -{ - return !(*this == x); -} - -size_t EntityData::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_EntityData_max_cdr_typesize; -} - -size_t EntityData::getCdrSerializedSize( - const EntityData& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.guid(), current_alignment); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void EntityData::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_guid; - - scdr << m_data; - -} - -void EntityData::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_guid; - - - - dcdr >> m_data; - - -} - - -bool EntityData::isKeyDefined() -{ - return true; -} - -void EntityData::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_guid.serialize(scdr); - -} - -/*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ -void EntityData::guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid) -{ - m_guid = _guid; -} - -/*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ -void EntityData::guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid) -{ - m_guid = std::move(_guid); -} - -/*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& EntityData::guid() const -{ - return m_guid; -} - -/*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ -eprosima::fastdds::statistics::detail::GUID_s& EntityData::guid() -{ - return m_guid; -} - - -/*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ -void EntityData::data( - float _data) -{ - m_data = _data; -} - -/*! - * @brief This function returns the value of member data - * @return Value of member data - */ -float EntityData::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -float& EntityData::data() -{ - return m_data; -} - - - - - -PhysicalData::PhysicalData() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_participant_guid - - // /type_d() m_host - - // /type_d() m_user - - // /type_d() m_process - - -} - -PhysicalData::~PhysicalData() -{ -} - -PhysicalData::PhysicalData( - const PhysicalData& x) -{ - m_participant_guid = x.m_participant_guid; - - - m_host = x.m_host; - - - m_user = x.m_user; - - - m_process = x.m_process; - -} - -PhysicalData::PhysicalData( - PhysicalData&& x) noexcept -{ - m_participant_guid = std::move(x.m_participant_guid); - - - m_host = std::move(x.m_host); - - - m_user = std::move(x.m_user); - - - m_process = std::move(x.m_process); - -} - -PhysicalData& PhysicalData::operator =( - const PhysicalData& x) -{ - m_participant_guid = x.m_participant_guid; - - - m_host = x.m_host; - - - m_user = x.m_user; - - - m_process = x.m_process; - - return *this; -} - -PhysicalData& PhysicalData::operator =( - PhysicalData&& x) noexcept -{ - m_participant_guid = std::move(x.m_participant_guid); - - - m_host = std::move(x.m_host); - - - m_user = std::move(x.m_user); - - - m_process = std::move(x.m_process); - - return *this; -} - -bool PhysicalData::operator ==( - const PhysicalData& x) const -{ - return (m_participant_guid == x.m_participant_guid && - m_host == x.m_host && - m_user == x.m_user && - m_process == x.m_process); -} - -bool PhysicalData::operator !=( - const PhysicalData& x) const -{ - return !(*this == x); -} - -size_t PhysicalData::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_PhysicalData_max_cdr_typesize; -} - -size_t PhysicalData::getCdrSerializedSize( - const PhysicalData& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.participant_guid(), current_alignment); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.host().size() + 1; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.user().size() + 1; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.process().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void PhysicalData::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_participant_guid; - - scdr << m_host.c_str(); - - scdr << m_user.c_str(); - - scdr << m_process.c_str(); - -} - -void PhysicalData::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_participant_guid; - - - - dcdr >> m_host; - - - - dcdr >> m_user; - - - - dcdr >> m_process; - - -} - - -bool PhysicalData::isKeyDefined() -{ - return true; -} - -void PhysicalData::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_participant_guid.serialize(scdr); - - - -} - -/*! - * @brief This function copies the value in member participant_guid - * @param _participant_guid New value to be copied in member participant_guid - */ -void PhysicalData::participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _participant_guid) -{ - m_participant_guid = _participant_guid; -} - -/*! - * @brief This function moves the value in member participant_guid - * @param _participant_guid New value to be moved in member participant_guid - */ -void PhysicalData::participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _participant_guid) -{ - m_participant_guid = std::move(_participant_guid); -} - -/*! - * @brief This function returns a constant reference to member participant_guid - * @return Constant reference to member participant_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& PhysicalData::participant_guid() const -{ - return m_participant_guid; -} - -/*! - * @brief This function returns a reference to member participant_guid - * @return Reference to member participant_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& PhysicalData::participant_guid() -{ - return m_participant_guid; -} - - -/*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ -void PhysicalData::host( - const std::string& _host) -{ - m_host = _host; -} - -/*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ -void PhysicalData::host( - std::string&& _host) -{ - m_host = std::move(_host); -} - -/*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ -const std::string& PhysicalData::host() const -{ - return m_host; -} - -/*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ -std::string& PhysicalData::host() -{ - return m_host; -} - - -/*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ -void PhysicalData::user( - const std::string& _user) -{ - m_user = _user; -} - -/*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ -void PhysicalData::user( - std::string&& _user) -{ - m_user = std::move(_user); -} - -/*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ -const std::string& PhysicalData::user() const -{ - return m_user; -} - -/*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ -std::string& PhysicalData::user() -{ - return m_user; -} - - -/*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ -void PhysicalData::process( - const std::string& _process) -{ - m_process = _process; -} - -/*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ -void PhysicalData::process( - std::string&& _process) -{ - m_process = std::move(_process); -} - -/*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ -const std::string& PhysicalData::process() const -{ - return m_process; -} - -/*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ -std::string& PhysicalData::process() -{ - return m_process; -} - - - - - - -Data::Data() -{ - m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; - // eprosima::fastdds::statistics::WriterReaderData m_writer_reader_data - - // eprosima::fastdds::statistics::Locator2LocatorData m_locator2locator_data - - // eprosima::fastdds::statistics::EntityData m_entity_data - - // eprosima::fastdds::statistics::Entity2LocatorTraffic m_entity2locator_traffic - - // eprosima::fastdds::statistics::EntityCount m_entity_count - - // eprosima::fastdds::statistics::DiscoveryTime m_discovery_time - - // eprosima::fastdds::statistics::SampleIdentityCount m_sample_identity_count - - // eprosima::fastdds::statistics::PhysicalData m_physical_data - -} - -Data::~Data() -{ -} - -Data::Data( - const Data& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = x.m_writer_reader_data; - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = x.m_locator2locator_data; - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = x.m_entity_data; - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = x.m_entity2locator_traffic; - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = x.m_entity_count; - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = x.m_discovery_time; - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = x.m_sample_identity_count; - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = x.m_physical_data; - break; - - default: - break; - } -} - -Data::Data( - Data&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = std::move(x.m_writer_reader_data); - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = std::move(x.m_locator2locator_data); - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = std::move(x.m_entity_data); - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = std::move(x.m_entity2locator_traffic); - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = std::move(x.m_entity_count); - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = std::move(x.m_discovery_time); - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = std::move(x.m_sample_identity_count); - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = std::move(x.m_physical_data); - - break; - - default: - break; - } -} - -Data& Data::operator =( - const Data& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = x.m_writer_reader_data; - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = x.m_locator2locator_data; - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = x.m_entity_data; - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = x.m_entity2locator_traffic; - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = x.m_entity_count; - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = x.m_discovery_time; - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = x.m_sample_identity_count; - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = x.m_physical_data; - break; - - default: - break; - } - - return *this; -} - -Data& Data::operator =( - Data&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = std::move(x.m_writer_reader_data); - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = std::move(x.m_locator2locator_data); - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = std::move(x.m_entity_data); - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = std::move(x.m_entity2locator_traffic); - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = std::move(x.m_entity_count); - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = std::move(x.m_discovery_time); - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = std::move(x.m_sample_identity_count); - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = std::move(x.m_physical_data); - - break; - - default: - break; - } - - return *this; -} - -bool Data::operator ==( - const Data& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - return (m_writer_reader_data == x.m_writer_reader_data); - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - return (m_locator2locator_data == x.m_locator2locator_data); - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - return (m_entity_data == x.m_entity_data); - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - return (m_entity2locator_traffic == x.m_entity2locator_traffic); - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - return (m_entity_count == x.m_entity_count); - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - return (m_discovery_time == x.m_discovery_time); - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - return (m_sample_identity_count == x.m_sample_identity_count); - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - return (m_physical_data == x.m_physical_data); - break; - - default: - break; - } - return false; -} - -bool Data::operator !=( - const Data& x) const -{ - return !(*this == x); -} - -void Data::_d( - eprosima::fastdds::statistics::EventKind __d) -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - switch(__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - switch(__d) - { - case eprosima::fastdds::statistics::NETWORK_LATENCY: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - switch(__d) - { - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - switch(__d) - { - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - switch(__d) - { - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - switch(__d) - { - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - switch(__d) - { - case eprosima::fastdds::statistics::SAMPLE_DATAS: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - switch(__d) - { - case eprosima::fastdds::statistics::PHYSICAL_DATA: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -eprosima::fastdds::statistics::EventKind Data::_d() const -{ - return m__d; -} - -eprosima::fastdds::statistics::EventKind& Data::_d() -{ - return m__d; -} - -void Data::writer_reader_data( - const eprosima::fastdds::statistics::WriterReaderData& _writer_reader_data) -{ - m_writer_reader_data = _writer_reader_data; - m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; - -} - -void Data::writer_reader_data( - eprosima::fastdds::statistics::WriterReaderData&& _writer_reader_data) -{ - m_writer_reader_data = std::move(_writer_reader_data); - m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; - -} - -const eprosima::fastdds::statistics::WriterReaderData& Data::writer_reader_data() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_writer_reader_data; -} - -eprosima::fastdds::statistics::WriterReaderData& Data::writer_reader_data() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_writer_reader_data; -} - - -void Data::locator2locator_data( - const eprosima::fastdds::statistics::Locator2LocatorData& _locator2locator_data) -{ - m_locator2locator_data = _locator2locator_data; - m__d = eprosima::fastdds::statistics::NETWORK_LATENCY; - -} - -void Data::locator2locator_data( - eprosima::fastdds::statistics::Locator2LocatorData&& _locator2locator_data) -{ - m_locator2locator_data = std::move(_locator2locator_data); - m__d = eprosima::fastdds::statistics::NETWORK_LATENCY; - -} - -const eprosima::fastdds::statistics::Locator2LocatorData& Data::locator2locator_data() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::NETWORK_LATENCY: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_locator2locator_data; -} - -eprosima::fastdds::statistics::Locator2LocatorData& Data::locator2locator_data() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::NETWORK_LATENCY: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_locator2locator_data; -} - - -void Data::entity_data( - const eprosima::fastdds::statistics::EntityData& _entity_data) -{ - m_entity_data = _entity_data; - m__d = eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT; - -} - -void Data::entity_data( - eprosima::fastdds::statistics::EntityData&& _entity_data) -{ - m_entity_data = std::move(_entity_data); - m__d = eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT; - -} - -const eprosima::fastdds::statistics::EntityData& Data::entity_data() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_data; -} - -eprosima::fastdds::statistics::EntityData& Data::entity_data() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_data; -} - - -void Data::entity2locator_traffic( - const eprosima::fastdds::statistics::Entity2LocatorTraffic& _entity2locator_traffic) -{ - m_entity2locator_traffic = _entity2locator_traffic; - m__d = eprosima::fastdds::statistics::RTPS_SENT; - -} - -void Data::entity2locator_traffic( - eprosima::fastdds::statistics::Entity2LocatorTraffic&& _entity2locator_traffic) -{ - m_entity2locator_traffic = std::move(_entity2locator_traffic); - m__d = eprosima::fastdds::statistics::RTPS_SENT; - -} - -const eprosima::fastdds::statistics::Entity2LocatorTraffic& Data::entity2locator_traffic() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity2locator_traffic; -} - -eprosima::fastdds::statistics::Entity2LocatorTraffic& Data::entity2locator_traffic() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity2locator_traffic; -} - - -void Data::entity_count( - const eprosima::fastdds::statistics::EntityCount& _entity_count) -{ - m_entity_count = _entity_count; - m__d = eprosima::fastdds::statistics::RESENT_DATAS; - -} - -void Data::entity_count( - eprosima::fastdds::statistics::EntityCount&& _entity_count) -{ - m_entity_count = std::move(_entity_count); - m__d = eprosima::fastdds::statistics::RESENT_DATAS; - -} - -const eprosima::fastdds::statistics::EntityCount& Data::entity_count() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_count; -} - -eprosima::fastdds::statistics::EntityCount& Data::entity_count() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_count; -} - - -void Data::discovery_time( - const eprosima::fastdds::statistics::DiscoveryTime& _discovery_time) -{ - m_discovery_time = _discovery_time; - m__d = eprosima::fastdds::statistics::DISCOVERED_ENTITY; - -} - -void Data::discovery_time( - eprosima::fastdds::statistics::DiscoveryTime&& _discovery_time) -{ - m_discovery_time = std::move(_discovery_time); - m__d = eprosima::fastdds::statistics::DISCOVERED_ENTITY; - -} - -const eprosima::fastdds::statistics::DiscoveryTime& Data::discovery_time() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_discovery_time; -} - -eprosima::fastdds::statistics::DiscoveryTime& Data::discovery_time() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_discovery_time; -} - - -void Data::sample_identity_count( - const eprosima::fastdds::statistics::SampleIdentityCount& _sample_identity_count) -{ - m_sample_identity_count = _sample_identity_count; - m__d = eprosima::fastdds::statistics::SAMPLE_DATAS; - -} - -void Data::sample_identity_count( - eprosima::fastdds::statistics::SampleIdentityCount&& _sample_identity_count) -{ - m_sample_identity_count = std::move(_sample_identity_count); - m__d = eprosima::fastdds::statistics::SAMPLE_DATAS; - -} - -const eprosima::fastdds::statistics::SampleIdentityCount& Data::sample_identity_count() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::SAMPLE_DATAS: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_sample_identity_count; -} - -eprosima::fastdds::statistics::SampleIdentityCount& Data::sample_identity_count() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::SAMPLE_DATAS: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_sample_identity_count; -} - - -void Data::physical_data( - const eprosima::fastdds::statistics::PhysicalData& _physical_data) -{ - m_physical_data = _physical_data; - m__d = eprosima::fastdds::statistics::PHYSICAL_DATA; - -} - -void Data::physical_data( - eprosima::fastdds::statistics::PhysicalData&& _physical_data) -{ - m_physical_data = std::move(_physical_data); - m__d = eprosima::fastdds::statistics::PHYSICAL_DATA; - -} - -const eprosima::fastdds::statistics::PhysicalData& Data::physical_data() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::PHYSICAL_DATA: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_physical_data; -} - -eprosima::fastdds::statistics::PhysicalData& Data::physical_data() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::PHYSICAL_DATA: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_physical_data; -} - - -// TODO(Ricardo) Review -size_t Data::getCdrSerializedSize( - const Data& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - - switch(data.m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - current_alignment += eprosima::fastdds::statistics::WriterReaderData::getCdrSerializedSize(data.writer_reader_data(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - current_alignment += eprosima::fastdds::statistics::Locator2LocatorData::getCdrSerializedSize(data.locator2locator_data(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - current_alignment += eprosima::fastdds::statistics::EntityData::getCdrSerializedSize(data.entity_data(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - current_alignment += eprosima::fastdds::statistics::Entity2LocatorTraffic::getCdrSerializedSize(data.entity2locator_traffic(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - current_alignment += eprosima::fastdds::statistics::EntityCount::getCdrSerializedSize(data.entity_count(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - current_alignment += eprosima::fastdds::statistics::DiscoveryTime::getCdrSerializedSize(data.discovery_time(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - current_alignment += eprosima::fastdds::statistics::SampleIdentityCount::getCdrSerializedSize(data.sample_identity_count(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - current_alignment += eprosima::fastdds::statistics::PhysicalData::getCdrSerializedSize(data.physical_data(), current_alignment); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void Data::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m__d; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - scdr << m_writer_reader_data; - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - scdr << m_locator2locator_data; - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - scdr << m_entity_data; - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - scdr << m_entity2locator_traffic; - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - scdr << m_entity_count; - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - scdr << m_discovery_time; - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - scdr << m_sample_identity_count; - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - scdr << m_physical_data; - - break; - - default: - break; - } -} - -void Data::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t bitmask_value = 0; - dcdr >> bitmask_value; - m__d = (eprosima::fastdds::statistics::EventKind)bitmask_value; - } - - - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - dcdr >> m_writer_reader_data; - - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - dcdr >> m_locator2locator_data; - - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - dcdr >> m_entity_data; - - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - dcdr >> m_entity2locator_traffic; - - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - dcdr >> m_entity_count; - - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - dcdr >> m_discovery_time; - - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - dcdr >> m_sample_identity_count; - - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - dcdr >> m_physical_data; - - - break; - - default: - break; - } -} - - - - - -} // namespace statistics - - -} // namespace fastdds - - -} // namespace eprosima - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/src/cpp/statistics/types/typesv1.h b/src/cpp/statistics/types/typesv1.h deleted file mode 100644 index 6880ab8c6ed..00000000000 --- a/src/cpp/statistics/types/typesv1.h +++ /dev/null @@ -1,3092 +0,0 @@ -// 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 types.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_H_ -#define _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(TYPES_SOURCE) -#define TYPES_DllAPI __declspec( dllexport ) -#else -#define TYPES_DllAPI __declspec( dllimport ) -#endif // TYPES_SOURCE -#else -#define TYPES_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define TYPES_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - -namespace eprosima { - namespace fastdds { - namespace statistics { - namespace detail { - - - /*! - * @brief This class represents the structure EntityId_s defined by the user in the IDL file. - * @ingroup types - */ - class EntityId_s - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EntityId_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EntityId_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s( - const EntityId_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s( - EntityId_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s& operator =( - const EntityId_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s& operator =( - EntityId_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::EntityId_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EntityId_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::EntityId_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EntityId_s& x) const; - - /*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ - eProsima_user_DllExport void value( - const std::array& _value); - - /*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ - eProsima_user_DllExport void value( - std::array&& _value); - - /*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ - eProsima_user_DllExport const std::array& value() const; - - /*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ - eProsima_user_DllExport std::array& value(); - - - /*! - * @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::fastdds::statistics::detail::EntityId_s& 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 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: - - std::array m_value; - - }; - - - - /*! - * @brief This class represents the structure GuidPrefix_s defined by the user in the IDL file. - * @ingroup types - */ - class GuidPrefix_s - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport GuidPrefix_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~GuidPrefix_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s( - const GuidPrefix_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s( - GuidPrefix_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s& operator =( - const GuidPrefix_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s& operator =( - GuidPrefix_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GuidPrefix_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const GuidPrefix_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GuidPrefix_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const GuidPrefix_s& x) const; - - /*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ - eProsima_user_DllExport void value( - const std::array& _value); - - /*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ - eProsima_user_DllExport void value( - std::array&& _value); - - /*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ - eProsima_user_DllExport const std::array& value() const; - - /*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ - eProsima_user_DllExport std::array& value(); - - - /*! - * @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::fastdds::statistics::detail::GuidPrefix_s& 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 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: - - std::array m_value; - - }; - - - - /*! - * @brief This class represents the structure GUID_s defined by the user in the IDL file. - * @ingroup types - */ - class GUID_s - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport GUID_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~GUID_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s( - const GUID_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s( - GUID_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s& operator =( - const GUID_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s& operator =( - GUID_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GUID_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const GUID_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GUID_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const GUID_s& x) const; - - /*! - * @brief This function copies the value in member guidPrefix - * @param _guidPrefix New value to be copied in member guidPrefix - */ - eProsima_user_DllExport void guidPrefix( - const eprosima::fastdds::statistics::detail::GuidPrefix_s& _guidPrefix); - - /*! - * @brief This function moves the value in member guidPrefix - * @param _guidPrefix New value to be moved in member guidPrefix - */ - eProsima_user_DllExport void guidPrefix( - eprosima::fastdds::statistics::detail::GuidPrefix_s&& _guidPrefix); - - /*! - * @brief This function returns a constant reference to member guidPrefix - * @return Constant reference to member guidPrefix - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GuidPrefix_s& guidPrefix() const; - - /*! - * @brief This function returns a reference to member guidPrefix - * @return Reference to member guidPrefix - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GuidPrefix_s& guidPrefix(); - - - /*! - * @brief This function copies the value in member entityId - * @param _entityId New value to be copied in member entityId - */ - eProsima_user_DllExport void entityId( - const eprosima::fastdds::statistics::detail::EntityId_s& _entityId); - - /*! - * @brief This function moves the value in member entityId - * @param _entityId New value to be moved in member entityId - */ - eProsima_user_DllExport void entityId( - eprosima::fastdds::statistics::detail::EntityId_s&& _entityId); - - /*! - * @brief This function returns a constant reference to member entityId - * @return Constant reference to member entityId - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::EntityId_s& entityId() const; - - /*! - * @brief This function returns a reference to member entityId - * @return Reference to member entityId - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::EntityId_s& entityId(); - - - /*! - * @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::fastdds::statistics::detail::GUID_s& 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 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: - - eprosima::fastdds::statistics::detail::GuidPrefix_s m_guidPrefix; - eprosima::fastdds::statistics::detail::EntityId_s m_entityId; - - }; - - - - /*! - * @brief This class represents the structure SequenceNumber_s defined by the user in the IDL file. - * @ingroup types - */ - class SequenceNumber_s - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceNumber_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceNumber_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s( - const SequenceNumber_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s( - SequenceNumber_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s& operator =( - const SequenceNumber_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s& operator =( - SequenceNumber_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SequenceNumber_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceNumber_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SequenceNumber_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceNumber_s& x) const; - - /*! - * @brief This function sets a value in member high - * @param _high New value for member high - */ - eProsima_user_DllExport void high( - int32_t _high); - - /*! - * @brief This function returns the value of member high - * @return Value of member high - */ - eProsima_user_DllExport int32_t high() const; - - /*! - * @brief This function returns a reference to member high - * @return Reference to member high - */ - eProsima_user_DllExport int32_t& high(); - - - /*! - * @brief This function sets a value in member low - * @param _low New value for member low - */ - eProsima_user_DllExport void low( - uint32_t _low); - - /*! - * @brief This function returns the value of member low - * @return Value of member low - */ - eProsima_user_DllExport uint32_t low() const; - - /*! - * @brief This function returns a reference to member low - * @return Reference to member low - */ - eProsima_user_DllExport uint32_t& low(); - - - /*! - * @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::fastdds::statistics::detail::SequenceNumber_s& 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 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_high; - uint32_t m_low; - - }; - - - - /*! - * @brief This class represents the structure SampleIdentity_s defined by the user in the IDL file. - * @ingroup types - */ - class SampleIdentity_s - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SampleIdentity_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SampleIdentity_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s( - const SampleIdentity_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s( - SampleIdentity_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s& operator =( - const SampleIdentity_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s& operator =( - SampleIdentity_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SampleIdentity_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SampleIdentity_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SampleIdentity_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SampleIdentity_s& x) const; - - /*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid); - - /*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid); - - /*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& writer_guid() const; - - /*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& writer_guid(); - - - /*! - * @brief This function copies the value in member sequence_number - * @param _sequence_number New value to be copied in member sequence_number - */ - eProsima_user_DllExport void sequence_number( - const eprosima::fastdds::statistics::detail::SequenceNumber_s& _sequence_number); - - /*! - * @brief This function moves the value in member sequence_number - * @param _sequence_number New value to be moved in member sequence_number - */ - eProsima_user_DllExport void sequence_number( - eprosima::fastdds::statistics::detail::SequenceNumber_s&& _sequence_number); - - /*! - * @brief This function returns a constant reference to member sequence_number - * @return Constant reference to member sequence_number - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::SequenceNumber_s& sequence_number() const; - - /*! - * @brief This function returns a reference to member sequence_number - * @return Reference to member sequence_number - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::SequenceNumber_s& sequence_number(); - - - /*! - * @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::fastdds::statistics::detail::SampleIdentity_s& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_writer_guid; - eprosima::fastdds::statistics::detail::SequenceNumber_s m_sequence_number; - - }; - - - - /*! - * @brief This class represents the structure Locator_s defined by the user in the IDL file. - * @ingroup types - */ - class Locator_s - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Locator_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Locator_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s( - const Locator_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s( - Locator_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s& operator =( - const Locator_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s& operator =( - Locator_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::Locator_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Locator_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::Locator_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Locator_s& x) const; - - /*! - * @brief This function sets a value in member kind - * @param _kind New value for member kind - */ - eProsima_user_DllExport void kind( - int32_t _kind); - - /*! - * @brief This function returns the value of member kind - * @return Value of member kind - */ - eProsima_user_DllExport int32_t kind() const; - - /*! - * @brief This function returns a reference to member kind - * @return Reference to member kind - */ - eProsima_user_DllExport int32_t& kind(); - - - /*! - * @brief This function sets a value in member port - * @param _port New value for member port - */ - eProsima_user_DllExport void port( - uint32_t _port); - - /*! - * @brief This function returns the value of member port - * @return Value of member port - */ - eProsima_user_DllExport uint32_t port() const; - - /*! - * @brief This function returns a reference to member port - * @return Reference to member port - */ - eProsima_user_DllExport uint32_t& port(); - - - /*! - * @brief This function copies the value in member address - * @param _address New value to be copied in member address - */ - eProsima_user_DllExport void address( - const std::array& _address); - - /*! - * @brief This function moves the value in member address - * @param _address New value to be moved in member address - */ - eProsima_user_DllExport void address( - std::array&& _address); - - /*! - * @brief This function returns a constant reference to member address - * @return Constant reference to member address - */ - eProsima_user_DllExport const std::array& address() const; - - /*! - * @brief This function returns a reference to member address - * @return Reference to member address - */ - eProsima_user_DllExport std::array& address(); - - - /*! - * @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::fastdds::statistics::detail::Locator_s& 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 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_kind; - uint32_t m_port; - std::array m_address; - - }; - - } // namespace detail - - - /*! - * @brief This class represents the structure DiscoveryTime defined by the user in the IDL file. - * @ingroup types - */ - class DiscoveryTime - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport DiscoveryTime(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~DiscoveryTime(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime( - const DiscoveryTime& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime( - DiscoveryTime&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime& operator =( - const DiscoveryTime& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime& operator =( - DiscoveryTime&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::DiscoveryTime object to compare. - */ - eProsima_user_DllExport bool operator ==( - const DiscoveryTime& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::DiscoveryTime object to compare. - */ - eProsima_user_DllExport bool operator !=( - const DiscoveryTime& x) const; - - /*! - * @brief This function copies the value in member local_participant_guid - * @param _local_participant_guid New value to be copied in member local_participant_guid - */ - eProsima_user_DllExport void local_participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _local_participant_guid); - - /*! - * @brief This function moves the value in member local_participant_guid - * @param _local_participant_guid New value to be moved in member local_participant_guid - */ - eProsima_user_DllExport void local_participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _local_participant_guid); - - /*! - * @brief This function returns a constant reference to member local_participant_guid - * @return Constant reference to member local_participant_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& local_participant_guid() const; - - /*! - * @brief This function returns a reference to member local_participant_guid - * @return Reference to member local_participant_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& local_participant_guid(); - - - /*! - * @brief This function copies the value in member remote_entity_guid - * @param _remote_entity_guid New value to be copied in member remote_entity_guid - */ - eProsima_user_DllExport void remote_entity_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _remote_entity_guid); - - /*! - * @brief This function moves the value in member remote_entity_guid - * @param _remote_entity_guid New value to be moved in member remote_entity_guid - */ - eProsima_user_DllExport void remote_entity_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _remote_entity_guid); - - /*! - * @brief This function returns a constant reference to member remote_entity_guid - * @return Constant reference to member remote_entity_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& remote_entity_guid() const; - - /*! - * @brief This function returns a reference to member remote_entity_guid - * @return Reference to member remote_entity_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& remote_entity_guid(); - - - /*! - * @brief This function sets a value in member time - * @param _time New value for member time - */ - eProsima_user_DllExport void time( - uint64_t _time); - - /*! - * @brief This function returns the value of member time - * @return Value of member time - */ - eProsima_user_DllExport uint64_t time() const; - - /*! - * @brief This function returns a reference to member time - * @return Reference to member time - */ - eProsima_user_DllExport uint64_t& time(); - - - /*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ - eProsima_user_DllExport void host( - const std::string& _host); - - /*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ - eProsima_user_DllExport void host( - std::string&& _host); - - /*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ - eProsima_user_DllExport const std::string& host() const; - - /*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ - eProsima_user_DllExport std::string& host(); - - - /*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ - eProsima_user_DllExport void user( - const std::string& _user); - - /*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ - eProsima_user_DllExport void user( - std::string&& _user); - - /*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ - eProsima_user_DllExport const std::string& user() const; - - /*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ - eProsima_user_DllExport std::string& user(); - - - /*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ - eProsima_user_DllExport void process( - const std::string& _process); - - /*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ - eProsima_user_DllExport void process( - std::string&& _process); - - /*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ - eProsima_user_DllExport const std::string& process() const; - - /*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ - eProsima_user_DllExport std::string& process(); - - - /*! - * @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::fastdds::statistics::DiscoveryTime& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_local_participant_guid; - eprosima::fastdds::statistics::detail::GUID_s m_remote_entity_guid; - uint64_t m_time; - std::string m_host; - std::string m_user; - std::string m_process; - - }; - - - - /*! - * @brief This class represents the structure EntityCount defined by the user in the IDL file. - * @ingroup types - */ - class EntityCount - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EntityCount(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EntityCount(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount( - const EntityCount& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount( - EntityCount&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount& operator =( - const EntityCount& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount& operator =( - EntityCount&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityCount object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EntityCount& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityCount object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EntityCount& x) const; - - /*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ - eProsima_user_DllExport void guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid); - - /*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ - eProsima_user_DllExport void guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid); - - /*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& guid() const; - - /*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& guid(); - - - /*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ - eProsima_user_DllExport void count( - uint64_t _count); - - /*! - * @brief This function returns the value of member count - * @return Value of member count - */ - eProsima_user_DllExport uint64_t count() const; - - /*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ - eProsima_user_DllExport uint64_t& count(); - - - /*! - * @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::fastdds::statistics::EntityCount& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_guid; - uint64_t m_count; - - }; - - - - /*! - * @brief This class represents the structure SampleIdentityCount defined by the user in the IDL file. - * @ingroup types - */ - class SampleIdentityCount - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SampleIdentityCount(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SampleIdentityCount(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount( - const SampleIdentityCount& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount( - SampleIdentityCount&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount& operator =( - const SampleIdentityCount& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount& operator =( - SampleIdentityCount&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::SampleIdentityCount object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SampleIdentityCount& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::SampleIdentityCount object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SampleIdentityCount& x) const; - - /*! - * @brief This function copies the value in member sample_id - * @param _sample_id New value to be copied in member sample_id - */ - eProsima_user_DllExport void sample_id( - const eprosima::fastdds::statistics::detail::SampleIdentity_s& _sample_id); - - /*! - * @brief This function moves the value in member sample_id - * @param _sample_id New value to be moved in member sample_id - */ - eProsima_user_DllExport void sample_id( - eprosima::fastdds::statistics::detail::SampleIdentity_s&& _sample_id); - - /*! - * @brief This function returns a constant reference to member sample_id - * @return Constant reference to member sample_id - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::SampleIdentity_s& sample_id() const; - - /*! - * @brief This function returns a reference to member sample_id - * @return Reference to member sample_id - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::SampleIdentity_s& sample_id(); - - - /*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ - eProsima_user_DllExport void count( - uint64_t _count); - - /*! - * @brief This function returns the value of member count - * @return Value of member count - */ - eProsima_user_DllExport uint64_t count() const; - - /*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ - eProsima_user_DllExport uint64_t& count(); - - - /*! - * @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::fastdds::statistics::SampleIdentityCount& 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 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: - - eprosima::fastdds::statistics::detail::SampleIdentity_s m_sample_id; - uint64_t m_count; - - }; - - - - /*! - * @brief This class represents the structure Entity2LocatorTraffic defined by the user in the IDL file. - * @ingroup types - */ - class Entity2LocatorTraffic - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Entity2LocatorTraffic(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Entity2LocatorTraffic(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic( - const Entity2LocatorTraffic& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic( - Entity2LocatorTraffic&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic& operator =( - const Entity2LocatorTraffic& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic& operator =( - Entity2LocatorTraffic&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Entity2LocatorTraffic object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Entity2LocatorTraffic& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Entity2LocatorTraffic object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Entity2LocatorTraffic& x) const; - - /*! - * @brief This function copies the value in member src_guid - * @param _src_guid New value to be copied in member src_guid - */ - eProsima_user_DllExport void src_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _src_guid); - - /*! - * @brief This function moves the value in member src_guid - * @param _src_guid New value to be moved in member src_guid - */ - eProsima_user_DllExport void src_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _src_guid); - - /*! - * @brief This function returns a constant reference to member src_guid - * @return Constant reference to member src_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& src_guid() const; - - /*! - * @brief This function returns a reference to member src_guid - * @return Reference to member src_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& src_guid(); - - - /*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator); - - /*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator); - - /*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::Locator_s& dst_locator() const; - - /*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::Locator_s& dst_locator(); - - - /*! - * @brief This function sets a value in member packet_count - * @param _packet_count New value for member packet_count - */ - eProsima_user_DllExport void packet_count( - uint64_t _packet_count); - - /*! - * @brief This function returns the value of member packet_count - * @return Value of member packet_count - */ - eProsima_user_DllExport uint64_t packet_count() const; - - /*! - * @brief This function returns a reference to member packet_count - * @return Reference to member packet_count - */ - eProsima_user_DllExport uint64_t& packet_count(); - - - /*! - * @brief This function sets a value in member byte_count - * @param _byte_count New value for member byte_count - */ - eProsima_user_DllExport void byte_count( - uint64_t _byte_count); - - /*! - * @brief This function returns the value of member byte_count - * @return Value of member byte_count - */ - eProsima_user_DllExport uint64_t byte_count() const; - - /*! - * @brief This function returns a reference to member byte_count - * @return Reference to member byte_count - */ - eProsima_user_DllExport uint64_t& byte_count(); - - - /*! - * @brief This function sets a value in member byte_magnitude_order - * @param _byte_magnitude_order New value for member byte_magnitude_order - */ - eProsima_user_DllExport void byte_magnitude_order( - int16_t _byte_magnitude_order); - - /*! - * @brief This function returns the value of member byte_magnitude_order - * @return Value of member byte_magnitude_order - */ - eProsima_user_DllExport int16_t byte_magnitude_order() const; - - /*! - * @brief This function returns a reference to member byte_magnitude_order - * @return Reference to member byte_magnitude_order - */ - eProsima_user_DllExport int16_t& byte_magnitude_order(); - - - /*! - * @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::fastdds::statistics::Entity2LocatorTraffic& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_src_guid; - eprosima::fastdds::statistics::detail::Locator_s m_dst_locator; - uint64_t m_packet_count; - uint64_t m_byte_count; - int16_t m_byte_magnitude_order; - - }; - - - - /*! - * @brief This class represents the structure WriterReaderData defined by the user in the IDL file. - * @ingroup types - */ - class WriterReaderData - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport WriterReaderData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~WriterReaderData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData( - const WriterReaderData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData( - WriterReaderData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData& operator =( - const WriterReaderData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData& operator =( - WriterReaderData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::WriterReaderData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const WriterReaderData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::WriterReaderData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const WriterReaderData& x) const; - - /*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid); - - /*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid); - - /*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& writer_guid() const; - - /*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& writer_guid(); - - - /*! - * @brief This function copies the value in member reader_guid - * @param _reader_guid New value to be copied in member reader_guid - */ - eProsima_user_DllExport void reader_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _reader_guid); - - /*! - * @brief This function moves the value in member reader_guid - * @param _reader_guid New value to be moved in member reader_guid - */ - eProsima_user_DllExport void reader_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _reader_guid); - - /*! - * @brief This function returns a constant reference to member reader_guid - * @return Constant reference to member reader_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& reader_guid() const; - - /*! - * @brief This function returns a reference to member reader_guid - * @return Reference to member reader_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& reader_guid(); - - - /*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ - eProsima_user_DllExport void data( - float _data); - - /*! - * @brief This function returns the value of member data - * @return Value of member data - */ - eProsima_user_DllExport float data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport float& data(); - - - /*! - * @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::fastdds::statistics::WriterReaderData& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_writer_guid; - eprosima::fastdds::statistics::detail::GUID_s m_reader_guid; - float m_data; - - }; - - - - /*! - * @brief This class represents the structure Locator2LocatorData defined by the user in the IDL file. - * @ingroup types - */ - class Locator2LocatorData - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Locator2LocatorData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Locator2LocatorData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData( - const Locator2LocatorData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData( - Locator2LocatorData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData& operator =( - const Locator2LocatorData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData& operator =( - Locator2LocatorData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Locator2LocatorData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Locator2LocatorData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Locator2LocatorData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Locator2LocatorData& x) const; - - /*! - * @brief This function copies the value in member src_locator - * @param _src_locator New value to be copied in member src_locator - */ - eProsima_user_DllExport void src_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _src_locator); - - /*! - * @brief This function moves the value in member src_locator - * @param _src_locator New value to be moved in member src_locator - */ - eProsima_user_DllExport void src_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _src_locator); - - /*! - * @brief This function returns a constant reference to member src_locator - * @return Constant reference to member src_locator - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::Locator_s& src_locator() const; - - /*! - * @brief This function returns a reference to member src_locator - * @return Reference to member src_locator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::Locator_s& src_locator(); - - - /*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator); - - /*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator); - - /*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::Locator_s& dst_locator() const; - - /*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::Locator_s& dst_locator(); - - - /*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ - eProsima_user_DllExport void data( - float _data); - - /*! - * @brief This function returns the value of member data - * @return Value of member data - */ - eProsima_user_DllExport float data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport float& data(); - - - /*! - * @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::fastdds::statistics::Locator2LocatorData& 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 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: - - eprosima::fastdds::statistics::detail::Locator_s m_src_locator; - eprosima::fastdds::statistics::detail::Locator_s m_dst_locator; - float m_data; - - }; - - - - /*! - * @brief This class represents the structure EntityData defined by the user in the IDL file. - * @ingroup types - */ - class EntityData - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EntityData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EntityData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData( - const EntityData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData( - EntityData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData& operator =( - const EntityData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData& operator =( - EntityData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EntityData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EntityData& x) const; - - /*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ - eProsima_user_DllExport void guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid); - - /*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ - eProsima_user_DllExport void guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid); - - /*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& guid() const; - - /*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& guid(); - - - /*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ - eProsima_user_DllExport void data( - float _data); - - /*! - * @brief This function returns the value of member data - * @return Value of member data - */ - eProsima_user_DllExport float data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport float& data(); - - - /*! - * @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::fastdds::statistics::EntityData& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_guid; - float m_data; - - }; - - - - /*! - * @brief This class represents the structure PhysicalData defined by the user in the IDL file. - * @ingroup types - */ - class PhysicalData - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport PhysicalData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~PhysicalData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData( - const PhysicalData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData( - PhysicalData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData& operator =( - const PhysicalData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData& operator =( - PhysicalData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::PhysicalData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const PhysicalData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::PhysicalData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const PhysicalData& x) const; - - /*! - * @brief This function copies the value in member participant_guid - * @param _participant_guid New value to be copied in member participant_guid - */ - eProsima_user_DllExport void participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _participant_guid); - - /*! - * @brief This function moves the value in member participant_guid - * @param _participant_guid New value to be moved in member participant_guid - */ - eProsima_user_DllExport void participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _participant_guid); - - /*! - * @brief This function returns a constant reference to member participant_guid - * @return Constant reference to member participant_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& participant_guid() const; - - /*! - * @brief This function returns a reference to member participant_guid - * @return Reference to member participant_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& participant_guid(); - - - /*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ - eProsima_user_DllExport void host( - const std::string& _host); - - /*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ - eProsima_user_DllExport void host( - std::string&& _host); - - /*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ - eProsima_user_DllExport const std::string& host() const; - - /*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ - eProsima_user_DllExport std::string& host(); - - - /*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ - eProsima_user_DllExport void user( - const std::string& _user); - - /*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ - eProsima_user_DllExport void user( - std::string&& _user); - - /*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ - eProsima_user_DllExport const std::string& user() const; - - /*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ - eProsima_user_DllExport std::string& user(); - - - /*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ - eProsima_user_DllExport void process( - const std::string& _process); - - /*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ - eProsima_user_DllExport void process( - std::string&& _process); - - /*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ - eProsima_user_DllExport const std::string& process() const; - - /*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ - eProsima_user_DllExport std::string& process(); - - - /*! - * @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::fastdds::statistics::PhysicalData& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_participant_guid; - std::string m_host; - std::string m_user; - std::string m_process; - - }; - - /*! - * @brief This class represents the bitmask EventKind defined by the user in the IDL file. - * @ingroup types - */ - enum EventKindBits : uint32_t - { - HISTORY2HISTORY_LATENCY = 0x01ull << 0, - NETWORK_LATENCY = 0x01ull << 1, - PUBLICATION_THROUGHPUT = 0x01ull << 2, - SUBSCRIPTION_THROUGHPUT = 0x01ull << 3, - RTPS_SENT = 0x01ull << 4, - RTPS_LOST = 0x01ull << 5, - RESENT_DATAS = 0x01ull << 6, - HEARTBEAT_COUNT = 0x01ull << 7, - ACKNACK_COUNT = 0x01ull << 8, - NACKFRAG_COUNT = 0x01ull << 9, - GAP_COUNT = 0x01ull << 10, - DATA_COUNT = 0x01ull << 11, - PDP_PACKETS = 0x01ull << 12, - EDP_PACKETS = 0x01ull << 13, - DISCOVERED_ENTITY = 0x01ull << 14, - SAMPLE_DATAS = 0x01ull << 15, - PHYSICAL_DATA = 0x01ull << 16 - }; - typedef uint32_t EventKind; - - - /*! - * @brief This class represents the union Data defined by the user in the IDL file. - * @ingroup types - */ - class Data - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Data(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Data(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data( - const Data& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data( - Data&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data& operator =( - const Data& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data& operator =( - Data&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Data object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Data& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Data object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Data& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - eprosima::fastdds::statistics::EventKind __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EventKind _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EventKind& _d(); - - /*! - * @brief This function copies the value in member writer_reader_data - * @param _writer_reader_data New value to be copied in member writer_reader_data - */ - eProsima_user_DllExport void writer_reader_data( - const eprosima::fastdds::statistics::WriterReaderData& _writer_reader_data); - - /*! - * @brief This function moves the value in member writer_reader_data - * @param _writer_reader_data New value to be moved in member writer_reader_data - */ - eProsima_user_DllExport void writer_reader_data( - eprosima::fastdds::statistics::WriterReaderData&& _writer_reader_data); - - /*! - * @brief This function returns a constant reference to member writer_reader_data - * @return Constant reference to member writer_reader_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::WriterReaderData& writer_reader_data() const; - - /*! - * @brief This function returns a reference to member writer_reader_data - * @return Reference to member writer_reader_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::WriterReaderData& writer_reader_data(); - - - /*! - * @brief This function copies the value in member locator2locator_data - * @param _locator2locator_data New value to be copied in member locator2locator_data - */ - eProsima_user_DllExport void locator2locator_data( - const eprosima::fastdds::statistics::Locator2LocatorData& _locator2locator_data); - - /*! - * @brief This function moves the value in member locator2locator_data - * @param _locator2locator_data New value to be moved in member locator2locator_data - */ - eProsima_user_DllExport void locator2locator_data( - eprosima::fastdds::statistics::Locator2LocatorData&& _locator2locator_data); - - /*! - * @brief This function returns a constant reference to member locator2locator_data - * @return Constant reference to member locator2locator_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::Locator2LocatorData& locator2locator_data() const; - - /*! - * @brief This function returns a reference to member locator2locator_data - * @return Reference to member locator2locator_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::Locator2LocatorData& locator2locator_data(); - - - /*! - * @brief This function copies the value in member entity_data - * @param _entity_data New value to be copied in member entity_data - */ - eProsima_user_DllExport void entity_data( - const eprosima::fastdds::statistics::EntityData& _entity_data); - - /*! - * @brief This function moves the value in member entity_data - * @param _entity_data New value to be moved in member entity_data - */ - eProsima_user_DllExport void entity_data( - eprosima::fastdds::statistics::EntityData&& _entity_data); - - /*! - * @brief This function returns a constant reference to member entity_data - * @return Constant reference to member entity_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::EntityData& entity_data() const; - - /*! - * @brief This function returns a reference to member entity_data - * @return Reference to member entity_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EntityData& entity_data(); - - - /*! - * @brief This function copies the value in member entity2locator_traffic - * @param _entity2locator_traffic New value to be copied in member entity2locator_traffic - */ - eProsima_user_DllExport void entity2locator_traffic( - const eprosima::fastdds::statistics::Entity2LocatorTraffic& _entity2locator_traffic); - - /*! - * @brief This function moves the value in member entity2locator_traffic - * @param _entity2locator_traffic New value to be moved in member entity2locator_traffic - */ - eProsima_user_DllExport void entity2locator_traffic( - eprosima::fastdds::statistics::Entity2LocatorTraffic&& _entity2locator_traffic); - - /*! - * @brief This function returns a constant reference to member entity2locator_traffic - * @return Constant reference to member entity2locator_traffic - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::Entity2LocatorTraffic& entity2locator_traffic() const; - - /*! - * @brief This function returns a reference to member entity2locator_traffic - * @return Reference to member entity2locator_traffic - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::Entity2LocatorTraffic& entity2locator_traffic(); - - - /*! - * @brief This function copies the value in member entity_count - * @param _entity_count New value to be copied in member entity_count - */ - eProsima_user_DllExport void entity_count( - const eprosima::fastdds::statistics::EntityCount& _entity_count); - - /*! - * @brief This function moves the value in member entity_count - * @param _entity_count New value to be moved in member entity_count - */ - eProsima_user_DllExport void entity_count( - eprosima::fastdds::statistics::EntityCount&& _entity_count); - - /*! - * @brief This function returns a constant reference to member entity_count - * @return Constant reference to member entity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::EntityCount& entity_count() const; - - /*! - * @brief This function returns a reference to member entity_count - * @return Reference to member entity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EntityCount& entity_count(); - - - /*! - * @brief This function copies the value in member discovery_time - * @param _discovery_time New value to be copied in member discovery_time - */ - eProsima_user_DllExport void discovery_time( - const eprosima::fastdds::statistics::DiscoveryTime& _discovery_time); - - /*! - * @brief This function moves the value in member discovery_time - * @param _discovery_time New value to be moved in member discovery_time - */ - eProsima_user_DllExport void discovery_time( - eprosima::fastdds::statistics::DiscoveryTime&& _discovery_time); - - /*! - * @brief This function returns a constant reference to member discovery_time - * @return Constant reference to member discovery_time - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::DiscoveryTime& discovery_time() const; - - /*! - * @brief This function returns a reference to member discovery_time - * @return Reference to member discovery_time - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::DiscoveryTime& discovery_time(); - - - /*! - * @brief This function copies the value in member sample_identity_count - * @param _sample_identity_count New value to be copied in member sample_identity_count - */ - eProsima_user_DllExport void sample_identity_count( - const eprosima::fastdds::statistics::SampleIdentityCount& _sample_identity_count); - - /*! - * @brief This function moves the value in member sample_identity_count - * @param _sample_identity_count New value to be moved in member sample_identity_count - */ - eProsima_user_DllExport void sample_identity_count( - eprosima::fastdds::statistics::SampleIdentityCount&& _sample_identity_count); - - /*! - * @brief This function returns a constant reference to member sample_identity_count - * @return Constant reference to member sample_identity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::SampleIdentityCount& sample_identity_count() const; - - /*! - * @brief This function returns a reference to member sample_identity_count - * @return Reference to member sample_identity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::SampleIdentityCount& sample_identity_count(); - - - /*! - * @brief This function copies the value in member physical_data - * @param _physical_data New value to be copied in member physical_data - */ - eProsima_user_DllExport void physical_data( - const eprosima::fastdds::statistics::PhysicalData& _physical_data); - - /*! - * @brief This function moves the value in member physical_data - * @param _physical_data New value to be moved in member physical_data - */ - eProsima_user_DllExport void physical_data( - eprosima::fastdds::statistics::PhysicalData&& _physical_data); - - /*! - * @brief This function returns a constant reference to member physical_data - * @return Constant reference to member physical_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::PhysicalData& physical_data() const; - - /*! - * @brief This function returns a reference to member physical_data - * @return Reference to member physical_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::PhysicalData& physical_data(); - - - /*! - * @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::fastdds::statistics::Data& 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); - - - - - - private: - - eprosima::fastdds::statistics::EventKind m__d; - - eprosima::fastdds::statistics::WriterReaderData m_writer_reader_data; - eprosima::fastdds::statistics::Locator2LocatorData m_locator2locator_data; - eprosima::fastdds::statistics::EntityData m_entity_data; - eprosima::fastdds::statistics::Entity2LocatorTraffic m_entity2locator_traffic; - eprosima::fastdds::statistics::EntityCount m_entity_count; - eprosima::fastdds::statistics::DiscoveryTime m_discovery_time; - eprosima::fastdds::statistics::SampleIdentityCount m_sample_identity_count; - eprosima::fastdds::statistics::PhysicalData m_physical_data; - }; - - } // namespace statistics - } // namespace fastdds -} // namespace eprosima - -#endif // _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/src/cpp/utils/SystemInfo.hpp b/src/cpp/utils/SystemInfo.hpp index 418da3d9963..2922212f7e8 100644 --- a/src/cpp/utils/SystemInfo.hpp +++ b/src/cpp/utils/SystemInfo.hpp @@ -36,7 +36,7 @@ namespace eprosima { -using ReturnCode_t = fastrtps::types::ReturnCode_t; +using ReturnCode_t = eprosima::fastdds::dds::ReturnCode_t; #if defined(_WIN32) || defined(__unix__) using FileWatchHandle = std::unique_ptr>; #else diff --git a/test/blackbox/CMakeLists.txt b/test/blackbox/CMakeLists.txt index cf4eaf24b1d..89b2810825b 100644 --- a/test/blackbox/CMakeLists.txt +++ b/test/blackbox/CMakeLists.txt @@ -56,27 +56,13 @@ endif() file(GLOB RTPS_BLACKBOXTESTS_TEST_SOURCE "common/RTPSBlackboxTests*.cpp") set(RTPS_BLACKBOXTESTS_SOURCE ${RTPS_BLACKBOXTESTS_TEST_SOURCE} - types/HelloWorld.cxx - types/HelloWorldv1.cxx types/HelloWorldPubSubTypes.cxx types/HelloWorldTypeObject.cxx - types/KeyedHelloWorld.cxx - types/KeyedHelloWorldv1.cxx types/KeyedHelloWorldPubSubTypes.cxx - types/StringTest.cxx - types/StringTestv1.cxx types/StringTestPubSubTypes.cxx - types/Data64kb.cxx - types/Data64kbv1.cxx types/Data64kbPubSubTypes.cxx - types/Data1mb.cxx - types/Data1mbv1.cxx types/Data1mbPubSubTypes.cxx - types/KeyedData1mb.cxx - types/KeyedData1mbv1.cxx types/KeyedData1mbPubSubTypes.cxx - types/FixedSized.cxx - types/FixedSizedv1.cxx types/FixedSizedPubSubTypes.cxx utils/data_generators.cpp @@ -102,33 +88,15 @@ gtest_discover_tests(BlackboxTests_RTPS file(GLOB BLACKBOXTESTS_TEST_SOURCE "common/BlackboxTests*.cpp") set(BLACKBOXTESTS_SOURCE ${BLACKBOXTESTS_TEST_SOURCE} - types/HelloWorld.cxx - types/HelloWorldv1.cxx types/HelloWorldPubSubTypes.cxx types/HelloWorldTypeObject.cxx - types/KeyedHelloWorld.cxx - types/KeyedHelloWorldv1.cxx types/KeyedHelloWorldPubSubTypes.cxx - types/StringTest.cxx - types/StringTestv1.cxx types/StringTestPubSubTypes.cxx - types/Data64kb.cxx - types/Data64kbv1.cxx types/Data64kbPubSubTypes.cxx - types/Data1mb.cxx - types/Data1mbv1.cxx types/Data1mbPubSubTypes.cxx - types/KeyedData1mb.cxx - types/KeyedData1mbv1.cxx types/KeyedData1mbPubSubTypes.cxx - types/FixedSized.cxx - types/FixedSizedv1.cxx types/FixedSizedPubSubTypes.cxx - types/TestIncludeRegression3361.cxx - types/TestIncludeRegression3361v1.cxx types/TestIncludeRegression3361TypeObject.cxx - types/TestRegression3361.cxx - types/TestRegression3361v1.cxx types/TestRegression3361PubSubTypes.cxx types/TestRegression3361TypeObject.cxx @@ -225,8 +193,6 @@ if(FASTDDS_PIM_API_TESTS) if (FASTDDS_STATISTICS) set(statistics_sources - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/types.cxx - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesv1.cxx ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesPubSubTypes.cxx ) diff --git a/test/blackbox/common/DDSBlackboxTestsAckPositive.cpp b/test/blackbox/common/DDSBlackboxTestsAckPositive.cpp index 72b6473a7cb..a9780997598 100644 --- a/test/blackbox/common/DDSBlackboxTestsAckPositive.cpp +++ b/test/blackbox/common/DDSBlackboxTestsAckPositive.cpp @@ -47,7 +47,7 @@ #include "../api/dds-pim/PubSubWriter.hpp" #include "../api/dds-pim/ReqRepAsReliableHelloWorldRequester.hpp" #include "../api/dds-pim/ReqRepAsReliableHelloWorldReplier.hpp" -#include "../types/FixedSized.h" +#include "../types/FixedSized.hpp" #include "../types/FixedSizedPubSubTypes.h" #include "../types/HelloWorldPubSubTypes.h" diff --git a/test/blackbox/common/DDSBlackboxTestsBasic.cpp b/test/blackbox/common/DDSBlackboxTestsBasic.cpp index 6733e3bd663..43eb62d0244 100644 --- a/test/blackbox/common/DDSBlackboxTestsBasic.cpp +++ b/test/blackbox/common/DDSBlackboxTestsBasic.cpp @@ -46,7 +46,7 @@ #include "../api/dds-pim/PubSubReader.hpp" #include "../api/dds-pim/PubSubWriter.hpp" #include "../api/dds-pim/PubSubWriterReader.hpp" -#include "../types/FixedSized.h" +#include "../types/FixedSized.hpp" #include "../types/FixedSizedPubSubTypes.h" #include "../types/HelloWorldPubSubTypes.h" diff --git a/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp b/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp index 7fbbe8fdcb8..d6ad7fa4caf 100644 --- a/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp +++ b/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp @@ -38,7 +38,7 @@ namespace eprosima { namespace fastdds { namespace dds { -using ReturnCode_t = eprosima::fastrtps::types::ReturnCode_t; +using ReturnCode_t = eprosima::fastdds::dds::ReturnCode_t; struct ContentFilterInfoCounter { diff --git a/test/blackbox/common/DDSBlackboxTestsStatistics.cpp b/test/blackbox/common/DDSBlackboxTestsStatistics.cpp index 193545f28d0..7e90b4d48da 100644 --- a/test/blackbox/common/DDSBlackboxTestsStatistics.cpp +++ b/test/blackbox/common/DDSBlackboxTestsStatistics.cpp @@ -51,11 +51,10 @@ #include #include #include -#include -#include "../types/HelloWorld.h" +#include "../types/HelloWorld.hpp" #include "../types/HelloWorldPubSubTypes.h" -#include "../types/statistics/types.h" +#include "../types/statistics/types.hpp" #include "../types/statistics/typesPubSubTypes.h" #include "BlackboxTests.hpp" #include "PubSubReader.hpp" @@ -78,7 +77,7 @@ static DataReader* enable_statistics( { auto qos = statistics::dds::STATISTICS_DATAWRITER_QOS; qos.history().depth = 10; - EXPECT_EQ(RETCODE_OK, participant->enable_statistics_datawriter( + EXPECT_EQ(eprosima::fastdds::dds::RETCODE_OK, participant->enable_statistics_datawriter( topic_name, qos)); auto topic_desc = participant->lookup_topicdescription(topic_name); @@ -93,8 +92,8 @@ static void disable_statistics( DataReader* reader, const std::string& topic_name) { - EXPECT_EQ(RETCODE_OK, subscriber->delete_datareader(reader)); - EXPECT_EQ(RETCODE_OK, participant->disable_statistics_datawriter(topic_name)); + EXPECT_EQ(eprosima::fastdds::dds::RETCODE_OK, subscriber->delete_datareader(reader)); + EXPECT_EQ(eprosima::fastdds::dds::RETCODE_OK, participant->disable_statistics_datawriter(topic_name)); } static void wait_statistics( @@ -119,7 +118,7 @@ static void wait_statistics( LoanableSequence data_seq; SampleInfoSeq info_seq; - if (RETCODE_OK == reader->take(data_seq, info_seq)) + if (eprosima::fastdds::dds::RETCODE_OK == reader->take(data_seq, info_seq)) { total_samples += info_seq.length(); reader->return_loan(data_seq, info_seq); @@ -225,7 +224,7 @@ void test_discovery_topic_physical_data( ASSERT_NE(nullptr, statistics_p1); Publisher* publisher_p1 = p1->create_publisher(PUBLISHER_QOS_DEFAULT); ASSERT_NE(nullptr, publisher_p1); - EXPECT_EQ(RETCODE_OK, + EXPECT_EQ(eprosima::fastdds::dds::RETCODE_OK, statistics_p1->enable_statistics_datawriter(statistics::DISCOVERY_TOPIC, statistics::dds::STATISTICS_DATAWRITER_QOS)); @@ -300,7 +299,7 @@ void test_discovery_topic_physical_data( /* Create waitset for the DataReader */ WaitSet waitset; StatusCondition& condition = discovery_data_reader->get_statuscondition(); - ASSERT_EQ(RETCODE_OK, condition.set_enabled_statuses(StatusMask::data_available())); + ASSERT_EQ(eprosima::fastdds::dds::RETCODE_OK, condition.set_enabled_statuses(StatusMask::data_available())); ASSERT_EQ(false, condition.get_trigger_value()); waitset.attach_condition(condition); @@ -330,7 +329,7 @@ void test_discovery_topic_physical_data( LoanableSequence discovery_time_seq; SampleInfoSeq info_seq; - while (RETCODE_OK == discovery_data_reader->take(discovery_time_seq, info_seq)) + while (eprosima::fastdds::dds::RETCODE_OK == discovery_data_reader->take(discovery_time_seq, info_seq)) { for (LoanableSequence::size_type n = 0; n < info_seq.length(); n++) { @@ -611,8 +610,8 @@ TEST(DDSStatistics, statistics_with_partition_on_user) auto user_pub_1 = p1->create_publisher(pub_qos); // We enable the participants - ASSERT_EQ(RETCODE_OK, p1->enable()); - ASSERT_EQ(RETCODE_OK, p2->enable()); + ASSERT_EQ(eprosima::fastdds::dds::RETCODE_OK, p1->enable()); + ASSERT_EQ(eprosima::fastdds::dds::RETCODE_OK, p2->enable()); auto statistics_p1 = statistics::dds::DomainParticipant::narrow(p1); auto statistics_p2 = statistics::dds::DomainParticipant::narrow(p2); diff --git a/test/blackbox/common/DDSBlackboxTestsStatisticsDomainParticipant.cpp b/test/blackbox/common/DDSBlackboxTestsStatisticsDomainParticipant.cpp index d8d6edb8f23..aed80865626 100644 --- a/test/blackbox/common/DDSBlackboxTestsStatisticsDomainParticipant.cpp +++ b/test/blackbox/common/DDSBlackboxTestsStatisticsDomainParticipant.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include class WriterReaderDataTest : public eprosima::fastdds::statistics::WriterReaderData diff --git a/test/blackbox/types/Data1mb.cxx b/test/blackbox/types/Data1mb.cxx deleted file mode 100644 index 52b9748fed0..00000000000 --- a/test/blackbox/types/Data1mb.cxx +++ /dev/null @@ -1,136 +0,0 @@ -// 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 Data1mb.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Data1mb.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - - - -Data1mb::Data1mb() -{ -} - -Data1mb::~Data1mb() -{ -} - -Data1mb::Data1mb( - const Data1mb& x) -{ - m_data = x.m_data; -} - -Data1mb::Data1mb( - Data1mb&& x) noexcept -{ - m_data = std::move(x.m_data); -} - -Data1mb& Data1mb::operator =( - const Data1mb& x) -{ - - m_data = x.m_data; - return *this; -} - -Data1mb& Data1mb::operator =( - Data1mb&& x) noexcept -{ - - m_data = std::move(x.m_data); - return *this; -} - -bool Data1mb::operator ==( - const Data1mb& x) const -{ - return (m_data == x.m_data); -} - -bool Data1mb::operator !=( - const Data1mb& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member data - * @param _data New value to be copied in member data - */ -void Data1mb::data( - const std::vector& _data) -{ - m_data = _data; -} - -/*! - * @brief This function moves the value in member data - * @param _data New value to be moved in member data - */ -void Data1mb::data( - std::vector&& _data) -{ - m_data = std::move(_data); -} - -/*! - * @brief This function returns a constant reference to member data - * @return Constant reference to member data - */ -const std::vector& Data1mb::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -std::vector& Data1mb::data() -{ - return m_data; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "Data1mbCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/Data1mb.h b/test/blackbox/types/Data1mb.hpp similarity index 75% rename from test/blackbox/types/Data1mb.h rename to test/blackbox/types/Data1mb.hpp index 98f2d058f3f..a6e6ded726d 100644 --- a/test/blackbox/types/Data1mb.h +++ b/test/blackbox/types/Data1mb.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file Data1mb.h + * @file Data1mb.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "Data1mbv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_DATA1MB_H_ -#define _FAST_DDS_GENERATED_DATA1MB_H_ +#ifndef _FAST_DDS_GENERATED_DATA1MB_HPP_ +#define _FAST_DDS_GENERATED_DATA1MB_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,17 +60,6 @@ #define DATA1MB_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - - - /*! @@ -88,80 +73,122 @@ class Data1mb /*! * @brief Default constructor. */ - eProsima_user_DllExport Data1mb(); + eProsima_user_DllExport Data1mb() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~Data1mb(); + eProsima_user_DllExport ~Data1mb() + { + } /*! * @brief Copy constructor. * @param x Reference to the object Data1mb that will be copied. */ eProsima_user_DllExport Data1mb( - const Data1mb& x); + const Data1mb& x) + { + m_data = x.m_data; + + } /*! * @brief Move constructor. * @param x Reference to the object Data1mb that will be copied. */ eProsima_user_DllExport Data1mb( - Data1mb&& x) noexcept; + Data1mb&& x) noexcept + { + m_data = std::move(x.m_data); + } /*! * @brief Copy assignment. * @param x Reference to the object Data1mb that will be copied. */ eProsima_user_DllExport Data1mb& operator =( - const Data1mb& x); + const Data1mb& x) + { + + m_data = x.m_data; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object Data1mb that will be copied. */ eProsima_user_DllExport Data1mb& operator =( - Data1mb&& x) noexcept; + Data1mb&& x) noexcept + { + + m_data = std::move(x.m_data); + return *this; + } /*! * @brief Comparison operator. * @param x Data1mb object to compare. */ eProsima_user_DllExport bool operator ==( - const Data1mb& x) const; + const Data1mb& x) const + { + return (m_data == x.m_data); + } /*! * @brief Comparison operator. * @param x Data1mb object to compare. */ eProsima_user_DllExport bool operator !=( - const Data1mb& x) const; + const Data1mb& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member data * @param _data New value to be copied in member data */ eProsima_user_DllExport void data( - const std::vector& _data); + const std::vector& _data) + { + m_data = _data; + } /*! * @brief This function moves the value in member data * @param _data New value to be moved in member data */ eProsima_user_DllExport void data( - std::vector&& _data); + std::vector&& _data) + { + m_data = std::move(_data); + } /*! * @brief This function returns a constant reference to member data * @return Constant reference to member data */ - eProsima_user_DllExport const std::vector& data() const; + eProsima_user_DllExport const std::vector& data() const + { + return m_data; + } /*! * @brief This function returns a reference to member data * @return Reference to member data */ - eProsima_user_DllExport std::vector& data(); + eProsima_user_DllExport std::vector& data() + { + return m_data; + } + + private: @@ -169,8 +196,6 @@ class Data1mb }; -#endif // _FAST_DDS_GENERATED_DATA1MB_H_ - +#endif // _FAST_DDS_GENERATED_DATA1MB_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/Data1mbCdrAux.hpp b/test/blackbox/types/Data1mbCdrAux.hpp index 63df7fdd02d..c9df9993562 100644 --- a/test/blackbox/types/Data1mbCdrAux.hpp +++ b/test/blackbox/types/Data1mbCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_DATA1MBCDRAUX_HPP_ #define _FAST_DDS_GENERATED_DATA1MBCDRAUX_HPP_ -#include "Data1mb.h" +#include "Data1mb.hpp" constexpr uint32_t Data1mb_max_cdr_typesize {1024008UL}; constexpr uint32_t Data1mb_max_key_cdr_typesize {0UL}; @@ -36,8 +36,6 @@ class CdrSizeCalculator; - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const Data1mb& data); diff --git a/test/blackbox/types/Data1mbCdrAux.ipp b/test/blackbox/types/Data1mbCdrAux.ipp index 13316beffae..7ec544737b9 100644 --- a/test/blackbox/types/Data1mbCdrAux.ipp +++ b/test/blackbox/types/Data1mbCdrAux.ipp @@ -36,8 +36,6 @@ namespace fastcdr { - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, diff --git a/test/blackbox/types/Data1mbPubSubTypes.cxx b/test/blackbox/types/Data1mbPubSubTypes.cxx index 0cbf598d813..aeff0b40e34 100644 --- a/test/blackbox/types/Data1mbPubSubTypes.cxx +++ b/test/blackbox/types/Data1mbPubSubTypes.cxx @@ -31,8 +31,6 @@ using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t; - - Data1mbPubSubType::Data1mbPubSubType() { setName("Data1mb"); @@ -221,3 +219,6 @@ bool Data1mbPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "Data1mbCdrAux.ipp" diff --git a/test/blackbox/types/Data1mbPubSubTypes.h b/test/blackbox/types/Data1mbPubSubTypes.h index a6ec2e9f983..13dae9d570e 100644 --- a/test/blackbox/types/Data1mbPubSubTypes.h +++ b/test/blackbox/types/Data1mbPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "Data1mb.h" +#include "Data1mb.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -40,8 +40,6 @@ - - /*! * @brief This class represents the TopicDataType of the type Data1mb defined by the user in the IDL file. * @ingroup Data1mb diff --git a/test/blackbox/types/Data1mbv1.cxx b/test/blackbox/types/Data1mbv1.cxx deleted file mode 100644 index c5a195c6f61..00000000000 --- a/test/blackbox/types/Data1mbv1.cxx +++ /dev/null @@ -1,243 +0,0 @@ -// 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 Data1mb.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Data1mb.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define Data1mb_max_cdr_typesize 1024008ULL; - - - - - - -Data1mb::Data1mb() -{ - // sequence m_data - - -} - -Data1mb::~Data1mb() -{ -} - -Data1mb::Data1mb( - const Data1mb& x) -{ - m_data = x.m_data; - -} - -Data1mb::Data1mb( - Data1mb&& x) noexcept -{ - m_data = std::move(x.m_data); - -} - -Data1mb& Data1mb::operator =( - const Data1mb& x) -{ - m_data = x.m_data; - - return *this; -} - -Data1mb& Data1mb::operator =( - Data1mb&& x) noexcept -{ - m_data = std::move(x.m_data); - - return *this; -} - -bool Data1mb::operator ==( - const Data1mb& x) const -{ - return (m_data == x.m_data); -} - -bool Data1mb::operator !=( - const Data1mb& x) const -{ - return !(*this == x); -} - -size_t Data1mb::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return Data1mb_max_cdr_typesize; -} - -size_t Data1mb::getCdrSerializedSize( - const Data1mb& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.data().size() > 0) - { - current_alignment += (data.data().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - - return current_alignment - initial_alignment; -} - - -void Data1mb::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_data; - - -} - -void Data1mb::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_data; - - -} - - -bool Data1mb::isKeyDefined() -{ - return false; -} - -void Data1mb::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member data - * @param _data New value to be copied in member data - */ -void Data1mb::data( - const std::vector& _data) -{ - m_data = _data; -} - -/*! - * @brief This function moves the value in member data - * @param _data New value to be moved in member data - */ -void Data1mb::data( - std::vector&& _data) -{ - m_data = std::move(_data); -} - -/*! - * @brief This function returns a constant reference to member data - * @return Constant reference to member data - */ -const std::vector& Data1mb::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -std::vector& Data1mb::data() -{ - return m_data; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/Data1mbv1.h b/test/blackbox/types/Data1mbv1.h deleted file mode 100644 index 960ad6760b2..00000000000 --- a/test/blackbox/types/Data1mbv1.h +++ /dev/null @@ -1,224 +0,0 @@ -// 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 Data1mb.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_DATA1MB_H_ -#define _FAST_DDS_GENERATED_DATA1MB_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(DATA1MB_SOURCE) -#define DATA1MB_DllAPI __declspec( dllexport ) -#else -#define DATA1MB_DllAPI __declspec( dllimport ) -#endif // DATA1MB_SOURCE -#else -#define DATA1MB_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define DATA1MB_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - - - -/*! - * @brief This class represents the structure Data1mb defined by the user in the IDL file. - * @ingroup Data1mb - */ -class Data1mb -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Data1mb(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Data1mb(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object Data1mb that will be copied. - */ - eProsima_user_DllExport Data1mb( - const Data1mb& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object Data1mb that will be copied. - */ - eProsima_user_DllExport Data1mb( - Data1mb&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object Data1mb that will be copied. - */ - eProsima_user_DllExport Data1mb& operator =( - const Data1mb& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object Data1mb that will be copied. - */ - eProsima_user_DllExport Data1mb& operator =( - Data1mb&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x Data1mb object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Data1mb& x) const; - - /*! - * @brief Comparison operator. - * @param x Data1mb object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Data1mb& x) const; - - /*! - * @brief This function copies the value in member data - * @param _data New value to be copied in member data - */ - eProsima_user_DllExport void data( - const std::vector& _data); - - /*! - * @brief This function moves the value in member data - * @param _data New value to be moved in member data - */ - eProsima_user_DllExport void data( - std::vector&& _data); - - /*! - * @brief This function returns a constant reference to member data - * @return Constant reference to member data - */ - eProsima_user_DllExport const std::vector& data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport std::vector& data(); - - - /*! - * @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 Data1mb& 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 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: - - std::vector m_data; - -}; - - -#endif // _FAST_DDS_GENERATED_DATA1MB_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/Data64kb.cxx b/test/blackbox/types/Data64kb.cxx deleted file mode 100644 index 83b6759be62..00000000000 --- a/test/blackbox/types/Data64kb.cxx +++ /dev/null @@ -1,136 +0,0 @@ -// 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 Data64kb.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Data64kb.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - - - -Data64kb::Data64kb() -{ -} - -Data64kb::~Data64kb() -{ -} - -Data64kb::Data64kb( - const Data64kb& x) -{ - m_data = x.m_data; -} - -Data64kb::Data64kb( - Data64kb&& x) noexcept -{ - m_data = std::move(x.m_data); -} - -Data64kb& Data64kb::operator =( - const Data64kb& x) -{ - - m_data = x.m_data; - return *this; -} - -Data64kb& Data64kb::operator =( - Data64kb&& x) noexcept -{ - - m_data = std::move(x.m_data); - return *this; -} - -bool Data64kb::operator ==( - const Data64kb& x) const -{ - return (m_data == x.m_data); -} - -bool Data64kb::operator !=( - const Data64kb& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member data - * @param _data New value to be copied in member data - */ -void Data64kb::data( - const std::vector& _data) -{ - m_data = _data; -} - -/*! - * @brief This function moves the value in member data - * @param _data New value to be moved in member data - */ -void Data64kb::data( - std::vector&& _data) -{ - m_data = std::move(_data); -} - -/*! - * @brief This function returns a constant reference to member data - * @return Constant reference to member data - */ -const std::vector& Data64kb::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -std::vector& Data64kb::data() -{ - return m_data; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "Data64kbCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/Data64kb.h b/test/blackbox/types/Data64kb.hpp similarity index 74% rename from test/blackbox/types/Data64kb.h rename to test/blackbox/types/Data64kb.hpp index 0599f7e7f85..59e9420af43 100644 --- a/test/blackbox/types/Data64kb.h +++ b/test/blackbox/types/Data64kb.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file Data64kb.h + * @file Data64kb.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "Data64kbv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_DATA64KB_H_ -#define _FAST_DDS_GENERATED_DATA64KB_H_ +#ifndef _FAST_DDS_GENERATED_DATA64KB_HPP_ +#define _FAST_DDS_GENERATED_DATA64KB_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,17 +60,6 @@ #define DATA64KB_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - - - /*! @@ -88,80 +73,122 @@ class Data64kb /*! * @brief Default constructor. */ - eProsima_user_DllExport Data64kb(); + eProsima_user_DllExport Data64kb() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~Data64kb(); + eProsima_user_DllExport ~Data64kb() + { + } /*! * @brief Copy constructor. * @param x Reference to the object Data64kb that will be copied. */ eProsima_user_DllExport Data64kb( - const Data64kb& x); + const Data64kb& x) + { + m_data = x.m_data; + + } /*! * @brief Move constructor. * @param x Reference to the object Data64kb that will be copied. */ eProsima_user_DllExport Data64kb( - Data64kb&& x) noexcept; + Data64kb&& x) noexcept + { + m_data = std::move(x.m_data); + } /*! * @brief Copy assignment. * @param x Reference to the object Data64kb that will be copied. */ eProsima_user_DllExport Data64kb& operator =( - const Data64kb& x); + const Data64kb& x) + { + + m_data = x.m_data; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object Data64kb that will be copied. */ eProsima_user_DllExport Data64kb& operator =( - Data64kb&& x) noexcept; + Data64kb&& x) noexcept + { + + m_data = std::move(x.m_data); + return *this; + } /*! * @brief Comparison operator. * @param x Data64kb object to compare. */ eProsima_user_DllExport bool operator ==( - const Data64kb& x) const; + const Data64kb& x) const + { + return (m_data == x.m_data); + } /*! * @brief Comparison operator. * @param x Data64kb object to compare. */ eProsima_user_DllExport bool operator !=( - const Data64kb& x) const; + const Data64kb& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member data * @param _data New value to be copied in member data */ eProsima_user_DllExport void data( - const std::vector& _data); + const std::vector& _data) + { + m_data = _data; + } /*! * @brief This function moves the value in member data * @param _data New value to be moved in member data */ eProsima_user_DllExport void data( - std::vector&& _data); + std::vector&& _data) + { + m_data = std::move(_data); + } /*! * @brief This function returns a constant reference to member data * @return Constant reference to member data */ - eProsima_user_DllExport const std::vector& data() const; + eProsima_user_DllExport const std::vector& data() const + { + return m_data; + } /*! * @brief This function returns a reference to member data * @return Reference to member data */ - eProsima_user_DllExport std::vector& data(); + eProsima_user_DllExport std::vector& data() + { + return m_data; + } + + private: @@ -169,8 +196,6 @@ class Data64kb }; -#endif // _FAST_DDS_GENERATED_DATA64KB_H_ - +#endif // _FAST_DDS_GENERATED_DATA64KB_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/Data64kbCdrAux.hpp b/test/blackbox/types/Data64kbCdrAux.hpp index 0b4ebbaab11..ac16dde605e 100644 --- a/test/blackbox/types/Data64kbCdrAux.hpp +++ b/test/blackbox/types/Data64kbCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_DATA64KBCDRAUX_HPP_ #define _FAST_DDS_GENERATED_DATA64KBCDRAUX_HPP_ -#include "Data64kb.h" +#include "Data64kb.hpp" constexpr uint32_t Data64kb_max_cdr_typesize {64004UL}; constexpr uint32_t Data64kb_max_key_cdr_typesize {0UL}; @@ -36,8 +36,6 @@ class CdrSizeCalculator; - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const Data64kb& data); diff --git a/test/blackbox/types/Data64kbCdrAux.ipp b/test/blackbox/types/Data64kbCdrAux.ipp index 0d0bc58843a..fba41c4203d 100644 --- a/test/blackbox/types/Data64kbCdrAux.ipp +++ b/test/blackbox/types/Data64kbCdrAux.ipp @@ -36,8 +36,6 @@ namespace fastcdr { - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, diff --git a/test/blackbox/types/Data64kbPubSubTypes.cxx b/test/blackbox/types/Data64kbPubSubTypes.cxx index 0b8d5772498..345815eca7a 100644 --- a/test/blackbox/types/Data64kbPubSubTypes.cxx +++ b/test/blackbox/types/Data64kbPubSubTypes.cxx @@ -31,8 +31,6 @@ using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t; - - Data64kbPubSubType::Data64kbPubSubType() { setName("Data64kb"); @@ -221,3 +219,6 @@ bool Data64kbPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "Data64kbCdrAux.ipp" diff --git a/test/blackbox/types/Data64kbPubSubTypes.h b/test/blackbox/types/Data64kbPubSubTypes.h index 18364f202c6..389bce53677 100644 --- a/test/blackbox/types/Data64kbPubSubTypes.h +++ b/test/blackbox/types/Data64kbPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "Data64kb.h" +#include "Data64kb.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -40,8 +40,6 @@ - - /*! * @brief This class represents the TopicDataType of the type Data64kb defined by the user in the IDL file. * @ingroup Data64kb diff --git a/test/blackbox/types/Data64kbv1.cxx b/test/blackbox/types/Data64kbv1.cxx deleted file mode 100644 index ee73e714a24..00000000000 --- a/test/blackbox/types/Data64kbv1.cxx +++ /dev/null @@ -1,243 +0,0 @@ -// 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 Data64kb.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Data64kb.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define Data64kb_max_cdr_typesize 64004ULL; - - - - - - -Data64kb::Data64kb() -{ - // sequence m_data - - -} - -Data64kb::~Data64kb() -{ -} - -Data64kb::Data64kb( - const Data64kb& x) -{ - m_data = x.m_data; - -} - -Data64kb::Data64kb( - Data64kb&& x) noexcept -{ - m_data = std::move(x.m_data); - -} - -Data64kb& Data64kb::operator =( - const Data64kb& x) -{ - m_data = x.m_data; - - return *this; -} - -Data64kb& Data64kb::operator =( - Data64kb&& x) noexcept -{ - m_data = std::move(x.m_data); - - return *this; -} - -bool Data64kb::operator ==( - const Data64kb& x) const -{ - return (m_data == x.m_data); -} - -bool Data64kb::operator !=( - const Data64kb& x) const -{ - return !(*this == x); -} - -size_t Data64kb::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return Data64kb_max_cdr_typesize; -} - -size_t Data64kb::getCdrSerializedSize( - const Data64kb& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.data().size() > 0) - { - current_alignment += (data.data().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - - return current_alignment - initial_alignment; -} - - -void Data64kb::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_data; - - -} - -void Data64kb::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_data; - - -} - - -bool Data64kb::isKeyDefined() -{ - return false; -} - -void Data64kb::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member data - * @param _data New value to be copied in member data - */ -void Data64kb::data( - const std::vector& _data) -{ - m_data = _data; -} - -/*! - * @brief This function moves the value in member data - * @param _data New value to be moved in member data - */ -void Data64kb::data( - std::vector&& _data) -{ - m_data = std::move(_data); -} - -/*! - * @brief This function returns a constant reference to member data - * @return Constant reference to member data - */ -const std::vector& Data64kb::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -std::vector& Data64kb::data() -{ - return m_data; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/Data64kbv1.h b/test/blackbox/types/Data64kbv1.h deleted file mode 100644 index e430b6a7bce..00000000000 --- a/test/blackbox/types/Data64kbv1.h +++ /dev/null @@ -1,224 +0,0 @@ -// 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 Data64kb.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_DATA64KB_H_ -#define _FAST_DDS_GENERATED_DATA64KB_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(DATA64KB_SOURCE) -#define DATA64KB_DllAPI __declspec( dllexport ) -#else -#define DATA64KB_DllAPI __declspec( dllimport ) -#endif // DATA64KB_SOURCE -#else -#define DATA64KB_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define DATA64KB_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - - - -/*! - * @brief This class represents the structure Data64kb defined by the user in the IDL file. - * @ingroup Data64kb - */ -class Data64kb -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Data64kb(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Data64kb(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object Data64kb that will be copied. - */ - eProsima_user_DllExport Data64kb( - const Data64kb& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object Data64kb that will be copied. - */ - eProsima_user_DllExport Data64kb( - Data64kb&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object Data64kb that will be copied. - */ - eProsima_user_DllExport Data64kb& operator =( - const Data64kb& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object Data64kb that will be copied. - */ - eProsima_user_DllExport Data64kb& operator =( - Data64kb&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x Data64kb object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Data64kb& x) const; - - /*! - * @brief Comparison operator. - * @param x Data64kb object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Data64kb& x) const; - - /*! - * @brief This function copies the value in member data - * @param _data New value to be copied in member data - */ - eProsima_user_DllExport void data( - const std::vector& _data); - - /*! - * @brief This function moves the value in member data - * @param _data New value to be moved in member data - */ - eProsima_user_DllExport void data( - std::vector&& _data); - - /*! - * @brief This function returns a constant reference to member data - * @return Constant reference to member data - */ - eProsima_user_DllExport const std::vector& data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport std::vector& data(); - - - /*! - * @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 Data64kb& 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 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: - - std::vector m_data; - -}; - - -#endif // _FAST_DDS_GENERATED_DATA64KB_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/FixedSized.cxx b/test/blackbox/types/FixedSized.cxx deleted file mode 100644 index 14f4255a658..00000000000 --- a/test/blackbox/types/FixedSized.cxx +++ /dev/null @@ -1,124 +0,0 @@ -// 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 FixedSized.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "FixedSized.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -FixedSized::FixedSized() -{ -} - -FixedSized::~FixedSized() -{ -} - -FixedSized::FixedSized( - const FixedSized& x) -{ - m_index = x.m_index; -} - -FixedSized::FixedSized( - FixedSized&& x) noexcept -{ - m_index = x.m_index; -} - -FixedSized& FixedSized::operator =( - const FixedSized& x) -{ - - m_index = x.m_index; - return *this; -} - -FixedSized& FixedSized::operator =( - FixedSized&& x) noexcept -{ - - m_index = x.m_index; - return *this; -} - -bool FixedSized::operator ==( - const FixedSized& x) const -{ - return (m_index == x.m_index); -} - -bool FixedSized::operator !=( - const FixedSized& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void FixedSized::index( - uint16_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint16_t FixedSized::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint16_t& FixedSized::index() -{ - return m_index; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "FixedSizedCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/FixedSized.h b/test/blackbox/types/FixedSized.hpp similarity index 74% rename from test/blackbox/types/FixedSized.h rename to test/blackbox/types/FixedSized.hpp index d4671fd3790..25a93670941 100644 --- a/test/blackbox/types/FixedSized.h +++ b/test/blackbox/types/FixedSized.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file FixedSized.h + * @file FixedSized.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "FixedSizedv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_FIXEDSIZED_H_ -#define _FAST_DDS_GENERATED_FIXEDSIZED_H_ +#ifndef _FAST_DDS_GENERATED_FIXEDSIZED_HPP_ +#define _FAST_DDS_GENERATED_FIXEDSIZED_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define FIXEDSIZED_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,112 @@ class FixedSized /*! * @brief Default constructor. */ - eProsima_user_DllExport FixedSized(); + eProsima_user_DllExport FixedSized() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~FixedSized(); + eProsima_user_DllExport ~FixedSized() + { + } /*! * @brief Copy constructor. * @param x Reference to the object FixedSized that will be copied. */ eProsima_user_DllExport FixedSized( - const FixedSized& x); + const FixedSized& x) + { + m_index = x.m_index; + + } /*! * @brief Move constructor. * @param x Reference to the object FixedSized that will be copied. */ eProsima_user_DllExport FixedSized( - FixedSized&& x) noexcept; + FixedSized&& x) noexcept + { + m_index = x.m_index; + } /*! * @brief Copy assignment. * @param x Reference to the object FixedSized that will be copied. */ eProsima_user_DllExport FixedSized& operator =( - const FixedSized& x); + const FixedSized& x) + { + + m_index = x.m_index; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object FixedSized that will be copied. */ eProsima_user_DllExport FixedSized& operator =( - FixedSized&& x) noexcept; + FixedSized&& x) noexcept + { + + m_index = x.m_index; + return *this; + } /*! * @brief Comparison operator. * @param x FixedSized object to compare. */ eProsima_user_DllExport bool operator ==( - const FixedSized& x) const; + const FixedSized& x) const + { + return (m_index == x.m_index); + } /*! * @brief Comparison operator. * @param x FixedSized object to compare. */ eProsima_user_DllExport bool operator !=( - const FixedSized& x) const; + const FixedSized& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint16_t _index); + uint16_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint16_t index() const; + eProsima_user_DllExport uint16_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint16_t& index(); + eProsima_user_DllExport uint16_t& index() + { + return m_index; + } + + private: @@ -160,8 +186,6 @@ class FixedSized }; -#endif // _FAST_DDS_GENERATED_FIXEDSIZED_H_ - +#endif // _FAST_DDS_GENERATED_FIXEDSIZED_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/FixedSizedCdrAux.hpp b/test/blackbox/types/FixedSizedCdrAux.hpp index b5a1996ed42..20505c37c3c 100644 --- a/test/blackbox/types/FixedSizedCdrAux.hpp +++ b/test/blackbox/types/FixedSizedCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_FIXEDSIZEDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_FIXEDSIZEDCDRAUX_HPP_ -#include "FixedSized.h" +#include "FixedSized.hpp" constexpr uint32_t FixedSized_max_cdr_typesize {2UL}; constexpr uint32_t FixedSized_max_key_cdr_typesize {0UL}; diff --git a/test/blackbox/types/FixedSizedPubSubTypes.cxx b/test/blackbox/types/FixedSizedPubSubTypes.cxx index 8a418964086..236ec65e916 100644 --- a/test/blackbox/types/FixedSizedPubSubTypes.cxx +++ b/test/blackbox/types/FixedSizedPubSubTypes.cxx @@ -219,3 +219,6 @@ bool FixedSizedPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "FixedSizedCdrAux.ipp" diff --git a/test/blackbox/types/FixedSizedPubSubTypes.h b/test/blackbox/types/FixedSizedPubSubTypes.h index ce899fe78d5..022a960af2d 100644 --- a/test/blackbox/types/FixedSizedPubSubTypes.h +++ b/test/blackbox/types/FixedSizedPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "FixedSized.h" +#include "FixedSized.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/test/blackbox/types/FixedSizedv1.cxx b/test/blackbox/types/FixedSizedv1.cxx deleted file mode 100644 index 1d28156bce2..00000000000 --- a/test/blackbox/types/FixedSizedv1.cxx +++ /dev/null @@ -1,223 +0,0 @@ -// 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 FixedSized.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "FixedSized.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define FixedSized_max_cdr_typesize 2ULL; - - - - -FixedSized::FixedSized() -{ - // unsigned short m_index - m_index = 0; - -} - -FixedSized::~FixedSized() -{ -} - -FixedSized::FixedSized( - const FixedSized& x) -{ - m_index = x.m_index; - -} - -FixedSized::FixedSized( - FixedSized&& x) noexcept -{ - m_index = x.m_index; - -} - -FixedSized& FixedSized::operator =( - const FixedSized& x) -{ - m_index = x.m_index; - - return *this; -} - -FixedSized& FixedSized::operator =( - FixedSized&& x) noexcept -{ - m_index = x.m_index; - - return *this; -} - -bool FixedSized::operator ==( - const FixedSized& x) const -{ - return (m_index == x.m_index); -} - -bool FixedSized::operator !=( - const FixedSized& x) const -{ - return !(*this == x); -} - -size_t FixedSized::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return FixedSized_max_cdr_typesize; -} - -size_t FixedSized::getCdrSerializedSize( - const FixedSized& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - return current_alignment - initial_alignment; -} - - -void FixedSized::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - -} - -void FixedSized::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - -} - - -bool FixedSized::isKeyDefined() -{ - return false; -} - -void FixedSized::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void FixedSized::index( - uint16_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint16_t FixedSized::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint16_t& FixedSized::index() -{ - return m_index; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/FixedSizedv1.h b/test/blackbox/types/FixedSizedv1.h deleted file mode 100644 index f8b470ea656..00000000000 --- a/test/blackbox/types/FixedSizedv1.h +++ /dev/null @@ -1,215 +0,0 @@ -// 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 FixedSized.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_FIXEDSIZED_H_ -#define _FAST_DDS_GENERATED_FIXEDSIZED_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(FIXEDSIZED_SOURCE) -#define FIXEDSIZED_DllAPI __declspec( dllexport ) -#else -#define FIXEDSIZED_DllAPI __declspec( dllimport ) -#endif // FIXEDSIZED_SOURCE -#else -#define FIXEDSIZED_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define FIXEDSIZED_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure FixedSized defined by the user in the IDL file. - * @ingroup FixedSized - */ -class FixedSized -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport FixedSized(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~FixedSized(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object FixedSized that will be copied. - */ - eProsima_user_DllExport FixedSized( - const FixedSized& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object FixedSized that will be copied. - */ - eProsima_user_DllExport FixedSized( - FixedSized&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object FixedSized that will be copied. - */ - eProsima_user_DllExport FixedSized& operator =( - const FixedSized& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object FixedSized that will be copied. - */ - eProsima_user_DllExport FixedSized& operator =( - FixedSized&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x FixedSized object to compare. - */ - eProsima_user_DllExport bool operator ==( - const FixedSized& x) const; - - /*! - * @brief Comparison operator. - * @param x FixedSized object to compare. - */ - eProsima_user_DllExport bool operator !=( - const FixedSized& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint16_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint16_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint16_t& index(); - - - /*! - * @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 FixedSized& 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 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: - - uint16_t m_index; - -}; - - -#endif // _FAST_DDS_GENERATED_FIXEDSIZED_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/HelloWorld.cxx b/test/blackbox/types/HelloWorld.cxx deleted file mode 100644 index 92746fad458..00000000000 --- a/test/blackbox/types/HelloWorld.cxx +++ /dev/null @@ -1,172 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include "HelloWorldTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -HelloWorld::HelloWorld() -{ - // Just to register all known types - registerHelloWorldTypes(); -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - m_message = x.m_message; -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint16_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint16_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint16_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const eprosima::fastcdr::fixed_string<128>& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - eprosima::fastcdr::fixed_string<128>&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const eprosima::fastcdr::fixed_string<128>& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -eprosima::fastcdr::fixed_string<128>& HelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "HelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/HelloWorld.h b/test/blackbox/types/HelloWorld.hpp similarity index 70% rename from test/blackbox/types/HelloWorld.h rename to test/blackbox/types/HelloWorld.hpp index 45a7a1ae125..f9c80150684 100644 --- a/test/blackbox/types/HelloWorld.h +++ b/test/blackbox/types/HelloWorld.hpp @@ -13,32 +13,30 @@ // limitations under the License. /*! - * @file HelloWorld.h + * @file HelloWorld.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "HelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLD_HPP_ #include #include #include #include #include +#include #include #include #include #include +#include +#include "HelloWorldTypeObject.h" #if defined(_WIN32) #if defined(EPROSIMA_USER_DLL_EXPORT) @@ -64,15 +62,6 @@ #define HELLOWORLD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +75,119 @@ class HelloWorld /*! * @brief Default constructor. */ - eProsima_user_DllExport HelloWorld(); + eProsima_user_DllExport HelloWorld() + { + // Just to register all known types + registerHelloWorldTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~HelloWorld(); + eProsima_user_DllExport ~HelloWorld() + { + } /*! * @brief Copy constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - const HelloWorld& x); + const HelloWorld& x) + { + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); + const HelloWorld& x) + { + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object HelloWorld that will be copied. */ eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; + HelloWorld&& x) noexcept + { + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return (m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x HelloWorld object to compare. */ eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; + const HelloWorld& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint16_t _index); + uint16_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint16_t index() const; + eProsima_user_DllExport uint16_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint16_t& index(); + eProsima_user_DllExport uint16_t& index() + { + return m_index; + } /*! @@ -160,26 +195,40 @@ class HelloWorld * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const eprosima::fastcdr::fixed_string<128>& _message); + const eprosima::fastcdr::fixed_string<128>& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - eprosima::fastcdr::fixed_string<128>&& _message); + eprosima::fastcdr::fixed_string<128>&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const eprosima::fastcdr::fixed_string<128>& message() const; + eProsima_user_DllExport const eprosima::fastcdr::fixed_string<128>& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport eprosima::fastcdr::fixed_string<128>& message(); + eProsima_user_DllExport eprosima::fastcdr::fixed_string<128>& message() + { + return m_message; + } + + private: @@ -188,8 +237,6 @@ class HelloWorld }; -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - +#endif // _FAST_DDS_GENERATED_HELLOWORLD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/HelloWorldCdrAux.hpp b/test/blackbox/types/HelloWorldCdrAux.hpp index a357b5fc54f..d32ceed7f75 100644 --- a/test/blackbox/types/HelloWorldCdrAux.hpp +++ b/test/blackbox/types/HelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ -#include "HelloWorld.h" +#include "HelloWorld.hpp" constexpr uint32_t HelloWorld_max_cdr_typesize {141UL}; constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; diff --git a/test/blackbox/types/HelloWorldPubSubTypes.cxx b/test/blackbox/types/HelloWorldPubSubTypes.cxx index 85cb477896e..9eaca1f74a9 100644 --- a/test/blackbox/types/HelloWorldPubSubTypes.cxx +++ b/test/blackbox/types/HelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool HelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" diff --git a/test/blackbox/types/HelloWorldPubSubTypes.h b/test/blackbox/types/HelloWorldPubSubTypes.h index ddbfbab5db6..c9b70273375 100644 --- a/test/blackbox/types/HelloWorldPubSubTypes.h +++ b/test/blackbox/types/HelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "HelloWorld.h" +#include "HelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/test/blackbox/types/HelloWorldTypeObject.cxx b/test/blackbox/types/HelloWorldTypeObject.cxx index 9163a2c402e..e19ade78dea 100644 --- a/test/blackbox/types/HelloWorldTypeObject.cxx +++ b/test/blackbox/types/HelloWorldTypeObject.cxx @@ -24,7 +24,7 @@ namespace { char dummy; } #endif -#include "HelloWorld.h" +#include "HelloWorld.hpp" #include "HelloWorldTypeObject.h" #include #include diff --git a/test/blackbox/types/HelloWorldv1.cxx b/test/blackbox/types/HelloWorldv1.cxx deleted file mode 100644 index 839599f3758..00000000000 --- a/test/blackbox/types/HelloWorldv1.cxx +++ /dev/null @@ -1,294 +0,0 @@ -// 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 HelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "HelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include "HelloWorldTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define HelloWorld_max_cdr_typesize 141ULL; - - - - -HelloWorld::HelloWorld() -{ - // unsigned short m_index - m_index = 0; - // /type_d() m_message - - - // Just to register all known types - registerHelloWorldTypes(); -} - -HelloWorld::~HelloWorld() -{ -} - -HelloWorld::HelloWorld( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - -} - -HelloWorld::HelloWorld( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -HelloWorld& HelloWorld::operator =( - const HelloWorld& x) -{ - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -HelloWorld& HelloWorld::operator =( - HelloWorld&& x) noexcept -{ - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool HelloWorld::operator ==( - const HelloWorld& x) const -{ - return (m_index == x.m_index && - m_message == x.m_message); -} - -bool HelloWorld::operator !=( - const HelloWorld& x) const -{ - return !(*this == x); -} - -size_t HelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return HelloWorld_max_cdr_typesize; -} - -size_t HelloWorld::getCdrSerializedSize( - const HelloWorld& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void HelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void HelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - - - { - std::string aux; - dcdr >> aux; - m_message = aux.c_str(); - } - - -} - - -bool HelloWorld::isKeyDefined() -{ - return false; -} - -void HelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void HelloWorld::index( - uint16_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint16_t HelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint16_t& HelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void HelloWorld::message( - const eprosima::fastrtps::fixed_string<128>& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void HelloWorld::message( - eprosima::fastrtps::fixed_string<128>&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const eprosima::fastrtps::fixed_string<128>& HelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -eprosima::fastrtps::fixed_string<128>& HelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/HelloWorldv1.h b/test/blackbox/types/HelloWorldv1.h deleted file mode 100644 index 908b021c239..00000000000 --- a/test/blackbox/types/HelloWorldv1.h +++ /dev/null @@ -1,243 +0,0 @@ -// 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 HelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ -#define _FAST_DDS_GENERATED_HELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(HELLOWORLD_SOURCE) -#define HELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define HELLOWORLD_DllAPI __declspec( dllimport ) -#endif // HELLOWORLD_SOURCE -#else -#define HELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define HELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure HelloWorld defined by the user in the IDL file. - * @ingroup HelloWorld - */ -class HelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport HelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~HelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - const HelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld( - HelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - const HelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object HelloWorld that will be copied. - */ - eProsima_user_DllExport HelloWorld& operator =( - HelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const HelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x HelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const HelloWorld& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint16_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint16_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint16_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const eprosima::fastrtps::fixed_string<128>& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - eprosima::fastrtps::fixed_string<128>&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const eprosima::fastrtps::fixed_string<128>& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport eprosima::fastrtps::fixed_string<128>& message(); - - - /*! - * @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 HelloWorld& 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 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: - - uint16_t m_index; - eprosima::fastrtps::fixed_string<128> m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/KeyedData1mb.cxx b/test/blackbox/types/KeyedData1mb.cxx deleted file mode 100644 index 80f10319227..00000000000 --- a/test/blackbox/types/KeyedData1mb.cxx +++ /dev/null @@ -1,170 +0,0 @@ -// 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 KeyedData1mb.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "KeyedData1mb.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - - - -KeyedData1mb::KeyedData1mb() -{ -} - -KeyedData1mb::~KeyedData1mb() -{ -} - -KeyedData1mb::KeyedData1mb( - const KeyedData1mb& x) -{ - m_key = x.m_key; - m_data = x.m_data; -} - -KeyedData1mb::KeyedData1mb( - KeyedData1mb&& x) noexcept -{ - m_key = x.m_key; - m_data = std::move(x.m_data); -} - -KeyedData1mb& KeyedData1mb::operator =( - const KeyedData1mb& x) -{ - - m_key = x.m_key; - m_data = x.m_data; - return *this; -} - -KeyedData1mb& KeyedData1mb::operator =( - KeyedData1mb&& x) noexcept -{ - - m_key = x.m_key; - m_data = std::move(x.m_data); - return *this; -} - -bool KeyedData1mb::operator ==( - const KeyedData1mb& x) const -{ - return (m_key == x.m_key && - m_data == x.m_data); -} - -bool KeyedData1mb::operator !=( - const KeyedData1mb& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member key - * @param _key New value for member key - */ -void KeyedData1mb::key( - uint16_t _key) -{ - m_key = _key; -} - -/*! - * @brief This function returns the value of member key - * @return Value of member key - */ -uint16_t KeyedData1mb::key() const -{ - return m_key; -} - -/*! - * @brief This function returns a reference to member key - * @return Reference to member key - */ -uint16_t& KeyedData1mb::key() -{ - return m_key; -} - - -/*! - * @brief This function copies the value in member data - * @param _data New value to be copied in member data - */ -void KeyedData1mb::data( - const std::vector& _data) -{ - m_data = _data; -} - -/*! - * @brief This function moves the value in member data - * @param _data New value to be moved in member data - */ -void KeyedData1mb::data( - std::vector&& _data) -{ - m_data = std::move(_data); -} - -/*! - * @brief This function returns a constant reference to member data - * @return Constant reference to member data - */ -const std::vector& KeyedData1mb::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -std::vector& KeyedData1mb::data() -{ - return m_data; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "KeyedData1mbCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/KeyedData1mb.h b/test/blackbox/types/KeyedData1mb.hpp similarity index 71% rename from test/blackbox/types/KeyedData1mb.h rename to test/blackbox/types/KeyedData1mb.hpp index 6437b546685..57e93c77fa0 100644 --- a/test/blackbox/types/KeyedData1mb.h +++ b/test/blackbox/types/KeyedData1mb.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file KeyedData1mb.h + * @file KeyedData1mb.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "KeyedData1mbv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_KEYEDDATA1MB_H_ -#define _FAST_DDS_GENERATED_KEYEDDATA1MB_H_ +#ifndef _FAST_DDS_GENERATED_KEYEDDATA1MB_HPP_ +#define _FAST_DDS_GENERATED_KEYEDDATA1MB_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,17 +60,6 @@ #define KEYEDDATA1MB_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - - - /*! @@ -88,73 +73,117 @@ class KeyedData1mb /*! * @brief Default constructor. */ - eProsima_user_DllExport KeyedData1mb(); + eProsima_user_DllExport KeyedData1mb() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~KeyedData1mb(); + eProsima_user_DllExport ~KeyedData1mb() + { + } /*! * @brief Copy constructor. * @param x Reference to the object KeyedData1mb that will be copied. */ eProsima_user_DllExport KeyedData1mb( - const KeyedData1mb& x); + const KeyedData1mb& x) + { + m_key = x.m_key; + + m_data = x.m_data; + + } /*! * @brief Move constructor. * @param x Reference to the object KeyedData1mb that will be copied. */ eProsima_user_DllExport KeyedData1mb( - KeyedData1mb&& x) noexcept; + KeyedData1mb&& x) noexcept + { + m_key = x.m_key; + m_data = std::move(x.m_data); + } /*! * @brief Copy assignment. * @param x Reference to the object KeyedData1mb that will be copied. */ eProsima_user_DllExport KeyedData1mb& operator =( - const KeyedData1mb& x); + const KeyedData1mb& x) + { + + m_key = x.m_key; + + m_data = x.m_data; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object KeyedData1mb that will be copied. */ eProsima_user_DllExport KeyedData1mb& operator =( - KeyedData1mb&& x) noexcept; + KeyedData1mb&& x) noexcept + { + + m_key = x.m_key; + m_data = std::move(x.m_data); + return *this; + } /*! * @brief Comparison operator. * @param x KeyedData1mb object to compare. */ eProsima_user_DllExport bool operator ==( - const KeyedData1mb& x) const; + const KeyedData1mb& x) const + { + return (m_key == x.m_key && + m_data == x.m_data); + } /*! * @brief Comparison operator. * @param x KeyedData1mb object to compare. */ eProsima_user_DllExport bool operator !=( - const KeyedData1mb& x) const; + const KeyedData1mb& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member key * @param _key New value for member key */ eProsima_user_DllExport void key( - uint16_t _key); + uint16_t _key) + { + m_key = _key; + } /*! * @brief This function returns the value of member key * @return Value of member key */ - eProsima_user_DllExport uint16_t key() const; + eProsima_user_DllExport uint16_t key() const + { + return m_key; + } /*! * @brief This function returns a reference to member key * @return Reference to member key */ - eProsima_user_DllExport uint16_t& key(); + eProsima_user_DllExport uint16_t& key() + { + return m_key; + } /*! @@ -162,26 +191,40 @@ class KeyedData1mb * @param _data New value to be copied in member data */ eProsima_user_DllExport void data( - const std::vector& _data); + const std::vector& _data) + { + m_data = _data; + } /*! * @brief This function moves the value in member data * @param _data New value to be moved in member data */ eProsima_user_DllExport void data( - std::vector&& _data); + std::vector&& _data) + { + m_data = std::move(_data); + } /*! * @brief This function returns a constant reference to member data * @return Constant reference to member data */ - eProsima_user_DllExport const std::vector& data() const; + eProsima_user_DllExport const std::vector& data() const + { + return m_data; + } /*! * @brief This function returns a reference to member data * @return Reference to member data */ - eProsima_user_DllExport std::vector& data(); + eProsima_user_DllExport std::vector& data() + { + return m_data; + } + + private: @@ -190,8 +233,6 @@ class KeyedData1mb }; -#endif // _FAST_DDS_GENERATED_KEYEDDATA1MB_H_ - +#endif // _FAST_DDS_GENERATED_KEYEDDATA1MB_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/KeyedData1mbCdrAux.hpp b/test/blackbox/types/KeyedData1mbCdrAux.hpp index ad9b32b1c7c..1e554dbfd51 100644 --- a/test/blackbox/types/KeyedData1mbCdrAux.hpp +++ b/test/blackbox/types/KeyedData1mbCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_KEYEDDATA1MBCDRAUX_HPP_ #define _FAST_DDS_GENERATED_KEYEDDATA1MBCDRAUX_HPP_ -#include "KeyedData1mb.h" +#include "KeyedData1mb.hpp" constexpr uint32_t KeyedData1mb_max_cdr_typesize {1024008UL}; constexpr uint32_t KeyedData1mb_max_key_cdr_typesize {2UL}; @@ -36,8 +36,6 @@ class CdrSizeCalculator; - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const KeyedData1mb& data); diff --git a/test/blackbox/types/KeyedData1mbCdrAux.ipp b/test/blackbox/types/KeyedData1mbCdrAux.ipp index d27be4015f7..74153cf0f20 100644 --- a/test/blackbox/types/KeyedData1mbCdrAux.ipp +++ b/test/blackbox/types/KeyedData1mbCdrAux.ipp @@ -36,8 +36,6 @@ namespace fastcdr { - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, diff --git a/test/blackbox/types/KeyedData1mbPubSubTypes.cxx b/test/blackbox/types/KeyedData1mbPubSubTypes.cxx index ba528f396c1..5e5bc0960dc 100644 --- a/test/blackbox/types/KeyedData1mbPubSubTypes.cxx +++ b/test/blackbox/types/KeyedData1mbPubSubTypes.cxx @@ -31,8 +31,6 @@ using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t; - - KeyedData1mbPubSubType::KeyedData1mbPubSubType() { setName("KeyedData1mb"); @@ -221,3 +219,6 @@ bool KeyedData1mbPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "KeyedData1mbCdrAux.ipp" diff --git a/test/blackbox/types/KeyedData1mbPubSubTypes.h b/test/blackbox/types/KeyedData1mbPubSubTypes.h index caf92fbbfad..15b5b65964a 100644 --- a/test/blackbox/types/KeyedData1mbPubSubTypes.h +++ b/test/blackbox/types/KeyedData1mbPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "KeyedData1mb.h" +#include "KeyedData1mb.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -40,8 +40,6 @@ - - /*! * @brief This class represents the TopicDataType of the type KeyedData1mb defined by the user in the IDL file. * @ingroup KeyedData1mb diff --git a/test/blackbox/types/KeyedData1mbv1.cxx b/test/blackbox/types/KeyedData1mbv1.cxx deleted file mode 100644 index f7793295217..00000000000 --- a/test/blackbox/types/KeyedData1mbv1.cxx +++ /dev/null @@ -1,300 +0,0 @@ -// 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 KeyedData1mb.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "KeyedData1mb.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define KeyedData1mb_max_cdr_typesize 1024008ULL; - - - - - - -KeyedData1mb::KeyedData1mb() -{ - // unsigned short m_key - m_key = 0; - // sequence m_data - - -} - -KeyedData1mb::~KeyedData1mb() -{ -} - -KeyedData1mb::KeyedData1mb( - const KeyedData1mb& x) -{ - m_key = x.m_key; - - - m_data = x.m_data; - -} - -KeyedData1mb::KeyedData1mb( - KeyedData1mb&& x) noexcept -{ - m_key = x.m_key; - - - m_data = std::move(x.m_data); - -} - -KeyedData1mb& KeyedData1mb::operator =( - const KeyedData1mb& x) -{ - m_key = x.m_key; - - - m_data = x.m_data; - - return *this; -} - -KeyedData1mb& KeyedData1mb::operator =( - KeyedData1mb&& x) noexcept -{ - m_key = x.m_key; - - - m_data = std::move(x.m_data); - - return *this; -} - -bool KeyedData1mb::operator ==( - const KeyedData1mb& x) const -{ - return (m_key == x.m_key && - m_data == x.m_data); -} - -bool KeyedData1mb::operator !=( - const KeyedData1mb& x) const -{ - return !(*this == x); -} - -size_t KeyedData1mb::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return KeyedData1mb_max_cdr_typesize; -} - -size_t KeyedData1mb::getCdrSerializedSize( - const KeyedData1mb& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.data().size() > 0) - { - current_alignment += (data.data().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - - return current_alignment - initial_alignment; -} - - -void KeyedData1mb::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_key; - - scdr << m_data; - - -} - -void KeyedData1mb::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_key; - - - - dcdr >> m_data; - - -} - - -bool KeyedData1mb::isKeyDefined() -{ - return true; -} - -void KeyedData1mb::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - - scdr << m_key; - - -} - -/*! - * @brief This function sets a value in member key - * @param _key New value for member key - */ -void KeyedData1mb::key( - uint16_t _key) -{ - m_key = _key; -} - -/*! - * @brief This function returns the value of member key - * @return Value of member key - */ -uint16_t KeyedData1mb::key() const -{ - return m_key; -} - -/*! - * @brief This function returns a reference to member key - * @return Reference to member key - */ -uint16_t& KeyedData1mb::key() -{ - return m_key; -} - - -/*! - * @brief This function copies the value in member data - * @param _data New value to be copied in member data - */ -void KeyedData1mb::data( - const std::vector& _data) -{ - m_data = _data; -} - -/*! - * @brief This function moves the value in member data - * @param _data New value to be moved in member data - */ -void KeyedData1mb::data( - std::vector&& _data) -{ - m_data = std::move(_data); -} - -/*! - * @brief This function returns a constant reference to member data - * @return Constant reference to member data - */ -const std::vector& KeyedData1mb::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -std::vector& KeyedData1mb::data() -{ - return m_data; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/KeyedData1mbv1.h b/test/blackbox/types/KeyedData1mbv1.h deleted file mode 100644 index 2cdefb542db..00000000000 --- a/test/blackbox/types/KeyedData1mbv1.h +++ /dev/null @@ -1,245 +0,0 @@ -// 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 KeyedData1mb.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_KEYEDDATA1MB_H_ -#define _FAST_DDS_GENERATED_KEYEDDATA1MB_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(KEYEDDATA1MB_SOURCE) -#define KEYEDDATA1MB_DllAPI __declspec( dllexport ) -#else -#define KEYEDDATA1MB_DllAPI __declspec( dllimport ) -#endif // KEYEDDATA1MB_SOURCE -#else -#define KEYEDDATA1MB_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define KEYEDDATA1MB_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - - - -/*! - * @brief This class represents the structure KeyedData1mb defined by the user in the IDL file. - * @ingroup KeyedData1mb - */ -class KeyedData1mb -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport KeyedData1mb(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~KeyedData1mb(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object KeyedData1mb that will be copied. - */ - eProsima_user_DllExport KeyedData1mb( - const KeyedData1mb& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object KeyedData1mb that will be copied. - */ - eProsima_user_DllExport KeyedData1mb( - KeyedData1mb&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object KeyedData1mb that will be copied. - */ - eProsima_user_DllExport KeyedData1mb& operator =( - const KeyedData1mb& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object KeyedData1mb that will be copied. - */ - eProsima_user_DllExport KeyedData1mb& operator =( - KeyedData1mb&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x KeyedData1mb object to compare. - */ - eProsima_user_DllExport bool operator ==( - const KeyedData1mb& x) const; - - /*! - * @brief Comparison operator. - * @param x KeyedData1mb object to compare. - */ - eProsima_user_DllExport bool operator !=( - const KeyedData1mb& x) const; - - /*! - * @brief This function sets a value in member key - * @param _key New value for member key - */ - eProsima_user_DllExport void key( - uint16_t _key); - - /*! - * @brief This function returns the value of member key - * @return Value of member key - */ - eProsima_user_DllExport uint16_t key() const; - - /*! - * @brief This function returns a reference to member key - * @return Reference to member key - */ - eProsima_user_DllExport uint16_t& key(); - - - /*! - * @brief This function copies the value in member data - * @param _data New value to be copied in member data - */ - eProsima_user_DllExport void data( - const std::vector& _data); - - /*! - * @brief This function moves the value in member data - * @param _data New value to be moved in member data - */ - eProsima_user_DllExport void data( - std::vector&& _data); - - /*! - * @brief This function returns a constant reference to member data - * @return Constant reference to member data - */ - eProsima_user_DllExport const std::vector& data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport std::vector& data(); - - - /*! - * @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 KeyedData1mb& 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 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: - - uint16_t m_key; - std::vector m_data; - -}; - - -#endif // _FAST_DDS_GENERATED_KEYEDDATA1MB_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/KeyedHelloWorld.cxx b/test/blackbox/types/KeyedHelloWorld.cxx deleted file mode 100644 index ed5211c6be4..00000000000 --- a/test/blackbox/types/KeyedHelloWorld.cxx +++ /dev/null @@ -1,202 +0,0 @@ -// 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 KeyedHelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "KeyedHelloWorld.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -KeyedHelloWorld::KeyedHelloWorld() -{ -} - -KeyedHelloWorld::~KeyedHelloWorld() -{ -} - -KeyedHelloWorld::KeyedHelloWorld( - const KeyedHelloWorld& x) -{ - m_key = x.m_key; - m_index = x.m_index; - m_message = x.m_message; -} - -KeyedHelloWorld::KeyedHelloWorld( - KeyedHelloWorld&& x) noexcept -{ - m_key = x.m_key; - m_index = x.m_index; - m_message = std::move(x.m_message); -} - -KeyedHelloWorld& KeyedHelloWorld::operator =( - const KeyedHelloWorld& x) -{ - - m_key = x.m_key; - m_index = x.m_index; - m_message = x.m_message; - return *this; -} - -KeyedHelloWorld& KeyedHelloWorld::operator =( - KeyedHelloWorld&& x) noexcept -{ - - m_key = x.m_key; - m_index = x.m_index; - m_message = std::move(x.m_message); - return *this; -} - -bool KeyedHelloWorld::operator ==( - const KeyedHelloWorld& x) const -{ - return (m_key == x.m_key && - m_index == x.m_index && - m_message == x.m_message); -} - -bool KeyedHelloWorld::operator !=( - const KeyedHelloWorld& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member key - * @param _key New value for member key - */ -void KeyedHelloWorld::key( - uint16_t _key) -{ - m_key = _key; -} - -/*! - * @brief This function returns the value of member key - * @return Value of member key - */ -uint16_t KeyedHelloWorld::key() const -{ - return m_key; -} - -/*! - * @brief This function returns a reference to member key - * @return Reference to member key - */ -uint16_t& KeyedHelloWorld::key() -{ - return m_key; -} - - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void KeyedHelloWorld::index( - uint16_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint16_t KeyedHelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint16_t& KeyedHelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void KeyedHelloWorld::message( - const eprosima::fastcdr::fixed_string<128>& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void KeyedHelloWorld::message( - eprosima::fastcdr::fixed_string<128>&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const eprosima::fastcdr::fixed_string<128>& KeyedHelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -eprosima::fastcdr::fixed_string<128>& KeyedHelloWorld::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "KeyedHelloWorldCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/KeyedHelloWorld.h b/test/blackbox/types/KeyedHelloWorld.hpp similarity index 69% rename from test/blackbox/types/KeyedHelloWorld.h rename to test/blackbox/types/KeyedHelloWorld.hpp index 0ec54f057b8..1d50871b228 100644 --- a/test/blackbox/types/KeyedHelloWorld.h +++ b/test/blackbox/types/KeyedHelloWorld.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file KeyedHelloWorld.h + * @file KeyedHelloWorld.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "KeyedHelloWorldv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_KEYEDHELLOWORLD_H_ -#define _FAST_DDS_GENERATED_KEYEDHELLOWORLD_H_ +#ifndef _FAST_DDS_GENERATED_KEYEDHELLOWORLD_HPP_ +#define _FAST_DDS_GENERATED_KEYEDHELLOWORLD_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define KEYEDHELLOWORLD_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,124 @@ class KeyedHelloWorld /*! * @brief Default constructor. */ - eProsima_user_DllExport KeyedHelloWorld(); + eProsima_user_DllExport KeyedHelloWorld() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~KeyedHelloWorld(); + eProsima_user_DllExport ~KeyedHelloWorld() + { + } /*! * @brief Copy constructor. * @param x Reference to the object KeyedHelloWorld that will be copied. */ eProsima_user_DllExport KeyedHelloWorld( - const KeyedHelloWorld& x); + const KeyedHelloWorld& x) + { + m_key = x.m_key; + + m_index = x.m_index; + + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object KeyedHelloWorld that will be copied. */ eProsima_user_DllExport KeyedHelloWorld( - KeyedHelloWorld&& x) noexcept; + KeyedHelloWorld&& x) noexcept + { + m_key = x.m_key; + m_index = x.m_index; + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object KeyedHelloWorld that will be copied. */ eProsima_user_DllExport KeyedHelloWorld& operator =( - const KeyedHelloWorld& x); + const KeyedHelloWorld& x) + { + + m_key = x.m_key; + + m_index = x.m_index; + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object KeyedHelloWorld that will be copied. */ eProsima_user_DllExport KeyedHelloWorld& operator =( - KeyedHelloWorld&& x) noexcept; + KeyedHelloWorld&& x) noexcept + { + + m_key = x.m_key; + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x KeyedHelloWorld object to compare. */ eProsima_user_DllExport bool operator ==( - const KeyedHelloWorld& x) const; + const KeyedHelloWorld& x) const + { + return (m_key == x.m_key && + m_index == x.m_index && + m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x KeyedHelloWorld object to compare. */ eProsima_user_DllExport bool operator !=( - const KeyedHelloWorld& x) const; + const KeyedHelloWorld& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member key * @param _key New value for member key */ eProsima_user_DllExport void key( - uint16_t _key); + uint16_t _key) + { + m_key = _key; + } /*! * @brief This function returns the value of member key * @return Value of member key */ - eProsima_user_DllExport uint16_t key() const; + eProsima_user_DllExport uint16_t key() const + { + return m_key; + } /*! * @brief This function returns a reference to member key * @return Reference to member key */ - eProsima_user_DllExport uint16_t& key(); + eProsima_user_DllExport uint16_t& key() + { + return m_key; + } /*! @@ -160,19 +198,28 @@ class KeyedHelloWorld * @param _index New value for member index */ eProsima_user_DllExport void index( - uint16_t _index); + uint16_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint16_t index() const; + eProsima_user_DllExport uint16_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint16_t& index(); + eProsima_user_DllExport uint16_t& index() + { + return m_index; + } /*! @@ -180,26 +227,40 @@ class KeyedHelloWorld * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const eprosima::fastcdr::fixed_string<128>& _message); + const eprosima::fastcdr::fixed_string<128>& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - eprosima::fastcdr::fixed_string<128>&& _message); + eprosima::fastcdr::fixed_string<128>&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const eprosima::fastcdr::fixed_string<128>& message() const; + eProsima_user_DllExport const eprosima::fastcdr::fixed_string<128>& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport eprosima::fastcdr::fixed_string<128>& message(); + eProsima_user_DllExport eprosima::fastcdr::fixed_string<128>& message() + { + return m_message; + } + + private: @@ -209,8 +270,6 @@ class KeyedHelloWorld }; -#endif // _FAST_DDS_GENERATED_KEYEDHELLOWORLD_H_ - +#endif // _FAST_DDS_GENERATED_KEYEDHELLOWORLD_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/KeyedHelloWorldCdrAux.hpp b/test/blackbox/types/KeyedHelloWorldCdrAux.hpp index d25e9dc8485..e5ea0317138 100644 --- a/test/blackbox/types/KeyedHelloWorldCdrAux.hpp +++ b/test/blackbox/types/KeyedHelloWorldCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_KEYEDHELLOWORLDCDRAUX_HPP_ #define _FAST_DDS_GENERATED_KEYEDHELLOWORLDCDRAUX_HPP_ -#include "KeyedHelloWorld.h" +#include "KeyedHelloWorld.hpp" constexpr uint32_t KeyedHelloWorld_max_cdr_typesize {141UL}; constexpr uint32_t KeyedHelloWorld_max_key_cdr_typesize {2UL}; diff --git a/test/blackbox/types/KeyedHelloWorldPubSubTypes.cxx b/test/blackbox/types/KeyedHelloWorldPubSubTypes.cxx index f5714a42c75..f3c5cbc4335 100644 --- a/test/blackbox/types/KeyedHelloWorldPubSubTypes.cxx +++ b/test/blackbox/types/KeyedHelloWorldPubSubTypes.cxx @@ -219,3 +219,6 @@ bool KeyedHelloWorldPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "KeyedHelloWorldCdrAux.ipp" diff --git a/test/blackbox/types/KeyedHelloWorldPubSubTypes.h b/test/blackbox/types/KeyedHelloWorldPubSubTypes.h index 827c99ed420..5a408173f2a 100644 --- a/test/blackbox/types/KeyedHelloWorldPubSubTypes.h +++ b/test/blackbox/types/KeyedHelloWorldPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "KeyedHelloWorld.h" +#include "KeyedHelloWorld.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/test/blackbox/types/KeyedHelloWorldv1.cxx b/test/blackbox/types/KeyedHelloWorldv1.cxx deleted file mode 100644 index 3391af9cd87..00000000000 --- a/test/blackbox/types/KeyedHelloWorldv1.cxx +++ /dev/null @@ -1,348 +0,0 @@ -// 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 KeyedHelloWorld.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "KeyedHelloWorld.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define KeyedHelloWorld_max_cdr_typesize 141ULL; - - - - -KeyedHelloWorld::KeyedHelloWorld() -{ - // unsigned short m_key - m_key = 0; - // unsigned short m_index - m_index = 0; - // /type_d() m_message - - -} - -KeyedHelloWorld::~KeyedHelloWorld() -{ -} - -KeyedHelloWorld::KeyedHelloWorld( - const KeyedHelloWorld& x) -{ - m_key = x.m_key; - - - m_index = x.m_index; - - - m_message = x.m_message; - -} - -KeyedHelloWorld::KeyedHelloWorld( - KeyedHelloWorld&& x) noexcept -{ - m_key = x.m_key; - - - m_index = x.m_index; - - - m_message = std::move(x.m_message); - -} - -KeyedHelloWorld& KeyedHelloWorld::operator =( - const KeyedHelloWorld& x) -{ - m_key = x.m_key; - - - m_index = x.m_index; - - - m_message = x.m_message; - - return *this; -} - -KeyedHelloWorld& KeyedHelloWorld::operator =( - KeyedHelloWorld&& x) noexcept -{ - m_key = x.m_key; - - - m_index = x.m_index; - - - m_message = std::move(x.m_message); - - return *this; -} - -bool KeyedHelloWorld::operator ==( - const KeyedHelloWorld& x) const -{ - return (m_key == x.m_key && - m_index == x.m_index && - m_message == x.m_message); -} - -bool KeyedHelloWorld::operator !=( - const KeyedHelloWorld& x) const -{ - return !(*this == x); -} - -size_t KeyedHelloWorld::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return KeyedHelloWorld_max_cdr_typesize; -} - -size_t KeyedHelloWorld::getCdrSerializedSize( - const KeyedHelloWorld& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - 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) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void KeyedHelloWorld::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_key; - - scdr << m_index; - - scdr << m_message.c_str(); - -} - -void KeyedHelloWorld::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_key; - - - - dcdr >> m_index; - - - - { - std::string aux; - dcdr >> aux; - m_message = aux.c_str(); - } - - -} - - -bool KeyedHelloWorld::isKeyDefined() -{ - return true; -} - -void KeyedHelloWorld::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - - scdr << m_key; - - - -} - -/*! - * @brief This function sets a value in member key - * @param _key New value for member key - */ -void KeyedHelloWorld::key( - uint16_t _key) -{ - m_key = _key; -} - -/*! - * @brief This function returns the value of member key - * @return Value of member key - */ -uint16_t KeyedHelloWorld::key() const -{ - return m_key; -} - -/*! - * @brief This function returns a reference to member key - * @return Reference to member key - */ -uint16_t& KeyedHelloWorld::key() -{ - return m_key; -} - - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void KeyedHelloWorld::index( - uint16_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint16_t KeyedHelloWorld::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint16_t& KeyedHelloWorld::index() -{ - return m_index; -} - - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void KeyedHelloWorld::message( - const eprosima::fastrtps::fixed_string<128>& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void KeyedHelloWorld::message( - eprosima::fastrtps::fixed_string<128>&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const eprosima::fastrtps::fixed_string<128>& KeyedHelloWorld::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -eprosima::fastrtps::fixed_string<128>& KeyedHelloWorld::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/KeyedHelloWorldv1.h b/test/blackbox/types/KeyedHelloWorldv1.h deleted file mode 100644 index ecb31c12b9f..00000000000 --- a/test/blackbox/types/KeyedHelloWorldv1.h +++ /dev/null @@ -1,264 +0,0 @@ -// 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 KeyedHelloWorld.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_KEYEDHELLOWORLD_H_ -#define _FAST_DDS_GENERATED_KEYEDHELLOWORLD_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(KEYEDHELLOWORLD_SOURCE) -#define KEYEDHELLOWORLD_DllAPI __declspec( dllexport ) -#else -#define KEYEDHELLOWORLD_DllAPI __declspec( dllimport ) -#endif // KEYEDHELLOWORLD_SOURCE -#else -#define KEYEDHELLOWORLD_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define KEYEDHELLOWORLD_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure KeyedHelloWorld defined by the user in the IDL file. - * @ingroup KeyedHelloWorld - */ -class KeyedHelloWorld -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport KeyedHelloWorld(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~KeyedHelloWorld(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object KeyedHelloWorld that will be copied. - */ - eProsima_user_DllExport KeyedHelloWorld( - const KeyedHelloWorld& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object KeyedHelloWorld that will be copied. - */ - eProsima_user_DllExport KeyedHelloWorld( - KeyedHelloWorld&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object KeyedHelloWorld that will be copied. - */ - eProsima_user_DllExport KeyedHelloWorld& operator =( - const KeyedHelloWorld& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object KeyedHelloWorld that will be copied. - */ - eProsima_user_DllExport KeyedHelloWorld& operator =( - KeyedHelloWorld&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x KeyedHelloWorld object to compare. - */ - eProsima_user_DllExport bool operator ==( - const KeyedHelloWorld& x) const; - - /*! - * @brief Comparison operator. - * @param x KeyedHelloWorld object to compare. - */ - eProsima_user_DllExport bool operator !=( - const KeyedHelloWorld& x) const; - - /*! - * @brief This function sets a value in member key - * @param _key New value for member key - */ - eProsima_user_DllExport void key( - uint16_t _key); - - /*! - * @brief This function returns the value of member key - * @return Value of member key - */ - eProsima_user_DllExport uint16_t key() const; - - /*! - * @brief This function returns a reference to member key - * @return Reference to member key - */ - eProsima_user_DllExport uint16_t& key(); - - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint16_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint16_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint16_t& index(); - - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const eprosima::fastrtps::fixed_string<128>& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - eprosima::fastrtps::fixed_string<128>&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const eprosima::fastrtps::fixed_string<128>& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport eprosima::fastrtps::fixed_string<128>& message(); - - - /*! - * @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 KeyedHelloWorld& 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 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: - - uint16_t m_key; - uint16_t m_index; - eprosima::fastrtps::fixed_string<128> m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_KEYEDHELLOWORLD_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/StringTest.cxx b/test/blackbox/types/StringTest.cxx deleted file mode 100644 index 6da9dd7d32e..00000000000 --- a/test/blackbox/types/StringTest.cxx +++ /dev/null @@ -1,134 +0,0 @@ -// 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 StringTest.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "StringTest.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -StringTest::StringTest() -{ -} - -StringTest::~StringTest() -{ -} - -StringTest::StringTest( - const StringTest& x) -{ - m_message = x.m_message; -} - -StringTest::StringTest( - StringTest&& x) noexcept -{ - m_message = std::move(x.m_message); -} - -StringTest& StringTest::operator =( - const StringTest& x) -{ - - m_message = x.m_message; - return *this; -} - -StringTest& StringTest::operator =( - StringTest&& x) noexcept -{ - - m_message = std::move(x.m_message); - return *this; -} - -bool StringTest::operator ==( - const StringTest& x) const -{ - return (m_message == x.m_message); -} - -bool StringTest::operator !=( - const StringTest& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void StringTest::message( - const eprosima::fastcdr::fixed_string<10000>& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void StringTest::message( - eprosima::fastcdr::fixed_string<10000>&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const eprosima::fastcdr::fixed_string<10000>& StringTest::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -eprosima::fastcdr::fixed_string<10000>& StringTest::message() -{ - return m_message; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "StringTestCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/StringTest.h b/test/blackbox/types/StringTest.hpp similarity index 75% rename from test/blackbox/types/StringTest.h rename to test/blackbox/types/StringTest.hpp index 6065acb5f13..d1c18b0a312 100644 --- a/test/blackbox/types/StringTest.h +++ b/test/blackbox/types/StringTest.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file StringTest.h + * @file StringTest.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "StringTestv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_STRINGTEST_H_ -#define _FAST_DDS_GENERATED_STRINGTEST_H_ +#ifndef _FAST_DDS_GENERATED_STRINGTEST_HPP_ +#define _FAST_DDS_GENERATED_STRINGTEST_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define STRINGTEST_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,80 +73,122 @@ class StringTest /*! * @brief Default constructor. */ - eProsima_user_DllExport StringTest(); + eProsima_user_DllExport StringTest() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~StringTest(); + eProsima_user_DllExport ~StringTest() + { + } /*! * @brief Copy constructor. * @param x Reference to the object StringTest that will be copied. */ eProsima_user_DllExport StringTest( - const StringTest& x); + const StringTest& x) + { + m_message = x.m_message; + + } /*! * @brief Move constructor. * @param x Reference to the object StringTest that will be copied. */ eProsima_user_DllExport StringTest( - StringTest&& x) noexcept; + StringTest&& x) noexcept + { + m_message = std::move(x.m_message); + } /*! * @brief Copy assignment. * @param x Reference to the object StringTest that will be copied. */ eProsima_user_DllExport StringTest& operator =( - const StringTest& x); + const StringTest& x) + { + + m_message = x.m_message; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object StringTest that will be copied. */ eProsima_user_DllExport StringTest& operator =( - StringTest&& x) noexcept; + StringTest&& x) noexcept + { + + m_message = std::move(x.m_message); + return *this; + } /*! * @brief Comparison operator. * @param x StringTest object to compare. */ eProsima_user_DllExport bool operator ==( - const StringTest& x) const; + const StringTest& x) const + { + return (m_message == x.m_message); + } /*! * @brief Comparison operator. * @param x StringTest object to compare. */ eProsima_user_DllExport bool operator !=( - const StringTest& x) const; + const StringTest& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member message * @param _message New value to be copied in member message */ eProsima_user_DllExport void message( - const eprosima::fastcdr::fixed_string<10000>& _message); + const eprosima::fastcdr::fixed_string<10000>& _message) + { + m_message = _message; + } /*! * @brief This function moves the value in member message * @param _message New value to be moved in member message */ eProsima_user_DllExport void message( - eprosima::fastcdr::fixed_string<10000>&& _message); + eprosima::fastcdr::fixed_string<10000>&& _message) + { + m_message = std::move(_message); + } /*! * @brief This function returns a constant reference to member message * @return Constant reference to member message */ - eProsima_user_DllExport const eprosima::fastcdr::fixed_string<10000>& message() const; + eProsima_user_DllExport const eprosima::fastcdr::fixed_string<10000>& message() const + { + return m_message; + } /*! * @brief This function returns a reference to member message * @return Reference to member message */ - eProsima_user_DllExport eprosima::fastcdr::fixed_string<10000>& message(); + eProsima_user_DllExport eprosima::fastcdr::fixed_string<10000>& message() + { + return m_message; + } + + private: @@ -167,8 +196,6 @@ class StringTest }; -#endif // _FAST_DDS_GENERATED_STRINGTEST_H_ - +#endif // _FAST_DDS_GENERATED_STRINGTEST_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/StringTestCdrAux.hpp b/test/blackbox/types/StringTestCdrAux.hpp index e823e199e62..7a55027308f 100644 --- a/test/blackbox/types/StringTestCdrAux.hpp +++ b/test/blackbox/types/StringTestCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_STRINGTESTCDRAUX_HPP_ #define _FAST_DDS_GENERATED_STRINGTESTCDRAUX_HPP_ -#include "StringTest.h" +#include "StringTest.hpp" constexpr uint32_t StringTest_max_cdr_typesize {10009UL}; constexpr uint32_t StringTest_max_key_cdr_typesize {0UL}; diff --git a/test/blackbox/types/StringTestPubSubTypes.cxx b/test/blackbox/types/StringTestPubSubTypes.cxx index a030d2a9d40..5e8b7f034ff 100644 --- a/test/blackbox/types/StringTestPubSubTypes.cxx +++ b/test/blackbox/types/StringTestPubSubTypes.cxx @@ -219,3 +219,6 @@ bool StringTestPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "StringTestCdrAux.ipp" diff --git a/test/blackbox/types/StringTestPubSubTypes.h b/test/blackbox/types/StringTestPubSubTypes.h index 51a448b7f62..b3f78c330d8 100644 --- a/test/blackbox/types/StringTestPubSubTypes.h +++ b/test/blackbox/types/StringTestPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "StringTest.h" +#include "StringTest.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/test/blackbox/types/StringTestv1.cxx b/test/blackbox/types/StringTestv1.cxx deleted file mode 100644 index b5c46f9ae1c..00000000000 --- a/test/blackbox/types/StringTestv1.cxx +++ /dev/null @@ -1,237 +0,0 @@ -// 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 StringTest.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "StringTest.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define StringTest_max_cdr_typesize 10009ULL; - - - - -StringTest::StringTest() -{ - // /type_d() m_message - - -} - -StringTest::~StringTest() -{ -} - -StringTest::StringTest( - const StringTest& x) -{ - m_message = x.m_message; - -} - -StringTest::StringTest( - StringTest&& x) noexcept -{ - m_message = std::move(x.m_message); - -} - -StringTest& StringTest::operator =( - const StringTest& x) -{ - m_message = x.m_message; - - return *this; -} - -StringTest& StringTest::operator =( - StringTest&& x) noexcept -{ - m_message = std::move(x.m_message); - - return *this; -} - -bool StringTest::operator ==( - const StringTest& x) const -{ - return (m_message == x.m_message); -} - -bool StringTest::operator !=( - const StringTest& x) const -{ - return !(*this == x); -} - -size_t StringTest::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return StringTest_max_cdr_typesize; -} - -size_t StringTest::getCdrSerializedSize( - const StringTest& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.message().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void StringTest::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_message.c_str(); - -} - -void StringTest::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - std::string aux; - dcdr >> aux; - m_message = aux.c_str(); - } - - -} - - -bool StringTest::isKeyDefined() -{ - return false; -} - -void StringTest::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ -void StringTest::message( - const eprosima::fastrtps::fixed_string<10000>& _message) -{ - m_message = _message; -} - -/*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ -void StringTest::message( - eprosima::fastrtps::fixed_string<10000>&& _message) -{ - m_message = std::move(_message); -} - -/*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ -const eprosima::fastrtps::fixed_string<10000>& StringTest::message() const -{ - return m_message; -} - -/*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ -eprosima::fastrtps::fixed_string<10000>& StringTest::message() -{ - return m_message; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/StringTestv1.h b/test/blackbox/types/StringTestv1.h deleted file mode 100644 index edbcc2cbb6c..00000000000 --- a/test/blackbox/types/StringTestv1.h +++ /dev/null @@ -1,222 +0,0 @@ -// 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 StringTest.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_STRINGTEST_H_ -#define _FAST_DDS_GENERATED_STRINGTEST_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(STRINGTEST_SOURCE) -#define STRINGTEST_DllAPI __declspec( dllexport ) -#else -#define STRINGTEST_DllAPI __declspec( dllimport ) -#endif // STRINGTEST_SOURCE -#else -#define STRINGTEST_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define STRINGTEST_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure StringTest defined by the user in the IDL file. - * @ingroup StringTest - */ -class StringTest -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport StringTest(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~StringTest(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object StringTest that will be copied. - */ - eProsima_user_DllExport StringTest( - const StringTest& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object StringTest that will be copied. - */ - eProsima_user_DllExport StringTest( - StringTest&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object StringTest that will be copied. - */ - eProsima_user_DllExport StringTest& operator =( - const StringTest& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object StringTest that will be copied. - */ - eProsima_user_DllExport StringTest& operator =( - StringTest&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x StringTest object to compare. - */ - eProsima_user_DllExport bool operator ==( - const StringTest& x) const; - - /*! - * @brief Comparison operator. - * @param x StringTest object to compare. - */ - eProsima_user_DllExport bool operator !=( - const StringTest& x) const; - - /*! - * @brief This function copies the value in member message - * @param _message New value to be copied in member message - */ - eProsima_user_DllExport void message( - const eprosima::fastrtps::fixed_string<10000>& _message); - - /*! - * @brief This function moves the value in member message - * @param _message New value to be moved in member message - */ - eProsima_user_DllExport void message( - eprosima::fastrtps::fixed_string<10000>&& _message); - - /*! - * @brief This function returns a constant reference to member message - * @return Constant reference to member message - */ - eProsima_user_DllExport const eprosima::fastrtps::fixed_string<10000>& message() const; - - /*! - * @brief This function returns a reference to member message - * @return Reference to member message - */ - eProsima_user_DllExport eprosima::fastrtps::fixed_string<10000>& message(); - - - /*! - * @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 StringTest& 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 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: - - eprosima::fastrtps::fixed_string<10000> m_message; - -}; - - -#endif // _FAST_DDS_GENERATED_STRINGTEST_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/TestIncludeRegression3361.cxx b/test/blackbox/types/TestIncludeRegression3361.cxx deleted file mode 100644 index bd999acb638..00000000000 --- a/test/blackbox/types/TestIncludeRegression3361.cxx +++ /dev/null @@ -1,48 +0,0 @@ -// 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 TestIncludeRegression3361.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "TestIncludeRegression3361.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include "TestIncludeRegression3361TypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - -namespace TestModule { - - -} // namespace TestModule -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/TestIncludeRegression3361.h b/test/blackbox/types/TestIncludeRegression3361.hpp similarity index 78% rename from test/blackbox/types/TestIncludeRegression3361.h rename to test/blackbox/types/TestIncludeRegression3361.hpp index 9f0c54030ed..cd63fe4b7b5 100644 --- a/test/blackbox/types/TestIncludeRegression3361.h +++ b/test/blackbox/types/TestIncludeRegression3361.hpp @@ -13,32 +13,30 @@ // limitations under the License. /*! - * @file TestIncludeRegression3361.h + * @file TestIncludeRegression3361.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "TestIncludeRegression3361v1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_TESTINCLUDEREGRESSION3361_H_ -#define _FAST_DDS_GENERATED_TESTINCLUDEREGRESSION3361_H_ +#ifndef _FAST_DDS_GENERATED_TESTINCLUDEREGRESSION3361_HPP_ +#define _FAST_DDS_GENERATED_TESTINCLUDEREGRESSION3361_HPP_ #include #include #include #include #include +#include #include #include #include #include +#include +#include "TestIncludeRegression3361TypeObject.h" #if defined(_WIN32) #if defined(EPROSIMA_USER_DLL_EXPORT) @@ -64,15 +62,6 @@ #define TESTINCLUDEREGRESSION3361_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - namespace TestModule { typedef std::string MACHINEID; @@ -80,8 +69,6 @@ typedef std::string MACHINEID; } // namespace TestModule -#endif // _FAST_DDS_GENERATED_TESTINCLUDEREGRESSION3361_H_ - +#endif // _FAST_DDS_GENERATED_TESTINCLUDEREGRESSION3361_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/TestIncludeRegression3361PubSubTypes.h b/test/blackbox/types/TestIncludeRegression3361PubSubTypes.h index 816d55fe4a4..99deb4fbcdc 100644 --- a/test/blackbox/types/TestIncludeRegression3361PubSubTypes.h +++ b/test/blackbox/types/TestIncludeRegression3361PubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "TestIncludeRegression3361.h" +#include "TestIncludeRegression3361.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -40,7 +40,7 @@ namespace TestModule { typedef std::string MACHINEID; -} +} // namespace TestModule #endif // _FAST_DDS_GENERATED_TESTINCLUDEREGRESSION3361_PUBSUBTYPES_H_ diff --git a/test/blackbox/types/TestIncludeRegression3361TypeObject.cxx b/test/blackbox/types/TestIncludeRegression3361TypeObject.cxx index 9fa90fe1008..3175a2b193c 100644 --- a/test/blackbox/types/TestIncludeRegression3361TypeObject.cxx +++ b/test/blackbox/types/TestIncludeRegression3361TypeObject.cxx @@ -24,7 +24,7 @@ namespace { char dummy; } #endif -#include "TestIncludeRegression3361.h" +#include "TestIncludeRegression3361.hpp" #include "TestIncludeRegression3361TypeObject.h" #include #include diff --git a/test/blackbox/types/TestIncludeRegression3361v1.cxx b/test/blackbox/types/TestIncludeRegression3361v1.cxx deleted file mode 100644 index abc875d3a33..00000000000 --- a/test/blackbox/types/TestIncludeRegression3361v1.cxx +++ /dev/null @@ -1,95 +0,0 @@ -// 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 TestIncludeRegression3361.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "TestIncludeRegression3361.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include "TestIncludeRegression3361TypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - - - -namespace TestModule { - - -} // namespace TestModule - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/TestIncludeRegression3361v1.h b/test/blackbox/types/TestIncludeRegression3361v1.h deleted file mode 100644 index fcc2b443cca..00000000000 --- a/test/blackbox/types/TestIncludeRegression3361v1.h +++ /dev/null @@ -1,80 +0,0 @@ -// 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 TestIncludeRegression3361.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_TESTINCLUDEREGRESSION3361_H_ -#define _FAST_DDS_GENERATED_TESTINCLUDEREGRESSION3361_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(TESTINCLUDEREGRESSION3361_SOURCE) -#define TESTINCLUDEREGRESSION3361_DllAPI __declspec( dllexport ) -#else -#define TESTINCLUDEREGRESSION3361_DllAPI __declspec( dllimport ) -#endif // TESTINCLUDEREGRESSION3361_SOURCE -#else -#define TESTINCLUDEREGRESSION3361_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define TESTINCLUDEREGRESSION3361_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - -namespace TestModule { - typedef std::string MACHINEID; - -} // namespace TestModule - -#endif // _FAST_DDS_GENERATED_TESTINCLUDEREGRESSION3361_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/TestRegression3361.cxx b/test/blackbox/types/TestRegression3361.cxx deleted file mode 100644 index ecf625300da..00000000000 --- a/test/blackbox/types/TestRegression3361.cxx +++ /dev/null @@ -1,138 +0,0 @@ -// 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 TestRegression3361.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "TestRegression3361.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include "TestRegression3361TypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -TestRegression3361::TestRegression3361() -{ - // Just to register all known types - registerTestRegression3361Types(); -} - -TestRegression3361::~TestRegression3361() -{ -} - -TestRegression3361::TestRegression3361( - const TestRegression3361& x) -{ - m_uuid = x.m_uuid; -} - -TestRegression3361::TestRegression3361( - TestRegression3361&& x) noexcept -{ - m_uuid = std::move(x.m_uuid); -} - -TestRegression3361& TestRegression3361::operator =( - const TestRegression3361& x) -{ - - m_uuid = x.m_uuid; - return *this; -} - -TestRegression3361& TestRegression3361::operator =( - TestRegression3361&& x) noexcept -{ - - m_uuid = std::move(x.m_uuid); - return *this; -} - -bool TestRegression3361::operator ==( - const TestRegression3361& x) const -{ - return (m_uuid == x.m_uuid); -} - -bool TestRegression3361::operator !=( - const TestRegression3361& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member uuid - * @param _uuid New value to be copied in member uuid - */ -void TestRegression3361::uuid( - const TestModule::MACHINEID& _uuid) -{ - m_uuid = _uuid; -} - -/*! - * @brief This function moves the value in member uuid - * @param _uuid New value to be moved in member uuid - */ -void TestRegression3361::uuid( - TestModule::MACHINEID&& _uuid) -{ - m_uuid = std::move(_uuid); -} - -/*! - * @brief This function returns a constant reference to member uuid - * @return Constant reference to member uuid - */ -const TestModule::MACHINEID& TestRegression3361::uuid() const -{ - return m_uuid; -} - -/*! - * @brief This function returns a reference to member uuid - * @return Reference to member uuid - */ -TestModule::MACHINEID& TestRegression3361::uuid() -{ - return m_uuid; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "TestRegression3361CdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/TestRegression3361.h b/test/blackbox/types/TestRegression3361.hpp similarity index 71% rename from test/blackbox/types/TestRegression3361.h rename to test/blackbox/types/TestRegression3361.hpp index fd1ff797e05..1fd5ca403b4 100644 --- a/test/blackbox/types/TestRegression3361.h +++ b/test/blackbox/types/TestRegression3361.hpp @@ -13,33 +13,31 @@ // limitations under the License. /*! - * @file TestRegression3361.h + * @file TestRegression3361.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "TestRegression3361v1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_TESTREGRESSION3361_H_ -#define _FAST_DDS_GENERATED_TESTREGRESSION3361_H_ +#ifndef _FAST_DDS_GENERATED_TESTREGRESSION3361_HPP_ +#define _FAST_DDS_GENERATED_TESTREGRESSION3361_HPP_ #include #include #include #include #include +#include #include #include #include #include +#include -#include "TestIncludeRegression3361.h" +#include "TestIncludeRegression3361.hpp" +#include "TestRegression3361TypeObject.h" #if defined(_WIN32) #if defined(EPROSIMA_USER_DLL_EXPORT) @@ -65,15 +63,6 @@ #define TESTREGRESSION3361_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -87,80 +76,124 @@ class TestRegression3361 /*! * @brief Default constructor. */ - eProsima_user_DllExport TestRegression3361(); + eProsima_user_DllExport TestRegression3361() + { + // Just to register all known types + registerTestRegression3361Types(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~TestRegression3361(); + eProsima_user_DllExport ~TestRegression3361() + { + } /*! * @brief Copy constructor. * @param x Reference to the object TestRegression3361 that will be copied. */ eProsima_user_DllExport TestRegression3361( - const TestRegression3361& x); + const TestRegression3361& x) + { + m_uuid = x.m_uuid; + + } /*! * @brief Move constructor. * @param x Reference to the object TestRegression3361 that will be copied. */ eProsima_user_DllExport TestRegression3361( - TestRegression3361&& x) noexcept; + TestRegression3361&& x) noexcept + { + m_uuid = std::move(x.m_uuid); + } /*! * @brief Copy assignment. * @param x Reference to the object TestRegression3361 that will be copied. */ eProsima_user_DllExport TestRegression3361& operator =( - const TestRegression3361& x); + const TestRegression3361& x) + { + + m_uuid = x.m_uuid; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object TestRegression3361 that will be copied. */ eProsima_user_DllExport TestRegression3361& operator =( - TestRegression3361&& x) noexcept; + TestRegression3361&& x) noexcept + { + + m_uuid = std::move(x.m_uuid); + return *this; + } /*! * @brief Comparison operator. * @param x TestRegression3361 object to compare. */ eProsima_user_DllExport bool operator ==( - const TestRegression3361& x) const; + const TestRegression3361& x) const + { + return (m_uuid == x.m_uuid); + } /*! * @brief Comparison operator. * @param x TestRegression3361 object to compare. */ eProsima_user_DllExport bool operator !=( - const TestRegression3361& x) const; + const TestRegression3361& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member uuid * @param _uuid New value to be copied in member uuid */ eProsima_user_DllExport void uuid( - const TestModule::MACHINEID& _uuid); + const TestModule::MACHINEID& _uuid) + { + m_uuid = _uuid; + } /*! * @brief This function moves the value in member uuid * @param _uuid New value to be moved in member uuid */ eProsima_user_DllExport void uuid( - TestModule::MACHINEID&& _uuid); + TestModule::MACHINEID&& _uuid) + { + m_uuid = std::move(_uuid); + } /*! * @brief This function returns a constant reference to member uuid * @return Constant reference to member uuid */ - eProsima_user_DllExport const TestModule::MACHINEID& uuid() const; + eProsima_user_DllExport const TestModule::MACHINEID& uuid() const + { + return m_uuid; + } /*! * @brief This function returns a reference to member uuid * @return Reference to member uuid */ - eProsima_user_DllExport TestModule::MACHINEID& uuid(); + eProsima_user_DllExport TestModule::MACHINEID& uuid() + { + return m_uuid; + } + + private: @@ -168,8 +201,6 @@ class TestRegression3361 }; -#endif // _FAST_DDS_GENERATED_TESTREGRESSION3361_H_ - +#endif // _FAST_DDS_GENERATED_TESTREGRESSION3361_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/TestRegression3361CdrAux.hpp b/test/blackbox/types/TestRegression3361CdrAux.hpp index 2f61ec53c58..f44467c9cfc 100644 --- a/test/blackbox/types/TestRegression3361CdrAux.hpp +++ b/test/blackbox/types/TestRegression3361CdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_TESTREGRESSION3361CDRAUX_HPP_ #define _FAST_DDS_GENERATED_TESTREGRESSION3361CDRAUX_HPP_ -#include "TestRegression3361.h" +#include "TestRegression3361.hpp" constexpr uint32_t TestRegression3361_max_cdr_typesize {264UL}; constexpr uint32_t TestRegression3361_max_key_cdr_typesize {0UL}; diff --git a/test/blackbox/types/TestRegression3361PubSubTypes.cxx b/test/blackbox/types/TestRegression3361PubSubTypes.cxx index b43c12a14b5..949b2b176dc 100644 --- a/test/blackbox/types/TestRegression3361PubSubTypes.cxx +++ b/test/blackbox/types/TestRegression3361PubSubTypes.cxx @@ -219,3 +219,6 @@ bool TestRegression3361PubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "TestRegression3361CdrAux.ipp" diff --git a/test/blackbox/types/TestRegression3361PubSubTypes.h b/test/blackbox/types/TestRegression3361PubSubTypes.h index a6c5be91dc5..a48ed768a81 100644 --- a/test/blackbox/types/TestRegression3361PubSubTypes.h +++ b/test/blackbox/types/TestRegression3361PubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "TestRegression3361.h" +#include "TestRegression3361.hpp" #include "TestIncludeRegression3361PubSubTypes.h" diff --git a/test/blackbox/types/TestRegression3361TypeObject.cxx b/test/blackbox/types/TestRegression3361TypeObject.cxx index 39450c3c9fd..e4e106705eb 100644 --- a/test/blackbox/types/TestRegression3361TypeObject.cxx +++ b/test/blackbox/types/TestRegression3361TypeObject.cxx @@ -24,7 +24,7 @@ namespace { char dummy; } #endif -#include "TestRegression3361.h" +#include "TestRegression3361.hpp" #include "TestRegression3361TypeObject.h" #include #include diff --git a/test/blackbox/types/TestRegression3361v1.cxx b/test/blackbox/types/TestRegression3361v1.cxx deleted file mode 100644 index 9ac400e6abb..00000000000 --- a/test/blackbox/types/TestRegression3361v1.cxx +++ /dev/null @@ -1,238 +0,0 @@ -// 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 TestRegression3361.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "TestRegression3361.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include "TestRegression3361TypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define TestRegression3361_max_cdr_typesize 264ULL; - - - - - -TestRegression3361::TestRegression3361() -{ - // TestModule::MACHINEID m_uuid - - - // Just to register all known types - registerTestRegression3361Types(); -} - -TestRegression3361::~TestRegression3361() -{ -} - -TestRegression3361::TestRegression3361( - const TestRegression3361& x) -{ - m_uuid = x.m_uuid; - -} - -TestRegression3361::TestRegression3361( - TestRegression3361&& x) noexcept -{ - m_uuid = std::move(x.m_uuid); - -} - -TestRegression3361& TestRegression3361::operator =( - const TestRegression3361& x) -{ - m_uuid = x.m_uuid; - - return *this; -} - -TestRegression3361& TestRegression3361::operator =( - TestRegression3361&& x) noexcept -{ - m_uuid = std::move(x.m_uuid); - - return *this; -} - -bool TestRegression3361::operator ==( - const TestRegression3361& x) const -{ - return (m_uuid == x.m_uuid); -} - -bool TestRegression3361::operator !=( - const TestRegression3361& x) const -{ - return !(*this == x); -} - -size_t TestRegression3361::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return TestRegression3361_max_cdr_typesize; -} - -size_t TestRegression3361::getCdrSerializedSize( - const TestRegression3361& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.uuid().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void TestRegression3361::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_uuid.c_str(); - -} - -void TestRegression3361::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_uuid; - - -} - - -bool TestRegression3361::isKeyDefined() -{ - return false; -} - -void TestRegression3361::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member uuid - * @param _uuid New value to be copied in member uuid - */ -void TestRegression3361::uuid( - const TestModule::MACHINEID& _uuid) -{ - m_uuid = _uuid; -} - -/*! - * @brief This function moves the value in member uuid - * @param _uuid New value to be moved in member uuid - */ -void TestRegression3361::uuid( - TestModule::MACHINEID&& _uuid) -{ - m_uuid = std::move(_uuid); -} - -/*! - * @brief This function returns a constant reference to member uuid - * @return Constant reference to member uuid - */ -const TestModule::MACHINEID& TestRegression3361::uuid() const -{ - return m_uuid; -} - -/*! - * @brief This function returns a reference to member uuid - * @return Reference to member uuid - */ -TestModule::MACHINEID& TestRegression3361::uuid() -{ - return m_uuid; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/TestRegression3361v1.h b/test/blackbox/types/TestRegression3361v1.h deleted file mode 100644 index 655f148ca89..00000000000 --- a/test/blackbox/types/TestRegression3361v1.h +++ /dev/null @@ -1,223 +0,0 @@ -// 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 TestRegression3361.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_TESTREGRESSION3361_H_ -#define _FAST_DDS_GENERATED_TESTREGRESSION3361_H_ - -#include "TestIncludeRegression3361.h" - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(TESTREGRESSION3361_SOURCE) -#define TESTREGRESSION3361_DllAPI __declspec( dllexport ) -#else -#define TESTREGRESSION3361_DllAPI __declspec( dllimport ) -#endif // TESTREGRESSION3361_SOURCE -#else -#define TESTREGRESSION3361_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define TESTREGRESSION3361_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure TestRegression3361 defined by the user in the IDL file. - * @ingroup TestRegression3361 - */ -class TestRegression3361 -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport TestRegression3361(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~TestRegression3361(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object TestRegression3361 that will be copied. - */ - eProsima_user_DllExport TestRegression3361( - const TestRegression3361& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object TestRegression3361 that will be copied. - */ - eProsima_user_DllExport TestRegression3361( - TestRegression3361&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object TestRegression3361 that will be copied. - */ - eProsima_user_DllExport TestRegression3361& operator =( - const TestRegression3361& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object TestRegression3361 that will be copied. - */ - eProsima_user_DllExport TestRegression3361& operator =( - TestRegression3361&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x TestRegression3361 object to compare. - */ - eProsima_user_DllExport bool operator ==( - const TestRegression3361& x) const; - - /*! - * @brief Comparison operator. - * @param x TestRegression3361 object to compare. - */ - eProsima_user_DllExport bool operator !=( - const TestRegression3361& x) const; - - /*! - * @brief This function copies the value in member uuid - * @param _uuid New value to be copied in member uuid - */ - eProsima_user_DllExport void uuid( - const TestModule::MACHINEID& _uuid); - - /*! - * @brief This function moves the value in member uuid - * @param _uuid New value to be moved in member uuid - */ - eProsima_user_DllExport void uuid( - TestModule::MACHINEID&& _uuid); - - /*! - * @brief This function returns a constant reference to member uuid - * @return Constant reference to member uuid - */ - eProsima_user_DllExport const TestModule::MACHINEID& uuid() const; - - /*! - * @brief This function returns a reference to member uuid - * @return Reference to member uuid - */ - eProsima_user_DllExport TestModule::MACHINEID& uuid(); - - - /*! - * @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 TestRegression3361& 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 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: - - TestModule::MACHINEID m_uuid; - -}; - - -#endif // _FAST_DDS_GENERATED_TESTREGRESSION3361_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/statistics/types.cxx b/test/blackbox/types/statistics/types.cxx deleted file mode 100644 index 9dcb86ef67b..00000000000 --- a/test/blackbox/types/statistics/types.cxx +++ /dev/null @@ -1,3211 +0,0 @@ -// 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 types.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "types.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - -namespace eprosima { - -namespace fastdds { - -namespace statistics { - -namespace detail { - - - -EntityId_s::EntityId_s() -{ -} - -EntityId_s::~EntityId_s() -{ -} - -EntityId_s::EntityId_s( - const EntityId_s& x) -{ - m_value = x.m_value; -} - -EntityId_s::EntityId_s( - EntityId_s&& x) noexcept -{ - m_value = std::move(x.m_value); -} - -EntityId_s& EntityId_s::operator =( - const EntityId_s& x) -{ - - m_value = x.m_value; - return *this; -} - -EntityId_s& EntityId_s::operator =( - EntityId_s&& x) noexcept -{ - - m_value = std::move(x.m_value); - return *this; -} - -bool EntityId_s::operator ==( - const EntityId_s& x) const -{ - return (m_value == x.m_value); -} - -bool EntityId_s::operator !=( - const EntityId_s& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ -void EntityId_s::value( - const std::array& _value) -{ - m_value = _value; -} - -/*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ -void EntityId_s::value( - std::array&& _value) -{ - m_value = std::move(_value); -} - -/*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ -const std::array& EntityId_s::value() const -{ - return m_value; -} - -/*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ -std::array& EntityId_s::value() -{ - return m_value; -} - - - - -GuidPrefix_s::GuidPrefix_s() -{ -} - -GuidPrefix_s::~GuidPrefix_s() -{ -} - -GuidPrefix_s::GuidPrefix_s( - const GuidPrefix_s& x) -{ - m_value = x.m_value; -} - -GuidPrefix_s::GuidPrefix_s( - GuidPrefix_s&& x) noexcept -{ - m_value = std::move(x.m_value); -} - -GuidPrefix_s& GuidPrefix_s::operator =( - const GuidPrefix_s& x) -{ - - m_value = x.m_value; - return *this; -} - -GuidPrefix_s& GuidPrefix_s::operator =( - GuidPrefix_s&& x) noexcept -{ - - m_value = std::move(x.m_value); - return *this; -} - -bool GuidPrefix_s::operator ==( - const GuidPrefix_s& x) const -{ - return (m_value == x.m_value); -} - -bool GuidPrefix_s::operator !=( - const GuidPrefix_s& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ -void GuidPrefix_s::value( - const std::array& _value) -{ - m_value = _value; -} - -/*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ -void GuidPrefix_s::value( - std::array&& _value) -{ - m_value = std::move(_value); -} - -/*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ -const std::array& GuidPrefix_s::value() const -{ - return m_value; -} - -/*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ -std::array& GuidPrefix_s::value() -{ - return m_value; -} - - - - -GUID_s::GUID_s() -{ -} - -GUID_s::~GUID_s() -{ -} - -GUID_s::GUID_s( - const GUID_s& x) -{ - m_guidPrefix = x.m_guidPrefix; - m_entityId = x.m_entityId; -} - -GUID_s::GUID_s( - GUID_s&& x) noexcept -{ - m_guidPrefix = std::move(x.m_guidPrefix); - m_entityId = std::move(x.m_entityId); -} - -GUID_s& GUID_s::operator =( - const GUID_s& x) -{ - - m_guidPrefix = x.m_guidPrefix; - m_entityId = x.m_entityId; - return *this; -} - -GUID_s& GUID_s::operator =( - GUID_s&& x) noexcept -{ - - m_guidPrefix = std::move(x.m_guidPrefix); - m_entityId = std::move(x.m_entityId); - return *this; -} - -bool GUID_s::operator ==( - const GUID_s& x) const -{ - return (m_guidPrefix == x.m_guidPrefix && - m_entityId == x.m_entityId); -} - -bool GUID_s::operator !=( - const GUID_s& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member guidPrefix - * @param _guidPrefix New value to be copied in member guidPrefix - */ -void GUID_s::guidPrefix( - const eprosima::fastdds::statistics::detail::GuidPrefix_s& _guidPrefix) -{ - m_guidPrefix = _guidPrefix; -} - -/*! - * @brief This function moves the value in member guidPrefix - * @param _guidPrefix New value to be moved in member guidPrefix - */ -void GUID_s::guidPrefix( - eprosima::fastdds::statistics::detail::GuidPrefix_s&& _guidPrefix) -{ - m_guidPrefix = std::move(_guidPrefix); -} - -/*! - * @brief This function returns a constant reference to member guidPrefix - * @return Constant reference to member guidPrefix - */ -const eprosima::fastdds::statistics::detail::GuidPrefix_s& GUID_s::guidPrefix() const -{ - return m_guidPrefix; -} - -/*! - * @brief This function returns a reference to member guidPrefix - * @return Reference to member guidPrefix - */ -eprosima::fastdds::statistics::detail::GuidPrefix_s& GUID_s::guidPrefix() -{ - return m_guidPrefix; -} - - -/*! - * @brief This function copies the value in member entityId - * @param _entityId New value to be copied in member entityId - */ -void GUID_s::entityId( - const eprosima::fastdds::statistics::detail::EntityId_s& _entityId) -{ - m_entityId = _entityId; -} - -/*! - * @brief This function moves the value in member entityId - * @param _entityId New value to be moved in member entityId - */ -void GUID_s::entityId( - eprosima::fastdds::statistics::detail::EntityId_s&& _entityId) -{ - m_entityId = std::move(_entityId); -} - -/*! - * @brief This function returns a constant reference to member entityId - * @return Constant reference to member entityId - */ -const eprosima::fastdds::statistics::detail::EntityId_s& GUID_s::entityId() const -{ - return m_entityId; -} - -/*! - * @brief This function returns a reference to member entityId - * @return Reference to member entityId - */ -eprosima::fastdds::statistics::detail::EntityId_s& GUID_s::entityId() -{ - return m_entityId; -} - - - - -SequenceNumber_s::SequenceNumber_s() -{ -} - -SequenceNumber_s::~SequenceNumber_s() -{ -} - -SequenceNumber_s::SequenceNumber_s( - const SequenceNumber_s& x) -{ - m_high = x.m_high; - m_low = x.m_low; -} - -SequenceNumber_s::SequenceNumber_s( - SequenceNumber_s&& x) noexcept -{ - m_high = x.m_high; - m_low = x.m_low; -} - -SequenceNumber_s& SequenceNumber_s::operator =( - const SequenceNumber_s& x) -{ - - m_high = x.m_high; - m_low = x.m_low; - return *this; -} - -SequenceNumber_s& SequenceNumber_s::operator =( - SequenceNumber_s&& x) noexcept -{ - - m_high = x.m_high; - m_low = x.m_low; - return *this; -} - -bool SequenceNumber_s::operator ==( - const SequenceNumber_s& x) const -{ - return (m_high == x.m_high && - m_low == x.m_low); -} - -bool SequenceNumber_s::operator !=( - const SequenceNumber_s& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member high - * @param _high New value for member high - */ -void SequenceNumber_s::high( - int32_t _high) -{ - m_high = _high; -} - -/*! - * @brief This function returns the value of member high - * @return Value of member high - */ -int32_t SequenceNumber_s::high() const -{ - return m_high; -} - -/*! - * @brief This function returns a reference to member high - * @return Reference to member high - */ -int32_t& SequenceNumber_s::high() -{ - return m_high; -} - - -/*! - * @brief This function sets a value in member low - * @param _low New value for member low - */ -void SequenceNumber_s::low( - uint32_t _low) -{ - m_low = _low; -} - -/*! - * @brief This function returns the value of member low - * @return Value of member low - */ -uint32_t SequenceNumber_s::low() const -{ - return m_low; -} - -/*! - * @brief This function returns a reference to member low - * @return Reference to member low - */ -uint32_t& SequenceNumber_s::low() -{ - return m_low; -} - - - - -SampleIdentity_s::SampleIdentity_s() -{ -} - -SampleIdentity_s::~SampleIdentity_s() -{ -} - -SampleIdentity_s::SampleIdentity_s( - const SampleIdentity_s& x) -{ - m_writer_guid = x.m_writer_guid; - m_sequence_number = x.m_sequence_number; -} - -SampleIdentity_s::SampleIdentity_s( - SampleIdentity_s&& x) noexcept -{ - m_writer_guid = std::move(x.m_writer_guid); - m_sequence_number = std::move(x.m_sequence_number); -} - -SampleIdentity_s& SampleIdentity_s::operator =( - const SampleIdentity_s& x) -{ - - m_writer_guid = x.m_writer_guid; - m_sequence_number = x.m_sequence_number; - return *this; -} - -SampleIdentity_s& SampleIdentity_s::operator =( - SampleIdentity_s&& x) noexcept -{ - - m_writer_guid = std::move(x.m_writer_guid); - m_sequence_number = std::move(x.m_sequence_number); - return *this; -} - -bool SampleIdentity_s::operator ==( - const SampleIdentity_s& x) const -{ - return (m_writer_guid == x.m_writer_guid && - m_sequence_number == x.m_sequence_number); -} - -bool SampleIdentity_s::operator !=( - const SampleIdentity_s& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ -void SampleIdentity_s::writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid) -{ - m_writer_guid = _writer_guid; -} - -/*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ -void SampleIdentity_s::writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid) -{ - m_writer_guid = std::move(_writer_guid); -} - -/*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& SampleIdentity_s::writer_guid() const -{ - return m_writer_guid; -} - -/*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& SampleIdentity_s::writer_guid() -{ - return m_writer_guid; -} - - -/*! - * @brief This function copies the value in member sequence_number - * @param _sequence_number New value to be copied in member sequence_number - */ -void SampleIdentity_s::sequence_number( - const eprosima::fastdds::statistics::detail::SequenceNumber_s& _sequence_number) -{ - m_sequence_number = _sequence_number; -} - -/*! - * @brief This function moves the value in member sequence_number - * @param _sequence_number New value to be moved in member sequence_number - */ -void SampleIdentity_s::sequence_number( - eprosima::fastdds::statistics::detail::SequenceNumber_s&& _sequence_number) -{ - m_sequence_number = std::move(_sequence_number); -} - -/*! - * @brief This function returns a constant reference to member sequence_number - * @return Constant reference to member sequence_number - */ -const eprosima::fastdds::statistics::detail::SequenceNumber_s& SampleIdentity_s::sequence_number() const -{ - return m_sequence_number; -} - -/*! - * @brief This function returns a reference to member sequence_number - * @return Reference to member sequence_number - */ -eprosima::fastdds::statistics::detail::SequenceNumber_s& SampleIdentity_s::sequence_number() -{ - return m_sequence_number; -} - - - - -Locator_s::Locator_s() -{ -} - -Locator_s::~Locator_s() -{ -} - -Locator_s::Locator_s( - const Locator_s& x) -{ - m_kind = x.m_kind; - m_port = x.m_port; - m_address = x.m_address; -} - -Locator_s::Locator_s( - Locator_s&& x) noexcept -{ - m_kind = x.m_kind; - m_port = x.m_port; - m_address = std::move(x.m_address); -} - -Locator_s& Locator_s::operator =( - const Locator_s& x) -{ - - m_kind = x.m_kind; - m_port = x.m_port; - m_address = x.m_address; - return *this; -} - -Locator_s& Locator_s::operator =( - Locator_s&& x) noexcept -{ - - m_kind = x.m_kind; - m_port = x.m_port; - m_address = std::move(x.m_address); - return *this; -} - -bool Locator_s::operator ==( - const Locator_s& x) const -{ - return (m_kind == x.m_kind && - m_port == x.m_port && - m_address == x.m_address); -} - -bool Locator_s::operator !=( - const Locator_s& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member kind - * @param _kind New value for member kind - */ -void Locator_s::kind( - int32_t _kind) -{ - m_kind = _kind; -} - -/*! - * @brief This function returns the value of member kind - * @return Value of member kind - */ -int32_t Locator_s::kind() const -{ - return m_kind; -} - -/*! - * @brief This function returns a reference to member kind - * @return Reference to member kind - */ -int32_t& Locator_s::kind() -{ - return m_kind; -} - - -/*! - * @brief This function sets a value in member port - * @param _port New value for member port - */ -void Locator_s::port( - uint32_t _port) -{ - m_port = _port; -} - -/*! - * @brief This function returns the value of member port - * @return Value of member port - */ -uint32_t Locator_s::port() const -{ - return m_port; -} - -/*! - * @brief This function returns a reference to member port - * @return Reference to member port - */ -uint32_t& Locator_s::port() -{ - return m_port; -} - - -/*! - * @brief This function copies the value in member address - * @param _address New value to be copied in member address - */ -void Locator_s::address( - const std::array& _address) -{ - m_address = _address; -} - -/*! - * @brief This function moves the value in member address - * @param _address New value to be moved in member address - */ -void Locator_s::address( - std::array&& _address) -{ - m_address = std::move(_address); -} - -/*! - * @brief This function returns a constant reference to member address - * @return Constant reference to member address - */ -const std::array& Locator_s::address() const -{ - return m_address; -} - -/*! - * @brief This function returns a reference to member address - * @return Reference to member address - */ -std::array& Locator_s::address() -{ - return m_address; -} - - - - -} // namespace detail - - -DiscoveryTime::DiscoveryTime() -{ -} - -DiscoveryTime::~DiscoveryTime() -{ -} - -DiscoveryTime::DiscoveryTime( - const DiscoveryTime& x) -{ - m_local_participant_guid = x.m_local_participant_guid; - m_remote_entity_guid = x.m_remote_entity_guid; - m_time = x.m_time; - m_host = x.m_host; - m_user = x.m_user; - m_process = x.m_process; -} - -DiscoveryTime::DiscoveryTime( - DiscoveryTime&& x) noexcept -{ - m_local_participant_guid = std::move(x.m_local_participant_guid); - m_remote_entity_guid = std::move(x.m_remote_entity_guid); - m_time = x.m_time; - m_host = std::move(x.m_host); - m_user = std::move(x.m_user); - m_process = std::move(x.m_process); -} - -DiscoveryTime& DiscoveryTime::operator =( - const DiscoveryTime& x) -{ - - m_local_participant_guid = x.m_local_participant_guid; - m_remote_entity_guid = x.m_remote_entity_guid; - m_time = x.m_time; - m_host = x.m_host; - m_user = x.m_user; - m_process = x.m_process; - return *this; -} - -DiscoveryTime& DiscoveryTime::operator =( - DiscoveryTime&& x) noexcept -{ - - m_local_participant_guid = std::move(x.m_local_participant_guid); - m_remote_entity_guid = std::move(x.m_remote_entity_guid); - m_time = x.m_time; - m_host = std::move(x.m_host); - m_user = std::move(x.m_user); - m_process = std::move(x.m_process); - return *this; -} - -bool DiscoveryTime::operator ==( - const DiscoveryTime& x) const -{ - return (m_local_participant_guid == x.m_local_participant_guid && - m_remote_entity_guid == x.m_remote_entity_guid && - m_time == x.m_time && - m_host == x.m_host && - m_user == x.m_user && - m_process == x.m_process); -} - -bool DiscoveryTime::operator !=( - const DiscoveryTime& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member local_participant_guid - * @param _local_participant_guid New value to be copied in member local_participant_guid - */ -void DiscoveryTime::local_participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _local_participant_guid) -{ - m_local_participant_guid = _local_participant_guid; -} - -/*! - * @brief This function moves the value in member local_participant_guid - * @param _local_participant_guid New value to be moved in member local_participant_guid - */ -void DiscoveryTime::local_participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _local_participant_guid) -{ - m_local_participant_guid = std::move(_local_participant_guid); -} - -/*! - * @brief This function returns a constant reference to member local_participant_guid - * @return Constant reference to member local_participant_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::local_participant_guid() const -{ - return m_local_participant_guid; -} - -/*! - * @brief This function returns a reference to member local_participant_guid - * @return Reference to member local_participant_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::local_participant_guid() -{ - return m_local_participant_guid; -} - - -/*! - * @brief This function copies the value in member remote_entity_guid - * @param _remote_entity_guid New value to be copied in member remote_entity_guid - */ -void DiscoveryTime::remote_entity_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _remote_entity_guid) -{ - m_remote_entity_guid = _remote_entity_guid; -} - -/*! - * @brief This function moves the value in member remote_entity_guid - * @param _remote_entity_guid New value to be moved in member remote_entity_guid - */ -void DiscoveryTime::remote_entity_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _remote_entity_guid) -{ - m_remote_entity_guid = std::move(_remote_entity_guid); -} - -/*! - * @brief This function returns a constant reference to member remote_entity_guid - * @return Constant reference to member remote_entity_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::remote_entity_guid() const -{ - return m_remote_entity_guid; -} - -/*! - * @brief This function returns a reference to member remote_entity_guid - * @return Reference to member remote_entity_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::remote_entity_guid() -{ - return m_remote_entity_guid; -} - - -/*! - * @brief This function sets a value in member time - * @param _time New value for member time - */ -void DiscoveryTime::time( - uint64_t _time) -{ - m_time = _time; -} - -/*! - * @brief This function returns the value of member time - * @return Value of member time - */ -uint64_t DiscoveryTime::time() const -{ - return m_time; -} - -/*! - * @brief This function returns a reference to member time - * @return Reference to member time - */ -uint64_t& DiscoveryTime::time() -{ - return m_time; -} - - -/*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ -void DiscoveryTime::host( - const std::string& _host) -{ - m_host = _host; -} - -/*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ -void DiscoveryTime::host( - std::string&& _host) -{ - m_host = std::move(_host); -} - -/*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ -const std::string& DiscoveryTime::host() const -{ - return m_host; -} - -/*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ -std::string& DiscoveryTime::host() -{ - return m_host; -} - - -/*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ -void DiscoveryTime::user( - const std::string& _user) -{ - m_user = _user; -} - -/*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ -void DiscoveryTime::user( - std::string&& _user) -{ - m_user = std::move(_user); -} - -/*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ -const std::string& DiscoveryTime::user() const -{ - return m_user; -} - -/*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ -std::string& DiscoveryTime::user() -{ - return m_user; -} - - -/*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ -void DiscoveryTime::process( - const std::string& _process) -{ - m_process = _process; -} - -/*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ -void DiscoveryTime::process( - std::string&& _process) -{ - m_process = std::move(_process); -} - -/*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ -const std::string& DiscoveryTime::process() const -{ - return m_process; -} - -/*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ -std::string& DiscoveryTime::process() -{ - return m_process; -} - - - - -EntityCount::EntityCount() -{ -} - -EntityCount::~EntityCount() -{ -} - -EntityCount::EntityCount( - const EntityCount& x) -{ - m_guid = x.m_guid; - m_count = x.m_count; -} - -EntityCount::EntityCount( - EntityCount&& x) noexcept -{ - m_guid = std::move(x.m_guid); - m_count = x.m_count; -} - -EntityCount& EntityCount::operator =( - const EntityCount& x) -{ - - m_guid = x.m_guid; - m_count = x.m_count; - return *this; -} - -EntityCount& EntityCount::operator =( - EntityCount&& x) noexcept -{ - - m_guid = std::move(x.m_guid); - m_count = x.m_count; - return *this; -} - -bool EntityCount::operator ==( - const EntityCount& x) const -{ - return (m_guid == x.m_guid && - m_count == x.m_count); -} - -bool EntityCount::operator !=( - const EntityCount& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ -void EntityCount::guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid) -{ - m_guid = _guid; -} - -/*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ -void EntityCount::guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid) -{ - m_guid = std::move(_guid); -} - -/*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& EntityCount::guid() const -{ - return m_guid; -} - -/*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ -eprosima::fastdds::statistics::detail::GUID_s& EntityCount::guid() -{ - return m_guid; -} - - -/*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ -void EntityCount::count( - uint64_t _count) -{ - m_count = _count; -} - -/*! - * @brief This function returns the value of member count - * @return Value of member count - */ -uint64_t EntityCount::count() const -{ - return m_count; -} - -/*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ -uint64_t& EntityCount::count() -{ - return m_count; -} - - - - -SampleIdentityCount::SampleIdentityCount() -{ -} - -SampleIdentityCount::~SampleIdentityCount() -{ -} - -SampleIdentityCount::SampleIdentityCount( - const SampleIdentityCount& x) -{ - m_sample_id = x.m_sample_id; - m_count = x.m_count; -} - -SampleIdentityCount::SampleIdentityCount( - SampleIdentityCount&& x) noexcept -{ - m_sample_id = std::move(x.m_sample_id); - m_count = x.m_count; -} - -SampleIdentityCount& SampleIdentityCount::operator =( - const SampleIdentityCount& x) -{ - - m_sample_id = x.m_sample_id; - m_count = x.m_count; - return *this; -} - -SampleIdentityCount& SampleIdentityCount::operator =( - SampleIdentityCount&& x) noexcept -{ - - m_sample_id = std::move(x.m_sample_id); - m_count = x.m_count; - return *this; -} - -bool SampleIdentityCount::operator ==( - const SampleIdentityCount& x) const -{ - return (m_sample_id == x.m_sample_id && - m_count == x.m_count); -} - -bool SampleIdentityCount::operator !=( - const SampleIdentityCount& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member sample_id - * @param _sample_id New value to be copied in member sample_id - */ -void SampleIdentityCount::sample_id( - const eprosima::fastdds::statistics::detail::SampleIdentity_s& _sample_id) -{ - m_sample_id = _sample_id; -} - -/*! - * @brief This function moves the value in member sample_id - * @param _sample_id New value to be moved in member sample_id - */ -void SampleIdentityCount::sample_id( - eprosima::fastdds::statistics::detail::SampleIdentity_s&& _sample_id) -{ - m_sample_id = std::move(_sample_id); -} - -/*! - * @brief This function returns a constant reference to member sample_id - * @return Constant reference to member sample_id - */ -const eprosima::fastdds::statistics::detail::SampleIdentity_s& SampleIdentityCount::sample_id() const -{ - return m_sample_id; -} - -/*! - * @brief This function returns a reference to member sample_id - * @return Reference to member sample_id - */ -eprosima::fastdds::statistics::detail::SampleIdentity_s& SampleIdentityCount::sample_id() -{ - return m_sample_id; -} - - -/*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ -void SampleIdentityCount::count( - uint64_t _count) -{ - m_count = _count; -} - -/*! - * @brief This function returns the value of member count - * @return Value of member count - */ -uint64_t SampleIdentityCount::count() const -{ - return m_count; -} - -/*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ -uint64_t& SampleIdentityCount::count() -{ - return m_count; -} - - - - -Entity2LocatorTraffic::Entity2LocatorTraffic() -{ -} - -Entity2LocatorTraffic::~Entity2LocatorTraffic() -{ -} - -Entity2LocatorTraffic::Entity2LocatorTraffic( - const Entity2LocatorTraffic& x) -{ - m_src_guid = x.m_src_guid; - m_dst_locator = x.m_dst_locator; - m_packet_count = x.m_packet_count; - m_byte_count = x.m_byte_count; - m_byte_magnitude_order = x.m_byte_magnitude_order; -} - -Entity2LocatorTraffic::Entity2LocatorTraffic( - Entity2LocatorTraffic&& x) noexcept -{ - m_src_guid = std::move(x.m_src_guid); - m_dst_locator = std::move(x.m_dst_locator); - m_packet_count = x.m_packet_count; - m_byte_count = x.m_byte_count; - m_byte_magnitude_order = x.m_byte_magnitude_order; -} - -Entity2LocatorTraffic& Entity2LocatorTraffic::operator =( - const Entity2LocatorTraffic& x) -{ - - m_src_guid = x.m_src_guid; - m_dst_locator = x.m_dst_locator; - m_packet_count = x.m_packet_count; - m_byte_count = x.m_byte_count; - m_byte_magnitude_order = x.m_byte_magnitude_order; - return *this; -} - -Entity2LocatorTraffic& Entity2LocatorTraffic::operator =( - Entity2LocatorTraffic&& x) noexcept -{ - - m_src_guid = std::move(x.m_src_guid); - m_dst_locator = std::move(x.m_dst_locator); - m_packet_count = x.m_packet_count; - m_byte_count = x.m_byte_count; - m_byte_magnitude_order = x.m_byte_magnitude_order; - return *this; -} - -bool Entity2LocatorTraffic::operator ==( - const Entity2LocatorTraffic& x) const -{ - return (m_src_guid == x.m_src_guid && - m_dst_locator == x.m_dst_locator && - m_packet_count == x.m_packet_count && - m_byte_count == x.m_byte_count && - m_byte_magnitude_order == x.m_byte_magnitude_order); -} - -bool Entity2LocatorTraffic::operator !=( - const Entity2LocatorTraffic& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member src_guid - * @param _src_guid New value to be copied in member src_guid - */ -void Entity2LocatorTraffic::src_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _src_guid) -{ - m_src_guid = _src_guid; -} - -/*! - * @brief This function moves the value in member src_guid - * @param _src_guid New value to be moved in member src_guid - */ -void Entity2LocatorTraffic::src_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _src_guid) -{ - m_src_guid = std::move(_src_guid); -} - -/*! - * @brief This function returns a constant reference to member src_guid - * @return Constant reference to member src_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& Entity2LocatorTraffic::src_guid() const -{ - return m_src_guid; -} - -/*! - * @brief This function returns a reference to member src_guid - * @return Reference to member src_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& Entity2LocatorTraffic::src_guid() -{ - return m_src_guid; -} - - -/*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ -void Entity2LocatorTraffic::dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator) -{ - m_dst_locator = _dst_locator; -} - -/*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ -void Entity2LocatorTraffic::dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator) -{ - m_dst_locator = std::move(_dst_locator); -} - -/*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ -const eprosima::fastdds::statistics::detail::Locator_s& Entity2LocatorTraffic::dst_locator() const -{ - return m_dst_locator; -} - -/*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ -eprosima::fastdds::statistics::detail::Locator_s& Entity2LocatorTraffic::dst_locator() -{ - return m_dst_locator; -} - - -/*! - * @brief This function sets a value in member packet_count - * @param _packet_count New value for member packet_count - */ -void Entity2LocatorTraffic::packet_count( - uint64_t _packet_count) -{ - m_packet_count = _packet_count; -} - -/*! - * @brief This function returns the value of member packet_count - * @return Value of member packet_count - */ -uint64_t Entity2LocatorTraffic::packet_count() const -{ - return m_packet_count; -} - -/*! - * @brief This function returns a reference to member packet_count - * @return Reference to member packet_count - */ -uint64_t& Entity2LocatorTraffic::packet_count() -{ - return m_packet_count; -} - - -/*! - * @brief This function sets a value in member byte_count - * @param _byte_count New value for member byte_count - */ -void Entity2LocatorTraffic::byte_count( - uint64_t _byte_count) -{ - m_byte_count = _byte_count; -} - -/*! - * @brief This function returns the value of member byte_count - * @return Value of member byte_count - */ -uint64_t Entity2LocatorTraffic::byte_count() const -{ - return m_byte_count; -} - -/*! - * @brief This function returns a reference to member byte_count - * @return Reference to member byte_count - */ -uint64_t& Entity2LocatorTraffic::byte_count() -{ - return m_byte_count; -} - - -/*! - * @brief This function sets a value in member byte_magnitude_order - * @param _byte_magnitude_order New value for member byte_magnitude_order - */ -void Entity2LocatorTraffic::byte_magnitude_order( - int16_t _byte_magnitude_order) -{ - m_byte_magnitude_order = _byte_magnitude_order; -} - -/*! - * @brief This function returns the value of member byte_magnitude_order - * @return Value of member byte_magnitude_order - */ -int16_t Entity2LocatorTraffic::byte_magnitude_order() const -{ - return m_byte_magnitude_order; -} - -/*! - * @brief This function returns a reference to member byte_magnitude_order - * @return Reference to member byte_magnitude_order - */ -int16_t& Entity2LocatorTraffic::byte_magnitude_order() -{ - return m_byte_magnitude_order; -} - - - - -WriterReaderData::WriterReaderData() -{ -} - -WriterReaderData::~WriterReaderData() -{ -} - -WriterReaderData::WriterReaderData( - const WriterReaderData& x) -{ - m_writer_guid = x.m_writer_guid; - m_reader_guid = x.m_reader_guid; - m_data = x.m_data; -} - -WriterReaderData::WriterReaderData( - WriterReaderData&& x) noexcept -{ - m_writer_guid = std::move(x.m_writer_guid); - m_reader_guid = std::move(x.m_reader_guid); - m_data = x.m_data; -} - -WriterReaderData& WriterReaderData::operator =( - const WriterReaderData& x) -{ - - m_writer_guid = x.m_writer_guid; - m_reader_guid = x.m_reader_guid; - m_data = x.m_data; - return *this; -} - -WriterReaderData& WriterReaderData::operator =( - WriterReaderData&& x) noexcept -{ - - m_writer_guid = std::move(x.m_writer_guid); - m_reader_guid = std::move(x.m_reader_guid); - m_data = x.m_data; - return *this; -} - -bool WriterReaderData::operator ==( - const WriterReaderData& x) const -{ - return (m_writer_guid == x.m_writer_guid && - m_reader_guid == x.m_reader_guid && - m_data == x.m_data); -} - -bool WriterReaderData::operator !=( - const WriterReaderData& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ -void WriterReaderData::writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid) -{ - m_writer_guid = _writer_guid; -} - -/*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ -void WriterReaderData::writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid) -{ - m_writer_guid = std::move(_writer_guid); -} - -/*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::writer_guid() const -{ - return m_writer_guid; -} - -/*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::writer_guid() -{ - return m_writer_guid; -} - - -/*! - * @brief This function copies the value in member reader_guid - * @param _reader_guid New value to be copied in member reader_guid - */ -void WriterReaderData::reader_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _reader_guid) -{ - m_reader_guid = _reader_guid; -} - -/*! - * @brief This function moves the value in member reader_guid - * @param _reader_guid New value to be moved in member reader_guid - */ -void WriterReaderData::reader_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _reader_guid) -{ - m_reader_guid = std::move(_reader_guid); -} - -/*! - * @brief This function returns a constant reference to member reader_guid - * @return Constant reference to member reader_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::reader_guid() const -{ - return m_reader_guid; -} - -/*! - * @brief This function returns a reference to member reader_guid - * @return Reference to member reader_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::reader_guid() -{ - return m_reader_guid; -} - - -/*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ -void WriterReaderData::data( - float _data) -{ - m_data = _data; -} - -/*! - * @brief This function returns the value of member data - * @return Value of member data - */ -float WriterReaderData::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -float& WriterReaderData::data() -{ - return m_data; -} - - - - -Locator2LocatorData::Locator2LocatorData() -{ -} - -Locator2LocatorData::~Locator2LocatorData() -{ -} - -Locator2LocatorData::Locator2LocatorData( - const Locator2LocatorData& x) -{ - m_src_locator = x.m_src_locator; - m_dst_locator = x.m_dst_locator; - m_data = x.m_data; -} - -Locator2LocatorData::Locator2LocatorData( - Locator2LocatorData&& x) noexcept -{ - m_src_locator = std::move(x.m_src_locator); - m_dst_locator = std::move(x.m_dst_locator); - m_data = x.m_data; -} - -Locator2LocatorData& Locator2LocatorData::operator =( - const Locator2LocatorData& x) -{ - - m_src_locator = x.m_src_locator; - m_dst_locator = x.m_dst_locator; - m_data = x.m_data; - return *this; -} - -Locator2LocatorData& Locator2LocatorData::operator =( - Locator2LocatorData&& x) noexcept -{ - - m_src_locator = std::move(x.m_src_locator); - m_dst_locator = std::move(x.m_dst_locator); - m_data = x.m_data; - return *this; -} - -bool Locator2LocatorData::operator ==( - const Locator2LocatorData& x) const -{ - return (m_src_locator == x.m_src_locator && - m_dst_locator == x.m_dst_locator && - m_data == x.m_data); -} - -bool Locator2LocatorData::operator !=( - const Locator2LocatorData& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member src_locator - * @param _src_locator New value to be copied in member src_locator - */ -void Locator2LocatorData::src_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _src_locator) -{ - m_src_locator = _src_locator; -} - -/*! - * @brief This function moves the value in member src_locator - * @param _src_locator New value to be moved in member src_locator - */ -void Locator2LocatorData::src_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _src_locator) -{ - m_src_locator = std::move(_src_locator); -} - -/*! - * @brief This function returns a constant reference to member src_locator - * @return Constant reference to member src_locator - */ -const eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::src_locator() const -{ - return m_src_locator; -} - -/*! - * @brief This function returns a reference to member src_locator - * @return Reference to member src_locator - */ -eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::src_locator() -{ - return m_src_locator; -} - - -/*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ -void Locator2LocatorData::dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator) -{ - m_dst_locator = _dst_locator; -} - -/*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ -void Locator2LocatorData::dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator) -{ - m_dst_locator = std::move(_dst_locator); -} - -/*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ -const eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::dst_locator() const -{ - return m_dst_locator; -} - -/*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ -eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::dst_locator() -{ - return m_dst_locator; -} - - -/*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ -void Locator2LocatorData::data( - float _data) -{ - m_data = _data; -} - -/*! - * @brief This function returns the value of member data - * @return Value of member data - */ -float Locator2LocatorData::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -float& Locator2LocatorData::data() -{ - return m_data; -} - - - - -EntityData::EntityData() -{ -} - -EntityData::~EntityData() -{ -} - -EntityData::EntityData( - const EntityData& x) -{ - m_guid = x.m_guid; - m_data = x.m_data; -} - -EntityData::EntityData( - EntityData&& x) noexcept -{ - m_guid = std::move(x.m_guid); - m_data = x.m_data; -} - -EntityData& EntityData::operator =( - const EntityData& x) -{ - - m_guid = x.m_guid; - m_data = x.m_data; - return *this; -} - -EntityData& EntityData::operator =( - EntityData&& x) noexcept -{ - - m_guid = std::move(x.m_guid); - m_data = x.m_data; - return *this; -} - -bool EntityData::operator ==( - const EntityData& x) const -{ - return (m_guid == x.m_guid && - m_data == x.m_data); -} - -bool EntityData::operator !=( - const EntityData& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ -void EntityData::guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid) -{ - m_guid = _guid; -} - -/*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ -void EntityData::guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid) -{ - m_guid = std::move(_guid); -} - -/*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& EntityData::guid() const -{ - return m_guid; -} - -/*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ -eprosima::fastdds::statistics::detail::GUID_s& EntityData::guid() -{ - return m_guid; -} - - -/*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ -void EntityData::data( - float _data) -{ - m_data = _data; -} - -/*! - * @brief This function returns the value of member data - * @return Value of member data - */ -float EntityData::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -float& EntityData::data() -{ - return m_data; -} - - - - -PhysicalData::PhysicalData() -{ -} - -PhysicalData::~PhysicalData() -{ -} - -PhysicalData::PhysicalData( - const PhysicalData& x) -{ - m_participant_guid = x.m_participant_guid; - m_host = x.m_host; - m_user = x.m_user; - m_process = x.m_process; -} - -PhysicalData::PhysicalData( - PhysicalData&& x) noexcept -{ - m_participant_guid = std::move(x.m_participant_guid); - m_host = std::move(x.m_host); - m_user = std::move(x.m_user); - m_process = std::move(x.m_process); -} - -PhysicalData& PhysicalData::operator =( - const PhysicalData& x) -{ - - m_participant_guid = x.m_participant_guid; - m_host = x.m_host; - m_user = x.m_user; - m_process = x.m_process; - return *this; -} - -PhysicalData& PhysicalData::operator =( - PhysicalData&& x) noexcept -{ - - m_participant_guid = std::move(x.m_participant_guid); - m_host = std::move(x.m_host); - m_user = std::move(x.m_user); - m_process = std::move(x.m_process); - return *this; -} - -bool PhysicalData::operator ==( - const PhysicalData& x) const -{ - return (m_participant_guid == x.m_participant_guid && - m_host == x.m_host && - m_user == x.m_user && - m_process == x.m_process); -} - -bool PhysicalData::operator !=( - const PhysicalData& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member participant_guid - * @param _participant_guid New value to be copied in member participant_guid - */ -void PhysicalData::participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _participant_guid) -{ - m_participant_guid = _participant_guid; -} - -/*! - * @brief This function moves the value in member participant_guid - * @param _participant_guid New value to be moved in member participant_guid - */ -void PhysicalData::participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _participant_guid) -{ - m_participant_guid = std::move(_participant_guid); -} - -/*! - * @brief This function returns a constant reference to member participant_guid - * @return Constant reference to member participant_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& PhysicalData::participant_guid() const -{ - return m_participant_guid; -} - -/*! - * @brief This function returns a reference to member participant_guid - * @return Reference to member participant_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& PhysicalData::participant_guid() -{ - return m_participant_guid; -} - - -/*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ -void PhysicalData::host( - const std::string& _host) -{ - m_host = _host; -} - -/*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ -void PhysicalData::host( - std::string&& _host) -{ - m_host = std::move(_host); -} - -/*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ -const std::string& PhysicalData::host() const -{ - return m_host; -} - -/*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ -std::string& PhysicalData::host() -{ - return m_host; -} - - -/*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ -void PhysicalData::user( - const std::string& _user) -{ - m_user = _user; -} - -/*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ -void PhysicalData::user( - std::string&& _user) -{ - m_user = std::move(_user); -} - -/*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ -const std::string& PhysicalData::user() const -{ - return m_user; -} - -/*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ -std::string& PhysicalData::user() -{ - return m_user; -} - - -/*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ -void PhysicalData::process( - const std::string& _process) -{ - m_process = _process; -} - -/*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ -void PhysicalData::process( - std::string&& _process) -{ - m_process = std::move(_process); -} - -/*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ -const std::string& PhysicalData::process() const -{ - return m_process; -} - -/*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ -std::string& PhysicalData::process() -{ - return m_process; -} - - - - - -Data::Data() -{ - m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; -} - -Data::~Data() -{ -} - -Data::Data( - const Data& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = x.m_writer_reader_data; - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = x.m_locator2locator_data; - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = x.m_entity_data; - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = x.m_entity2locator_traffic; - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = x.m_entity_count; - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = x.m_discovery_time; - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = x.m_sample_identity_count; - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = x.m_physical_data; - break; - - default: - break; - } -} - -Data::Data( - Data&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = std::move(x.m_writer_reader_data); - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = std::move(x.m_locator2locator_data); - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = std::move(x.m_entity_data); - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = std::move(x.m_entity2locator_traffic); - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = std::move(x.m_entity_count); - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = std::move(x.m_discovery_time); - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = std::move(x.m_sample_identity_count); - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = std::move(x.m_physical_data); - - break; - - default: - break; - } -} - -Data& Data::operator =( - const Data& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = x.m_writer_reader_data; - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = x.m_locator2locator_data; - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = x.m_entity_data; - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = x.m_entity2locator_traffic; - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = x.m_entity_count; - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = x.m_discovery_time; - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = x.m_sample_identity_count; - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = x.m_physical_data; - break; - - default: - break; - } - - return *this; -} - -Data& Data::operator =( - Data&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = std::move(x.m_writer_reader_data); - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = std::move(x.m_locator2locator_data); - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = std::move(x.m_entity_data); - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = std::move(x.m_entity2locator_traffic); - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = std::move(x.m_entity_count); - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = std::move(x.m_discovery_time); - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = std::move(x.m_sample_identity_count); - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = std::move(x.m_physical_data); - - break; - - default: - break; - } - - return *this; -} - -bool Data::operator ==( - const Data& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - return (m_writer_reader_data == x.m_writer_reader_data); - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - return (m_locator2locator_data == x.m_locator2locator_data); - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - return (m_entity_data == x.m_entity_data); - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - return (m_entity2locator_traffic == x.m_entity2locator_traffic); - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - return (m_entity_count == x.m_entity_count); - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - return (m_discovery_time == x.m_discovery_time); - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - return (m_sample_identity_count == x.m_sample_identity_count); - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - return (m_physical_data == x.m_physical_data); - break; - - default: - break; - } - return false; -} - -bool Data::operator !=( - const Data& x) const -{ - return !(*this == x); -} - -void Data::_d( - eprosima::fastdds::statistics::EventKind __d) -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - switch (__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - switch (__d) - { - case eprosima::fastdds::statistics::NETWORK_LATENCY: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - switch (__d) - { - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - switch (__d) - { - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - switch (__d) - { - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - switch (__d) - { - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - switch (__d) - { - case eprosima::fastdds::statistics::SAMPLE_DATAS: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - switch (__d) - { - case eprosima::fastdds::statistics::PHYSICAL_DATA: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -eprosima::fastdds::statistics::EventKind Data::_d() const -{ - return m__d; -} - -eprosima::fastdds::statistics::EventKind& Data::_d() -{ - return m__d; -} - -void Data::writer_reader_data( - const eprosima::fastdds::statistics::WriterReaderData& _writer_reader_data) -{ - m_writer_reader_data = _writer_reader_data; - m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; - -} - -void Data::writer_reader_data( - eprosima::fastdds::statistics::WriterReaderData&& _writer_reader_data) -{ - m_writer_reader_data = std::move(_writer_reader_data); - m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; - -} - -const eprosima::fastdds::statistics::WriterReaderData& Data::writer_reader_data() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_writer_reader_data; -} - -eprosima::fastdds::statistics::WriterReaderData& Data::writer_reader_data() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_writer_reader_data; -} - - -void Data::locator2locator_data( - const eprosima::fastdds::statistics::Locator2LocatorData& _locator2locator_data) -{ - m_locator2locator_data = _locator2locator_data; - m__d = eprosima::fastdds::statistics::NETWORK_LATENCY; - -} - -void Data::locator2locator_data( - eprosima::fastdds::statistics::Locator2LocatorData&& _locator2locator_data) -{ - m_locator2locator_data = std::move(_locator2locator_data); - m__d = eprosima::fastdds::statistics::NETWORK_LATENCY; - -} - -const eprosima::fastdds::statistics::Locator2LocatorData& Data::locator2locator_data() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::NETWORK_LATENCY: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_locator2locator_data; -} - -eprosima::fastdds::statistics::Locator2LocatorData& Data::locator2locator_data() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::NETWORK_LATENCY: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_locator2locator_data; -} - - -void Data::entity_data( - const eprosima::fastdds::statistics::EntityData& _entity_data) -{ - m_entity_data = _entity_data; - m__d = eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT; - -} - -void Data::entity_data( - eprosima::fastdds::statistics::EntityData&& _entity_data) -{ - m_entity_data = std::move(_entity_data); - m__d = eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT; - -} - -const eprosima::fastdds::statistics::EntityData& Data::entity_data() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_data; -} - -eprosima::fastdds::statistics::EntityData& Data::entity_data() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_data; -} - - -void Data::entity2locator_traffic( - const eprosima::fastdds::statistics::Entity2LocatorTraffic& _entity2locator_traffic) -{ - m_entity2locator_traffic = _entity2locator_traffic; - m__d = eprosima::fastdds::statistics::RTPS_SENT; - -} - -void Data::entity2locator_traffic( - eprosima::fastdds::statistics::Entity2LocatorTraffic&& _entity2locator_traffic) -{ - m_entity2locator_traffic = std::move(_entity2locator_traffic); - m__d = eprosima::fastdds::statistics::RTPS_SENT; - -} - -const eprosima::fastdds::statistics::Entity2LocatorTraffic& Data::entity2locator_traffic() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity2locator_traffic; -} - -eprosima::fastdds::statistics::Entity2LocatorTraffic& Data::entity2locator_traffic() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity2locator_traffic; -} - - -void Data::entity_count( - const eprosima::fastdds::statistics::EntityCount& _entity_count) -{ - m_entity_count = _entity_count; - m__d = eprosima::fastdds::statistics::RESENT_DATAS; - -} - -void Data::entity_count( - eprosima::fastdds::statistics::EntityCount&& _entity_count) -{ - m_entity_count = std::move(_entity_count); - m__d = eprosima::fastdds::statistics::RESENT_DATAS; - -} - -const eprosima::fastdds::statistics::EntityCount& Data::entity_count() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_count; -} - -eprosima::fastdds::statistics::EntityCount& Data::entity_count() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_count; -} - - -void Data::discovery_time( - const eprosima::fastdds::statistics::DiscoveryTime& _discovery_time) -{ - m_discovery_time = _discovery_time; - m__d = eprosima::fastdds::statistics::DISCOVERED_ENTITY; - -} - -void Data::discovery_time( - eprosima::fastdds::statistics::DiscoveryTime&& _discovery_time) -{ - m_discovery_time = std::move(_discovery_time); - m__d = eprosima::fastdds::statistics::DISCOVERED_ENTITY; - -} - -const eprosima::fastdds::statistics::DiscoveryTime& Data::discovery_time() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_discovery_time; -} - -eprosima::fastdds::statistics::DiscoveryTime& Data::discovery_time() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_discovery_time; -} - - -void Data::sample_identity_count( - const eprosima::fastdds::statistics::SampleIdentityCount& _sample_identity_count) -{ - m_sample_identity_count = _sample_identity_count; - m__d = eprosima::fastdds::statistics::SAMPLE_DATAS; - -} - -void Data::sample_identity_count( - eprosima::fastdds::statistics::SampleIdentityCount&& _sample_identity_count) -{ - m_sample_identity_count = std::move(_sample_identity_count); - m__d = eprosima::fastdds::statistics::SAMPLE_DATAS; - -} - -const eprosima::fastdds::statistics::SampleIdentityCount& Data::sample_identity_count() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::SAMPLE_DATAS: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_sample_identity_count; -} - -eprosima::fastdds::statistics::SampleIdentityCount& Data::sample_identity_count() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::SAMPLE_DATAS: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_sample_identity_count; -} - - -void Data::physical_data( - const eprosima::fastdds::statistics::PhysicalData& _physical_data) -{ - m_physical_data = _physical_data; - m__d = eprosima::fastdds::statistics::PHYSICAL_DATA; - -} - -void Data::physical_data( - eprosima::fastdds::statistics::PhysicalData&& _physical_data) -{ - m_physical_data = std::move(_physical_data); - m__d = eprosima::fastdds::statistics::PHYSICAL_DATA; - -} - -const eprosima::fastdds::statistics::PhysicalData& Data::physical_data() const -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::PHYSICAL_DATA: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_physical_data; -} - -eprosima::fastdds::statistics::PhysicalData& Data::physical_data() -{ - bool b = false; - - switch (m__d) - { - case eprosima::fastdds::statistics::PHYSICAL_DATA: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_physical_data; -} - - - - -} // namespace statistics - - -} // namespace fastdds - - -} // namespace eprosima -// Include auxiliary functions like for serializing/deserializing. -#include "typesCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/statistics/types.h b/test/blackbox/types/statistics/types.h deleted file mode 100644 index c51a79f2044..00000000000 --- a/test/blackbox/types/statistics/types.h +++ /dev/null @@ -1,2331 +0,0 @@ -// 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 types.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include -#include "typesv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_H_ -#define _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_H_ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(TYPES_SOURCE) -#define TYPES_DllAPI __declspec( dllexport ) -#else -#define TYPES_DllAPI __declspec( dllimport ) -#endif // TYPES_SOURCE -#else -#define TYPES_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define TYPES_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - -namespace eprosima { - -namespace fastdds { - -namespace statistics { - -namespace detail { - - - -/*! - * @brief This class represents the structure EntityId_s defined by the user in the IDL file. - * @ingroup types - */ -class EntityId_s -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EntityId_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EntityId_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s( - const EntityId_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s( - EntityId_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s& operator =( - const EntityId_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s& operator =( - EntityId_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::EntityId_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EntityId_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::EntityId_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EntityId_s& x) const; - - /*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ - eProsima_user_DllExport void value( - const std::array& _value); - - /*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ - eProsima_user_DllExport void value( - std::array&& _value); - - /*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ - eProsima_user_DllExport const std::array& value() const; - - /*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ - eProsima_user_DllExport std::array& value(); - -private: - - std::array m_value{0}; - -}; - - -/*! - * @brief This class represents the structure GuidPrefix_s defined by the user in the IDL file. - * @ingroup types - */ -class GuidPrefix_s -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport GuidPrefix_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~GuidPrefix_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s( - const GuidPrefix_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s( - GuidPrefix_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s& operator =( - const GuidPrefix_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s& operator =( - GuidPrefix_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GuidPrefix_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const GuidPrefix_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GuidPrefix_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const GuidPrefix_s& x) const; - - /*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ - eProsima_user_DllExport void value( - const std::array& _value); - - /*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ - eProsima_user_DllExport void value( - std::array&& _value); - - /*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ - eProsima_user_DllExport const std::array& value() const; - - /*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ - eProsima_user_DllExport std::array& value(); - -private: - - std::array m_value{0}; - -}; - - -/*! - * @brief This class represents the structure GUID_s defined by the user in the IDL file. - * @ingroup types - */ -class GUID_s -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport GUID_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~GUID_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s( - const GUID_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s( - GUID_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s& operator =( - const GUID_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s& operator =( - GUID_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GUID_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const GUID_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GUID_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const GUID_s& x) const; - - /*! - * @brief This function copies the value in member guidPrefix - * @param _guidPrefix New value to be copied in member guidPrefix - */ - eProsima_user_DllExport void guidPrefix( - const eprosima::fastdds::statistics::detail::GuidPrefix_s& _guidPrefix); - - /*! - * @brief This function moves the value in member guidPrefix - * @param _guidPrefix New value to be moved in member guidPrefix - */ - eProsima_user_DllExport void guidPrefix( - eprosima::fastdds::statistics::detail::GuidPrefix_s&& _guidPrefix); - - /*! - * @brief This function returns a constant reference to member guidPrefix - * @return Constant reference to member guidPrefix - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GuidPrefix_s& guidPrefix() const; - - /*! - * @brief This function returns a reference to member guidPrefix - * @return Reference to member guidPrefix - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GuidPrefix_s& guidPrefix(); - - - /*! - * @brief This function copies the value in member entityId - * @param _entityId New value to be copied in member entityId - */ - eProsima_user_DllExport void entityId( - const eprosima::fastdds::statistics::detail::EntityId_s& _entityId); - - /*! - * @brief This function moves the value in member entityId - * @param _entityId New value to be moved in member entityId - */ - eProsima_user_DllExport void entityId( - eprosima::fastdds::statistics::detail::EntityId_s&& _entityId); - - /*! - * @brief This function returns a constant reference to member entityId - * @return Constant reference to member entityId - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::EntityId_s& entityId() const; - - /*! - * @brief This function returns a reference to member entityId - * @return Reference to member entityId - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::EntityId_s& entityId(); - -private: - - eprosima::fastdds::statistics::detail::GuidPrefix_s m_guidPrefix; - eprosima::fastdds::statistics::detail::EntityId_s m_entityId; - -}; - - -/*! - * @brief This class represents the structure SequenceNumber_s defined by the user in the IDL file. - * @ingroup types - */ -class SequenceNumber_s -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceNumber_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceNumber_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s( - const SequenceNumber_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s( - SequenceNumber_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s& operator =( - const SequenceNumber_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s& operator =( - SequenceNumber_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SequenceNumber_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceNumber_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SequenceNumber_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceNumber_s& x) const; - - /*! - * @brief This function sets a value in member high - * @param _high New value for member high - */ - eProsima_user_DllExport void high( - int32_t _high); - - /*! - * @brief This function returns the value of member high - * @return Value of member high - */ - eProsima_user_DllExport int32_t high() const; - - /*! - * @brief This function returns a reference to member high - * @return Reference to member high - */ - eProsima_user_DllExport int32_t& high(); - - - /*! - * @brief This function sets a value in member low - * @param _low New value for member low - */ - eProsima_user_DllExport void low( - uint32_t _low); - - /*! - * @brief This function returns the value of member low - * @return Value of member low - */ - eProsima_user_DllExport uint32_t low() const; - - /*! - * @brief This function returns a reference to member low - * @return Reference to member low - */ - eProsima_user_DllExport uint32_t& low(); - -private: - - int32_t m_high{0}; - uint32_t m_low{0}; - -}; - - -/*! - * @brief This class represents the structure SampleIdentity_s defined by the user in the IDL file. - * @ingroup types - */ -class SampleIdentity_s -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SampleIdentity_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SampleIdentity_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s( - const SampleIdentity_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s( - SampleIdentity_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s& operator =( - const SampleIdentity_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s& operator =( - SampleIdentity_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SampleIdentity_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SampleIdentity_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SampleIdentity_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SampleIdentity_s& x) const; - - /*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid); - - /*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid); - - /*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& writer_guid() const; - - /*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& writer_guid(); - - - /*! - * @brief This function copies the value in member sequence_number - * @param _sequence_number New value to be copied in member sequence_number - */ - eProsima_user_DllExport void sequence_number( - const eprosima::fastdds::statistics::detail::SequenceNumber_s& _sequence_number); - - /*! - * @brief This function moves the value in member sequence_number - * @param _sequence_number New value to be moved in member sequence_number - */ - eProsima_user_DllExport void sequence_number( - eprosima::fastdds::statistics::detail::SequenceNumber_s&& _sequence_number); - - /*! - * @brief This function returns a constant reference to member sequence_number - * @return Constant reference to member sequence_number - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::SequenceNumber_s& sequence_number() const; - - /*! - * @brief This function returns a reference to member sequence_number - * @return Reference to member sequence_number - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::SequenceNumber_s& sequence_number(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_writer_guid; - eprosima::fastdds::statistics::detail::SequenceNumber_s m_sequence_number; - -}; - - -/*! - * @brief This class represents the structure Locator_s defined by the user in the IDL file. - * @ingroup types - */ -class Locator_s -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Locator_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Locator_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s( - const Locator_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s( - Locator_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s& operator =( - const Locator_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s& operator =( - Locator_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::Locator_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Locator_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::Locator_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Locator_s& x) const; - - /*! - * @brief This function sets a value in member kind - * @param _kind New value for member kind - */ - eProsima_user_DllExport void kind( - int32_t _kind); - - /*! - * @brief This function returns the value of member kind - * @return Value of member kind - */ - eProsima_user_DllExport int32_t kind() const; - - /*! - * @brief This function returns a reference to member kind - * @return Reference to member kind - */ - eProsima_user_DllExport int32_t& kind(); - - - /*! - * @brief This function sets a value in member port - * @param _port New value for member port - */ - eProsima_user_DllExport void port( - uint32_t _port); - - /*! - * @brief This function returns the value of member port - * @return Value of member port - */ - eProsima_user_DllExport uint32_t port() const; - - /*! - * @brief This function returns a reference to member port - * @return Reference to member port - */ - eProsima_user_DllExport uint32_t& port(); - - - /*! - * @brief This function copies the value in member address - * @param _address New value to be copied in member address - */ - eProsima_user_DllExport void address( - const std::array& _address); - - /*! - * @brief This function moves the value in member address - * @param _address New value to be moved in member address - */ - eProsima_user_DllExport void address( - std::array&& _address); - - /*! - * @brief This function returns a constant reference to member address - * @return Constant reference to member address - */ - eProsima_user_DllExport const std::array& address() const; - - /*! - * @brief This function returns a reference to member address - * @return Reference to member address - */ - eProsima_user_DllExport std::array& address(); - -private: - - int32_t m_kind{0}; - uint32_t m_port{0}; - std::array m_address{0}; - -}; - -} // namespace detail - - -/*! - * @brief This class represents the structure DiscoveryTime defined by the user in the IDL file. - * @ingroup types - */ -class DiscoveryTime -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport DiscoveryTime(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~DiscoveryTime(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime( - const DiscoveryTime& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime( - DiscoveryTime&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime& operator =( - const DiscoveryTime& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime& operator =( - DiscoveryTime&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::DiscoveryTime object to compare. - */ - eProsima_user_DllExport bool operator ==( - const DiscoveryTime& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::DiscoveryTime object to compare. - */ - eProsima_user_DllExport bool operator !=( - const DiscoveryTime& x) const; - - /*! - * @brief This function copies the value in member local_participant_guid - * @param _local_participant_guid New value to be copied in member local_participant_guid - */ - eProsima_user_DllExport void local_participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _local_participant_guid); - - /*! - * @brief This function moves the value in member local_participant_guid - * @param _local_participant_guid New value to be moved in member local_participant_guid - */ - eProsima_user_DllExport void local_participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _local_participant_guid); - - /*! - * @brief This function returns a constant reference to member local_participant_guid - * @return Constant reference to member local_participant_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& local_participant_guid() const; - - /*! - * @brief This function returns a reference to member local_participant_guid - * @return Reference to member local_participant_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& local_participant_guid(); - - - /*! - * @brief This function copies the value in member remote_entity_guid - * @param _remote_entity_guid New value to be copied in member remote_entity_guid - */ - eProsima_user_DllExport void remote_entity_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _remote_entity_guid); - - /*! - * @brief This function moves the value in member remote_entity_guid - * @param _remote_entity_guid New value to be moved in member remote_entity_guid - */ - eProsima_user_DllExport void remote_entity_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _remote_entity_guid); - - /*! - * @brief This function returns a constant reference to member remote_entity_guid - * @return Constant reference to member remote_entity_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& remote_entity_guid() const; - - /*! - * @brief This function returns a reference to member remote_entity_guid - * @return Reference to member remote_entity_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& remote_entity_guid(); - - - /*! - * @brief This function sets a value in member time - * @param _time New value for member time - */ - eProsima_user_DllExport void time( - uint64_t _time); - - /*! - * @brief This function returns the value of member time - * @return Value of member time - */ - eProsima_user_DllExport uint64_t time() const; - - /*! - * @brief This function returns a reference to member time - * @return Reference to member time - */ - eProsima_user_DllExport uint64_t& time(); - - - /*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ - eProsima_user_DllExport void host( - const std::string& _host); - - /*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ - eProsima_user_DllExport void host( - std::string&& _host); - - /*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ - eProsima_user_DllExport const std::string& host() const; - - /*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ - eProsima_user_DllExport std::string& host(); - - - /*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ - eProsima_user_DllExport void user( - const std::string& _user); - - /*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ - eProsima_user_DllExport void user( - std::string&& _user); - - /*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ - eProsima_user_DllExport const std::string& user() const; - - /*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ - eProsima_user_DllExport std::string& user(); - - - /*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ - eProsima_user_DllExport void process( - const std::string& _process); - - /*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ - eProsima_user_DllExport void process( - std::string&& _process); - - /*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ - eProsima_user_DllExport const std::string& process() const; - - /*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ - eProsima_user_DllExport std::string& process(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_local_participant_guid; - eprosima::fastdds::statistics::detail::GUID_s m_remote_entity_guid; - uint64_t m_time{0}; - std::string m_host; - std::string m_user; - std::string m_process; - -}; - - -/*! - * @brief This class represents the structure EntityCount defined by the user in the IDL file. - * @ingroup types - */ -class EntityCount -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EntityCount(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EntityCount(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount( - const EntityCount& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount( - EntityCount&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount& operator =( - const EntityCount& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount& operator =( - EntityCount&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityCount object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EntityCount& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityCount object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EntityCount& x) const; - - /*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ - eProsima_user_DllExport void guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid); - - /*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ - eProsima_user_DllExport void guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid); - - /*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& guid() const; - - /*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& guid(); - - - /*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ - eProsima_user_DllExport void count( - uint64_t _count); - - /*! - * @brief This function returns the value of member count - * @return Value of member count - */ - eProsima_user_DllExport uint64_t count() const; - - /*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ - eProsima_user_DllExport uint64_t& count(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_guid; - uint64_t m_count{0}; - -}; - - -/*! - * @brief This class represents the structure SampleIdentityCount defined by the user in the IDL file. - * @ingroup types - */ -class SampleIdentityCount -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SampleIdentityCount(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SampleIdentityCount(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount( - const SampleIdentityCount& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount( - SampleIdentityCount&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount& operator =( - const SampleIdentityCount& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount& operator =( - SampleIdentityCount&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::SampleIdentityCount object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SampleIdentityCount& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::SampleIdentityCount object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SampleIdentityCount& x) const; - - /*! - * @brief This function copies the value in member sample_id - * @param _sample_id New value to be copied in member sample_id - */ - eProsima_user_DllExport void sample_id( - const eprosima::fastdds::statistics::detail::SampleIdentity_s& _sample_id); - - /*! - * @brief This function moves the value in member sample_id - * @param _sample_id New value to be moved in member sample_id - */ - eProsima_user_DllExport void sample_id( - eprosima::fastdds::statistics::detail::SampleIdentity_s&& _sample_id); - - /*! - * @brief This function returns a constant reference to member sample_id - * @return Constant reference to member sample_id - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::SampleIdentity_s& sample_id() const; - - /*! - * @brief This function returns a reference to member sample_id - * @return Reference to member sample_id - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::SampleIdentity_s& sample_id(); - - - /*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ - eProsima_user_DllExport void count( - uint64_t _count); - - /*! - * @brief This function returns the value of member count - * @return Value of member count - */ - eProsima_user_DllExport uint64_t count() const; - - /*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ - eProsima_user_DllExport uint64_t& count(); - -private: - - eprosima::fastdds::statistics::detail::SampleIdentity_s m_sample_id; - uint64_t m_count{0}; - -}; - - -/*! - * @brief This class represents the structure Entity2LocatorTraffic defined by the user in the IDL file. - * @ingroup types - */ -class Entity2LocatorTraffic -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Entity2LocatorTraffic(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Entity2LocatorTraffic(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic( - const Entity2LocatorTraffic& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic( - Entity2LocatorTraffic&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic& operator =( - const Entity2LocatorTraffic& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic& operator =( - Entity2LocatorTraffic&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Entity2LocatorTraffic object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Entity2LocatorTraffic& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Entity2LocatorTraffic object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Entity2LocatorTraffic& x) const; - - /*! - * @brief This function copies the value in member src_guid - * @param _src_guid New value to be copied in member src_guid - */ - eProsima_user_DllExport void src_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _src_guid); - - /*! - * @brief This function moves the value in member src_guid - * @param _src_guid New value to be moved in member src_guid - */ - eProsima_user_DllExport void src_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _src_guid); - - /*! - * @brief This function returns a constant reference to member src_guid - * @return Constant reference to member src_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& src_guid() const; - - /*! - * @brief This function returns a reference to member src_guid - * @return Reference to member src_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& src_guid(); - - - /*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator); - - /*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator); - - /*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::Locator_s& dst_locator() const; - - /*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::Locator_s& dst_locator(); - - - /*! - * @brief This function sets a value in member packet_count - * @param _packet_count New value for member packet_count - */ - eProsima_user_DllExport void packet_count( - uint64_t _packet_count); - - /*! - * @brief This function returns the value of member packet_count - * @return Value of member packet_count - */ - eProsima_user_DllExport uint64_t packet_count() const; - - /*! - * @brief This function returns a reference to member packet_count - * @return Reference to member packet_count - */ - eProsima_user_DllExport uint64_t& packet_count(); - - - /*! - * @brief This function sets a value in member byte_count - * @param _byte_count New value for member byte_count - */ - eProsima_user_DllExport void byte_count( - uint64_t _byte_count); - - /*! - * @brief This function returns the value of member byte_count - * @return Value of member byte_count - */ - eProsima_user_DllExport uint64_t byte_count() const; - - /*! - * @brief This function returns a reference to member byte_count - * @return Reference to member byte_count - */ - eProsima_user_DllExport uint64_t& byte_count(); - - - /*! - * @brief This function sets a value in member byte_magnitude_order - * @param _byte_magnitude_order New value for member byte_magnitude_order - */ - eProsima_user_DllExport void byte_magnitude_order( - int16_t _byte_magnitude_order); - - /*! - * @brief This function returns the value of member byte_magnitude_order - * @return Value of member byte_magnitude_order - */ - eProsima_user_DllExport int16_t byte_magnitude_order() const; - - /*! - * @brief This function returns a reference to member byte_magnitude_order - * @return Reference to member byte_magnitude_order - */ - eProsima_user_DllExport int16_t& byte_magnitude_order(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_src_guid; - eprosima::fastdds::statistics::detail::Locator_s m_dst_locator; - uint64_t m_packet_count{0}; - uint64_t m_byte_count{0}; - int16_t m_byte_magnitude_order{0}; - -}; - - -/*! - * @brief This class represents the structure WriterReaderData defined by the user in the IDL file. - * @ingroup types - */ -class WriterReaderData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport WriterReaderData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~WriterReaderData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData( - const WriterReaderData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData( - WriterReaderData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData& operator =( - const WriterReaderData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData& operator =( - WriterReaderData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::WriterReaderData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const WriterReaderData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::WriterReaderData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const WriterReaderData& x) const; - - /*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid); - - /*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid); - - /*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& writer_guid() const; - - /*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& writer_guid(); - - - /*! - * @brief This function copies the value in member reader_guid - * @param _reader_guid New value to be copied in member reader_guid - */ - eProsima_user_DllExport void reader_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _reader_guid); - - /*! - * @brief This function moves the value in member reader_guid - * @param _reader_guid New value to be moved in member reader_guid - */ - eProsima_user_DllExport void reader_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _reader_guid); - - /*! - * @brief This function returns a constant reference to member reader_guid - * @return Constant reference to member reader_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& reader_guid() const; - - /*! - * @brief This function returns a reference to member reader_guid - * @return Reference to member reader_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& reader_guid(); - - - /*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ - eProsima_user_DllExport void data( - float _data); - - /*! - * @brief This function returns the value of member data - * @return Value of member data - */ - eProsima_user_DllExport float data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport float& data(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_writer_guid; - eprosima::fastdds::statistics::detail::GUID_s m_reader_guid; - float m_data{0.0}; - -}; - - -/*! - * @brief This class represents the structure Locator2LocatorData defined by the user in the IDL file. - * @ingroup types - */ -class Locator2LocatorData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Locator2LocatorData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Locator2LocatorData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData( - const Locator2LocatorData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData( - Locator2LocatorData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData& operator =( - const Locator2LocatorData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData& operator =( - Locator2LocatorData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Locator2LocatorData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Locator2LocatorData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Locator2LocatorData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Locator2LocatorData& x) const; - - /*! - * @brief This function copies the value in member src_locator - * @param _src_locator New value to be copied in member src_locator - */ - eProsima_user_DllExport void src_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _src_locator); - - /*! - * @brief This function moves the value in member src_locator - * @param _src_locator New value to be moved in member src_locator - */ - eProsima_user_DllExport void src_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _src_locator); - - /*! - * @brief This function returns a constant reference to member src_locator - * @return Constant reference to member src_locator - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::Locator_s& src_locator() const; - - /*! - * @brief This function returns a reference to member src_locator - * @return Reference to member src_locator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::Locator_s& src_locator(); - - - /*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator); - - /*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator); - - /*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::Locator_s& dst_locator() const; - - /*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::Locator_s& dst_locator(); - - - /*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ - eProsima_user_DllExport void data( - float _data); - - /*! - * @brief This function returns the value of member data - * @return Value of member data - */ - eProsima_user_DllExport float data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport float& data(); - -private: - - eprosima::fastdds::statistics::detail::Locator_s m_src_locator; - eprosima::fastdds::statistics::detail::Locator_s m_dst_locator; - float m_data{0.0}; - -}; - - -/*! - * @brief This class represents the structure EntityData defined by the user in the IDL file. - * @ingroup types - */ -class EntityData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EntityData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EntityData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData( - const EntityData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData( - EntityData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData& operator =( - const EntityData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData& operator =( - EntityData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EntityData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EntityData& x) const; - - /*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ - eProsima_user_DllExport void guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid); - - /*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ - eProsima_user_DllExport void guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid); - - /*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& guid() const; - - /*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& guid(); - - - /*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ - eProsima_user_DllExport void data( - float _data); - - /*! - * @brief This function returns the value of member data - * @return Value of member data - */ - eProsima_user_DllExport float data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport float& data(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_guid; - float m_data{0.0}; - -}; - - -/*! - * @brief This class represents the structure PhysicalData defined by the user in the IDL file. - * @ingroup types - */ -class PhysicalData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport PhysicalData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~PhysicalData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData( - const PhysicalData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData( - PhysicalData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData& operator =( - const PhysicalData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData& operator =( - PhysicalData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::PhysicalData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const PhysicalData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::PhysicalData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const PhysicalData& x) const; - - /*! - * @brief This function copies the value in member participant_guid - * @param _participant_guid New value to be copied in member participant_guid - */ - eProsima_user_DllExport void participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _participant_guid); - - /*! - * @brief This function moves the value in member participant_guid - * @param _participant_guid New value to be moved in member participant_guid - */ - eProsima_user_DllExport void participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _participant_guid); - - /*! - * @brief This function returns a constant reference to member participant_guid - * @return Constant reference to member participant_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& participant_guid() const; - - /*! - * @brief This function returns a reference to member participant_guid - * @return Reference to member participant_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& participant_guid(); - - - /*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ - eProsima_user_DllExport void host( - const std::string& _host); - - /*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ - eProsima_user_DllExport void host( - std::string&& _host); - - /*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ - eProsima_user_DllExport const std::string& host() const; - - /*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ - eProsima_user_DllExport std::string& host(); - - - /*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ - eProsima_user_DllExport void user( - const std::string& _user); - - /*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ - eProsima_user_DllExport void user( - std::string&& _user); - - /*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ - eProsima_user_DllExport const std::string& user() const; - - /*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ - eProsima_user_DllExport std::string& user(); - - - /*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ - eProsima_user_DllExport void process( - const std::string& _process); - - /*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ - eProsima_user_DllExport void process( - std::string&& _process); - - /*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ - eProsima_user_DllExport const std::string& process() const; - - /*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ - eProsima_user_DllExport std::string& process(); - -private: - - eprosima::fastdds::statistics::detail::GUID_s m_participant_guid; - std::string m_host; - std::string m_user; - std::string m_process; - -}; -/*! - * @brief This enumeration represents the EventKind bitflags defined by the user in the IDL file. - * @ingroup types - */ -enum EventKindBits : uint32_t -{ - HISTORY2HISTORY_LATENCY = 0x01ull << 0, - NETWORK_LATENCY = 0x01ull << 1, - PUBLICATION_THROUGHPUT = 0x01ull << 2, - SUBSCRIPTION_THROUGHPUT = 0x01ull << 3, - RTPS_SENT = 0x01ull << 4, - RTPS_LOST = 0x01ull << 5, - RESENT_DATAS = 0x01ull << 6, - HEARTBEAT_COUNT = 0x01ull << 7, - ACKNACK_COUNT = 0x01ull << 8, - NACKFRAG_COUNT = 0x01ull << 9, - GAP_COUNT = 0x01ull << 10, - DATA_COUNT = 0x01ull << 11, - PDP_PACKETS = 0x01ull << 12, - EDP_PACKETS = 0x01ull << 13, - DISCOVERED_ENTITY = 0x01ull << 14, - SAMPLE_DATAS = 0x01ull << 15, - PHYSICAL_DATA = 0x01ull << 16 -}; -typedef uint32_t EventKind; - - -/*! - * @brief This class represents the union Data defined by the user in the IDL file. - * @ingroup types - */ -class Data -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Data(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Data(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data( - const Data& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data( - Data&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data& operator =( - const Data& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data& operator =( - Data&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Data object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Data& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Data object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Data& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - eprosima::fastdds::statistics::EventKind __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EventKind _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EventKind& _d(); - - /*! - * @brief This function copies the value in member writer_reader_data - * @param _writer_reader_data New value to be copied in member writer_reader_data - */ - eProsima_user_DllExport void writer_reader_data( - const eprosima::fastdds::statistics::WriterReaderData& _writer_reader_data); - - /*! - * @brief This function moves the value in member writer_reader_data - * @param _writer_reader_data New value to be moved in member writer_reader_data - */ - eProsima_user_DllExport void writer_reader_data( - eprosima::fastdds::statistics::WriterReaderData&& _writer_reader_data); - - /*! - * @brief This function returns a constant reference to member writer_reader_data - * @return Constant reference to member writer_reader_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::WriterReaderData& writer_reader_data() const; - - /*! - * @brief This function returns a reference to member writer_reader_data - * @return Reference to member writer_reader_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::WriterReaderData& writer_reader_data(); - - - /*! - * @brief This function copies the value in member locator2locator_data - * @param _locator2locator_data New value to be copied in member locator2locator_data - */ - eProsima_user_DllExport void locator2locator_data( - const eprosima::fastdds::statistics::Locator2LocatorData& _locator2locator_data); - - /*! - * @brief This function moves the value in member locator2locator_data - * @param _locator2locator_data New value to be moved in member locator2locator_data - */ - eProsima_user_DllExport void locator2locator_data( - eprosima::fastdds::statistics::Locator2LocatorData&& _locator2locator_data); - - /*! - * @brief This function returns a constant reference to member locator2locator_data - * @return Constant reference to member locator2locator_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::Locator2LocatorData& locator2locator_data() const; - - /*! - * @brief This function returns a reference to member locator2locator_data - * @return Reference to member locator2locator_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::Locator2LocatorData& locator2locator_data(); - - - /*! - * @brief This function copies the value in member entity_data - * @param _entity_data New value to be copied in member entity_data - */ - eProsima_user_DllExport void entity_data( - const eprosima::fastdds::statistics::EntityData& _entity_data); - - /*! - * @brief This function moves the value in member entity_data - * @param _entity_data New value to be moved in member entity_data - */ - eProsima_user_DllExport void entity_data( - eprosima::fastdds::statistics::EntityData&& _entity_data); - - /*! - * @brief This function returns a constant reference to member entity_data - * @return Constant reference to member entity_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::EntityData& entity_data() const; - - /*! - * @brief This function returns a reference to member entity_data - * @return Reference to member entity_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EntityData& entity_data(); - - - /*! - * @brief This function copies the value in member entity2locator_traffic - * @param _entity2locator_traffic New value to be copied in member entity2locator_traffic - */ - eProsima_user_DllExport void entity2locator_traffic( - const eprosima::fastdds::statistics::Entity2LocatorTraffic& _entity2locator_traffic); - - /*! - * @brief This function moves the value in member entity2locator_traffic - * @param _entity2locator_traffic New value to be moved in member entity2locator_traffic - */ - eProsima_user_DllExport void entity2locator_traffic( - eprosima::fastdds::statistics::Entity2LocatorTraffic&& _entity2locator_traffic); - - /*! - * @brief This function returns a constant reference to member entity2locator_traffic - * @return Constant reference to member entity2locator_traffic - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::Entity2LocatorTraffic& entity2locator_traffic() const; - - /*! - * @brief This function returns a reference to member entity2locator_traffic - * @return Reference to member entity2locator_traffic - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::Entity2LocatorTraffic& entity2locator_traffic(); - - - /*! - * @brief This function copies the value in member entity_count - * @param _entity_count New value to be copied in member entity_count - */ - eProsima_user_DllExport void entity_count( - const eprosima::fastdds::statistics::EntityCount& _entity_count); - - /*! - * @brief This function moves the value in member entity_count - * @param _entity_count New value to be moved in member entity_count - */ - eProsima_user_DllExport void entity_count( - eprosima::fastdds::statistics::EntityCount&& _entity_count); - - /*! - * @brief This function returns a constant reference to member entity_count - * @return Constant reference to member entity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::EntityCount& entity_count() const; - - /*! - * @brief This function returns a reference to member entity_count - * @return Reference to member entity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EntityCount& entity_count(); - - - /*! - * @brief This function copies the value in member discovery_time - * @param _discovery_time New value to be copied in member discovery_time - */ - eProsima_user_DllExport void discovery_time( - const eprosima::fastdds::statistics::DiscoveryTime& _discovery_time); - - /*! - * @brief This function moves the value in member discovery_time - * @param _discovery_time New value to be moved in member discovery_time - */ - eProsima_user_DllExport void discovery_time( - eprosima::fastdds::statistics::DiscoveryTime&& _discovery_time); - - /*! - * @brief This function returns a constant reference to member discovery_time - * @return Constant reference to member discovery_time - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::DiscoveryTime& discovery_time() const; - - /*! - * @brief This function returns a reference to member discovery_time - * @return Reference to member discovery_time - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::DiscoveryTime& discovery_time(); - - - /*! - * @brief This function copies the value in member sample_identity_count - * @param _sample_identity_count New value to be copied in member sample_identity_count - */ - eProsima_user_DllExport void sample_identity_count( - const eprosima::fastdds::statistics::SampleIdentityCount& _sample_identity_count); - - /*! - * @brief This function moves the value in member sample_identity_count - * @param _sample_identity_count New value to be moved in member sample_identity_count - */ - eProsima_user_DllExport void sample_identity_count( - eprosima::fastdds::statistics::SampleIdentityCount&& _sample_identity_count); - - /*! - * @brief This function returns a constant reference to member sample_identity_count - * @return Constant reference to member sample_identity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::SampleIdentityCount& sample_identity_count() const; - - /*! - * @brief This function returns a reference to member sample_identity_count - * @return Reference to member sample_identity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::SampleIdentityCount& sample_identity_count(); - - - /*! - * @brief This function copies the value in member physical_data - * @param _physical_data New value to be copied in member physical_data - */ - eProsima_user_DllExport void physical_data( - const eprosima::fastdds::statistics::PhysicalData& _physical_data); - - /*! - * @brief This function moves the value in member physical_data - * @param _physical_data New value to be moved in member physical_data - */ - eProsima_user_DllExport void physical_data( - eprosima::fastdds::statistics::PhysicalData&& _physical_data); - - /*! - * @brief This function returns a constant reference to member physical_data - * @return Constant reference to member physical_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::PhysicalData& physical_data() const; - - /*! - * @brief This function returns a reference to member physical_data - * @return Reference to member physical_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::PhysicalData& physical_data(); - -private: - - eprosima::fastdds::statistics::EventKind m__d; - - eprosima::fastdds::statistics::WriterReaderData m_writer_reader_data; - eprosima::fastdds::statistics::Locator2LocatorData m_locator2locator_data; - eprosima::fastdds::statistics::EntityData m_entity_data; - eprosima::fastdds::statistics::Entity2LocatorTraffic m_entity2locator_traffic; - eprosima::fastdds::statistics::EntityCount m_entity_count; - eprosima::fastdds::statistics::DiscoveryTime m_discovery_time; - eprosima::fastdds::statistics::SampleIdentityCount m_sample_identity_count; - eprosima::fastdds::statistics::PhysicalData m_physical_data; -}; - -} // namespace statistics - -} // namespace fastdds - -} // namespace eprosima - -#endif // _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_H_ - - - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/blackbox/types/statistics/types.hpp b/test/blackbox/types/statistics/types.hpp new file mode 100644 index 00000000000..dcbf1fb35f9 --- /dev/null +++ b/test/blackbox/types/statistics/types.hpp @@ -0,0 +1,4177 @@ +// 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 types.hpp + * This header file contains the declaration of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_HPP_ +#define _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_HPP_ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#define eProsima_user_DllExport __declspec( dllexport ) +#else +#define eProsima_user_DllExport +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define eProsima_user_DllExport +#endif // _WIN32 + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#if defined(TYPES_SOURCE) +#define TYPES_DllAPI __declspec( dllexport ) +#else +#define TYPES_DllAPI __declspec( dllimport ) +#endif // TYPES_SOURCE +#else +#define TYPES_DllAPI +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define TYPES_DllAPI +#endif // _WIN32 + +namespace eprosima { + +namespace fastdds { + +namespace statistics { + +namespace detail { + + + +/*! + * @brief This class represents the structure EntityId_s defined by the user in the IDL file. + * @ingroup types + */ +class EntityId_s +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport EntityId_s() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~EntityId_s() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object EntityId_s that will be copied. + */ + eProsima_user_DllExport EntityId_s( + const EntityId_s& x) + { + m_value = x.m_value; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object EntityId_s that will be copied. + */ + eProsima_user_DllExport EntityId_s( + EntityId_s&& x) noexcept + { + m_value = std::move(x.m_value); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object EntityId_s that will be copied. + */ + eProsima_user_DllExport EntityId_s& operator =( + const EntityId_s& x) + { + + m_value = x.m_value; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object EntityId_s that will be copied. + */ + eProsima_user_DllExport EntityId_s& operator =( + EntityId_s&& x) noexcept + { + + m_value = std::move(x.m_value); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x EntityId_s object to compare. + */ + eProsima_user_DllExport bool operator ==( + const EntityId_s& x) const + { + return (m_value == x.m_value); + } + + /*! + * @brief Comparison operator. + * @param x EntityId_s object to compare. + */ + eProsima_user_DllExport bool operator !=( + const EntityId_s& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member value + * @param _value New value to be copied in member value + */ + eProsima_user_DllExport void value( + const std::array& _value) + { + m_value = _value; + } + + /*! + * @brief This function moves the value in member value + * @param _value New value to be moved in member value + */ + eProsima_user_DllExport void value( + std::array&& _value) + { + m_value = std::move(_value); + } + + /*! + * @brief This function returns a constant reference to member value + * @return Constant reference to member value + */ + eProsima_user_DllExport const std::array& value() const + { + return m_value; + } + + /*! + * @brief This function returns a reference to member value + * @return Reference to member value + */ + eProsima_user_DllExport std::array& value() + { + return m_value; + } + + + +private: + + std::array m_value{0}; + +}; + + +/*! + * @brief This class represents the structure GuidPrefix_s defined by the user in the IDL file. + * @ingroup types + */ +class GuidPrefix_s +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport GuidPrefix_s() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~GuidPrefix_s() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object GuidPrefix_s that will be copied. + */ + eProsima_user_DllExport GuidPrefix_s( + const GuidPrefix_s& x) + { + m_value = x.m_value; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object GuidPrefix_s that will be copied. + */ + eProsima_user_DllExport GuidPrefix_s( + GuidPrefix_s&& x) noexcept + { + m_value = std::move(x.m_value); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object GuidPrefix_s that will be copied. + */ + eProsima_user_DllExport GuidPrefix_s& operator =( + const GuidPrefix_s& x) + { + + m_value = x.m_value; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object GuidPrefix_s that will be copied. + */ + eProsima_user_DllExport GuidPrefix_s& operator =( + GuidPrefix_s&& x) noexcept + { + + m_value = std::move(x.m_value); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x GuidPrefix_s object to compare. + */ + eProsima_user_DllExport bool operator ==( + const GuidPrefix_s& x) const + { + return (m_value == x.m_value); + } + + /*! + * @brief Comparison operator. + * @param x GuidPrefix_s object to compare. + */ + eProsima_user_DllExport bool operator !=( + const GuidPrefix_s& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member value + * @param _value New value to be copied in member value + */ + eProsima_user_DllExport void value( + const std::array& _value) + { + m_value = _value; + } + + /*! + * @brief This function moves the value in member value + * @param _value New value to be moved in member value + */ + eProsima_user_DllExport void value( + std::array&& _value) + { + m_value = std::move(_value); + } + + /*! + * @brief This function returns a constant reference to member value + * @return Constant reference to member value + */ + eProsima_user_DllExport const std::array& value() const + { + return m_value; + } + + /*! + * @brief This function returns a reference to member value + * @return Reference to member value + */ + eProsima_user_DllExport std::array& value() + { + return m_value; + } + + + +private: + + std::array m_value{0}; + +}; + + +/*! + * @brief This class represents the structure GUID_s defined by the user in the IDL file. + * @ingroup types + */ +class GUID_s +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport GUID_s() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~GUID_s() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object GUID_s that will be copied. + */ + eProsima_user_DllExport GUID_s( + const GUID_s& x) + { + m_guidPrefix = x.m_guidPrefix; + + m_entityId = x.m_entityId; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object GUID_s that will be copied. + */ + eProsima_user_DllExport GUID_s( + GUID_s&& x) noexcept + { + m_guidPrefix = std::move(x.m_guidPrefix); + m_entityId = std::move(x.m_entityId); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object GUID_s that will be copied. + */ + eProsima_user_DllExport GUID_s& operator =( + const GUID_s& x) + { + + m_guidPrefix = x.m_guidPrefix; + + m_entityId = x.m_entityId; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object GUID_s that will be copied. + */ + eProsima_user_DllExport GUID_s& operator =( + GUID_s&& x) noexcept + { + + m_guidPrefix = std::move(x.m_guidPrefix); + m_entityId = std::move(x.m_entityId); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x GUID_s object to compare. + */ + eProsima_user_DllExport bool operator ==( + const GUID_s& x) const + { + return (m_guidPrefix == x.m_guidPrefix && + m_entityId == x.m_entityId); + } + + /*! + * @brief Comparison operator. + * @param x GUID_s object to compare. + */ + eProsima_user_DllExport bool operator !=( + const GUID_s& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member guidPrefix + * @param _guidPrefix New value to be copied in member guidPrefix + */ + eProsima_user_DllExport void guidPrefix( + const GuidPrefix_s& _guidPrefix) + { + m_guidPrefix = _guidPrefix; + } + + /*! + * @brief This function moves the value in member guidPrefix + * @param _guidPrefix New value to be moved in member guidPrefix + */ + eProsima_user_DllExport void guidPrefix( + GuidPrefix_s&& _guidPrefix) + { + m_guidPrefix = std::move(_guidPrefix); + } + + /*! + * @brief This function returns a constant reference to member guidPrefix + * @return Constant reference to member guidPrefix + */ + eProsima_user_DllExport const GuidPrefix_s& guidPrefix() const + { + return m_guidPrefix; + } + + /*! + * @brief This function returns a reference to member guidPrefix + * @return Reference to member guidPrefix + */ + eProsima_user_DllExport GuidPrefix_s& guidPrefix() + { + return m_guidPrefix; + } + + + /*! + * @brief This function copies the value in member entityId + * @param _entityId New value to be copied in member entityId + */ + eProsima_user_DllExport void entityId( + const EntityId_s& _entityId) + { + m_entityId = _entityId; + } + + /*! + * @brief This function moves the value in member entityId + * @param _entityId New value to be moved in member entityId + */ + eProsima_user_DllExport void entityId( + EntityId_s&& _entityId) + { + m_entityId = std::move(_entityId); + } + + /*! + * @brief This function returns a constant reference to member entityId + * @return Constant reference to member entityId + */ + eProsima_user_DllExport const EntityId_s& entityId() const + { + return m_entityId; + } + + /*! + * @brief This function returns a reference to member entityId + * @return Reference to member entityId + */ + eProsima_user_DllExport EntityId_s& entityId() + { + return m_entityId; + } + + + +private: + + GuidPrefix_s m_guidPrefix; + EntityId_s m_entityId; + +}; + + +/*! + * @brief This class represents the structure SequenceNumber_s defined by the user in the IDL file. + * @ingroup types + */ +class SequenceNumber_s +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport SequenceNumber_s() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~SequenceNumber_s() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object SequenceNumber_s that will be copied. + */ + eProsima_user_DllExport SequenceNumber_s( + const SequenceNumber_s& x) + { + m_high = x.m_high; + + m_low = x.m_low; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object SequenceNumber_s that will be copied. + */ + eProsima_user_DllExport SequenceNumber_s( + SequenceNumber_s&& x) noexcept + { + m_high = x.m_high; + m_low = x.m_low; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object SequenceNumber_s that will be copied. + */ + eProsima_user_DllExport SequenceNumber_s& operator =( + const SequenceNumber_s& x) + { + + m_high = x.m_high; + + m_low = x.m_low; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object SequenceNumber_s that will be copied. + */ + eProsima_user_DllExport SequenceNumber_s& operator =( + SequenceNumber_s&& x) noexcept + { + + m_high = x.m_high; + m_low = x.m_low; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x SequenceNumber_s object to compare. + */ + eProsima_user_DllExport bool operator ==( + const SequenceNumber_s& x) const + { + return (m_high == x.m_high && + m_low == x.m_low); + } + + /*! + * @brief Comparison operator. + * @param x SequenceNumber_s object to compare. + */ + eProsima_user_DllExport bool operator !=( + const SequenceNumber_s& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member high + * @param _high New value for member high + */ + eProsima_user_DllExport void high( + int32_t _high) + { + m_high = _high; + } + + /*! + * @brief This function returns the value of member high + * @return Value of member high + */ + eProsima_user_DllExport int32_t high() const + { + return m_high; + } + + /*! + * @brief This function returns a reference to member high + * @return Reference to member high + */ + eProsima_user_DllExport int32_t& high() + { + return m_high; + } + + + /*! + * @brief This function sets a value in member low + * @param _low New value for member low + */ + eProsima_user_DllExport void low( + uint32_t _low) + { + m_low = _low; + } + + /*! + * @brief This function returns the value of member low + * @return Value of member low + */ + eProsima_user_DllExport uint32_t low() const + { + return m_low; + } + + /*! + * @brief This function returns a reference to member low + * @return Reference to member low + */ + eProsima_user_DllExport uint32_t& low() + { + return m_low; + } + + + +private: + + int32_t m_high{0}; + uint32_t m_low{0}; + +}; + + +/*! + * @brief This class represents the structure SampleIdentity_s defined by the user in the IDL file. + * @ingroup types + */ +class SampleIdentity_s +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport SampleIdentity_s() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~SampleIdentity_s() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object SampleIdentity_s that will be copied. + */ + eProsima_user_DllExport SampleIdentity_s( + const SampleIdentity_s& x) + { + m_writer_guid = x.m_writer_guid; + + m_sequence_number = x.m_sequence_number; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object SampleIdentity_s that will be copied. + */ + eProsima_user_DllExport SampleIdentity_s( + SampleIdentity_s&& x) noexcept + { + m_writer_guid = std::move(x.m_writer_guid); + m_sequence_number = std::move(x.m_sequence_number); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object SampleIdentity_s that will be copied. + */ + eProsima_user_DllExport SampleIdentity_s& operator =( + const SampleIdentity_s& x) + { + + m_writer_guid = x.m_writer_guid; + + m_sequence_number = x.m_sequence_number; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object SampleIdentity_s that will be copied. + */ + eProsima_user_DllExport SampleIdentity_s& operator =( + SampleIdentity_s&& x) noexcept + { + + m_writer_guid = std::move(x.m_writer_guid); + m_sequence_number = std::move(x.m_sequence_number); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x SampleIdentity_s object to compare. + */ + eProsima_user_DllExport bool operator ==( + const SampleIdentity_s& x) const + { + return (m_writer_guid == x.m_writer_guid && + m_sequence_number == x.m_sequence_number); + } + + /*! + * @brief Comparison operator. + * @param x SampleIdentity_s object to compare. + */ + eProsima_user_DllExport bool operator !=( + const SampleIdentity_s& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member writer_guid + * @param _writer_guid New value to be copied in member writer_guid + */ + eProsima_user_DllExport void writer_guid( + const GUID_s& _writer_guid) + { + m_writer_guid = _writer_guid; + } + + /*! + * @brief This function moves the value in member writer_guid + * @param _writer_guid New value to be moved in member writer_guid + */ + eProsima_user_DllExport void writer_guid( + GUID_s&& _writer_guid) + { + m_writer_guid = std::move(_writer_guid); + } + + /*! + * @brief This function returns a constant reference to member writer_guid + * @return Constant reference to member writer_guid + */ + eProsima_user_DllExport const GUID_s& writer_guid() const + { + return m_writer_guid; + } + + /*! + * @brief This function returns a reference to member writer_guid + * @return Reference to member writer_guid + */ + eProsima_user_DllExport GUID_s& writer_guid() + { + return m_writer_guid; + } + + + /*! + * @brief This function copies the value in member sequence_number + * @param _sequence_number New value to be copied in member sequence_number + */ + eProsima_user_DllExport void sequence_number( + const SequenceNumber_s& _sequence_number) + { + m_sequence_number = _sequence_number; + } + + /*! + * @brief This function moves the value in member sequence_number + * @param _sequence_number New value to be moved in member sequence_number + */ + eProsima_user_DllExport void sequence_number( + SequenceNumber_s&& _sequence_number) + { + m_sequence_number = std::move(_sequence_number); + } + + /*! + * @brief This function returns a constant reference to member sequence_number + * @return Constant reference to member sequence_number + */ + eProsima_user_DllExport const SequenceNumber_s& sequence_number() const + { + return m_sequence_number; + } + + /*! + * @brief This function returns a reference to member sequence_number + * @return Reference to member sequence_number + */ + eProsima_user_DllExport SequenceNumber_s& sequence_number() + { + return m_sequence_number; + } + + + +private: + + GUID_s m_writer_guid; + SequenceNumber_s m_sequence_number; + +}; + + +/*! + * @brief This class represents the structure Locator_s defined by the user in the IDL file. + * @ingroup types + */ +class Locator_s +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport Locator_s() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~Locator_s() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object Locator_s that will be copied. + */ + eProsima_user_DllExport Locator_s( + const Locator_s& x) + { + m_kind = x.m_kind; + + m_port = x.m_port; + + m_address = x.m_address; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object Locator_s that will be copied. + */ + eProsima_user_DllExport Locator_s( + Locator_s&& x) noexcept + { + m_kind = x.m_kind; + m_port = x.m_port; + m_address = std::move(x.m_address); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object Locator_s that will be copied. + */ + eProsima_user_DllExport Locator_s& operator =( + const Locator_s& x) + { + + m_kind = x.m_kind; + + m_port = x.m_port; + + m_address = x.m_address; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object Locator_s that will be copied. + */ + eProsima_user_DllExport Locator_s& operator =( + Locator_s&& x) noexcept + { + + m_kind = x.m_kind; + m_port = x.m_port; + m_address = std::move(x.m_address); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x Locator_s object to compare. + */ + eProsima_user_DllExport bool operator ==( + const Locator_s& x) const + { + return (m_kind == x.m_kind && + m_port == x.m_port && + m_address == x.m_address); + } + + /*! + * @brief Comparison operator. + * @param x Locator_s object to compare. + */ + eProsima_user_DllExport bool operator !=( + const Locator_s& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member kind + * @param _kind New value for member kind + */ + eProsima_user_DllExport void kind( + int32_t _kind) + { + m_kind = _kind; + } + + /*! + * @brief This function returns the value of member kind + * @return Value of member kind + */ + eProsima_user_DllExport int32_t kind() const + { + return m_kind; + } + + /*! + * @brief This function returns a reference to member kind + * @return Reference to member kind + */ + eProsima_user_DllExport int32_t& kind() + { + return m_kind; + } + + + /*! + * @brief This function sets a value in member port + * @param _port New value for member port + */ + eProsima_user_DllExport void port( + uint32_t _port) + { + m_port = _port; + } + + /*! + * @brief This function returns the value of member port + * @return Value of member port + */ + eProsima_user_DllExport uint32_t port() const + { + return m_port; + } + + /*! + * @brief This function returns a reference to member port + * @return Reference to member port + */ + eProsima_user_DllExport uint32_t& port() + { + return m_port; + } + + + /*! + * @brief This function copies the value in member address + * @param _address New value to be copied in member address + */ + eProsima_user_DllExport void address( + const std::array& _address) + { + m_address = _address; + } + + /*! + * @brief This function moves the value in member address + * @param _address New value to be moved in member address + */ + eProsima_user_DllExport void address( + std::array&& _address) + { + m_address = std::move(_address); + } + + /*! + * @brief This function returns a constant reference to member address + * @return Constant reference to member address + */ + eProsima_user_DllExport const std::array& address() const + { + return m_address; + } + + /*! + * @brief This function returns a reference to member address + * @return Reference to member address + */ + eProsima_user_DllExport std::array& address() + { + return m_address; + } + + + +private: + + int32_t m_kind{0}; + uint32_t m_port{0}; + std::array m_address{0}; + +}; + +} // namespace detail + + +/*! + * @brief This class represents the structure DiscoveryTime defined by the user in the IDL file. + * @ingroup types + */ +class DiscoveryTime +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport DiscoveryTime() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~DiscoveryTime() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object DiscoveryTime that will be copied. + */ + eProsima_user_DllExport DiscoveryTime( + const DiscoveryTime& x) + { + m_local_participant_guid = x.m_local_participant_guid; + + m_remote_entity_guid = x.m_remote_entity_guid; + + m_time = x.m_time; + + m_host = x.m_host; + + m_user = x.m_user; + + m_process = x.m_process; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object DiscoveryTime that will be copied. + */ + eProsima_user_DllExport DiscoveryTime( + DiscoveryTime&& x) noexcept + { + m_local_participant_guid = std::move(x.m_local_participant_guid); + m_remote_entity_guid = std::move(x.m_remote_entity_guid); + m_time = x.m_time; + m_host = std::move(x.m_host); + m_user = std::move(x.m_user); + m_process = std::move(x.m_process); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object DiscoveryTime that will be copied. + */ + eProsima_user_DllExport DiscoveryTime& operator =( + const DiscoveryTime& x) + { + + m_local_participant_guid = x.m_local_participant_guid; + + m_remote_entity_guid = x.m_remote_entity_guid; + + m_time = x.m_time; + + m_host = x.m_host; + + m_user = x.m_user; + + m_process = x.m_process; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object DiscoveryTime that will be copied. + */ + eProsima_user_DllExport DiscoveryTime& operator =( + DiscoveryTime&& x) noexcept + { + + m_local_participant_guid = std::move(x.m_local_participant_guid); + m_remote_entity_guid = std::move(x.m_remote_entity_guid); + m_time = x.m_time; + m_host = std::move(x.m_host); + m_user = std::move(x.m_user); + m_process = std::move(x.m_process); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x DiscoveryTime object to compare. + */ + eProsima_user_DllExport bool operator ==( + const DiscoveryTime& x) const + { + return (m_local_participant_guid == x.m_local_participant_guid && + m_remote_entity_guid == x.m_remote_entity_guid && + m_time == x.m_time && + m_host == x.m_host && + m_user == x.m_user && + m_process == x.m_process); + } + + /*! + * @brief Comparison operator. + * @param x DiscoveryTime object to compare. + */ + eProsima_user_DllExport bool operator !=( + const DiscoveryTime& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member local_participant_guid + * @param _local_participant_guid New value to be copied in member local_participant_guid + */ + eProsima_user_DllExport void local_participant_guid( + const detail::GUID_s& _local_participant_guid) + { + m_local_participant_guid = _local_participant_guid; + } + + /*! + * @brief This function moves the value in member local_participant_guid + * @param _local_participant_guid New value to be moved in member local_participant_guid + */ + eProsima_user_DllExport void local_participant_guid( + detail::GUID_s&& _local_participant_guid) + { + m_local_participant_guid = std::move(_local_participant_guid); + } + + /*! + * @brief This function returns a constant reference to member local_participant_guid + * @return Constant reference to member local_participant_guid + */ + eProsima_user_DllExport const detail::GUID_s& local_participant_guid() const + { + return m_local_participant_guid; + } + + /*! + * @brief This function returns a reference to member local_participant_guid + * @return Reference to member local_participant_guid + */ + eProsima_user_DllExport detail::GUID_s& local_participant_guid() + { + return m_local_participant_guid; + } + + + /*! + * @brief This function copies the value in member remote_entity_guid + * @param _remote_entity_guid New value to be copied in member remote_entity_guid + */ + eProsima_user_DllExport void remote_entity_guid( + const detail::GUID_s& _remote_entity_guid) + { + m_remote_entity_guid = _remote_entity_guid; + } + + /*! + * @brief This function moves the value in member remote_entity_guid + * @param _remote_entity_guid New value to be moved in member remote_entity_guid + */ + eProsima_user_DllExport void remote_entity_guid( + detail::GUID_s&& _remote_entity_guid) + { + m_remote_entity_guid = std::move(_remote_entity_guid); + } + + /*! + * @brief This function returns a constant reference to member remote_entity_guid + * @return Constant reference to member remote_entity_guid + */ + eProsima_user_DllExport const detail::GUID_s& remote_entity_guid() const + { + return m_remote_entity_guid; + } + + /*! + * @brief This function returns a reference to member remote_entity_guid + * @return Reference to member remote_entity_guid + */ + eProsima_user_DllExport detail::GUID_s& remote_entity_guid() + { + return m_remote_entity_guid; + } + + + /*! + * @brief This function sets a value in member time + * @param _time New value for member time + */ + eProsima_user_DllExport void time( + uint64_t _time) + { + m_time = _time; + } + + /*! + * @brief This function returns the value of member time + * @return Value of member time + */ + eProsima_user_DllExport uint64_t time() const + { + return m_time; + } + + /*! + * @brief This function returns a reference to member time + * @return Reference to member time + */ + eProsima_user_DllExport uint64_t& time() + { + return m_time; + } + + + /*! + * @brief This function copies the value in member host + * @param _host New value to be copied in member host + */ + eProsima_user_DllExport void host( + const std::string& _host) + { + m_host = _host; + } + + /*! + * @brief This function moves the value in member host + * @param _host New value to be moved in member host + */ + eProsima_user_DllExport void host( + std::string&& _host) + { + m_host = std::move(_host); + } + + /*! + * @brief This function returns a constant reference to member host + * @return Constant reference to member host + */ + eProsima_user_DllExport const std::string& host() const + { + return m_host; + } + + /*! + * @brief This function returns a reference to member host + * @return Reference to member host + */ + eProsima_user_DllExport std::string& host() + { + return m_host; + } + + + /*! + * @brief This function copies the value in member user + * @param _user New value to be copied in member user + */ + eProsima_user_DllExport void user( + const std::string& _user) + { + m_user = _user; + } + + /*! + * @brief This function moves the value in member user + * @param _user New value to be moved in member user + */ + eProsima_user_DllExport void user( + std::string&& _user) + { + m_user = std::move(_user); + } + + /*! + * @brief This function returns a constant reference to member user + * @return Constant reference to member user + */ + eProsima_user_DllExport const std::string& user() const + { + return m_user; + } + + /*! + * @brief This function returns a reference to member user + * @return Reference to member user + */ + eProsima_user_DllExport std::string& user() + { + return m_user; + } + + + /*! + * @brief This function copies the value in member process + * @param _process New value to be copied in member process + */ + eProsima_user_DllExport void process( + const std::string& _process) + { + m_process = _process; + } + + /*! + * @brief This function moves the value in member process + * @param _process New value to be moved in member process + */ + eProsima_user_DllExport void process( + std::string&& _process) + { + m_process = std::move(_process); + } + + /*! + * @brief This function returns a constant reference to member process + * @return Constant reference to member process + */ + eProsima_user_DllExport const std::string& process() const + { + return m_process; + } + + /*! + * @brief This function returns a reference to member process + * @return Reference to member process + */ + eProsima_user_DllExport std::string& process() + { + return m_process; + } + + + +private: + + detail::GUID_s m_local_participant_guid; + detail::GUID_s m_remote_entity_guid; + uint64_t m_time{0}; + std::string m_host; + std::string m_user; + std::string m_process; + +}; + + +/*! + * @brief This class represents the structure EntityCount defined by the user in the IDL file. + * @ingroup types + */ +class EntityCount +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport EntityCount() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~EntityCount() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object EntityCount that will be copied. + */ + eProsima_user_DllExport EntityCount( + const EntityCount& x) + { + m_guid = x.m_guid; + + m_count = x.m_count; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object EntityCount that will be copied. + */ + eProsima_user_DllExport EntityCount( + EntityCount&& x) noexcept + { + m_guid = std::move(x.m_guid); + m_count = x.m_count; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object EntityCount that will be copied. + */ + eProsima_user_DllExport EntityCount& operator =( + const EntityCount& x) + { + + m_guid = x.m_guid; + + m_count = x.m_count; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object EntityCount that will be copied. + */ + eProsima_user_DllExport EntityCount& operator =( + EntityCount&& x) noexcept + { + + m_guid = std::move(x.m_guid); + m_count = x.m_count; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x EntityCount object to compare. + */ + eProsima_user_DllExport bool operator ==( + const EntityCount& x) const + { + return (m_guid == x.m_guid && + m_count == x.m_count); + } + + /*! + * @brief Comparison operator. + * @param x EntityCount object to compare. + */ + eProsima_user_DllExport bool operator !=( + const EntityCount& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member guid + * @param _guid New value to be copied in member guid + */ + eProsima_user_DllExport void guid( + const detail::GUID_s& _guid) + { + m_guid = _guid; + } + + /*! + * @brief This function moves the value in member guid + * @param _guid New value to be moved in member guid + */ + eProsima_user_DllExport void guid( + detail::GUID_s&& _guid) + { + m_guid = std::move(_guid); + } + + /*! + * @brief This function returns a constant reference to member guid + * @return Constant reference to member guid + */ + eProsima_user_DllExport const detail::GUID_s& guid() const + { + return m_guid; + } + + /*! + * @brief This function returns a reference to member guid + * @return Reference to member guid + */ + eProsima_user_DllExport detail::GUID_s& guid() + { + return m_guid; + } + + + /*! + * @brief This function sets a value in member count + * @param _count New value for member count + */ + eProsima_user_DllExport void count( + uint64_t _count) + { + m_count = _count; + } + + /*! + * @brief This function returns the value of member count + * @return Value of member count + */ + eProsima_user_DllExport uint64_t count() const + { + return m_count; + } + + /*! + * @brief This function returns a reference to member count + * @return Reference to member count + */ + eProsima_user_DllExport uint64_t& count() + { + return m_count; + } + + + +private: + + detail::GUID_s m_guid; + uint64_t m_count{0}; + +}; + + +/*! + * @brief This class represents the structure SampleIdentityCount defined by the user in the IDL file. + * @ingroup types + */ +class SampleIdentityCount +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport SampleIdentityCount() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~SampleIdentityCount() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object SampleIdentityCount that will be copied. + */ + eProsima_user_DllExport SampleIdentityCount( + const SampleIdentityCount& x) + { + m_sample_id = x.m_sample_id; + + m_count = x.m_count; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object SampleIdentityCount that will be copied. + */ + eProsima_user_DllExport SampleIdentityCount( + SampleIdentityCount&& x) noexcept + { + m_sample_id = std::move(x.m_sample_id); + m_count = x.m_count; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object SampleIdentityCount that will be copied. + */ + eProsima_user_DllExport SampleIdentityCount& operator =( + const SampleIdentityCount& x) + { + + m_sample_id = x.m_sample_id; + + m_count = x.m_count; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object SampleIdentityCount that will be copied. + */ + eProsima_user_DllExport SampleIdentityCount& operator =( + SampleIdentityCount&& x) noexcept + { + + m_sample_id = std::move(x.m_sample_id); + m_count = x.m_count; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x SampleIdentityCount object to compare. + */ + eProsima_user_DllExport bool operator ==( + const SampleIdentityCount& x) const + { + return (m_sample_id == x.m_sample_id && + m_count == x.m_count); + } + + /*! + * @brief Comparison operator. + * @param x SampleIdentityCount object to compare. + */ + eProsima_user_DllExport bool operator !=( + const SampleIdentityCount& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member sample_id + * @param _sample_id New value to be copied in member sample_id + */ + eProsima_user_DllExport void sample_id( + const detail::SampleIdentity_s& _sample_id) + { + m_sample_id = _sample_id; + } + + /*! + * @brief This function moves the value in member sample_id + * @param _sample_id New value to be moved in member sample_id + */ + eProsima_user_DllExport void sample_id( + detail::SampleIdentity_s&& _sample_id) + { + m_sample_id = std::move(_sample_id); + } + + /*! + * @brief This function returns a constant reference to member sample_id + * @return Constant reference to member sample_id + */ + eProsima_user_DllExport const detail::SampleIdentity_s& sample_id() const + { + return m_sample_id; + } + + /*! + * @brief This function returns a reference to member sample_id + * @return Reference to member sample_id + */ + eProsima_user_DllExport detail::SampleIdentity_s& sample_id() + { + return m_sample_id; + } + + + /*! + * @brief This function sets a value in member count + * @param _count New value for member count + */ + eProsima_user_DllExport void count( + uint64_t _count) + { + m_count = _count; + } + + /*! + * @brief This function returns the value of member count + * @return Value of member count + */ + eProsima_user_DllExport uint64_t count() const + { + return m_count; + } + + /*! + * @brief This function returns a reference to member count + * @return Reference to member count + */ + eProsima_user_DllExport uint64_t& count() + { + return m_count; + } + + + +private: + + detail::SampleIdentity_s m_sample_id; + uint64_t m_count{0}; + +}; + + +/*! + * @brief This class represents the structure Entity2LocatorTraffic defined by the user in the IDL file. + * @ingroup types + */ +class Entity2LocatorTraffic +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport Entity2LocatorTraffic() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~Entity2LocatorTraffic() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object Entity2LocatorTraffic that will be copied. + */ + eProsima_user_DllExport Entity2LocatorTraffic( + const Entity2LocatorTraffic& x) + { + m_src_guid = x.m_src_guid; + + m_dst_locator = x.m_dst_locator; + + m_packet_count = x.m_packet_count; + + m_byte_count = x.m_byte_count; + + m_byte_magnitude_order = x.m_byte_magnitude_order; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object Entity2LocatorTraffic that will be copied. + */ + eProsima_user_DllExport Entity2LocatorTraffic( + Entity2LocatorTraffic&& x) noexcept + { + m_src_guid = std::move(x.m_src_guid); + m_dst_locator = std::move(x.m_dst_locator); + m_packet_count = x.m_packet_count; + m_byte_count = x.m_byte_count; + m_byte_magnitude_order = x.m_byte_magnitude_order; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object Entity2LocatorTraffic that will be copied. + */ + eProsima_user_DllExport Entity2LocatorTraffic& operator =( + const Entity2LocatorTraffic& x) + { + + m_src_guid = x.m_src_guid; + + m_dst_locator = x.m_dst_locator; + + m_packet_count = x.m_packet_count; + + m_byte_count = x.m_byte_count; + + m_byte_magnitude_order = x.m_byte_magnitude_order; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object Entity2LocatorTraffic that will be copied. + */ + eProsima_user_DllExport Entity2LocatorTraffic& operator =( + Entity2LocatorTraffic&& x) noexcept + { + + m_src_guid = std::move(x.m_src_guid); + m_dst_locator = std::move(x.m_dst_locator); + m_packet_count = x.m_packet_count; + m_byte_count = x.m_byte_count; + m_byte_magnitude_order = x.m_byte_magnitude_order; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x Entity2LocatorTraffic object to compare. + */ + eProsima_user_DllExport bool operator ==( + const Entity2LocatorTraffic& x) const + { + return (m_src_guid == x.m_src_guid && + m_dst_locator == x.m_dst_locator && + m_packet_count == x.m_packet_count && + m_byte_count == x.m_byte_count && + m_byte_magnitude_order == x.m_byte_magnitude_order); + } + + /*! + * @brief Comparison operator. + * @param x Entity2LocatorTraffic object to compare. + */ + eProsima_user_DllExport bool operator !=( + const Entity2LocatorTraffic& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member src_guid + * @param _src_guid New value to be copied in member src_guid + */ + eProsima_user_DllExport void src_guid( + const detail::GUID_s& _src_guid) + { + m_src_guid = _src_guid; + } + + /*! + * @brief This function moves the value in member src_guid + * @param _src_guid New value to be moved in member src_guid + */ + eProsima_user_DllExport void src_guid( + detail::GUID_s&& _src_guid) + { + m_src_guid = std::move(_src_guid); + } + + /*! + * @brief This function returns a constant reference to member src_guid + * @return Constant reference to member src_guid + */ + eProsima_user_DllExport const detail::GUID_s& src_guid() const + { + return m_src_guid; + } + + /*! + * @brief This function returns a reference to member src_guid + * @return Reference to member src_guid + */ + eProsima_user_DllExport detail::GUID_s& src_guid() + { + return m_src_guid; + } + + + /*! + * @brief This function copies the value in member dst_locator + * @param _dst_locator New value to be copied in member dst_locator + */ + eProsima_user_DllExport void dst_locator( + const detail::Locator_s& _dst_locator) + { + m_dst_locator = _dst_locator; + } + + /*! + * @brief This function moves the value in member dst_locator + * @param _dst_locator New value to be moved in member dst_locator + */ + eProsima_user_DllExport void dst_locator( + detail::Locator_s&& _dst_locator) + { + m_dst_locator = std::move(_dst_locator); + } + + /*! + * @brief This function returns a constant reference to member dst_locator + * @return Constant reference to member dst_locator + */ + eProsima_user_DllExport const detail::Locator_s& dst_locator() const + { + return m_dst_locator; + } + + /*! + * @brief This function returns a reference to member dst_locator + * @return Reference to member dst_locator + */ + eProsima_user_DllExport detail::Locator_s& dst_locator() + { + return m_dst_locator; + } + + + /*! + * @brief This function sets a value in member packet_count + * @param _packet_count New value for member packet_count + */ + eProsima_user_DllExport void packet_count( + uint64_t _packet_count) + { + m_packet_count = _packet_count; + } + + /*! + * @brief This function returns the value of member packet_count + * @return Value of member packet_count + */ + eProsima_user_DllExport uint64_t packet_count() const + { + return m_packet_count; + } + + /*! + * @brief This function returns a reference to member packet_count + * @return Reference to member packet_count + */ + eProsima_user_DllExport uint64_t& packet_count() + { + return m_packet_count; + } + + + /*! + * @brief This function sets a value in member byte_count + * @param _byte_count New value for member byte_count + */ + eProsima_user_DllExport void byte_count( + uint64_t _byte_count) + { + m_byte_count = _byte_count; + } + + /*! + * @brief This function returns the value of member byte_count + * @return Value of member byte_count + */ + eProsima_user_DllExport uint64_t byte_count() const + { + return m_byte_count; + } + + /*! + * @brief This function returns a reference to member byte_count + * @return Reference to member byte_count + */ + eProsima_user_DllExport uint64_t& byte_count() + { + return m_byte_count; + } + + + /*! + * @brief This function sets a value in member byte_magnitude_order + * @param _byte_magnitude_order New value for member byte_magnitude_order + */ + eProsima_user_DllExport void byte_magnitude_order( + int16_t _byte_magnitude_order) + { + m_byte_magnitude_order = _byte_magnitude_order; + } + + /*! + * @brief This function returns the value of member byte_magnitude_order + * @return Value of member byte_magnitude_order + */ + eProsima_user_DllExport int16_t byte_magnitude_order() const + { + return m_byte_magnitude_order; + } + + /*! + * @brief This function returns a reference to member byte_magnitude_order + * @return Reference to member byte_magnitude_order + */ + eProsima_user_DllExport int16_t& byte_magnitude_order() + { + return m_byte_magnitude_order; + } + + + +private: + + detail::GUID_s m_src_guid; + detail::Locator_s m_dst_locator; + uint64_t m_packet_count{0}; + uint64_t m_byte_count{0}; + int16_t m_byte_magnitude_order{0}; + +}; + + +/*! + * @brief This class represents the structure WriterReaderData defined by the user in the IDL file. + * @ingroup types + */ +class WriterReaderData +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport WriterReaderData() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~WriterReaderData() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object WriterReaderData that will be copied. + */ + eProsima_user_DllExport WriterReaderData( + const WriterReaderData& x) + { + m_writer_guid = x.m_writer_guid; + + m_reader_guid = x.m_reader_guid; + + m_data = x.m_data; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object WriterReaderData that will be copied. + */ + eProsima_user_DllExport WriterReaderData( + WriterReaderData&& x) noexcept + { + m_writer_guid = std::move(x.m_writer_guid); + m_reader_guid = std::move(x.m_reader_guid); + m_data = x.m_data; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object WriterReaderData that will be copied. + */ + eProsima_user_DllExport WriterReaderData& operator =( + const WriterReaderData& x) + { + + m_writer_guid = x.m_writer_guid; + + m_reader_guid = x.m_reader_guid; + + m_data = x.m_data; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object WriterReaderData that will be copied. + */ + eProsima_user_DllExport WriterReaderData& operator =( + WriterReaderData&& x) noexcept + { + + m_writer_guid = std::move(x.m_writer_guid); + m_reader_guid = std::move(x.m_reader_guid); + m_data = x.m_data; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x WriterReaderData object to compare. + */ + eProsima_user_DllExport bool operator ==( + const WriterReaderData& x) const + { + return (m_writer_guid == x.m_writer_guid && + m_reader_guid == x.m_reader_guid && + m_data == x.m_data); + } + + /*! + * @brief Comparison operator. + * @param x WriterReaderData object to compare. + */ + eProsima_user_DllExport bool operator !=( + const WriterReaderData& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member writer_guid + * @param _writer_guid New value to be copied in member writer_guid + */ + eProsima_user_DllExport void writer_guid( + const detail::GUID_s& _writer_guid) + { + m_writer_guid = _writer_guid; + } + + /*! + * @brief This function moves the value in member writer_guid + * @param _writer_guid New value to be moved in member writer_guid + */ + eProsima_user_DllExport void writer_guid( + detail::GUID_s&& _writer_guid) + { + m_writer_guid = std::move(_writer_guid); + } + + /*! + * @brief This function returns a constant reference to member writer_guid + * @return Constant reference to member writer_guid + */ + eProsima_user_DllExport const detail::GUID_s& writer_guid() const + { + return m_writer_guid; + } + + /*! + * @brief This function returns a reference to member writer_guid + * @return Reference to member writer_guid + */ + eProsima_user_DllExport detail::GUID_s& writer_guid() + { + return m_writer_guid; + } + + + /*! + * @brief This function copies the value in member reader_guid + * @param _reader_guid New value to be copied in member reader_guid + */ + eProsima_user_DllExport void reader_guid( + const detail::GUID_s& _reader_guid) + { + m_reader_guid = _reader_guid; + } + + /*! + * @brief This function moves the value in member reader_guid + * @param _reader_guid New value to be moved in member reader_guid + */ + eProsima_user_DllExport void reader_guid( + detail::GUID_s&& _reader_guid) + { + m_reader_guid = std::move(_reader_guid); + } + + /*! + * @brief This function returns a constant reference to member reader_guid + * @return Constant reference to member reader_guid + */ + eProsima_user_DllExport const detail::GUID_s& reader_guid() const + { + return m_reader_guid; + } + + /*! + * @brief This function returns a reference to member reader_guid + * @return Reference to member reader_guid + */ + eProsima_user_DllExport detail::GUID_s& reader_guid() + { + return m_reader_guid; + } + + + /*! + * @brief This function sets a value in member data + * @param _data New value for member data + */ + eProsima_user_DllExport void data( + float _data) + { + m_data = _data; + } + + /*! + * @brief This function returns the value of member data + * @return Value of member data + */ + eProsima_user_DllExport float data() const + { + return m_data; + } + + /*! + * @brief This function returns a reference to member data + * @return Reference to member data + */ + eProsima_user_DllExport float& data() + { + return m_data; + } + + + +private: + + detail::GUID_s m_writer_guid; + detail::GUID_s m_reader_guid; + float m_data{0.0}; + +}; + + +/*! + * @brief This class represents the structure Locator2LocatorData defined by the user in the IDL file. + * @ingroup types + */ +class Locator2LocatorData +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport Locator2LocatorData() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~Locator2LocatorData() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object Locator2LocatorData that will be copied. + */ + eProsima_user_DllExport Locator2LocatorData( + const Locator2LocatorData& x) + { + m_src_locator = x.m_src_locator; + + m_dst_locator = x.m_dst_locator; + + m_data = x.m_data; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object Locator2LocatorData that will be copied. + */ + eProsima_user_DllExport Locator2LocatorData( + Locator2LocatorData&& x) noexcept + { + m_src_locator = std::move(x.m_src_locator); + m_dst_locator = std::move(x.m_dst_locator); + m_data = x.m_data; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object Locator2LocatorData that will be copied. + */ + eProsima_user_DllExport Locator2LocatorData& operator =( + const Locator2LocatorData& x) + { + + m_src_locator = x.m_src_locator; + + m_dst_locator = x.m_dst_locator; + + m_data = x.m_data; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object Locator2LocatorData that will be copied. + */ + eProsima_user_DllExport Locator2LocatorData& operator =( + Locator2LocatorData&& x) noexcept + { + + m_src_locator = std::move(x.m_src_locator); + m_dst_locator = std::move(x.m_dst_locator); + m_data = x.m_data; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x Locator2LocatorData object to compare. + */ + eProsima_user_DllExport bool operator ==( + const Locator2LocatorData& x) const + { + return (m_src_locator == x.m_src_locator && + m_dst_locator == x.m_dst_locator && + m_data == x.m_data); + } + + /*! + * @brief Comparison operator. + * @param x Locator2LocatorData object to compare. + */ + eProsima_user_DllExport bool operator !=( + const Locator2LocatorData& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member src_locator + * @param _src_locator New value to be copied in member src_locator + */ + eProsima_user_DllExport void src_locator( + const detail::Locator_s& _src_locator) + { + m_src_locator = _src_locator; + } + + /*! + * @brief This function moves the value in member src_locator + * @param _src_locator New value to be moved in member src_locator + */ + eProsima_user_DllExport void src_locator( + detail::Locator_s&& _src_locator) + { + m_src_locator = std::move(_src_locator); + } + + /*! + * @brief This function returns a constant reference to member src_locator + * @return Constant reference to member src_locator + */ + eProsima_user_DllExport const detail::Locator_s& src_locator() const + { + return m_src_locator; + } + + /*! + * @brief This function returns a reference to member src_locator + * @return Reference to member src_locator + */ + eProsima_user_DllExport detail::Locator_s& src_locator() + { + return m_src_locator; + } + + + /*! + * @brief This function copies the value in member dst_locator + * @param _dst_locator New value to be copied in member dst_locator + */ + eProsima_user_DllExport void dst_locator( + const detail::Locator_s& _dst_locator) + { + m_dst_locator = _dst_locator; + } + + /*! + * @brief This function moves the value in member dst_locator + * @param _dst_locator New value to be moved in member dst_locator + */ + eProsima_user_DllExport void dst_locator( + detail::Locator_s&& _dst_locator) + { + m_dst_locator = std::move(_dst_locator); + } + + /*! + * @brief This function returns a constant reference to member dst_locator + * @return Constant reference to member dst_locator + */ + eProsima_user_DllExport const detail::Locator_s& dst_locator() const + { + return m_dst_locator; + } + + /*! + * @brief This function returns a reference to member dst_locator + * @return Reference to member dst_locator + */ + eProsima_user_DllExport detail::Locator_s& dst_locator() + { + return m_dst_locator; + } + + + /*! + * @brief This function sets a value in member data + * @param _data New value for member data + */ + eProsima_user_DllExport void data( + float _data) + { + m_data = _data; + } + + /*! + * @brief This function returns the value of member data + * @return Value of member data + */ + eProsima_user_DllExport float data() const + { + return m_data; + } + + /*! + * @brief This function returns a reference to member data + * @return Reference to member data + */ + eProsima_user_DllExport float& data() + { + return m_data; + } + + + +private: + + detail::Locator_s m_src_locator; + detail::Locator_s m_dst_locator; + float m_data{0.0}; + +}; + + +/*! + * @brief This class represents the structure EntityData defined by the user in the IDL file. + * @ingroup types + */ +class EntityData +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport EntityData() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~EntityData() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object EntityData that will be copied. + */ + eProsima_user_DllExport EntityData( + const EntityData& x) + { + m_guid = x.m_guid; + + m_data = x.m_data; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object EntityData that will be copied. + */ + eProsima_user_DllExport EntityData( + EntityData&& x) noexcept + { + m_guid = std::move(x.m_guid); + m_data = x.m_data; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object EntityData that will be copied. + */ + eProsima_user_DllExport EntityData& operator =( + const EntityData& x) + { + + m_guid = x.m_guid; + + m_data = x.m_data; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object EntityData that will be copied. + */ + eProsima_user_DllExport EntityData& operator =( + EntityData&& x) noexcept + { + + m_guid = std::move(x.m_guid); + m_data = x.m_data; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x EntityData object to compare. + */ + eProsima_user_DllExport bool operator ==( + const EntityData& x) const + { + return (m_guid == x.m_guid && + m_data == x.m_data); + } + + /*! + * @brief Comparison operator. + * @param x EntityData object to compare. + */ + eProsima_user_DllExport bool operator !=( + const EntityData& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member guid + * @param _guid New value to be copied in member guid + */ + eProsima_user_DllExport void guid( + const detail::GUID_s& _guid) + { + m_guid = _guid; + } + + /*! + * @brief This function moves the value in member guid + * @param _guid New value to be moved in member guid + */ + eProsima_user_DllExport void guid( + detail::GUID_s&& _guid) + { + m_guid = std::move(_guid); + } + + /*! + * @brief This function returns a constant reference to member guid + * @return Constant reference to member guid + */ + eProsima_user_DllExport const detail::GUID_s& guid() const + { + return m_guid; + } + + /*! + * @brief This function returns a reference to member guid + * @return Reference to member guid + */ + eProsima_user_DllExport detail::GUID_s& guid() + { + return m_guid; + } + + + /*! + * @brief This function sets a value in member data + * @param _data New value for member data + */ + eProsima_user_DllExport void data( + float _data) + { + m_data = _data; + } + + /*! + * @brief This function returns the value of member data + * @return Value of member data + */ + eProsima_user_DllExport float data() const + { + return m_data; + } + + /*! + * @brief This function returns a reference to member data + * @return Reference to member data + */ + eProsima_user_DllExport float& data() + { + return m_data; + } + + + +private: + + detail::GUID_s m_guid; + float m_data{0.0}; + +}; + + +/*! + * @brief This class represents the structure PhysicalData defined by the user in the IDL file. + * @ingroup types + */ +class PhysicalData +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport PhysicalData() + { + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~PhysicalData() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object PhysicalData that will be copied. + */ + eProsima_user_DllExport PhysicalData( + const PhysicalData& x) + { + m_participant_guid = x.m_participant_guid; + + m_host = x.m_host; + + m_user = x.m_user; + + m_process = x.m_process; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object PhysicalData that will be copied. + */ + eProsima_user_DllExport PhysicalData( + PhysicalData&& x) noexcept + { + m_participant_guid = std::move(x.m_participant_guid); + m_host = std::move(x.m_host); + m_user = std::move(x.m_user); + m_process = std::move(x.m_process); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object PhysicalData that will be copied. + */ + eProsima_user_DllExport PhysicalData& operator =( + const PhysicalData& x) + { + + m_participant_guid = x.m_participant_guid; + + m_host = x.m_host; + + m_user = x.m_user; + + m_process = x.m_process; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object PhysicalData that will be copied. + */ + eProsima_user_DllExport PhysicalData& operator =( + PhysicalData&& x) noexcept + { + + m_participant_guid = std::move(x.m_participant_guid); + m_host = std::move(x.m_host); + m_user = std::move(x.m_user); + m_process = std::move(x.m_process); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x PhysicalData object to compare. + */ + eProsima_user_DllExport bool operator ==( + const PhysicalData& x) const + { + return (m_participant_guid == x.m_participant_guid && + m_host == x.m_host && + m_user == x.m_user && + m_process == x.m_process); + } + + /*! + * @brief Comparison operator. + * @param x PhysicalData object to compare. + */ + eProsima_user_DllExport bool operator !=( + const PhysicalData& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member participant_guid + * @param _participant_guid New value to be copied in member participant_guid + */ + eProsima_user_DllExport void participant_guid( + const detail::GUID_s& _participant_guid) + { + m_participant_guid = _participant_guid; + } + + /*! + * @brief This function moves the value in member participant_guid + * @param _participant_guid New value to be moved in member participant_guid + */ + eProsima_user_DllExport void participant_guid( + detail::GUID_s&& _participant_guid) + { + m_participant_guid = std::move(_participant_guid); + } + + /*! + * @brief This function returns a constant reference to member participant_guid + * @return Constant reference to member participant_guid + */ + eProsima_user_DllExport const detail::GUID_s& participant_guid() const + { + return m_participant_guid; + } + + /*! + * @brief This function returns a reference to member participant_guid + * @return Reference to member participant_guid + */ + eProsima_user_DllExport detail::GUID_s& participant_guid() + { + return m_participant_guid; + } + + + /*! + * @brief This function copies the value in member host + * @param _host New value to be copied in member host + */ + eProsima_user_DllExport void host( + const std::string& _host) + { + m_host = _host; + } + + /*! + * @brief This function moves the value in member host + * @param _host New value to be moved in member host + */ + eProsima_user_DllExport void host( + std::string&& _host) + { + m_host = std::move(_host); + } + + /*! + * @brief This function returns a constant reference to member host + * @return Constant reference to member host + */ + eProsima_user_DllExport const std::string& host() const + { + return m_host; + } + + /*! + * @brief This function returns a reference to member host + * @return Reference to member host + */ + eProsima_user_DllExport std::string& host() + { + return m_host; + } + + + /*! + * @brief This function copies the value in member user + * @param _user New value to be copied in member user + */ + eProsima_user_DllExport void user( + const std::string& _user) + { + m_user = _user; + } + + /*! + * @brief This function moves the value in member user + * @param _user New value to be moved in member user + */ + eProsima_user_DllExport void user( + std::string&& _user) + { + m_user = std::move(_user); + } + + /*! + * @brief This function returns a constant reference to member user + * @return Constant reference to member user + */ + eProsima_user_DllExport const std::string& user() const + { + return m_user; + } + + /*! + * @brief This function returns a reference to member user + * @return Reference to member user + */ + eProsima_user_DllExport std::string& user() + { + return m_user; + } + + + /*! + * @brief This function copies the value in member process + * @param _process New value to be copied in member process + */ + eProsima_user_DllExport void process( + const std::string& _process) + { + m_process = _process; + } + + /*! + * @brief This function moves the value in member process + * @param _process New value to be moved in member process + */ + eProsima_user_DllExport void process( + std::string&& _process) + { + m_process = std::move(_process); + } + + /*! + * @brief This function returns a constant reference to member process + * @return Constant reference to member process + */ + eProsima_user_DllExport const std::string& process() const + { + return m_process; + } + + /*! + * @brief This function returns a reference to member process + * @return Reference to member process + */ + eProsima_user_DllExport std::string& process() + { + return m_process; + } + + + +private: + + detail::GUID_s m_participant_guid; + std::string m_host; + std::string m_user; + std::string m_process; + +}; +/*! + * @brief This enumeration represents the EventKind bitflags defined by the user in the IDL file. + * @ingroup types + */ +enum EventKindBits : uint32_t +{ + HISTORY2HISTORY_LATENCY = 0x01ull << 0, + NETWORK_LATENCY = 0x01ull << 1, + PUBLICATION_THROUGHPUT = 0x01ull << 2, + SUBSCRIPTION_THROUGHPUT = 0x01ull << 3, + RTPS_SENT = 0x01ull << 4, + RTPS_LOST = 0x01ull << 5, + RESENT_DATAS = 0x01ull << 6, + HEARTBEAT_COUNT = 0x01ull << 7, + ACKNACK_COUNT = 0x01ull << 8, + NACKFRAG_COUNT = 0x01ull << 9, + GAP_COUNT = 0x01ull << 10, + DATA_COUNT = 0x01ull << 11, + PDP_PACKETS = 0x01ull << 12, + EDP_PACKETS = 0x01ull << 13, + DISCOVERED_ENTITY = 0x01ull << 14, + SAMPLE_DATAS = 0x01ull << 15, + PHYSICAL_DATA = 0x01ull << 16 +}; +typedef uint32_t EventKind; + + +/*! + * @brief This class represents the union Data defined by the user in the IDL file. + * @ingroup types + */ +class Data +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport Data() + { + m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~Data() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object Data that will be copied. + */ + eProsima_user_DllExport Data( + const Data& x) + { + m__d = x.m__d; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + m_writer_reader_data = x.m_writer_reader_data; + break; + + + case eprosima::fastdds::statistics::NETWORK_LATENCY: + m_locator2locator_data = x.m_locator2locator_data; + break; + + + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + m_entity_data = x.m_entity_data; + break; + + + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + m_entity2locator_traffic = x.m_entity2locator_traffic; + break; + + + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + m_entity_count = x.m_entity_count; + break; + + + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + m_discovery_time = x.m_discovery_time; + break; + + + case eprosima::fastdds::statistics::SAMPLE_DATAS: + m_sample_identity_count = x.m_sample_identity_count; + break; + + + case eprosima::fastdds::statistics::PHYSICAL_DATA: + m_physical_data = x.m_physical_data; + break; + + default: + break; + } + } + + /*! + * @brief Move constructor. + * @param x Reference to the object Data that will be copied. + */ + eProsima_user_DllExport Data( + Data&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + m_writer_reader_data = std::move(x.m_writer_reader_data); + + break; + + + case eprosima::fastdds::statistics::NETWORK_LATENCY: + m_locator2locator_data = std::move(x.m_locator2locator_data); + + break; + + + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + m_entity_data = std::move(x.m_entity_data); + + break; + + + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + m_entity2locator_traffic = std::move(x.m_entity2locator_traffic); + + break; + + + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + m_entity_count = std::move(x.m_entity_count); + + break; + + + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + m_discovery_time = std::move(x.m_discovery_time); + + break; + + + case eprosima::fastdds::statistics::SAMPLE_DATAS: + m_sample_identity_count = std::move(x.m_sample_identity_count); + + break; + + + case eprosima::fastdds::statistics::PHYSICAL_DATA: + m_physical_data = std::move(x.m_physical_data); + + break; + + default: + break; + } + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object Data that will be copied. + */ + eProsima_user_DllExport Data& operator =( + const Data& x) + { + m__d = x.m__d; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + m_writer_reader_data = x.m_writer_reader_data; + break; + + + case eprosima::fastdds::statistics::NETWORK_LATENCY: + m_locator2locator_data = x.m_locator2locator_data; + break; + + + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + m_entity_data = x.m_entity_data; + break; + + + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + m_entity2locator_traffic = x.m_entity2locator_traffic; + break; + + + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + m_entity_count = x.m_entity_count; + break; + + + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + m_discovery_time = x.m_discovery_time; + break; + + + case eprosima::fastdds::statistics::SAMPLE_DATAS: + m_sample_identity_count = x.m_sample_identity_count; + break; + + + case eprosima::fastdds::statistics::PHYSICAL_DATA: + m_physical_data = x.m_physical_data; + break; + + default: + break; + } + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object Data that will be copied. + */ + eProsima_user_DllExport Data& operator =( + Data&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + m_writer_reader_data = std::move(x.m_writer_reader_data); + + break; + + + case eprosima::fastdds::statistics::NETWORK_LATENCY: + m_locator2locator_data = std::move(x.m_locator2locator_data); + + break; + + + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + m_entity_data = std::move(x.m_entity_data); + + break; + + + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + m_entity2locator_traffic = std::move(x.m_entity2locator_traffic); + + break; + + + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + m_entity_count = std::move(x.m_entity_count); + + break; + + + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + m_discovery_time = std::move(x.m_discovery_time); + + break; + + + case eprosima::fastdds::statistics::SAMPLE_DATAS: + m_sample_identity_count = std::move(x.m_sample_identity_count); + + break; + + + case eprosima::fastdds::statistics::PHYSICAL_DATA: + m_physical_data = std::move(x.m_physical_data); + + break; + + default: + break; + } + + return *this; + } + + /*! + * @brief Comparison operator. + * @param x Data object to compare. + */ + eProsima_user_DllExport bool operator ==( + const Data& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + return (m_writer_reader_data == x.m_writer_reader_data); + break; + + + case eprosima::fastdds::statistics::NETWORK_LATENCY: + return (m_locator2locator_data == x.m_locator2locator_data); + break; + + + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + return (m_entity_data == x.m_entity_data); + break; + + + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + return (m_entity2locator_traffic == x.m_entity2locator_traffic); + break; + + + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + return (m_entity_count == x.m_entity_count); + break; + + + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + return (m_discovery_time == x.m_discovery_time); + break; + + + case eprosima::fastdds::statistics::SAMPLE_DATAS: + return (m_sample_identity_count == x.m_sample_identity_count); + break; + + + case eprosima::fastdds::statistics::PHYSICAL_DATA: + return (m_physical_data == x.m_physical_data); + break; + + default: + break; + } + return false; + } + + /*! + * @brief Comparison operator. + * @param x Data object to compare. + */ + eProsima_user_DllExport bool operator !=( + const Data& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets the discriminator value. + * @param __d New value for the discriminator. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + */ + eProsima_user_DllExport void _d( + EventKind __d) + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + switch (__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::NETWORK_LATENCY: + switch (__d) + { + case eprosima::fastdds::statistics::NETWORK_LATENCY: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + switch (__d) + { + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + switch (__d) + { + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + switch (__d) + { + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + switch (__d) + { + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::SAMPLE_DATAS: + switch (__d) + { + case eprosima::fastdds::statistics::SAMPLE_DATAS: + b = true; + break; + default: + break; + } + break; + + + case eprosima::fastdds::statistics::PHYSICAL_DATA: + switch (__d) + { + case eprosima::fastdds::statistics::PHYSICAL_DATA: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } + + /*! + * @brief This function returns the value of the discriminator. + * @return Value of the discriminator + */ + eProsima_user_DllExport EventKind _d() const + { + return m__d; + } + + /*! + * @brief This function returns a reference to the discriminator. + * @return Reference to the discriminator. + */ + eProsima_user_DllExport EventKind& _d() + { + return m__d; + } + + /*! + * @brief This function copies the value in member writer_reader_data + * @param _writer_reader_data New value to be copied in member writer_reader_data + */ + eProsima_user_DllExport void writer_reader_data( + const WriterReaderData& _writer_reader_data) + { + m_writer_reader_data = _writer_reader_data; + m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; + + } + + /*! + * @brief This function moves the value in member writer_reader_data + * @param _writer_reader_data New value to be moved in member writer_reader_data + */ + eProsima_user_DllExport void writer_reader_data( + WriterReaderData&& _writer_reader_data) + { + m_writer_reader_data = std::move(_writer_reader_data); + m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; + + } + + /*! + * @brief This function returns a constant reference to member writer_reader_data + * @return Constant reference to member writer_reader_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const WriterReaderData& writer_reader_data() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_writer_reader_data; + } + + /*! + * @brief This function returns a reference to member writer_reader_data + * @return Reference to member writer_reader_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport WriterReaderData& writer_reader_data() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_writer_reader_data; + } + + + /*! + * @brief This function copies the value in member locator2locator_data + * @param _locator2locator_data New value to be copied in member locator2locator_data + */ + eProsima_user_DllExport void locator2locator_data( + const Locator2LocatorData& _locator2locator_data) + { + m_locator2locator_data = _locator2locator_data; + m__d = eprosima::fastdds::statistics::NETWORK_LATENCY; + + } + + /*! + * @brief This function moves the value in member locator2locator_data + * @param _locator2locator_data New value to be moved in member locator2locator_data + */ + eProsima_user_DllExport void locator2locator_data( + Locator2LocatorData&& _locator2locator_data) + { + m_locator2locator_data = std::move(_locator2locator_data); + m__d = eprosima::fastdds::statistics::NETWORK_LATENCY; + + } + + /*! + * @brief This function returns a constant reference to member locator2locator_data + * @return Constant reference to member locator2locator_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const Locator2LocatorData& locator2locator_data() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::NETWORK_LATENCY: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_locator2locator_data; + } + + /*! + * @brief This function returns a reference to member locator2locator_data + * @return Reference to member locator2locator_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport Locator2LocatorData& locator2locator_data() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::NETWORK_LATENCY: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_locator2locator_data; + } + + + /*! + * @brief This function copies the value in member entity_data + * @param _entity_data New value to be copied in member entity_data + */ + eProsima_user_DllExport void entity_data( + const EntityData& _entity_data) + { + m_entity_data = _entity_data; + m__d = eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT; + + } + + /*! + * @brief This function moves the value in member entity_data + * @param _entity_data New value to be moved in member entity_data + */ + eProsima_user_DllExport void entity_data( + EntityData&& _entity_data) + { + m_entity_data = std::move(_entity_data); + m__d = eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT; + + } + + /*! + * @brief This function returns a constant reference to member entity_data + * @return Constant reference to member entity_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const EntityData& entity_data() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_entity_data; + } + + /*! + * @brief This function returns a reference to member entity_data + * @return Reference to member entity_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport EntityData& entity_data() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: + case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_entity_data; + } + + + /*! + * @brief This function copies the value in member entity2locator_traffic + * @param _entity2locator_traffic New value to be copied in member entity2locator_traffic + */ + eProsima_user_DllExport void entity2locator_traffic( + const Entity2LocatorTraffic& _entity2locator_traffic) + { + m_entity2locator_traffic = _entity2locator_traffic; + m__d = eprosima::fastdds::statistics::RTPS_SENT; + + } + + /*! + * @brief This function moves the value in member entity2locator_traffic + * @param _entity2locator_traffic New value to be moved in member entity2locator_traffic + */ + eProsima_user_DllExport void entity2locator_traffic( + Entity2LocatorTraffic&& _entity2locator_traffic) + { + m_entity2locator_traffic = std::move(_entity2locator_traffic); + m__d = eprosima::fastdds::statistics::RTPS_SENT; + + } + + /*! + * @brief This function returns a constant reference to member entity2locator_traffic + * @return Constant reference to member entity2locator_traffic + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const Entity2LocatorTraffic& entity2locator_traffic() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_entity2locator_traffic; + } + + /*! + * @brief This function returns a reference to member entity2locator_traffic + * @return Reference to member entity2locator_traffic + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport Entity2LocatorTraffic& entity2locator_traffic() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::RTPS_SENT: + case eprosima::fastdds::statistics::RTPS_LOST: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_entity2locator_traffic; + } + + + /*! + * @brief This function copies the value in member entity_count + * @param _entity_count New value to be copied in member entity_count + */ + eProsima_user_DllExport void entity_count( + const EntityCount& _entity_count) + { + m_entity_count = _entity_count; + m__d = eprosima::fastdds::statistics::RESENT_DATAS; + + } + + /*! + * @brief This function moves the value in member entity_count + * @param _entity_count New value to be moved in member entity_count + */ + eProsima_user_DllExport void entity_count( + EntityCount&& _entity_count) + { + m_entity_count = std::move(_entity_count); + m__d = eprosima::fastdds::statistics::RESENT_DATAS; + + } + + /*! + * @brief This function returns a constant reference to member entity_count + * @return Constant reference to member entity_count + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const EntityCount& entity_count() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_entity_count; + } + + /*! + * @brief This function returns a reference to member entity_count + * @return Reference to member entity_count + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport EntityCount& entity_count() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::RESENT_DATAS: + case eprosima::fastdds::statistics::HEARTBEAT_COUNT: + case eprosima::fastdds::statistics::ACKNACK_COUNT: + case eprosima::fastdds::statistics::NACKFRAG_COUNT: + case eprosima::fastdds::statistics::GAP_COUNT: + case eprosima::fastdds::statistics::DATA_COUNT: + case eprosima::fastdds::statistics::PDP_PACKETS: + case eprosima::fastdds::statistics::EDP_PACKETS: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_entity_count; + } + + + /*! + * @brief This function copies the value in member discovery_time + * @param _discovery_time New value to be copied in member discovery_time + */ + eProsima_user_DllExport void discovery_time( + const DiscoveryTime& _discovery_time) + { + m_discovery_time = _discovery_time; + m__d = eprosima::fastdds::statistics::DISCOVERED_ENTITY; + + } + + /*! + * @brief This function moves the value in member discovery_time + * @param _discovery_time New value to be moved in member discovery_time + */ + eProsima_user_DllExport void discovery_time( + DiscoveryTime&& _discovery_time) + { + m_discovery_time = std::move(_discovery_time); + m__d = eprosima::fastdds::statistics::DISCOVERED_ENTITY; + + } + + /*! + * @brief This function returns a constant reference to member discovery_time + * @return Constant reference to member discovery_time + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const DiscoveryTime& discovery_time() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_discovery_time; + } + + /*! + * @brief This function returns a reference to member discovery_time + * @return Reference to member discovery_time + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport DiscoveryTime& discovery_time() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::DISCOVERED_ENTITY: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_discovery_time; + } + + + /*! + * @brief This function copies the value in member sample_identity_count + * @param _sample_identity_count New value to be copied in member sample_identity_count + */ + eProsima_user_DllExport void sample_identity_count( + const SampleIdentityCount& _sample_identity_count) + { + m_sample_identity_count = _sample_identity_count; + m__d = eprosima::fastdds::statistics::SAMPLE_DATAS; + + } + + /*! + * @brief This function moves the value in member sample_identity_count + * @param _sample_identity_count New value to be moved in member sample_identity_count + */ + eProsima_user_DllExport void sample_identity_count( + SampleIdentityCount&& _sample_identity_count) + { + m_sample_identity_count = std::move(_sample_identity_count); + m__d = eprosima::fastdds::statistics::SAMPLE_DATAS; + + } + + /*! + * @brief This function returns a constant reference to member sample_identity_count + * @return Constant reference to member sample_identity_count + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const SampleIdentityCount& sample_identity_count() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::SAMPLE_DATAS: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_sample_identity_count; + } + + /*! + * @brief This function returns a reference to member sample_identity_count + * @return Reference to member sample_identity_count + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport SampleIdentityCount& sample_identity_count() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::SAMPLE_DATAS: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_sample_identity_count; + } + + + /*! + * @brief This function copies the value in member physical_data + * @param _physical_data New value to be copied in member physical_data + */ + eProsima_user_DllExport void physical_data( + const PhysicalData& _physical_data) + { + m_physical_data = _physical_data; + m__d = eprosima::fastdds::statistics::PHYSICAL_DATA; + + } + + /*! + * @brief This function moves the value in member physical_data + * @param _physical_data New value to be moved in member physical_data + */ + eProsima_user_DllExport void physical_data( + PhysicalData&& _physical_data) + { + m_physical_data = std::move(_physical_data); + m__d = eprosima::fastdds::statistics::PHYSICAL_DATA; + + } + + /*! + * @brief This function returns a constant reference to member physical_data + * @return Constant reference to member physical_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport const PhysicalData& physical_data() const + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::PHYSICAL_DATA: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_physical_data; + } + + /*! + * @brief This function returns a reference to member physical_data + * @return Reference to member physical_data + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport PhysicalData& physical_data() + { + bool b = false; + + switch (m__d) + { + case eprosima::fastdds::statistics::PHYSICAL_DATA: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_physical_data; + } + + + +private: + + EventKind m__d; + + WriterReaderData m_writer_reader_data; + Locator2LocatorData m_locator2locator_data; + EntityData m_entity_data; + Entity2LocatorTraffic m_entity2locator_traffic; + EntityCount m_entity_count; + DiscoveryTime m_discovery_time; + SampleIdentityCount m_sample_identity_count; + PhysicalData m_physical_data; +}; + +} // namespace statistics + +} // namespace fastdds + +} // namespace eprosima + +#endif // _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_HPP_ + + diff --git a/test/blackbox/types/statistics/typesCdrAux.hpp b/test/blackbox/types/statistics/typesCdrAux.hpp index 92b36ffa689..d6cf6299463 100644 --- a/test/blackbox/types/statistics/typesCdrAux.hpp +++ b/test/blackbox/types/statistics/typesCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPESCDRAUX_HPP_ #define _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPESCDRAUX_HPP_ -#include "types.h" +#include "types.hpp" constexpr uint32_t eprosima_fastdds_statistics_DiscoveryTime_max_cdr_typesize {852UL}; constexpr uint32_t eprosima_fastdds_statistics_DiscoveryTime_max_key_cdr_typesize {56UL}; @@ -113,7 +113,6 @@ eProsima_user_DllExport void serialize_key( - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const eprosima::fastdds::statistics::DiscoveryTime& data); @@ -164,11 +163,6 @@ eProsima_user_DllExport void serialize_key( - - - - - } // namespace fastcdr } // namespace eprosima diff --git a/test/blackbox/types/statistics/typesCdrAux.ipp b/test/blackbox/types/statistics/typesCdrAux.ipp index feec2a39a65..0f68f38bc16 100644 --- a/test/blackbox/types/statistics/typesCdrAux.ipp +++ b/test/blackbox/types/statistics/typesCdrAux.ipp @@ -592,7 +592,6 @@ void serialize_key( - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1692,9 +1691,6 @@ eProsima_user_DllExport void deserialize( } - - - } // namespace fastcdr } // namespace eprosima diff --git a/test/blackbox/types/statistics/typesPubSubTypes.cxx b/test/blackbox/types/statistics/typesPubSubTypes.cxx index 5d92b732491..9046fabb418 100644 --- a/test/blackbox/types/statistics/typesPubSubTypes.cxx +++ b/test/blackbox/types/statistics/typesPubSubTypes.cxx @@ -1173,8 +1173,7 @@ namespace eprosima { return true; } - - } //End of namespace detail + } // namespace detail @@ -2699,14 +2698,12 @@ namespace eprosima { + } // namespace statistics + } // namespace fastdds +} // namespace eprosima - } //End of namespace statistics - - - } //End of namespace fastdds - - -} //End of namespace eprosima +// Include auxiliary functions like for serializing/deserializing. +#include "typesCdrAux.ipp" diff --git a/test/blackbox/types/statistics/typesPubSubTypes.h b/test/blackbox/types/statistics/typesPubSubTypes.h index 33e545416c8..2094a912f4c 100644 --- a/test/blackbox/types/statistics/typesPubSubTypes.h +++ b/test/blackbox/types/statistics/typesPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "types.h" +#include "types.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -585,7 +585,7 @@ namespace eprosima unsigned char* m_keyBuffer; }; - } + } // namespace detail @@ -1309,11 +1309,9 @@ namespace eprosima - - - } - } -} + } // namespace statistics + } // namespace fastdds +} // namespace eprosima #endif // _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_PUBSUBTYPES_H_ diff --git a/test/blackbox/types/statistics/typesv1.cxx b/test/blackbox/types/statistics/typesv1.cxx deleted file mode 100644 index 80c55edc2e6..00000000000 --- a/test/blackbox/types/statistics/typesv1.cxx +++ /dev/null @@ -1,4757 +0,0 @@ -// 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 types.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "types.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define eprosima_fastdds_statistics_DiscoveryTime_max_cdr_typesize 852ULL; -#define eprosima_fastdds_statistics_PhysicalData_max_cdr_typesize 812ULL; - -#define eprosima_fastdds_statistics_detail_Locator_s_max_cdr_typesize 28ULL; - -#define eprosima_fastdds_statistics_detail_GuidPrefix_s_max_cdr_typesize 16ULL; -#define eprosima_fastdds_statistics_detail_SampleIdentity_s_max_cdr_typesize 44ULL; -#define eprosima_fastdds_statistics_EntityData_max_cdr_typesize 36ULL; -#define eprosima_fastdds_statistics_Entity2LocatorTraffic_max_cdr_typesize 82ULL; -#define eprosima_fastdds_statistics_detail_EntityId_s_max_cdr_typesize 8ULL; -#define eprosima_fastdds_statistics_EntityCount_max_cdr_typesize 40ULL; -#define eprosima_fastdds_statistics_WriterReaderData_max_cdr_typesize 64ULL; -#define eprosima_fastdds_statistics_SampleIdentityCount_max_cdr_typesize 56ULL; -#define eprosima_fastdds_statistics_Locator2LocatorData_max_cdr_typesize 64ULL; -#define eprosima_fastdds_statistics_detail_GUID_s_max_cdr_typesize 28ULL; -#define eprosima_fastdds_statistics_detail_SequenceNumber_s_max_cdr_typesize 12ULL; - - -namespace eprosima { - -namespace fastdds { - -namespace statistics { - -namespace detail { - - - -EntityId_s::EntityId_s() -{ - // octet m_value - memset(&m_value, 0, ((4)) * 1); - -} - -EntityId_s::~EntityId_s() -{ -} - -EntityId_s::EntityId_s( - const EntityId_s& x) -{ - m_value = x.m_value; - -} - -EntityId_s::EntityId_s( - EntityId_s&& x) noexcept -{ - m_value = std::move(x.m_value); - -} - -EntityId_s& EntityId_s::operator =( - const EntityId_s& x) -{ - m_value = x.m_value; - - return *this; -} - -EntityId_s& EntityId_s::operator =( - EntityId_s&& x) noexcept -{ - m_value = std::move(x.m_value); - - return *this; -} - -bool EntityId_s::operator ==( - const EntityId_s& x) const -{ - return (m_value == x.m_value); -} - -bool EntityId_s::operator !=( - const EntityId_s& x) const -{ - return !(*this == x); -} - -size_t EntityId_s::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_detail_EntityId_s_max_cdr_typesize; -} - -size_t EntityId_s::getCdrSerializedSize( - const EntityId_s& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((4)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void EntityId_s::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_value; - - -} - -void EntityId_s::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_value; - - -} - - -bool EntityId_s::isKeyDefined() -{ - return false; -} - -void EntityId_s::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ -void EntityId_s::value( - const std::array& _value) -{ - m_value = _value; -} - -/*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ -void EntityId_s::value( - std::array&& _value) -{ - m_value = std::move(_value); -} - -/*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ -const std::array& EntityId_s::value() const -{ - return m_value; -} - -/*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ -std::array& EntityId_s::value() -{ - return m_value; -} - - - - - -GuidPrefix_s::GuidPrefix_s() -{ - // octet m_value - memset(&m_value, 0, ((12)) * 1); - -} - -GuidPrefix_s::~GuidPrefix_s() -{ -} - -GuidPrefix_s::GuidPrefix_s( - const GuidPrefix_s& x) -{ - m_value = x.m_value; - -} - -GuidPrefix_s::GuidPrefix_s( - GuidPrefix_s&& x) noexcept -{ - m_value = std::move(x.m_value); - -} - -GuidPrefix_s& GuidPrefix_s::operator =( - const GuidPrefix_s& x) -{ - m_value = x.m_value; - - return *this; -} - -GuidPrefix_s& GuidPrefix_s::operator =( - GuidPrefix_s&& x) noexcept -{ - m_value = std::move(x.m_value); - - return *this; -} - -bool GuidPrefix_s::operator ==( - const GuidPrefix_s& x) const -{ - return (m_value == x.m_value); -} - -bool GuidPrefix_s::operator !=( - const GuidPrefix_s& x) const -{ - return !(*this == x); -} - -size_t GuidPrefix_s::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_detail_GuidPrefix_s_max_cdr_typesize; -} - -size_t GuidPrefix_s::getCdrSerializedSize( - const GuidPrefix_s& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((12)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void GuidPrefix_s::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_value; - - -} - -void GuidPrefix_s::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_value; - - -} - - -bool GuidPrefix_s::isKeyDefined() -{ - return false; -} - -void GuidPrefix_s::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ -void GuidPrefix_s::value( - const std::array& _value) -{ - m_value = _value; -} - -/*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ -void GuidPrefix_s::value( - std::array&& _value) -{ - m_value = std::move(_value); -} - -/*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ -const std::array& GuidPrefix_s::value() const -{ - return m_value; -} - -/*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ -std::array& GuidPrefix_s::value() -{ - return m_value; -} - - - - - -GUID_s::GUID_s() -{ - // eprosima::fastdds::statistics::detail::GuidPrefix_s m_guidPrefix - - // eprosima::fastdds::statistics::detail::EntityId_s m_entityId - - -} - -GUID_s::~GUID_s() -{ -} - -GUID_s::GUID_s( - const GUID_s& x) -{ - m_guidPrefix = x.m_guidPrefix; - - - m_entityId = x.m_entityId; - -} - -GUID_s::GUID_s( - GUID_s&& x) noexcept -{ - m_guidPrefix = std::move(x.m_guidPrefix); - - - m_entityId = std::move(x.m_entityId); - -} - -GUID_s& GUID_s::operator =( - const GUID_s& x) -{ - m_guidPrefix = x.m_guidPrefix; - - - m_entityId = x.m_entityId; - - return *this; -} - -GUID_s& GUID_s::operator =( - GUID_s&& x) noexcept -{ - m_guidPrefix = std::move(x.m_guidPrefix); - - - m_entityId = std::move(x.m_entityId); - - return *this; -} - -bool GUID_s::operator ==( - const GUID_s& x) const -{ - return (m_guidPrefix == x.m_guidPrefix && - m_entityId == x.m_entityId); -} - -bool GUID_s::operator !=( - const GUID_s& x) const -{ - return !(*this == x); -} - -size_t GUID_s::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_detail_GUID_s_max_cdr_typesize; -} - -size_t GUID_s::getCdrSerializedSize( - const GUID_s& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GuidPrefix_s::getCdrSerializedSize(data.guidPrefix(), current_alignment); - - - current_alignment += eprosima::fastdds::statistics::detail::EntityId_s::getCdrSerializedSize(data.entityId(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void GUID_s::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_guidPrefix; - - scdr << m_entityId; - -} - -void GUID_s::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_guidPrefix; - - - - dcdr >> m_entityId; - - -} - - -bool GUID_s::isKeyDefined() -{ - return false; -} - -void GUID_s::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member guidPrefix - * @param _guidPrefix New value to be copied in member guidPrefix - */ -void GUID_s::guidPrefix( - const eprosima::fastdds::statistics::detail::GuidPrefix_s& _guidPrefix) -{ - m_guidPrefix = _guidPrefix; -} - -/*! - * @brief This function moves the value in member guidPrefix - * @param _guidPrefix New value to be moved in member guidPrefix - */ -void GUID_s::guidPrefix( - eprosima::fastdds::statistics::detail::GuidPrefix_s&& _guidPrefix) -{ - m_guidPrefix = std::move(_guidPrefix); -} - -/*! - * @brief This function returns a constant reference to member guidPrefix - * @return Constant reference to member guidPrefix - */ -const eprosima::fastdds::statistics::detail::GuidPrefix_s& GUID_s::guidPrefix() const -{ - return m_guidPrefix; -} - -/*! - * @brief This function returns a reference to member guidPrefix - * @return Reference to member guidPrefix - */ -eprosima::fastdds::statistics::detail::GuidPrefix_s& GUID_s::guidPrefix() -{ - return m_guidPrefix; -} - - -/*! - * @brief This function copies the value in member entityId - * @param _entityId New value to be copied in member entityId - */ -void GUID_s::entityId( - const eprosima::fastdds::statistics::detail::EntityId_s& _entityId) -{ - m_entityId = _entityId; -} - -/*! - * @brief This function moves the value in member entityId - * @param _entityId New value to be moved in member entityId - */ -void GUID_s::entityId( - eprosima::fastdds::statistics::detail::EntityId_s&& _entityId) -{ - m_entityId = std::move(_entityId); -} - -/*! - * @brief This function returns a constant reference to member entityId - * @return Constant reference to member entityId - */ -const eprosima::fastdds::statistics::detail::EntityId_s& GUID_s::entityId() const -{ - return m_entityId; -} - -/*! - * @brief This function returns a reference to member entityId - * @return Reference to member entityId - */ -eprosima::fastdds::statistics::detail::EntityId_s& GUID_s::entityId() -{ - return m_entityId; -} - - - - - -SequenceNumber_s::SequenceNumber_s() -{ - // long m_high - m_high = 0; - // unsigned long m_low - m_low = 0; - -} - -SequenceNumber_s::~SequenceNumber_s() -{ -} - -SequenceNumber_s::SequenceNumber_s( - const SequenceNumber_s& x) -{ - m_high = x.m_high; - - - m_low = x.m_low; - -} - -SequenceNumber_s::SequenceNumber_s( - SequenceNumber_s&& x) noexcept -{ - m_high = x.m_high; - - - m_low = x.m_low; - -} - -SequenceNumber_s& SequenceNumber_s::operator =( - const SequenceNumber_s& x) -{ - m_high = x.m_high; - - - m_low = x.m_low; - - return *this; -} - -SequenceNumber_s& SequenceNumber_s::operator =( - SequenceNumber_s&& x) noexcept -{ - m_high = x.m_high; - - - m_low = x.m_low; - - return *this; -} - -bool SequenceNumber_s::operator ==( - const SequenceNumber_s& x) const -{ - return (m_high == x.m_high && - m_low == x.m_low); -} - -bool SequenceNumber_s::operator !=( - const SequenceNumber_s& x) const -{ - return !(*this == x); -} - -size_t SequenceNumber_s::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_detail_SequenceNumber_s_max_cdr_typesize; -} - -size_t SequenceNumber_s::getCdrSerializedSize( - const SequenceNumber_s& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void SequenceNumber_s::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_high; - - scdr << m_low; - -} - -void SequenceNumber_s::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_high; - - - - dcdr >> m_low; - - -} - - -bool SequenceNumber_s::isKeyDefined() -{ - return false; -} - -void SequenceNumber_s::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member high - * @param _high New value for member high - */ -void SequenceNumber_s::high( - int32_t _high) -{ - m_high = _high; -} - -/*! - * @brief This function returns the value of member high - * @return Value of member high - */ -int32_t SequenceNumber_s::high() const -{ - return m_high; -} - -/*! - * @brief This function returns a reference to member high - * @return Reference to member high - */ -int32_t& SequenceNumber_s::high() -{ - return m_high; -} - - -/*! - * @brief This function sets a value in member low - * @param _low New value for member low - */ -void SequenceNumber_s::low( - uint32_t _low) -{ - m_low = _low; -} - -/*! - * @brief This function returns the value of member low - * @return Value of member low - */ -uint32_t SequenceNumber_s::low() const -{ - return m_low; -} - -/*! - * @brief This function returns a reference to member low - * @return Reference to member low - */ -uint32_t& SequenceNumber_s::low() -{ - return m_low; -} - - - - - -SampleIdentity_s::SampleIdentity_s() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_writer_guid - - // eprosima::fastdds::statistics::detail::SequenceNumber_s m_sequence_number - - -} - -SampleIdentity_s::~SampleIdentity_s() -{ -} - -SampleIdentity_s::SampleIdentity_s( - const SampleIdentity_s& x) -{ - m_writer_guid = x.m_writer_guid; - - - m_sequence_number = x.m_sequence_number; - -} - -SampleIdentity_s::SampleIdentity_s( - SampleIdentity_s&& x) noexcept -{ - m_writer_guid = std::move(x.m_writer_guid); - - - m_sequence_number = std::move(x.m_sequence_number); - -} - -SampleIdentity_s& SampleIdentity_s::operator =( - const SampleIdentity_s& x) -{ - m_writer_guid = x.m_writer_guid; - - - m_sequence_number = x.m_sequence_number; - - return *this; -} - -SampleIdentity_s& SampleIdentity_s::operator =( - SampleIdentity_s&& x) noexcept -{ - m_writer_guid = std::move(x.m_writer_guid); - - - m_sequence_number = std::move(x.m_sequence_number); - - return *this; -} - -bool SampleIdentity_s::operator ==( - const SampleIdentity_s& x) const -{ - return (m_writer_guid == x.m_writer_guid && - m_sequence_number == x.m_sequence_number); -} - -bool SampleIdentity_s::operator !=( - const SampleIdentity_s& x) const -{ - return !(*this == x); -} - -size_t SampleIdentity_s::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_detail_SampleIdentity_s_max_cdr_typesize; -} - -size_t SampleIdentity_s::getCdrSerializedSize( - const SampleIdentity_s& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.writer_guid(), current_alignment); - - - current_alignment += eprosima::fastdds::statistics::detail::SequenceNumber_s::getCdrSerializedSize(data.sequence_number(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SampleIdentity_s::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_writer_guid; - - scdr << m_sequence_number; - -} - -void SampleIdentity_s::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_writer_guid; - - - - dcdr >> m_sequence_number; - - -} - - -bool SampleIdentity_s::isKeyDefined() -{ - return false; -} - -void SampleIdentity_s::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ -void SampleIdentity_s::writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid) -{ - m_writer_guid = _writer_guid; -} - -/*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ -void SampleIdentity_s::writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid) -{ - m_writer_guid = std::move(_writer_guid); -} - -/*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& SampleIdentity_s::writer_guid() const -{ - return m_writer_guid; -} - -/*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& SampleIdentity_s::writer_guid() -{ - return m_writer_guid; -} - - -/*! - * @brief This function copies the value in member sequence_number - * @param _sequence_number New value to be copied in member sequence_number - */ -void SampleIdentity_s::sequence_number( - const eprosima::fastdds::statistics::detail::SequenceNumber_s& _sequence_number) -{ - m_sequence_number = _sequence_number; -} - -/*! - * @brief This function moves the value in member sequence_number - * @param _sequence_number New value to be moved in member sequence_number - */ -void SampleIdentity_s::sequence_number( - eprosima::fastdds::statistics::detail::SequenceNumber_s&& _sequence_number) -{ - m_sequence_number = std::move(_sequence_number); -} - -/*! - * @brief This function returns a constant reference to member sequence_number - * @return Constant reference to member sequence_number - */ -const eprosima::fastdds::statistics::detail::SequenceNumber_s& SampleIdentity_s::sequence_number() const -{ - return m_sequence_number; -} - -/*! - * @brief This function returns a reference to member sequence_number - * @return Reference to member sequence_number - */ -eprosima::fastdds::statistics::detail::SequenceNumber_s& SampleIdentity_s::sequence_number() -{ - return m_sequence_number; -} - - - - - -Locator_s::Locator_s() -{ - // long m_kind - m_kind = 0; - // unsigned long m_port - m_port = 0; - // octet m_address - memset(&m_address, 0, ((16)) * 1); - -} - -Locator_s::~Locator_s() -{ -} - -Locator_s::Locator_s( - const Locator_s& x) -{ - m_kind = x.m_kind; - - - m_port = x.m_port; - - - m_address = x.m_address; - -} - -Locator_s::Locator_s( - Locator_s&& x) noexcept -{ - m_kind = x.m_kind; - - - m_port = x.m_port; - - - m_address = std::move(x.m_address); - -} - -Locator_s& Locator_s::operator =( - const Locator_s& x) -{ - m_kind = x.m_kind; - - - m_port = x.m_port; - - - m_address = x.m_address; - - return *this; -} - -Locator_s& Locator_s::operator =( - Locator_s&& x) noexcept -{ - m_kind = x.m_kind; - - - m_port = x.m_port; - - - m_address = std::move(x.m_address); - - return *this; -} - -bool Locator_s::operator ==( - const Locator_s& x) const -{ - return (m_kind == x.m_kind && - m_port == x.m_port && - m_address == x.m_address); -} - -bool Locator_s::operator !=( - const Locator_s& x) const -{ - return !(*this == x); -} - -size_t Locator_s::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_detail_Locator_s_max_cdr_typesize; -} - -size_t Locator_s::getCdrSerializedSize( - const Locator_s& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += (((16)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void Locator_s::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_kind; - - scdr << m_port; - - scdr << m_address; - - -} - -void Locator_s::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_kind; - - - - dcdr >> m_port; - - - - dcdr >> m_address; - - -} - - -bool Locator_s::isKeyDefined() -{ - return false; -} - -void Locator_s::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member kind - * @param _kind New value for member kind - */ -void Locator_s::kind( - int32_t _kind) -{ - m_kind = _kind; -} - -/*! - * @brief This function returns the value of member kind - * @return Value of member kind - */ -int32_t Locator_s::kind() const -{ - return m_kind; -} - -/*! - * @brief This function returns a reference to member kind - * @return Reference to member kind - */ -int32_t& Locator_s::kind() -{ - return m_kind; -} - - -/*! - * @brief This function sets a value in member port - * @param _port New value for member port - */ -void Locator_s::port( - uint32_t _port) -{ - m_port = _port; -} - -/*! - * @brief This function returns the value of member port - * @return Value of member port - */ -uint32_t Locator_s::port() const -{ - return m_port; -} - -/*! - * @brief This function returns a reference to member port - * @return Reference to member port - */ -uint32_t& Locator_s::port() -{ - return m_port; -} - - -/*! - * @brief This function copies the value in member address - * @param _address New value to be copied in member address - */ -void Locator_s::address( - const std::array& _address) -{ - m_address = _address; -} - -/*! - * @brief This function moves the value in member address - * @param _address New value to be moved in member address - */ -void Locator_s::address( - std::array&& _address) -{ - m_address = std::move(_address); -} - -/*! - * @brief This function returns a constant reference to member address - * @return Constant reference to member address - */ -const std::array& Locator_s::address() const -{ - return m_address; -} - -/*! - * @brief This function returns a reference to member address - * @return Reference to member address - */ -std::array& Locator_s::address() -{ - return m_address; -} - - - - - -} // namespace detail - - -DiscoveryTime::DiscoveryTime() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_local_participant_guid - - // eprosima::fastdds::statistics::detail::GUID_s m_remote_entity_guid - - // unsigned long long m_time - m_time = 0; - // /type_d() m_host - - // /type_d() m_user - - // /type_d() m_process - - -} - -DiscoveryTime::~DiscoveryTime() -{ -} - -DiscoveryTime::DiscoveryTime( - const DiscoveryTime& x) -{ - m_local_participant_guid = x.m_local_participant_guid; - - - m_remote_entity_guid = x.m_remote_entity_guid; - - - m_time = x.m_time; - - - m_host = x.m_host; - - - m_user = x.m_user; - - - m_process = x.m_process; - -} - -DiscoveryTime::DiscoveryTime( - DiscoveryTime&& x) noexcept -{ - m_local_participant_guid = std::move(x.m_local_participant_guid); - - - m_remote_entity_guid = std::move(x.m_remote_entity_guid); - - - m_time = x.m_time; - - - m_host = std::move(x.m_host); - - - m_user = std::move(x.m_user); - - - m_process = std::move(x.m_process); - -} - -DiscoveryTime& DiscoveryTime::operator =( - const DiscoveryTime& x) -{ - m_local_participant_guid = x.m_local_participant_guid; - - - m_remote_entity_guid = x.m_remote_entity_guid; - - - m_time = x.m_time; - - - m_host = x.m_host; - - - m_user = x.m_user; - - - m_process = x.m_process; - - return *this; -} - -DiscoveryTime& DiscoveryTime::operator =( - DiscoveryTime&& x) noexcept -{ - m_local_participant_guid = std::move(x.m_local_participant_guid); - - - m_remote_entity_guid = std::move(x.m_remote_entity_guid); - - - m_time = x.m_time; - - - m_host = std::move(x.m_host); - - - m_user = std::move(x.m_user); - - - m_process = std::move(x.m_process); - - return *this; -} - -bool DiscoveryTime::operator ==( - const DiscoveryTime& x) const -{ - return (m_local_participant_guid == x.m_local_participant_guid && - m_remote_entity_guid == x.m_remote_entity_guid && - m_time == x.m_time && - m_host == x.m_host && - m_user == x.m_user && - m_process == x.m_process); -} - -bool DiscoveryTime::operator !=( - const DiscoveryTime& x) const -{ - return !(*this == x); -} - -size_t DiscoveryTime::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_DiscoveryTime_max_cdr_typesize; -} - -size_t DiscoveryTime::getCdrSerializedSize( - const DiscoveryTime& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.local_participant_guid(), current_alignment); - - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.remote_entity_guid(), current_alignment); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.host().size() + 1; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.user().size() + 1; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.process().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void DiscoveryTime::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_local_participant_guid; - - scdr << m_remote_entity_guid; - - scdr << m_time; - - scdr << m_host.c_str(); - - scdr << m_user.c_str(); - - scdr << m_process.c_str(); - -} - -void DiscoveryTime::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_local_participant_guid; - - - - dcdr >> m_remote_entity_guid; - - - - dcdr >> m_time; - - - - dcdr >> m_host; - - - - dcdr >> m_user; - - - - dcdr >> m_process; - - -} - - -bool DiscoveryTime::isKeyDefined() -{ - return true; -} - -void DiscoveryTime::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_local_participant_guid.serialize(scdr); - m_remote_entity_guid.serialize(scdr); - - - - -} - -/*! - * @brief This function copies the value in member local_participant_guid - * @param _local_participant_guid New value to be copied in member local_participant_guid - */ -void DiscoveryTime::local_participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _local_participant_guid) -{ - m_local_participant_guid = _local_participant_guid; -} - -/*! - * @brief This function moves the value in member local_participant_guid - * @param _local_participant_guid New value to be moved in member local_participant_guid - */ -void DiscoveryTime::local_participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _local_participant_guid) -{ - m_local_participant_guid = std::move(_local_participant_guid); -} - -/*! - * @brief This function returns a constant reference to member local_participant_guid - * @return Constant reference to member local_participant_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::local_participant_guid() const -{ - return m_local_participant_guid; -} - -/*! - * @brief This function returns a reference to member local_participant_guid - * @return Reference to member local_participant_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::local_participant_guid() -{ - return m_local_participant_guid; -} - - -/*! - * @brief This function copies the value in member remote_entity_guid - * @param _remote_entity_guid New value to be copied in member remote_entity_guid - */ -void DiscoveryTime::remote_entity_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _remote_entity_guid) -{ - m_remote_entity_guid = _remote_entity_guid; -} - -/*! - * @brief This function moves the value in member remote_entity_guid - * @param _remote_entity_guid New value to be moved in member remote_entity_guid - */ -void DiscoveryTime::remote_entity_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _remote_entity_guid) -{ - m_remote_entity_guid = std::move(_remote_entity_guid); -} - -/*! - * @brief This function returns a constant reference to member remote_entity_guid - * @return Constant reference to member remote_entity_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::remote_entity_guid() const -{ - return m_remote_entity_guid; -} - -/*! - * @brief This function returns a reference to member remote_entity_guid - * @return Reference to member remote_entity_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& DiscoveryTime::remote_entity_guid() -{ - return m_remote_entity_guid; -} - - -/*! - * @brief This function sets a value in member time - * @param _time New value for member time - */ -void DiscoveryTime::time( - uint64_t _time) -{ - m_time = _time; -} - -/*! - * @brief This function returns the value of member time - * @return Value of member time - */ -uint64_t DiscoveryTime::time() const -{ - return m_time; -} - -/*! - * @brief This function returns a reference to member time - * @return Reference to member time - */ -uint64_t& DiscoveryTime::time() -{ - return m_time; -} - - -/*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ -void DiscoveryTime::host( - const std::string& _host) -{ - m_host = _host; -} - -/*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ -void DiscoveryTime::host( - std::string&& _host) -{ - m_host = std::move(_host); -} - -/*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ -const std::string& DiscoveryTime::host() const -{ - return m_host; -} - -/*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ -std::string& DiscoveryTime::host() -{ - return m_host; -} - - -/*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ -void DiscoveryTime::user( - const std::string& _user) -{ - m_user = _user; -} - -/*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ -void DiscoveryTime::user( - std::string&& _user) -{ - m_user = std::move(_user); -} - -/*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ -const std::string& DiscoveryTime::user() const -{ - return m_user; -} - -/*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ -std::string& DiscoveryTime::user() -{ - return m_user; -} - - -/*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ -void DiscoveryTime::process( - const std::string& _process) -{ - m_process = _process; -} - -/*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ -void DiscoveryTime::process( - std::string&& _process) -{ - m_process = std::move(_process); -} - -/*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ -const std::string& DiscoveryTime::process() const -{ - return m_process; -} - -/*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ -std::string& DiscoveryTime::process() -{ - return m_process; -} - - - - - -EntityCount::EntityCount() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_guid - - // unsigned long long m_count - m_count = 0; - -} - -EntityCount::~EntityCount() -{ -} - -EntityCount::EntityCount( - const EntityCount& x) -{ - m_guid = x.m_guid; - - - m_count = x.m_count; - -} - -EntityCount::EntityCount( - EntityCount&& x) noexcept -{ - m_guid = std::move(x.m_guid); - - - m_count = x.m_count; - -} - -EntityCount& EntityCount::operator =( - const EntityCount& x) -{ - m_guid = x.m_guid; - - - m_count = x.m_count; - - return *this; -} - -EntityCount& EntityCount::operator =( - EntityCount&& x) noexcept -{ - m_guid = std::move(x.m_guid); - - - m_count = x.m_count; - - return *this; -} - -bool EntityCount::operator ==( - const EntityCount& x) const -{ - return (m_guid == x.m_guid && - m_count == x.m_count); -} - -bool EntityCount::operator !=( - const EntityCount& x) const -{ - return !(*this == x); -} - -size_t EntityCount::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_EntityCount_max_cdr_typesize; -} - -size_t EntityCount::getCdrSerializedSize( - const EntityCount& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.guid(), current_alignment); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - return current_alignment - initial_alignment; -} - - -void EntityCount::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_guid; - - scdr << m_count; - -} - -void EntityCount::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_guid; - - - - dcdr >> m_count; - - -} - - -bool EntityCount::isKeyDefined() -{ - return true; -} - -void EntityCount::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_guid.serialize(scdr); - -} - -/*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ -void EntityCount::guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid) -{ - m_guid = _guid; -} - -/*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ -void EntityCount::guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid) -{ - m_guid = std::move(_guid); -} - -/*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& EntityCount::guid() const -{ - return m_guid; -} - -/*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ -eprosima::fastdds::statistics::detail::GUID_s& EntityCount::guid() -{ - return m_guid; -} - - -/*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ -void EntityCount::count( - uint64_t _count) -{ - m_count = _count; -} - -/*! - * @brief This function returns the value of member count - * @return Value of member count - */ -uint64_t EntityCount::count() const -{ - return m_count; -} - -/*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ -uint64_t& EntityCount::count() -{ - return m_count; -} - - - - - -SampleIdentityCount::SampleIdentityCount() -{ - // eprosima::fastdds::statistics::detail::SampleIdentity_s m_sample_id - - // unsigned long long m_count - m_count = 0; - -} - -SampleIdentityCount::~SampleIdentityCount() -{ -} - -SampleIdentityCount::SampleIdentityCount( - const SampleIdentityCount& x) -{ - m_sample_id = x.m_sample_id; - - - m_count = x.m_count; - -} - -SampleIdentityCount::SampleIdentityCount( - SampleIdentityCount&& x) noexcept -{ - m_sample_id = std::move(x.m_sample_id); - - - m_count = x.m_count; - -} - -SampleIdentityCount& SampleIdentityCount::operator =( - const SampleIdentityCount& x) -{ - m_sample_id = x.m_sample_id; - - - m_count = x.m_count; - - return *this; -} - -SampleIdentityCount& SampleIdentityCount::operator =( - SampleIdentityCount&& x) noexcept -{ - m_sample_id = std::move(x.m_sample_id); - - - m_count = x.m_count; - - return *this; -} - -bool SampleIdentityCount::operator ==( - const SampleIdentityCount& x) const -{ - return (m_sample_id == x.m_sample_id && - m_count == x.m_count); -} - -bool SampleIdentityCount::operator !=( - const SampleIdentityCount& x) const -{ - return !(*this == x); -} - -size_t SampleIdentityCount::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_SampleIdentityCount_max_cdr_typesize; -} - -size_t SampleIdentityCount::getCdrSerializedSize( - const SampleIdentityCount& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::SampleIdentity_s::getCdrSerializedSize(data.sample_id(), current_alignment); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - return current_alignment - initial_alignment; -} - - -void SampleIdentityCount::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_sample_id; - - scdr << m_count; - -} - -void SampleIdentityCount::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_sample_id; - - - - dcdr >> m_count; - - -} - - -bool SampleIdentityCount::isKeyDefined() -{ - return true; -} - -void SampleIdentityCount::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_sample_id.serialize(scdr); - -} - -/*! - * @brief This function copies the value in member sample_id - * @param _sample_id New value to be copied in member sample_id - */ -void SampleIdentityCount::sample_id( - const eprosima::fastdds::statistics::detail::SampleIdentity_s& _sample_id) -{ - m_sample_id = _sample_id; -} - -/*! - * @brief This function moves the value in member sample_id - * @param _sample_id New value to be moved in member sample_id - */ -void SampleIdentityCount::sample_id( - eprosima::fastdds::statistics::detail::SampleIdentity_s&& _sample_id) -{ - m_sample_id = std::move(_sample_id); -} - -/*! - * @brief This function returns a constant reference to member sample_id - * @return Constant reference to member sample_id - */ -const eprosima::fastdds::statistics::detail::SampleIdentity_s& SampleIdentityCount::sample_id() const -{ - return m_sample_id; -} - -/*! - * @brief This function returns a reference to member sample_id - * @return Reference to member sample_id - */ -eprosima::fastdds::statistics::detail::SampleIdentity_s& SampleIdentityCount::sample_id() -{ - return m_sample_id; -} - - -/*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ -void SampleIdentityCount::count( - uint64_t _count) -{ - m_count = _count; -} - -/*! - * @brief This function returns the value of member count - * @return Value of member count - */ -uint64_t SampleIdentityCount::count() const -{ - return m_count; -} - -/*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ -uint64_t& SampleIdentityCount::count() -{ - return m_count; -} - - - - - -Entity2LocatorTraffic::Entity2LocatorTraffic() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_src_guid - - // eprosima::fastdds::statistics::detail::Locator_s m_dst_locator - - // unsigned long long m_packet_count - m_packet_count = 0; - // unsigned long long m_byte_count - m_byte_count = 0; - // short m_byte_magnitude_order - m_byte_magnitude_order = 0; - -} - -Entity2LocatorTraffic::~Entity2LocatorTraffic() -{ -} - -Entity2LocatorTraffic::Entity2LocatorTraffic( - const Entity2LocatorTraffic& x) -{ - m_src_guid = x.m_src_guid; - - - m_dst_locator = x.m_dst_locator; - - - m_packet_count = x.m_packet_count; - - - m_byte_count = x.m_byte_count; - - - m_byte_magnitude_order = x.m_byte_magnitude_order; - -} - -Entity2LocatorTraffic::Entity2LocatorTraffic( - Entity2LocatorTraffic&& x) noexcept -{ - m_src_guid = std::move(x.m_src_guid); - - - m_dst_locator = std::move(x.m_dst_locator); - - - m_packet_count = x.m_packet_count; - - - m_byte_count = x.m_byte_count; - - - m_byte_magnitude_order = x.m_byte_magnitude_order; - -} - -Entity2LocatorTraffic& Entity2LocatorTraffic::operator =( - const Entity2LocatorTraffic& x) -{ - m_src_guid = x.m_src_guid; - - - m_dst_locator = x.m_dst_locator; - - - m_packet_count = x.m_packet_count; - - - m_byte_count = x.m_byte_count; - - - m_byte_magnitude_order = x.m_byte_magnitude_order; - - return *this; -} - -Entity2LocatorTraffic& Entity2LocatorTraffic::operator =( - Entity2LocatorTraffic&& x) noexcept -{ - m_src_guid = std::move(x.m_src_guid); - - - m_dst_locator = std::move(x.m_dst_locator); - - - m_packet_count = x.m_packet_count; - - - m_byte_count = x.m_byte_count; - - - m_byte_magnitude_order = x.m_byte_magnitude_order; - - return *this; -} - -bool Entity2LocatorTraffic::operator ==( - const Entity2LocatorTraffic& x) const -{ - return (m_src_guid == x.m_src_guid && - m_dst_locator == x.m_dst_locator && - m_packet_count == x.m_packet_count && - m_byte_count == x.m_byte_count && - m_byte_magnitude_order == x.m_byte_magnitude_order); -} - -bool Entity2LocatorTraffic::operator !=( - const Entity2LocatorTraffic& x) const -{ - return !(*this == x); -} - -size_t Entity2LocatorTraffic::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_Entity2LocatorTraffic_max_cdr_typesize; -} - -size_t Entity2LocatorTraffic::getCdrSerializedSize( - const Entity2LocatorTraffic& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.src_guid(), current_alignment); - - - current_alignment += eprosima::fastdds::statistics::detail::Locator_s::getCdrSerializedSize(data.dst_locator(), current_alignment); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - return current_alignment - initial_alignment; -} - - -void Entity2LocatorTraffic::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_src_guid; - - scdr << m_dst_locator; - - scdr << m_packet_count; - - scdr << m_byte_count; - - scdr << m_byte_magnitude_order; - -} - -void Entity2LocatorTraffic::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_src_guid; - - - - dcdr >> m_dst_locator; - - - - dcdr >> m_packet_count; - - - - dcdr >> m_byte_count; - - - - dcdr >> m_byte_magnitude_order; - - -} - - -bool Entity2LocatorTraffic::isKeyDefined() -{ - return true; -} - -void Entity2LocatorTraffic::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_src_guid.serialize(scdr); - m_dst_locator.serialize(scdr); - - - -} - -/*! - * @brief This function copies the value in member src_guid - * @param _src_guid New value to be copied in member src_guid - */ -void Entity2LocatorTraffic::src_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _src_guid) -{ - m_src_guid = _src_guid; -} - -/*! - * @brief This function moves the value in member src_guid - * @param _src_guid New value to be moved in member src_guid - */ -void Entity2LocatorTraffic::src_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _src_guid) -{ - m_src_guid = std::move(_src_guid); -} - -/*! - * @brief This function returns a constant reference to member src_guid - * @return Constant reference to member src_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& Entity2LocatorTraffic::src_guid() const -{ - return m_src_guid; -} - -/*! - * @brief This function returns a reference to member src_guid - * @return Reference to member src_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& Entity2LocatorTraffic::src_guid() -{ - return m_src_guid; -} - - -/*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ -void Entity2LocatorTraffic::dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator) -{ - m_dst_locator = _dst_locator; -} - -/*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ -void Entity2LocatorTraffic::dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator) -{ - m_dst_locator = std::move(_dst_locator); -} - -/*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ -const eprosima::fastdds::statistics::detail::Locator_s& Entity2LocatorTraffic::dst_locator() const -{ - return m_dst_locator; -} - -/*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ -eprosima::fastdds::statistics::detail::Locator_s& Entity2LocatorTraffic::dst_locator() -{ - return m_dst_locator; -} - - -/*! - * @brief This function sets a value in member packet_count - * @param _packet_count New value for member packet_count - */ -void Entity2LocatorTraffic::packet_count( - uint64_t _packet_count) -{ - m_packet_count = _packet_count; -} - -/*! - * @brief This function returns the value of member packet_count - * @return Value of member packet_count - */ -uint64_t Entity2LocatorTraffic::packet_count() const -{ - return m_packet_count; -} - -/*! - * @brief This function returns a reference to member packet_count - * @return Reference to member packet_count - */ -uint64_t& Entity2LocatorTraffic::packet_count() -{ - return m_packet_count; -} - - -/*! - * @brief This function sets a value in member byte_count - * @param _byte_count New value for member byte_count - */ -void Entity2LocatorTraffic::byte_count( - uint64_t _byte_count) -{ - m_byte_count = _byte_count; -} - -/*! - * @brief This function returns the value of member byte_count - * @return Value of member byte_count - */ -uint64_t Entity2LocatorTraffic::byte_count() const -{ - return m_byte_count; -} - -/*! - * @brief This function returns a reference to member byte_count - * @return Reference to member byte_count - */ -uint64_t& Entity2LocatorTraffic::byte_count() -{ - return m_byte_count; -} - - -/*! - * @brief This function sets a value in member byte_magnitude_order - * @param _byte_magnitude_order New value for member byte_magnitude_order - */ -void Entity2LocatorTraffic::byte_magnitude_order( - int16_t _byte_magnitude_order) -{ - m_byte_magnitude_order = _byte_magnitude_order; -} - -/*! - * @brief This function returns the value of member byte_magnitude_order - * @return Value of member byte_magnitude_order - */ -int16_t Entity2LocatorTraffic::byte_magnitude_order() const -{ - return m_byte_magnitude_order; -} - -/*! - * @brief This function returns a reference to member byte_magnitude_order - * @return Reference to member byte_magnitude_order - */ -int16_t& Entity2LocatorTraffic::byte_magnitude_order() -{ - return m_byte_magnitude_order; -} - - - - - -WriterReaderData::WriterReaderData() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_writer_guid - - // eprosima::fastdds::statistics::detail::GUID_s m_reader_guid - - // float m_data - m_data = 0.0; - -} - -WriterReaderData::~WriterReaderData() -{ -} - -WriterReaderData::WriterReaderData( - const WriterReaderData& x) -{ - m_writer_guid = x.m_writer_guid; - - - m_reader_guid = x.m_reader_guid; - - - m_data = x.m_data; - -} - -WriterReaderData::WriterReaderData( - WriterReaderData&& x) noexcept -{ - m_writer_guid = std::move(x.m_writer_guid); - - - m_reader_guid = std::move(x.m_reader_guid); - - - m_data = x.m_data; - -} - -WriterReaderData& WriterReaderData::operator =( - const WriterReaderData& x) -{ - m_writer_guid = x.m_writer_guid; - - - m_reader_guid = x.m_reader_guid; - - - m_data = x.m_data; - - return *this; -} - -WriterReaderData& WriterReaderData::operator =( - WriterReaderData&& x) noexcept -{ - m_writer_guid = std::move(x.m_writer_guid); - - - m_reader_guid = std::move(x.m_reader_guid); - - - m_data = x.m_data; - - return *this; -} - -bool WriterReaderData::operator ==( - const WriterReaderData& x) const -{ - return (m_writer_guid == x.m_writer_guid && - m_reader_guid == x.m_reader_guid && - m_data == x.m_data); -} - -bool WriterReaderData::operator !=( - const WriterReaderData& x) const -{ - return !(*this == x); -} - -size_t WriterReaderData::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_WriterReaderData_max_cdr_typesize; -} - -size_t WriterReaderData::getCdrSerializedSize( - const WriterReaderData& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.writer_guid(), current_alignment); - - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.reader_guid(), current_alignment); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void WriterReaderData::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_writer_guid; - - scdr << m_reader_guid; - - scdr << m_data; - -} - -void WriterReaderData::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_writer_guid; - - - - dcdr >> m_reader_guid; - - - - dcdr >> m_data; - - -} - - -bool WriterReaderData::isKeyDefined() -{ - return true; -} - -void WriterReaderData::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_writer_guid.serialize(scdr); - m_reader_guid.serialize(scdr); - -} - -/*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ -void WriterReaderData::writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid) -{ - m_writer_guid = _writer_guid; -} - -/*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ -void WriterReaderData::writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid) -{ - m_writer_guid = std::move(_writer_guid); -} - -/*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::writer_guid() const -{ - return m_writer_guid; -} - -/*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::writer_guid() -{ - return m_writer_guid; -} - - -/*! - * @brief This function copies the value in member reader_guid - * @param _reader_guid New value to be copied in member reader_guid - */ -void WriterReaderData::reader_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _reader_guid) -{ - m_reader_guid = _reader_guid; -} - -/*! - * @brief This function moves the value in member reader_guid - * @param _reader_guid New value to be moved in member reader_guid - */ -void WriterReaderData::reader_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _reader_guid) -{ - m_reader_guid = std::move(_reader_guid); -} - -/*! - * @brief This function returns a constant reference to member reader_guid - * @return Constant reference to member reader_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::reader_guid() const -{ - return m_reader_guid; -} - -/*! - * @brief This function returns a reference to member reader_guid - * @return Reference to member reader_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& WriterReaderData::reader_guid() -{ - return m_reader_guid; -} - - -/*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ -void WriterReaderData::data( - float _data) -{ - m_data = _data; -} - -/*! - * @brief This function returns the value of member data - * @return Value of member data - */ -float WriterReaderData::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -float& WriterReaderData::data() -{ - return m_data; -} - - - - - -Locator2LocatorData::Locator2LocatorData() -{ - // eprosima::fastdds::statistics::detail::Locator_s m_src_locator - - // eprosima::fastdds::statistics::detail::Locator_s m_dst_locator - - // float m_data - m_data = 0.0; - -} - -Locator2LocatorData::~Locator2LocatorData() -{ -} - -Locator2LocatorData::Locator2LocatorData( - const Locator2LocatorData& x) -{ - m_src_locator = x.m_src_locator; - - - m_dst_locator = x.m_dst_locator; - - - m_data = x.m_data; - -} - -Locator2LocatorData::Locator2LocatorData( - Locator2LocatorData&& x) noexcept -{ - m_src_locator = std::move(x.m_src_locator); - - - m_dst_locator = std::move(x.m_dst_locator); - - - m_data = x.m_data; - -} - -Locator2LocatorData& Locator2LocatorData::operator =( - const Locator2LocatorData& x) -{ - m_src_locator = x.m_src_locator; - - - m_dst_locator = x.m_dst_locator; - - - m_data = x.m_data; - - return *this; -} - -Locator2LocatorData& Locator2LocatorData::operator =( - Locator2LocatorData&& x) noexcept -{ - m_src_locator = std::move(x.m_src_locator); - - - m_dst_locator = std::move(x.m_dst_locator); - - - m_data = x.m_data; - - return *this; -} - -bool Locator2LocatorData::operator ==( - const Locator2LocatorData& x) const -{ - return (m_src_locator == x.m_src_locator && - m_dst_locator == x.m_dst_locator && - m_data == x.m_data); -} - -bool Locator2LocatorData::operator !=( - const Locator2LocatorData& x) const -{ - return !(*this == x); -} - -size_t Locator2LocatorData::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_Locator2LocatorData_max_cdr_typesize; -} - -size_t Locator2LocatorData::getCdrSerializedSize( - const Locator2LocatorData& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::Locator_s::getCdrSerializedSize(data.src_locator(), current_alignment); - - - current_alignment += eprosima::fastdds::statistics::detail::Locator_s::getCdrSerializedSize(data.dst_locator(), current_alignment); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void Locator2LocatorData::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_src_locator; - - scdr << m_dst_locator; - - scdr << m_data; - -} - -void Locator2LocatorData::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_src_locator; - - - - dcdr >> m_dst_locator; - - - - dcdr >> m_data; - - -} - - -bool Locator2LocatorData::isKeyDefined() -{ - return true; -} - -void Locator2LocatorData::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_src_locator.serialize(scdr); - m_dst_locator.serialize(scdr); - -} - -/*! - * @brief This function copies the value in member src_locator - * @param _src_locator New value to be copied in member src_locator - */ -void Locator2LocatorData::src_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _src_locator) -{ - m_src_locator = _src_locator; -} - -/*! - * @brief This function moves the value in member src_locator - * @param _src_locator New value to be moved in member src_locator - */ -void Locator2LocatorData::src_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _src_locator) -{ - m_src_locator = std::move(_src_locator); -} - -/*! - * @brief This function returns a constant reference to member src_locator - * @return Constant reference to member src_locator - */ -const eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::src_locator() const -{ - return m_src_locator; -} - -/*! - * @brief This function returns a reference to member src_locator - * @return Reference to member src_locator - */ -eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::src_locator() -{ - return m_src_locator; -} - - -/*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ -void Locator2LocatorData::dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator) -{ - m_dst_locator = _dst_locator; -} - -/*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ -void Locator2LocatorData::dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator) -{ - m_dst_locator = std::move(_dst_locator); -} - -/*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ -const eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::dst_locator() const -{ - return m_dst_locator; -} - -/*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ -eprosima::fastdds::statistics::detail::Locator_s& Locator2LocatorData::dst_locator() -{ - return m_dst_locator; -} - - -/*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ -void Locator2LocatorData::data( - float _data) -{ - m_data = _data; -} - -/*! - * @brief This function returns the value of member data - * @return Value of member data - */ -float Locator2LocatorData::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -float& Locator2LocatorData::data() -{ - return m_data; -} - - - - - -EntityData::EntityData() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_guid - - // float m_data - m_data = 0.0; - -} - -EntityData::~EntityData() -{ -} - -EntityData::EntityData( - const EntityData& x) -{ - m_guid = x.m_guid; - - - m_data = x.m_data; - -} - -EntityData::EntityData( - EntityData&& x) noexcept -{ - m_guid = std::move(x.m_guid); - - - m_data = x.m_data; - -} - -EntityData& EntityData::operator =( - const EntityData& x) -{ - m_guid = x.m_guid; - - - m_data = x.m_data; - - return *this; -} - -EntityData& EntityData::operator =( - EntityData&& x) noexcept -{ - m_guid = std::move(x.m_guid); - - - m_data = x.m_data; - - return *this; -} - -bool EntityData::operator ==( - const EntityData& x) const -{ - return (m_guid == x.m_guid && - m_data == x.m_data); -} - -bool EntityData::operator !=( - const EntityData& x) const -{ - return !(*this == x); -} - -size_t EntityData::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_EntityData_max_cdr_typesize; -} - -size_t EntityData::getCdrSerializedSize( - const EntityData& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.guid(), current_alignment); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void EntityData::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_guid; - - scdr << m_data; - -} - -void EntityData::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_guid; - - - - dcdr >> m_data; - - -} - - -bool EntityData::isKeyDefined() -{ - return true; -} - -void EntityData::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_guid.serialize(scdr); - -} - -/*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ -void EntityData::guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid) -{ - m_guid = _guid; -} - -/*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ -void EntityData::guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid) -{ - m_guid = std::move(_guid); -} - -/*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& EntityData::guid() const -{ - return m_guid; -} - -/*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ -eprosima::fastdds::statistics::detail::GUID_s& EntityData::guid() -{ - return m_guid; -} - - -/*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ -void EntityData::data( - float _data) -{ - m_data = _data; -} - -/*! - * @brief This function returns the value of member data - * @return Value of member data - */ -float EntityData::data() const -{ - return m_data; -} - -/*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ -float& EntityData::data() -{ - return m_data; -} - - - - - -PhysicalData::PhysicalData() -{ - // eprosima::fastdds::statistics::detail::GUID_s m_participant_guid - - // /type_d() m_host - - // /type_d() m_user - - // /type_d() m_process - - -} - -PhysicalData::~PhysicalData() -{ -} - -PhysicalData::PhysicalData( - const PhysicalData& x) -{ - m_participant_guid = x.m_participant_guid; - - - m_host = x.m_host; - - - m_user = x.m_user; - - - m_process = x.m_process; - -} - -PhysicalData::PhysicalData( - PhysicalData&& x) noexcept -{ - m_participant_guid = std::move(x.m_participant_guid); - - - m_host = std::move(x.m_host); - - - m_user = std::move(x.m_user); - - - m_process = std::move(x.m_process); - -} - -PhysicalData& PhysicalData::operator =( - const PhysicalData& x) -{ - m_participant_guid = x.m_participant_guid; - - - m_host = x.m_host; - - - m_user = x.m_user; - - - m_process = x.m_process; - - return *this; -} - -PhysicalData& PhysicalData::operator =( - PhysicalData&& x) noexcept -{ - m_participant_guid = std::move(x.m_participant_guid); - - - m_host = std::move(x.m_host); - - - m_user = std::move(x.m_user); - - - m_process = std::move(x.m_process); - - return *this; -} - -bool PhysicalData::operator ==( - const PhysicalData& x) const -{ - return (m_participant_guid == x.m_participant_guid && - m_host == x.m_host && - m_user == x.m_user && - m_process == x.m_process); -} - -bool PhysicalData::operator !=( - const PhysicalData& x) const -{ - return !(*this == x); -} - -size_t PhysicalData::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return eprosima_fastdds_statistics_PhysicalData_max_cdr_typesize; -} - -size_t PhysicalData::getCdrSerializedSize( - const PhysicalData& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += eprosima::fastdds::statistics::detail::GUID_s::getCdrSerializedSize(data.participant_guid(), current_alignment); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.host().size() + 1; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.user().size() + 1; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.process().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void PhysicalData::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_participant_guid; - - scdr << m_host.c_str(); - - scdr << m_user.c_str(); - - scdr << m_process.c_str(); - -} - -void PhysicalData::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_participant_guid; - - - - dcdr >> m_host; - - - - dcdr >> m_user; - - - - dcdr >> m_process; - - -} - - -bool PhysicalData::isKeyDefined() -{ - return true; -} - -void PhysicalData::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - m_participant_guid.serialize(scdr); - - - -} - -/*! - * @brief This function copies the value in member participant_guid - * @param _participant_guid New value to be copied in member participant_guid - */ -void PhysicalData::participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _participant_guid) -{ - m_participant_guid = _participant_guid; -} - -/*! - * @brief This function moves the value in member participant_guid - * @param _participant_guid New value to be moved in member participant_guid - */ -void PhysicalData::participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _participant_guid) -{ - m_participant_guid = std::move(_participant_guid); -} - -/*! - * @brief This function returns a constant reference to member participant_guid - * @return Constant reference to member participant_guid - */ -const eprosima::fastdds::statistics::detail::GUID_s& PhysicalData::participant_guid() const -{ - return m_participant_guid; -} - -/*! - * @brief This function returns a reference to member participant_guid - * @return Reference to member participant_guid - */ -eprosima::fastdds::statistics::detail::GUID_s& PhysicalData::participant_guid() -{ - return m_participant_guid; -} - - -/*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ -void PhysicalData::host( - const std::string& _host) -{ - m_host = _host; -} - -/*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ -void PhysicalData::host( - std::string&& _host) -{ - m_host = std::move(_host); -} - -/*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ -const std::string& PhysicalData::host() const -{ - return m_host; -} - -/*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ -std::string& PhysicalData::host() -{ - return m_host; -} - - -/*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ -void PhysicalData::user( - const std::string& _user) -{ - m_user = _user; -} - -/*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ -void PhysicalData::user( - std::string&& _user) -{ - m_user = std::move(_user); -} - -/*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ -const std::string& PhysicalData::user() const -{ - return m_user; -} - -/*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ -std::string& PhysicalData::user() -{ - return m_user; -} - - -/*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ -void PhysicalData::process( - const std::string& _process) -{ - m_process = _process; -} - -/*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ -void PhysicalData::process( - std::string&& _process) -{ - m_process = std::move(_process); -} - -/*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ -const std::string& PhysicalData::process() const -{ - return m_process; -} - -/*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ -std::string& PhysicalData::process() -{ - return m_process; -} - - - - - - -Data::Data() -{ - m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; - // eprosima::fastdds::statistics::WriterReaderData m_writer_reader_data - - // eprosima::fastdds::statistics::Locator2LocatorData m_locator2locator_data - - // eprosima::fastdds::statistics::EntityData m_entity_data - - // eprosima::fastdds::statistics::Entity2LocatorTraffic m_entity2locator_traffic - - // eprosima::fastdds::statistics::EntityCount m_entity_count - - // eprosima::fastdds::statistics::DiscoveryTime m_discovery_time - - // eprosima::fastdds::statistics::SampleIdentityCount m_sample_identity_count - - // eprosima::fastdds::statistics::PhysicalData m_physical_data - -} - -Data::~Data() -{ -} - -Data::Data( - const Data& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = x.m_writer_reader_data; - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = x.m_locator2locator_data; - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = x.m_entity_data; - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = x.m_entity2locator_traffic; - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = x.m_entity_count; - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = x.m_discovery_time; - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = x.m_sample_identity_count; - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = x.m_physical_data; - break; - - default: - break; - } -} - -Data::Data( - Data&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = std::move(x.m_writer_reader_data); - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = std::move(x.m_locator2locator_data); - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = std::move(x.m_entity_data); - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = std::move(x.m_entity2locator_traffic); - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = std::move(x.m_entity_count); - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = std::move(x.m_discovery_time); - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = std::move(x.m_sample_identity_count); - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = std::move(x.m_physical_data); - - break; - - default: - break; - } -} - -Data& Data::operator =( - const Data& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = x.m_writer_reader_data; - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = x.m_locator2locator_data; - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = x.m_entity_data; - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = x.m_entity2locator_traffic; - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = x.m_entity_count; - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = x.m_discovery_time; - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = x.m_sample_identity_count; - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = x.m_physical_data; - break; - - default: - break; - } - - return *this; -} - -Data& Data::operator =( - Data&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - m_writer_reader_data = std::move(x.m_writer_reader_data); - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - m_locator2locator_data = std::move(x.m_locator2locator_data); - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - m_entity_data = std::move(x.m_entity_data); - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - m_entity2locator_traffic = std::move(x.m_entity2locator_traffic); - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - m_entity_count = std::move(x.m_entity_count); - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - m_discovery_time = std::move(x.m_discovery_time); - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - m_sample_identity_count = std::move(x.m_sample_identity_count); - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - m_physical_data = std::move(x.m_physical_data); - - break; - - default: - break; - } - - return *this; -} - -bool Data::operator ==( - const Data& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - return (m_writer_reader_data == x.m_writer_reader_data); - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - return (m_locator2locator_data == x.m_locator2locator_data); - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - return (m_entity_data == x.m_entity_data); - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - return (m_entity2locator_traffic == x.m_entity2locator_traffic); - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - return (m_entity_count == x.m_entity_count); - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - return (m_discovery_time == x.m_discovery_time); - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - return (m_sample_identity_count == x.m_sample_identity_count); - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - return (m_physical_data == x.m_physical_data); - break; - - default: - break; - } - return false; -} - -bool Data::operator !=( - const Data& x) const -{ - return !(*this == x); -} - -void Data::_d( - eprosima::fastdds::statistics::EventKind __d) -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - switch(__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - switch(__d) - { - case eprosima::fastdds::statistics::NETWORK_LATENCY: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - switch(__d) - { - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - switch(__d) - { - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - switch(__d) - { - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - switch(__d) - { - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - switch(__d) - { - case eprosima::fastdds::statistics::SAMPLE_DATAS: - b = true; - break; - default: - break; - } - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - switch(__d) - { - case eprosima::fastdds::statistics::PHYSICAL_DATA: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -eprosima::fastdds::statistics::EventKind Data::_d() const -{ - return m__d; -} - -eprosima::fastdds::statistics::EventKind& Data::_d() -{ - return m__d; -} - -void Data::writer_reader_data( - const eprosima::fastdds::statistics::WriterReaderData& _writer_reader_data) -{ - m_writer_reader_data = _writer_reader_data; - m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; - -} - -void Data::writer_reader_data( - eprosima::fastdds::statistics::WriterReaderData&& _writer_reader_data) -{ - m_writer_reader_data = std::move(_writer_reader_data); - m__d = eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY; - -} - -const eprosima::fastdds::statistics::WriterReaderData& Data::writer_reader_data() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_writer_reader_data; -} - -eprosima::fastdds::statistics::WriterReaderData& Data::writer_reader_data() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_writer_reader_data; -} - - -void Data::locator2locator_data( - const eprosima::fastdds::statistics::Locator2LocatorData& _locator2locator_data) -{ - m_locator2locator_data = _locator2locator_data; - m__d = eprosima::fastdds::statistics::NETWORK_LATENCY; - -} - -void Data::locator2locator_data( - eprosima::fastdds::statistics::Locator2LocatorData&& _locator2locator_data) -{ - m_locator2locator_data = std::move(_locator2locator_data); - m__d = eprosima::fastdds::statistics::NETWORK_LATENCY; - -} - -const eprosima::fastdds::statistics::Locator2LocatorData& Data::locator2locator_data() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::NETWORK_LATENCY: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_locator2locator_data; -} - -eprosima::fastdds::statistics::Locator2LocatorData& Data::locator2locator_data() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::NETWORK_LATENCY: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_locator2locator_data; -} - - -void Data::entity_data( - const eprosima::fastdds::statistics::EntityData& _entity_data) -{ - m_entity_data = _entity_data; - m__d = eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT; - -} - -void Data::entity_data( - eprosima::fastdds::statistics::EntityData&& _entity_data) -{ - m_entity_data = std::move(_entity_data); - m__d = eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT; - -} - -const eprosima::fastdds::statistics::EntityData& Data::entity_data() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_data; -} - -eprosima::fastdds::statistics::EntityData& Data::entity_data() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_data; -} - - -void Data::entity2locator_traffic( - const eprosima::fastdds::statistics::Entity2LocatorTraffic& _entity2locator_traffic) -{ - m_entity2locator_traffic = _entity2locator_traffic; - m__d = eprosima::fastdds::statistics::RTPS_SENT; - -} - -void Data::entity2locator_traffic( - eprosima::fastdds::statistics::Entity2LocatorTraffic&& _entity2locator_traffic) -{ - m_entity2locator_traffic = std::move(_entity2locator_traffic); - m__d = eprosima::fastdds::statistics::RTPS_SENT; - -} - -const eprosima::fastdds::statistics::Entity2LocatorTraffic& Data::entity2locator_traffic() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity2locator_traffic; -} - -eprosima::fastdds::statistics::Entity2LocatorTraffic& Data::entity2locator_traffic() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity2locator_traffic; -} - - -void Data::entity_count( - const eprosima::fastdds::statistics::EntityCount& _entity_count) -{ - m_entity_count = _entity_count; - m__d = eprosima::fastdds::statistics::RESENT_DATAS; - -} - -void Data::entity_count( - eprosima::fastdds::statistics::EntityCount&& _entity_count) -{ - m_entity_count = std::move(_entity_count); - m__d = eprosima::fastdds::statistics::RESENT_DATAS; - -} - -const eprosima::fastdds::statistics::EntityCount& Data::entity_count() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_count; -} - -eprosima::fastdds::statistics::EntityCount& Data::entity_count() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_entity_count; -} - - -void Data::discovery_time( - const eprosima::fastdds::statistics::DiscoveryTime& _discovery_time) -{ - m_discovery_time = _discovery_time; - m__d = eprosima::fastdds::statistics::DISCOVERED_ENTITY; - -} - -void Data::discovery_time( - eprosima::fastdds::statistics::DiscoveryTime&& _discovery_time) -{ - m_discovery_time = std::move(_discovery_time); - m__d = eprosima::fastdds::statistics::DISCOVERED_ENTITY; - -} - -const eprosima::fastdds::statistics::DiscoveryTime& Data::discovery_time() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_discovery_time; -} - -eprosima::fastdds::statistics::DiscoveryTime& Data::discovery_time() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_discovery_time; -} - - -void Data::sample_identity_count( - const eprosima::fastdds::statistics::SampleIdentityCount& _sample_identity_count) -{ - m_sample_identity_count = _sample_identity_count; - m__d = eprosima::fastdds::statistics::SAMPLE_DATAS; - -} - -void Data::sample_identity_count( - eprosima::fastdds::statistics::SampleIdentityCount&& _sample_identity_count) -{ - m_sample_identity_count = std::move(_sample_identity_count); - m__d = eprosima::fastdds::statistics::SAMPLE_DATAS; - -} - -const eprosima::fastdds::statistics::SampleIdentityCount& Data::sample_identity_count() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::SAMPLE_DATAS: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_sample_identity_count; -} - -eprosima::fastdds::statistics::SampleIdentityCount& Data::sample_identity_count() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::SAMPLE_DATAS: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_sample_identity_count; -} - - -void Data::physical_data( - const eprosima::fastdds::statistics::PhysicalData& _physical_data) -{ - m_physical_data = _physical_data; - m__d = eprosima::fastdds::statistics::PHYSICAL_DATA; - -} - -void Data::physical_data( - eprosima::fastdds::statistics::PhysicalData&& _physical_data) -{ - m_physical_data = std::move(_physical_data); - m__d = eprosima::fastdds::statistics::PHYSICAL_DATA; - -} - -const eprosima::fastdds::statistics::PhysicalData& Data::physical_data() const -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::PHYSICAL_DATA: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_physical_data; -} - -eprosima::fastdds::statistics::PhysicalData& Data::physical_data() -{ - bool b = false; - - switch(m__d) - { - case eprosima::fastdds::statistics::PHYSICAL_DATA: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_physical_data; -} - - -// TODO(Ricardo) Review -size_t Data::getCdrSerializedSize( - const Data& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - - switch(data.m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - current_alignment += eprosima::fastdds::statistics::WriterReaderData::getCdrSerializedSize(data.writer_reader_data(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - current_alignment += eprosima::fastdds::statistics::Locator2LocatorData::getCdrSerializedSize(data.locator2locator_data(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - current_alignment += eprosima::fastdds::statistics::EntityData::getCdrSerializedSize(data.entity_data(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - current_alignment += eprosima::fastdds::statistics::Entity2LocatorTraffic::getCdrSerializedSize(data.entity2locator_traffic(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - current_alignment += eprosima::fastdds::statistics::EntityCount::getCdrSerializedSize(data.entity_count(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - current_alignment += eprosima::fastdds::statistics::DiscoveryTime::getCdrSerializedSize(data.discovery_time(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - current_alignment += eprosima::fastdds::statistics::SampleIdentityCount::getCdrSerializedSize(data.sample_identity_count(), current_alignment); - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - current_alignment += eprosima::fastdds::statistics::PhysicalData::getCdrSerializedSize(data.physical_data(), current_alignment); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void Data::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m__d; - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - scdr << m_writer_reader_data; - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - scdr << m_locator2locator_data; - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - scdr << m_entity_data; - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - scdr << m_entity2locator_traffic; - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - scdr << m_entity_count; - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - scdr << m_discovery_time; - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - scdr << m_sample_identity_count; - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - scdr << m_physical_data; - - break; - - default: - break; - } -} - -void Data::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t bitmask_value = 0; - dcdr >> bitmask_value; - m__d = (eprosima::fastdds::statistics::EventKind)bitmask_value; - } - - - - switch(m__d) - { - case eprosima::fastdds::statistics::HISTORY2HISTORY_LATENCY: - dcdr >> m_writer_reader_data; - - - break; - - - case eprosima::fastdds::statistics::NETWORK_LATENCY: - dcdr >> m_locator2locator_data; - - - break; - - - case eprosima::fastdds::statistics::PUBLICATION_THROUGHPUT: - case eprosima::fastdds::statistics::SUBSCRIPTION_THROUGHPUT: - dcdr >> m_entity_data; - - - break; - - - case eprosima::fastdds::statistics::RTPS_SENT: - case eprosima::fastdds::statistics::RTPS_LOST: - dcdr >> m_entity2locator_traffic; - - - break; - - - case eprosima::fastdds::statistics::RESENT_DATAS: - case eprosima::fastdds::statistics::HEARTBEAT_COUNT: - case eprosima::fastdds::statistics::ACKNACK_COUNT: - case eprosima::fastdds::statistics::NACKFRAG_COUNT: - case eprosima::fastdds::statistics::GAP_COUNT: - case eprosima::fastdds::statistics::DATA_COUNT: - case eprosima::fastdds::statistics::PDP_PACKETS: - case eprosima::fastdds::statistics::EDP_PACKETS: - dcdr >> m_entity_count; - - - break; - - - case eprosima::fastdds::statistics::DISCOVERED_ENTITY: - dcdr >> m_discovery_time; - - - break; - - - case eprosima::fastdds::statistics::SAMPLE_DATAS: - dcdr >> m_sample_identity_count; - - - break; - - - case eprosima::fastdds::statistics::PHYSICAL_DATA: - dcdr >> m_physical_data; - - - break; - - default: - break; - } -} - - - - - -} // namespace statistics - - -} // namespace fastdds - - -} // namespace eprosima - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/blackbox/types/statistics/typesv1.h b/test/blackbox/types/statistics/typesv1.h deleted file mode 100644 index 6880ab8c6ed..00000000000 --- a/test/blackbox/types/statistics/typesv1.h +++ /dev/null @@ -1,3092 +0,0 @@ -// 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 types.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_H_ -#define _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(TYPES_SOURCE) -#define TYPES_DllAPI __declspec( dllexport ) -#else -#define TYPES_DllAPI __declspec( dllimport ) -#endif // TYPES_SOURCE -#else -#define TYPES_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define TYPES_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - -namespace eprosima { - namespace fastdds { - namespace statistics { - namespace detail { - - - /*! - * @brief This class represents the structure EntityId_s defined by the user in the IDL file. - * @ingroup types - */ - class EntityId_s - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EntityId_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EntityId_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s( - const EntityId_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s( - EntityId_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s& operator =( - const EntityId_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::EntityId_s that will be copied. - */ - eProsima_user_DllExport EntityId_s& operator =( - EntityId_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::EntityId_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EntityId_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::EntityId_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EntityId_s& x) const; - - /*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ - eProsima_user_DllExport void value( - const std::array& _value); - - /*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ - eProsima_user_DllExport void value( - std::array&& _value); - - /*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ - eProsima_user_DllExport const std::array& value() const; - - /*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ - eProsima_user_DllExport std::array& value(); - - - /*! - * @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::fastdds::statistics::detail::EntityId_s& 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 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: - - std::array m_value; - - }; - - - - /*! - * @brief This class represents the structure GuidPrefix_s defined by the user in the IDL file. - * @ingroup types - */ - class GuidPrefix_s - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport GuidPrefix_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~GuidPrefix_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s( - const GuidPrefix_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s( - GuidPrefix_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s& operator =( - const GuidPrefix_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GuidPrefix_s that will be copied. - */ - eProsima_user_DllExport GuidPrefix_s& operator =( - GuidPrefix_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GuidPrefix_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const GuidPrefix_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GuidPrefix_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const GuidPrefix_s& x) const; - - /*! - * @brief This function copies the value in member value - * @param _value New value to be copied in member value - */ - eProsima_user_DllExport void value( - const std::array& _value); - - /*! - * @brief This function moves the value in member value - * @param _value New value to be moved in member value - */ - eProsima_user_DllExport void value( - std::array&& _value); - - /*! - * @brief This function returns a constant reference to member value - * @return Constant reference to member value - */ - eProsima_user_DllExport const std::array& value() const; - - /*! - * @brief This function returns a reference to member value - * @return Reference to member value - */ - eProsima_user_DllExport std::array& value(); - - - /*! - * @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::fastdds::statistics::detail::GuidPrefix_s& 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 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: - - std::array m_value; - - }; - - - - /*! - * @brief This class represents the structure GUID_s defined by the user in the IDL file. - * @ingroup types - */ - class GUID_s - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport GUID_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~GUID_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s( - const GUID_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s( - GUID_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s& operator =( - const GUID_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::GUID_s that will be copied. - */ - eProsima_user_DllExport GUID_s& operator =( - GUID_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GUID_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const GUID_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::GUID_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const GUID_s& x) const; - - /*! - * @brief This function copies the value in member guidPrefix - * @param _guidPrefix New value to be copied in member guidPrefix - */ - eProsima_user_DllExport void guidPrefix( - const eprosima::fastdds::statistics::detail::GuidPrefix_s& _guidPrefix); - - /*! - * @brief This function moves the value in member guidPrefix - * @param _guidPrefix New value to be moved in member guidPrefix - */ - eProsima_user_DllExport void guidPrefix( - eprosima::fastdds::statistics::detail::GuidPrefix_s&& _guidPrefix); - - /*! - * @brief This function returns a constant reference to member guidPrefix - * @return Constant reference to member guidPrefix - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GuidPrefix_s& guidPrefix() const; - - /*! - * @brief This function returns a reference to member guidPrefix - * @return Reference to member guidPrefix - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GuidPrefix_s& guidPrefix(); - - - /*! - * @brief This function copies the value in member entityId - * @param _entityId New value to be copied in member entityId - */ - eProsima_user_DllExport void entityId( - const eprosima::fastdds::statistics::detail::EntityId_s& _entityId); - - /*! - * @brief This function moves the value in member entityId - * @param _entityId New value to be moved in member entityId - */ - eProsima_user_DllExport void entityId( - eprosima::fastdds::statistics::detail::EntityId_s&& _entityId); - - /*! - * @brief This function returns a constant reference to member entityId - * @return Constant reference to member entityId - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::EntityId_s& entityId() const; - - /*! - * @brief This function returns a reference to member entityId - * @return Reference to member entityId - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::EntityId_s& entityId(); - - - /*! - * @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::fastdds::statistics::detail::GUID_s& 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 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: - - eprosima::fastdds::statistics::detail::GuidPrefix_s m_guidPrefix; - eprosima::fastdds::statistics::detail::EntityId_s m_entityId; - - }; - - - - /*! - * @brief This class represents the structure SequenceNumber_s defined by the user in the IDL file. - * @ingroup types - */ - class SequenceNumber_s - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceNumber_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceNumber_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s( - const SequenceNumber_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s( - SequenceNumber_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s& operator =( - const SequenceNumber_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SequenceNumber_s that will be copied. - */ - eProsima_user_DllExport SequenceNumber_s& operator =( - SequenceNumber_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SequenceNumber_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceNumber_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SequenceNumber_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceNumber_s& x) const; - - /*! - * @brief This function sets a value in member high - * @param _high New value for member high - */ - eProsima_user_DllExport void high( - int32_t _high); - - /*! - * @brief This function returns the value of member high - * @return Value of member high - */ - eProsima_user_DllExport int32_t high() const; - - /*! - * @brief This function returns a reference to member high - * @return Reference to member high - */ - eProsima_user_DllExport int32_t& high(); - - - /*! - * @brief This function sets a value in member low - * @param _low New value for member low - */ - eProsima_user_DllExport void low( - uint32_t _low); - - /*! - * @brief This function returns the value of member low - * @return Value of member low - */ - eProsima_user_DllExport uint32_t low() const; - - /*! - * @brief This function returns a reference to member low - * @return Reference to member low - */ - eProsima_user_DllExport uint32_t& low(); - - - /*! - * @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::fastdds::statistics::detail::SequenceNumber_s& 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 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_high; - uint32_t m_low; - - }; - - - - /*! - * @brief This class represents the structure SampleIdentity_s defined by the user in the IDL file. - * @ingroup types - */ - class SampleIdentity_s - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SampleIdentity_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SampleIdentity_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s( - const SampleIdentity_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s( - SampleIdentity_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s& operator =( - const SampleIdentity_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::SampleIdentity_s that will be copied. - */ - eProsima_user_DllExport SampleIdentity_s& operator =( - SampleIdentity_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SampleIdentity_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SampleIdentity_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::SampleIdentity_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SampleIdentity_s& x) const; - - /*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid); - - /*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid); - - /*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& writer_guid() const; - - /*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& writer_guid(); - - - /*! - * @brief This function copies the value in member sequence_number - * @param _sequence_number New value to be copied in member sequence_number - */ - eProsima_user_DllExport void sequence_number( - const eprosima::fastdds::statistics::detail::SequenceNumber_s& _sequence_number); - - /*! - * @brief This function moves the value in member sequence_number - * @param _sequence_number New value to be moved in member sequence_number - */ - eProsima_user_DllExport void sequence_number( - eprosima::fastdds::statistics::detail::SequenceNumber_s&& _sequence_number); - - /*! - * @brief This function returns a constant reference to member sequence_number - * @return Constant reference to member sequence_number - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::SequenceNumber_s& sequence_number() const; - - /*! - * @brief This function returns a reference to member sequence_number - * @return Reference to member sequence_number - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::SequenceNumber_s& sequence_number(); - - - /*! - * @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::fastdds::statistics::detail::SampleIdentity_s& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_writer_guid; - eprosima::fastdds::statistics::detail::SequenceNumber_s m_sequence_number; - - }; - - - - /*! - * @brief This class represents the structure Locator_s defined by the user in the IDL file. - * @ingroup types - */ - class Locator_s - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Locator_s(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Locator_s(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s( - const Locator_s& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s( - Locator_s&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s& operator =( - const Locator_s& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::detail::Locator_s that will be copied. - */ - eProsima_user_DllExport Locator_s& operator =( - Locator_s&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::Locator_s object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Locator_s& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::detail::Locator_s object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Locator_s& x) const; - - /*! - * @brief This function sets a value in member kind - * @param _kind New value for member kind - */ - eProsima_user_DllExport void kind( - int32_t _kind); - - /*! - * @brief This function returns the value of member kind - * @return Value of member kind - */ - eProsima_user_DllExport int32_t kind() const; - - /*! - * @brief This function returns a reference to member kind - * @return Reference to member kind - */ - eProsima_user_DllExport int32_t& kind(); - - - /*! - * @brief This function sets a value in member port - * @param _port New value for member port - */ - eProsima_user_DllExport void port( - uint32_t _port); - - /*! - * @brief This function returns the value of member port - * @return Value of member port - */ - eProsima_user_DllExport uint32_t port() const; - - /*! - * @brief This function returns a reference to member port - * @return Reference to member port - */ - eProsima_user_DllExport uint32_t& port(); - - - /*! - * @brief This function copies the value in member address - * @param _address New value to be copied in member address - */ - eProsima_user_DllExport void address( - const std::array& _address); - - /*! - * @brief This function moves the value in member address - * @param _address New value to be moved in member address - */ - eProsima_user_DllExport void address( - std::array&& _address); - - /*! - * @brief This function returns a constant reference to member address - * @return Constant reference to member address - */ - eProsima_user_DllExport const std::array& address() const; - - /*! - * @brief This function returns a reference to member address - * @return Reference to member address - */ - eProsima_user_DllExport std::array& address(); - - - /*! - * @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::fastdds::statistics::detail::Locator_s& 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 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_kind; - uint32_t m_port; - std::array m_address; - - }; - - } // namespace detail - - - /*! - * @brief This class represents the structure DiscoveryTime defined by the user in the IDL file. - * @ingroup types - */ - class DiscoveryTime - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport DiscoveryTime(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~DiscoveryTime(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime( - const DiscoveryTime& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime( - DiscoveryTime&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime& operator =( - const DiscoveryTime& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::DiscoveryTime that will be copied. - */ - eProsima_user_DllExport DiscoveryTime& operator =( - DiscoveryTime&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::DiscoveryTime object to compare. - */ - eProsima_user_DllExport bool operator ==( - const DiscoveryTime& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::DiscoveryTime object to compare. - */ - eProsima_user_DllExport bool operator !=( - const DiscoveryTime& x) const; - - /*! - * @brief This function copies the value in member local_participant_guid - * @param _local_participant_guid New value to be copied in member local_participant_guid - */ - eProsima_user_DllExport void local_participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _local_participant_guid); - - /*! - * @brief This function moves the value in member local_participant_guid - * @param _local_participant_guid New value to be moved in member local_participant_guid - */ - eProsima_user_DllExport void local_participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _local_participant_guid); - - /*! - * @brief This function returns a constant reference to member local_participant_guid - * @return Constant reference to member local_participant_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& local_participant_guid() const; - - /*! - * @brief This function returns a reference to member local_participant_guid - * @return Reference to member local_participant_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& local_participant_guid(); - - - /*! - * @brief This function copies the value in member remote_entity_guid - * @param _remote_entity_guid New value to be copied in member remote_entity_guid - */ - eProsima_user_DllExport void remote_entity_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _remote_entity_guid); - - /*! - * @brief This function moves the value in member remote_entity_guid - * @param _remote_entity_guid New value to be moved in member remote_entity_guid - */ - eProsima_user_DllExport void remote_entity_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _remote_entity_guid); - - /*! - * @brief This function returns a constant reference to member remote_entity_guid - * @return Constant reference to member remote_entity_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& remote_entity_guid() const; - - /*! - * @brief This function returns a reference to member remote_entity_guid - * @return Reference to member remote_entity_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& remote_entity_guid(); - - - /*! - * @brief This function sets a value in member time - * @param _time New value for member time - */ - eProsima_user_DllExport void time( - uint64_t _time); - - /*! - * @brief This function returns the value of member time - * @return Value of member time - */ - eProsima_user_DllExport uint64_t time() const; - - /*! - * @brief This function returns a reference to member time - * @return Reference to member time - */ - eProsima_user_DllExport uint64_t& time(); - - - /*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ - eProsima_user_DllExport void host( - const std::string& _host); - - /*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ - eProsima_user_DllExport void host( - std::string&& _host); - - /*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ - eProsima_user_DllExport const std::string& host() const; - - /*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ - eProsima_user_DllExport std::string& host(); - - - /*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ - eProsima_user_DllExport void user( - const std::string& _user); - - /*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ - eProsima_user_DllExport void user( - std::string&& _user); - - /*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ - eProsima_user_DllExport const std::string& user() const; - - /*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ - eProsima_user_DllExport std::string& user(); - - - /*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ - eProsima_user_DllExport void process( - const std::string& _process); - - /*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ - eProsima_user_DllExport void process( - std::string&& _process); - - /*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ - eProsima_user_DllExport const std::string& process() const; - - /*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ - eProsima_user_DllExport std::string& process(); - - - /*! - * @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::fastdds::statistics::DiscoveryTime& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_local_participant_guid; - eprosima::fastdds::statistics::detail::GUID_s m_remote_entity_guid; - uint64_t m_time; - std::string m_host; - std::string m_user; - std::string m_process; - - }; - - - - /*! - * @brief This class represents the structure EntityCount defined by the user in the IDL file. - * @ingroup types - */ - class EntityCount - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EntityCount(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EntityCount(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount( - const EntityCount& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount( - EntityCount&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount& operator =( - const EntityCount& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityCount that will be copied. - */ - eProsima_user_DllExport EntityCount& operator =( - EntityCount&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityCount object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EntityCount& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityCount object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EntityCount& x) const; - - /*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ - eProsima_user_DllExport void guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid); - - /*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ - eProsima_user_DllExport void guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid); - - /*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& guid() const; - - /*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& guid(); - - - /*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ - eProsima_user_DllExport void count( - uint64_t _count); - - /*! - * @brief This function returns the value of member count - * @return Value of member count - */ - eProsima_user_DllExport uint64_t count() const; - - /*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ - eProsima_user_DllExport uint64_t& count(); - - - /*! - * @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::fastdds::statistics::EntityCount& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_guid; - uint64_t m_count; - - }; - - - - /*! - * @brief This class represents the structure SampleIdentityCount defined by the user in the IDL file. - * @ingroup types - */ - class SampleIdentityCount - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SampleIdentityCount(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SampleIdentityCount(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount( - const SampleIdentityCount& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount( - SampleIdentityCount&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount& operator =( - const SampleIdentityCount& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::SampleIdentityCount that will be copied. - */ - eProsima_user_DllExport SampleIdentityCount& operator =( - SampleIdentityCount&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::SampleIdentityCount object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SampleIdentityCount& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::SampleIdentityCount object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SampleIdentityCount& x) const; - - /*! - * @brief This function copies the value in member sample_id - * @param _sample_id New value to be copied in member sample_id - */ - eProsima_user_DllExport void sample_id( - const eprosima::fastdds::statistics::detail::SampleIdentity_s& _sample_id); - - /*! - * @brief This function moves the value in member sample_id - * @param _sample_id New value to be moved in member sample_id - */ - eProsima_user_DllExport void sample_id( - eprosima::fastdds::statistics::detail::SampleIdentity_s&& _sample_id); - - /*! - * @brief This function returns a constant reference to member sample_id - * @return Constant reference to member sample_id - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::SampleIdentity_s& sample_id() const; - - /*! - * @brief This function returns a reference to member sample_id - * @return Reference to member sample_id - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::SampleIdentity_s& sample_id(); - - - /*! - * @brief This function sets a value in member count - * @param _count New value for member count - */ - eProsima_user_DllExport void count( - uint64_t _count); - - /*! - * @brief This function returns the value of member count - * @return Value of member count - */ - eProsima_user_DllExport uint64_t count() const; - - /*! - * @brief This function returns a reference to member count - * @return Reference to member count - */ - eProsima_user_DllExport uint64_t& count(); - - - /*! - * @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::fastdds::statistics::SampleIdentityCount& 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 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: - - eprosima::fastdds::statistics::detail::SampleIdentity_s m_sample_id; - uint64_t m_count; - - }; - - - - /*! - * @brief This class represents the structure Entity2LocatorTraffic defined by the user in the IDL file. - * @ingroup types - */ - class Entity2LocatorTraffic - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Entity2LocatorTraffic(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Entity2LocatorTraffic(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic( - const Entity2LocatorTraffic& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic( - Entity2LocatorTraffic&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic& operator =( - const Entity2LocatorTraffic& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Entity2LocatorTraffic that will be copied. - */ - eProsima_user_DllExport Entity2LocatorTraffic& operator =( - Entity2LocatorTraffic&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Entity2LocatorTraffic object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Entity2LocatorTraffic& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Entity2LocatorTraffic object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Entity2LocatorTraffic& x) const; - - /*! - * @brief This function copies the value in member src_guid - * @param _src_guid New value to be copied in member src_guid - */ - eProsima_user_DllExport void src_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _src_guid); - - /*! - * @brief This function moves the value in member src_guid - * @param _src_guid New value to be moved in member src_guid - */ - eProsima_user_DllExport void src_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _src_guid); - - /*! - * @brief This function returns a constant reference to member src_guid - * @return Constant reference to member src_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& src_guid() const; - - /*! - * @brief This function returns a reference to member src_guid - * @return Reference to member src_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& src_guid(); - - - /*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator); - - /*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator); - - /*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::Locator_s& dst_locator() const; - - /*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::Locator_s& dst_locator(); - - - /*! - * @brief This function sets a value in member packet_count - * @param _packet_count New value for member packet_count - */ - eProsima_user_DllExport void packet_count( - uint64_t _packet_count); - - /*! - * @brief This function returns the value of member packet_count - * @return Value of member packet_count - */ - eProsima_user_DllExport uint64_t packet_count() const; - - /*! - * @brief This function returns a reference to member packet_count - * @return Reference to member packet_count - */ - eProsima_user_DllExport uint64_t& packet_count(); - - - /*! - * @brief This function sets a value in member byte_count - * @param _byte_count New value for member byte_count - */ - eProsima_user_DllExport void byte_count( - uint64_t _byte_count); - - /*! - * @brief This function returns the value of member byte_count - * @return Value of member byte_count - */ - eProsima_user_DllExport uint64_t byte_count() const; - - /*! - * @brief This function returns a reference to member byte_count - * @return Reference to member byte_count - */ - eProsima_user_DllExport uint64_t& byte_count(); - - - /*! - * @brief This function sets a value in member byte_magnitude_order - * @param _byte_magnitude_order New value for member byte_magnitude_order - */ - eProsima_user_DllExport void byte_magnitude_order( - int16_t _byte_magnitude_order); - - /*! - * @brief This function returns the value of member byte_magnitude_order - * @return Value of member byte_magnitude_order - */ - eProsima_user_DllExport int16_t byte_magnitude_order() const; - - /*! - * @brief This function returns a reference to member byte_magnitude_order - * @return Reference to member byte_magnitude_order - */ - eProsima_user_DllExport int16_t& byte_magnitude_order(); - - - /*! - * @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::fastdds::statistics::Entity2LocatorTraffic& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_src_guid; - eprosima::fastdds::statistics::detail::Locator_s m_dst_locator; - uint64_t m_packet_count; - uint64_t m_byte_count; - int16_t m_byte_magnitude_order; - - }; - - - - /*! - * @brief This class represents the structure WriterReaderData defined by the user in the IDL file. - * @ingroup types - */ - class WriterReaderData - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport WriterReaderData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~WriterReaderData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData( - const WriterReaderData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData( - WriterReaderData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData& operator =( - const WriterReaderData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::WriterReaderData that will be copied. - */ - eProsima_user_DllExport WriterReaderData& operator =( - WriterReaderData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::WriterReaderData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const WriterReaderData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::WriterReaderData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const WriterReaderData& x) const; - - /*! - * @brief This function copies the value in member writer_guid - * @param _writer_guid New value to be copied in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _writer_guid); - - /*! - * @brief This function moves the value in member writer_guid - * @param _writer_guid New value to be moved in member writer_guid - */ - eProsima_user_DllExport void writer_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _writer_guid); - - /*! - * @brief This function returns a constant reference to member writer_guid - * @return Constant reference to member writer_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& writer_guid() const; - - /*! - * @brief This function returns a reference to member writer_guid - * @return Reference to member writer_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& writer_guid(); - - - /*! - * @brief This function copies the value in member reader_guid - * @param _reader_guid New value to be copied in member reader_guid - */ - eProsima_user_DllExport void reader_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _reader_guid); - - /*! - * @brief This function moves the value in member reader_guid - * @param _reader_guid New value to be moved in member reader_guid - */ - eProsima_user_DllExport void reader_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _reader_guid); - - /*! - * @brief This function returns a constant reference to member reader_guid - * @return Constant reference to member reader_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& reader_guid() const; - - /*! - * @brief This function returns a reference to member reader_guid - * @return Reference to member reader_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& reader_guid(); - - - /*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ - eProsima_user_DllExport void data( - float _data); - - /*! - * @brief This function returns the value of member data - * @return Value of member data - */ - eProsima_user_DllExport float data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport float& data(); - - - /*! - * @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::fastdds::statistics::WriterReaderData& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_writer_guid; - eprosima::fastdds::statistics::detail::GUID_s m_reader_guid; - float m_data; - - }; - - - - /*! - * @brief This class represents the structure Locator2LocatorData defined by the user in the IDL file. - * @ingroup types - */ - class Locator2LocatorData - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Locator2LocatorData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Locator2LocatorData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData( - const Locator2LocatorData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData( - Locator2LocatorData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData& operator =( - const Locator2LocatorData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Locator2LocatorData that will be copied. - */ - eProsima_user_DllExport Locator2LocatorData& operator =( - Locator2LocatorData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Locator2LocatorData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Locator2LocatorData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Locator2LocatorData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Locator2LocatorData& x) const; - - /*! - * @brief This function copies the value in member src_locator - * @param _src_locator New value to be copied in member src_locator - */ - eProsima_user_DllExport void src_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _src_locator); - - /*! - * @brief This function moves the value in member src_locator - * @param _src_locator New value to be moved in member src_locator - */ - eProsima_user_DllExport void src_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _src_locator); - - /*! - * @brief This function returns a constant reference to member src_locator - * @return Constant reference to member src_locator - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::Locator_s& src_locator() const; - - /*! - * @brief This function returns a reference to member src_locator - * @return Reference to member src_locator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::Locator_s& src_locator(); - - - /*! - * @brief This function copies the value in member dst_locator - * @param _dst_locator New value to be copied in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - const eprosima::fastdds::statistics::detail::Locator_s& _dst_locator); - - /*! - * @brief This function moves the value in member dst_locator - * @param _dst_locator New value to be moved in member dst_locator - */ - eProsima_user_DllExport void dst_locator( - eprosima::fastdds::statistics::detail::Locator_s&& _dst_locator); - - /*! - * @brief This function returns a constant reference to member dst_locator - * @return Constant reference to member dst_locator - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::Locator_s& dst_locator() const; - - /*! - * @brief This function returns a reference to member dst_locator - * @return Reference to member dst_locator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::Locator_s& dst_locator(); - - - /*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ - eProsima_user_DllExport void data( - float _data); - - /*! - * @brief This function returns the value of member data - * @return Value of member data - */ - eProsima_user_DllExport float data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport float& data(); - - - /*! - * @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::fastdds::statistics::Locator2LocatorData& 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 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: - - eprosima::fastdds::statistics::detail::Locator_s m_src_locator; - eprosima::fastdds::statistics::detail::Locator_s m_dst_locator; - float m_data; - - }; - - - - /*! - * @brief This class represents the structure EntityData defined by the user in the IDL file. - * @ingroup types - */ - class EntityData - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EntityData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EntityData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData( - const EntityData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData( - EntityData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData& operator =( - const EntityData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::EntityData that will be copied. - */ - eProsima_user_DllExport EntityData& operator =( - EntityData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EntityData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::EntityData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EntityData& x) const; - - /*! - * @brief This function copies the value in member guid - * @param _guid New value to be copied in member guid - */ - eProsima_user_DllExport void guid( - const eprosima::fastdds::statistics::detail::GUID_s& _guid); - - /*! - * @brief This function moves the value in member guid - * @param _guid New value to be moved in member guid - */ - eProsima_user_DllExport void guid( - eprosima::fastdds::statistics::detail::GUID_s&& _guid); - - /*! - * @brief This function returns a constant reference to member guid - * @return Constant reference to member guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& guid() const; - - /*! - * @brief This function returns a reference to member guid - * @return Reference to member guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& guid(); - - - /*! - * @brief This function sets a value in member data - * @param _data New value for member data - */ - eProsima_user_DllExport void data( - float _data); - - /*! - * @brief This function returns the value of member data - * @return Value of member data - */ - eProsima_user_DllExport float data() const; - - /*! - * @brief This function returns a reference to member data - * @return Reference to member data - */ - eProsima_user_DllExport float& data(); - - - /*! - * @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::fastdds::statistics::EntityData& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_guid; - float m_data; - - }; - - - - /*! - * @brief This class represents the structure PhysicalData defined by the user in the IDL file. - * @ingroup types - */ - class PhysicalData - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport PhysicalData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~PhysicalData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData( - const PhysicalData& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData( - PhysicalData&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData& operator =( - const PhysicalData& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::PhysicalData that will be copied. - */ - eProsima_user_DllExport PhysicalData& operator =( - PhysicalData&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::PhysicalData object to compare. - */ - eProsima_user_DllExport bool operator ==( - const PhysicalData& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::PhysicalData object to compare. - */ - eProsima_user_DllExport bool operator !=( - const PhysicalData& x) const; - - /*! - * @brief This function copies the value in member participant_guid - * @param _participant_guid New value to be copied in member participant_guid - */ - eProsima_user_DllExport void participant_guid( - const eprosima::fastdds::statistics::detail::GUID_s& _participant_guid); - - /*! - * @brief This function moves the value in member participant_guid - * @param _participant_guid New value to be moved in member participant_guid - */ - eProsima_user_DllExport void participant_guid( - eprosima::fastdds::statistics::detail::GUID_s&& _participant_guid); - - /*! - * @brief This function returns a constant reference to member participant_guid - * @return Constant reference to member participant_guid - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::detail::GUID_s& participant_guid() const; - - /*! - * @brief This function returns a reference to member participant_guid - * @return Reference to member participant_guid - */ - eProsima_user_DllExport eprosima::fastdds::statistics::detail::GUID_s& participant_guid(); - - - /*! - * @brief This function copies the value in member host - * @param _host New value to be copied in member host - */ - eProsima_user_DllExport void host( - const std::string& _host); - - /*! - * @brief This function moves the value in member host - * @param _host New value to be moved in member host - */ - eProsima_user_DllExport void host( - std::string&& _host); - - /*! - * @brief This function returns a constant reference to member host - * @return Constant reference to member host - */ - eProsima_user_DllExport const std::string& host() const; - - /*! - * @brief This function returns a reference to member host - * @return Reference to member host - */ - eProsima_user_DllExport std::string& host(); - - - /*! - * @brief This function copies the value in member user - * @param _user New value to be copied in member user - */ - eProsima_user_DllExport void user( - const std::string& _user); - - /*! - * @brief This function moves the value in member user - * @param _user New value to be moved in member user - */ - eProsima_user_DllExport void user( - std::string&& _user); - - /*! - * @brief This function returns a constant reference to member user - * @return Constant reference to member user - */ - eProsima_user_DllExport const std::string& user() const; - - /*! - * @brief This function returns a reference to member user - * @return Reference to member user - */ - eProsima_user_DllExport std::string& user(); - - - /*! - * @brief This function copies the value in member process - * @param _process New value to be copied in member process - */ - eProsima_user_DllExport void process( - const std::string& _process); - - /*! - * @brief This function moves the value in member process - * @param _process New value to be moved in member process - */ - eProsima_user_DllExport void process( - std::string&& _process); - - /*! - * @brief This function returns a constant reference to member process - * @return Constant reference to member process - */ - eProsima_user_DllExport const std::string& process() const; - - /*! - * @brief This function returns a reference to member process - * @return Reference to member process - */ - eProsima_user_DllExport std::string& process(); - - - /*! - * @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::fastdds::statistics::PhysicalData& 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 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: - - eprosima::fastdds::statistics::detail::GUID_s m_participant_guid; - std::string m_host; - std::string m_user; - std::string m_process; - - }; - - /*! - * @brief This class represents the bitmask EventKind defined by the user in the IDL file. - * @ingroup types - */ - enum EventKindBits : uint32_t - { - HISTORY2HISTORY_LATENCY = 0x01ull << 0, - NETWORK_LATENCY = 0x01ull << 1, - PUBLICATION_THROUGHPUT = 0x01ull << 2, - SUBSCRIPTION_THROUGHPUT = 0x01ull << 3, - RTPS_SENT = 0x01ull << 4, - RTPS_LOST = 0x01ull << 5, - RESENT_DATAS = 0x01ull << 6, - HEARTBEAT_COUNT = 0x01ull << 7, - ACKNACK_COUNT = 0x01ull << 8, - NACKFRAG_COUNT = 0x01ull << 9, - GAP_COUNT = 0x01ull << 10, - DATA_COUNT = 0x01ull << 11, - PDP_PACKETS = 0x01ull << 12, - EDP_PACKETS = 0x01ull << 13, - DISCOVERED_ENTITY = 0x01ull << 14, - SAMPLE_DATAS = 0x01ull << 15, - PHYSICAL_DATA = 0x01ull << 16 - }; - typedef uint32_t EventKind; - - - /*! - * @brief This class represents the union Data defined by the user in the IDL file. - * @ingroup types - */ - class Data - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Data(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Data(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data( - const Data& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data( - Data&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data& operator =( - const Data& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object eprosima::fastdds::statistics::Data that will be copied. - */ - eProsima_user_DllExport Data& operator =( - Data&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Data object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Data& x) const; - - /*! - * @brief Comparison operator. - * @param x eprosima::fastdds::statistics::Data object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Data& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - eprosima::fastdds::statistics::EventKind __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EventKind _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EventKind& _d(); - - /*! - * @brief This function copies the value in member writer_reader_data - * @param _writer_reader_data New value to be copied in member writer_reader_data - */ - eProsima_user_DllExport void writer_reader_data( - const eprosima::fastdds::statistics::WriterReaderData& _writer_reader_data); - - /*! - * @brief This function moves the value in member writer_reader_data - * @param _writer_reader_data New value to be moved in member writer_reader_data - */ - eProsima_user_DllExport void writer_reader_data( - eprosima::fastdds::statistics::WriterReaderData&& _writer_reader_data); - - /*! - * @brief This function returns a constant reference to member writer_reader_data - * @return Constant reference to member writer_reader_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::WriterReaderData& writer_reader_data() const; - - /*! - * @brief This function returns a reference to member writer_reader_data - * @return Reference to member writer_reader_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::WriterReaderData& writer_reader_data(); - - - /*! - * @brief This function copies the value in member locator2locator_data - * @param _locator2locator_data New value to be copied in member locator2locator_data - */ - eProsima_user_DllExport void locator2locator_data( - const eprosima::fastdds::statistics::Locator2LocatorData& _locator2locator_data); - - /*! - * @brief This function moves the value in member locator2locator_data - * @param _locator2locator_data New value to be moved in member locator2locator_data - */ - eProsima_user_DllExport void locator2locator_data( - eprosima::fastdds::statistics::Locator2LocatorData&& _locator2locator_data); - - /*! - * @brief This function returns a constant reference to member locator2locator_data - * @return Constant reference to member locator2locator_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::Locator2LocatorData& locator2locator_data() const; - - /*! - * @brief This function returns a reference to member locator2locator_data - * @return Reference to member locator2locator_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::Locator2LocatorData& locator2locator_data(); - - - /*! - * @brief This function copies the value in member entity_data - * @param _entity_data New value to be copied in member entity_data - */ - eProsima_user_DllExport void entity_data( - const eprosima::fastdds::statistics::EntityData& _entity_data); - - /*! - * @brief This function moves the value in member entity_data - * @param _entity_data New value to be moved in member entity_data - */ - eProsima_user_DllExport void entity_data( - eprosima::fastdds::statistics::EntityData&& _entity_data); - - /*! - * @brief This function returns a constant reference to member entity_data - * @return Constant reference to member entity_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::EntityData& entity_data() const; - - /*! - * @brief This function returns a reference to member entity_data - * @return Reference to member entity_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EntityData& entity_data(); - - - /*! - * @brief This function copies the value in member entity2locator_traffic - * @param _entity2locator_traffic New value to be copied in member entity2locator_traffic - */ - eProsima_user_DllExport void entity2locator_traffic( - const eprosima::fastdds::statistics::Entity2LocatorTraffic& _entity2locator_traffic); - - /*! - * @brief This function moves the value in member entity2locator_traffic - * @param _entity2locator_traffic New value to be moved in member entity2locator_traffic - */ - eProsima_user_DllExport void entity2locator_traffic( - eprosima::fastdds::statistics::Entity2LocatorTraffic&& _entity2locator_traffic); - - /*! - * @brief This function returns a constant reference to member entity2locator_traffic - * @return Constant reference to member entity2locator_traffic - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::Entity2LocatorTraffic& entity2locator_traffic() const; - - /*! - * @brief This function returns a reference to member entity2locator_traffic - * @return Reference to member entity2locator_traffic - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::Entity2LocatorTraffic& entity2locator_traffic(); - - - /*! - * @brief This function copies the value in member entity_count - * @param _entity_count New value to be copied in member entity_count - */ - eProsima_user_DllExport void entity_count( - const eprosima::fastdds::statistics::EntityCount& _entity_count); - - /*! - * @brief This function moves the value in member entity_count - * @param _entity_count New value to be moved in member entity_count - */ - eProsima_user_DllExport void entity_count( - eprosima::fastdds::statistics::EntityCount&& _entity_count); - - /*! - * @brief This function returns a constant reference to member entity_count - * @return Constant reference to member entity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::EntityCount& entity_count() const; - - /*! - * @brief This function returns a reference to member entity_count - * @return Reference to member entity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::EntityCount& entity_count(); - - - /*! - * @brief This function copies the value in member discovery_time - * @param _discovery_time New value to be copied in member discovery_time - */ - eProsima_user_DllExport void discovery_time( - const eprosima::fastdds::statistics::DiscoveryTime& _discovery_time); - - /*! - * @brief This function moves the value in member discovery_time - * @param _discovery_time New value to be moved in member discovery_time - */ - eProsima_user_DllExport void discovery_time( - eprosima::fastdds::statistics::DiscoveryTime&& _discovery_time); - - /*! - * @brief This function returns a constant reference to member discovery_time - * @return Constant reference to member discovery_time - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::DiscoveryTime& discovery_time() const; - - /*! - * @brief This function returns a reference to member discovery_time - * @return Reference to member discovery_time - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::DiscoveryTime& discovery_time(); - - - /*! - * @brief This function copies the value in member sample_identity_count - * @param _sample_identity_count New value to be copied in member sample_identity_count - */ - eProsima_user_DllExport void sample_identity_count( - const eprosima::fastdds::statistics::SampleIdentityCount& _sample_identity_count); - - /*! - * @brief This function moves the value in member sample_identity_count - * @param _sample_identity_count New value to be moved in member sample_identity_count - */ - eProsima_user_DllExport void sample_identity_count( - eprosima::fastdds::statistics::SampleIdentityCount&& _sample_identity_count); - - /*! - * @brief This function returns a constant reference to member sample_identity_count - * @return Constant reference to member sample_identity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::SampleIdentityCount& sample_identity_count() const; - - /*! - * @brief This function returns a reference to member sample_identity_count - * @return Reference to member sample_identity_count - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::SampleIdentityCount& sample_identity_count(); - - - /*! - * @brief This function copies the value in member physical_data - * @param _physical_data New value to be copied in member physical_data - */ - eProsima_user_DllExport void physical_data( - const eprosima::fastdds::statistics::PhysicalData& _physical_data); - - /*! - * @brief This function moves the value in member physical_data - * @param _physical_data New value to be moved in member physical_data - */ - eProsima_user_DllExport void physical_data( - eprosima::fastdds::statistics::PhysicalData&& _physical_data); - - /*! - * @brief This function returns a constant reference to member physical_data - * @return Constant reference to member physical_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const eprosima::fastdds::statistics::PhysicalData& physical_data() const; - - /*! - * @brief This function returns a reference to member physical_data - * @return Reference to member physical_data - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport eprosima::fastdds::statistics::PhysicalData& physical_data(); - - - /*! - * @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::fastdds::statistics::Data& 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); - - - - - - private: - - eprosima::fastdds::statistics::EventKind m__d; - - eprosima::fastdds::statistics::WriterReaderData m_writer_reader_data; - eprosima::fastdds::statistics::Locator2LocatorData m_locator2locator_data; - eprosima::fastdds::statistics::EntityData m_entity_data; - eprosima::fastdds::statistics::Entity2LocatorTraffic m_entity2locator_traffic; - eprosima::fastdds::statistics::EntityCount m_entity_count; - eprosima::fastdds::statistics::DiscoveryTime m_discovery_time; - eprosima::fastdds::statistics::SampleIdentityCount m_sample_identity_count; - eprosima::fastdds::statistics::PhysicalData m_physical_data; - }; - - } // namespace statistics - } // namespace fastdds -} // namespace eprosima - -#endif // _FAST_DDS_GENERATED_EPROSIMA_FASTDDS_STATISTICS_TYPES_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/communication/CMakeLists.txt b/test/communication/CMakeLists.txt index e19db25df79..4ec1c3f10f4 100644 --- a/test/communication/CMakeLists.txt +++ b/test/communication/CMakeLists.txt @@ -18,12 +18,8 @@ find_package(PythonInterp 3) # Binaries ############################################################################### set(COMMON_SOURCE - ${PROJECT_SOURCE_DIR}/test/blackbox/types/HelloWorld.cxx - ${PROJECT_SOURCE_DIR}/test/blackbox/types/HelloWorldv1.cxx ${PROJECT_SOURCE_DIR}/test/blackbox/types/HelloWorldPubSubTypes.cxx ${PROJECT_SOURCE_DIR}/test/blackbox/types/HelloWorldTypeObject.cxx - ${PROJECT_SOURCE_DIR}/test/blackbox/types/FixedSized.cxx - ${PROJECT_SOURCE_DIR}/test/blackbox/types/FixedSizedv1.cxx ${PROJECT_SOURCE_DIR}/test/blackbox/types/FixedSizedPubSubTypes.cxx ) diff --git a/test/dds/communication/CMakeLists.txt b/test/dds/communication/CMakeLists.txt index ac69ac6d8ba..ef5066fd4c6 100644 --- a/test/dds/communication/CMakeLists.txt +++ b/test/dds/communication/CMakeLists.txt @@ -48,12 +48,8 @@ target_link_libraries(DDSSimpleCommunicationDynamicSubscriber fastrtps fastcdr f # Standar tests set(COMMON_SOURCE - ${PROJECT_SOURCE_DIR}/test/blackbox/types/HelloWorld.cxx - ${PROJECT_SOURCE_DIR}/test/blackbox/types/HelloWorldv1.cxx ${PROJECT_SOURCE_DIR}/test/blackbox/types/HelloWorldPubSubTypes.cxx ${PROJECT_SOURCE_DIR}/test/blackbox/types/HelloWorldTypeObject.cxx - ${PROJECT_SOURCE_DIR}/test/blackbox/types/FixedSized.cxx - ${PROJECT_SOURCE_DIR}/test/blackbox/types/FixedSizedv1.cxx ${PROJECT_SOURCE_DIR}/test/blackbox/types/FixedSizedPubSubTypes.cxx ) diff --git a/test/profiling/allocations/AllocTestType.cxx b/test/profiling/allocations/AllocTestType.cxx deleted file mode 100644 index 58cc317296f..00000000000 --- a/test/profiling/allocations/AllocTestType.cxx +++ /dev/null @@ -1,124 +0,0 @@ -// 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 AllocTestType.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "AllocTestType.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -AllocTestType::AllocTestType() -{ -} - -AllocTestType::~AllocTestType() -{ -} - -AllocTestType::AllocTestType( - const AllocTestType& x) -{ - m_index = x.m_index; -} - -AllocTestType::AllocTestType( - AllocTestType&& x) noexcept -{ - m_index = x.m_index; -} - -AllocTestType& AllocTestType::operator =( - const AllocTestType& x) -{ - - m_index = x.m_index; - return *this; -} - -AllocTestType& AllocTestType::operator =( - AllocTestType&& x) noexcept -{ - - m_index = x.m_index; - return *this; -} - -bool AllocTestType::operator ==( - const AllocTestType& x) const -{ - return (m_index == x.m_index); -} - -bool AllocTestType::operator !=( - const AllocTestType& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void AllocTestType::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t AllocTestType::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& AllocTestType::index() -{ - return m_index; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "AllocTestTypeCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/profiling/allocations/AllocTestType.h b/test/profiling/allocations/AllocTestType.hpp similarity index 74% rename from test/profiling/allocations/AllocTestType.h rename to test/profiling/allocations/AllocTestType.hpp index e823f9360d1..f004848a7df 100644 --- a/test/profiling/allocations/AllocTestType.h +++ b/test/profiling/allocations/AllocTestType.hpp @@ -13,31 +13,27 @@ // limitations under the License. /*! - * @file AllocTestType.h + * @file AllocTestType.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "AllocTestTypev1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_ALLOCTESTTYPE_H_ -#define _FAST_DDS_GENERATED_ALLOCTESTTYPE_H_ +#ifndef _FAST_DDS_GENERATED_ALLOCTESTTYPE_HPP_ +#define _FAST_DDS_GENERATED_ALLOCTESTTYPE_HPP_ #include #include #include #include #include +#include #include #include #include #include - +#include #if defined(_WIN32) @@ -64,15 +60,6 @@ #define ALLOCTESTTYPE_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! @@ -86,73 +73,112 @@ class AllocTestType /*! * @brief Default constructor. */ - eProsima_user_DllExport AllocTestType(); + eProsima_user_DllExport AllocTestType() + { + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~AllocTestType(); + eProsima_user_DllExport ~AllocTestType() + { + } /*! * @brief Copy constructor. * @param x Reference to the object AllocTestType that will be copied. */ eProsima_user_DllExport AllocTestType( - const AllocTestType& x); + const AllocTestType& x) + { + m_index = x.m_index; + + } /*! * @brief Move constructor. * @param x Reference to the object AllocTestType that will be copied. */ eProsima_user_DllExport AllocTestType( - AllocTestType&& x) noexcept; + AllocTestType&& x) noexcept + { + m_index = x.m_index; + } /*! * @brief Copy assignment. * @param x Reference to the object AllocTestType that will be copied. */ eProsima_user_DllExport AllocTestType& operator =( - const AllocTestType& x); + const AllocTestType& x) + { + + m_index = x.m_index; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object AllocTestType that will be copied. */ eProsima_user_DllExport AllocTestType& operator =( - AllocTestType&& x) noexcept; + AllocTestType&& x) noexcept + { + + m_index = x.m_index; + return *this; + } /*! * @brief Comparison operator. * @param x AllocTestType object to compare. */ eProsima_user_DllExport bool operator ==( - const AllocTestType& x) const; + const AllocTestType& x) const + { + return (m_index == x.m_index); + } /*! * @brief Comparison operator. * @param x AllocTestType object to compare. */ eProsima_user_DllExport bool operator !=( - const AllocTestType& x) const; + const AllocTestType& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member index * @param _index New value for member index */ eProsima_user_DllExport void index( - uint32_t _index); + uint32_t _index) + { + m_index = _index; + } /*! * @brief This function returns the value of member index * @return Value of member index */ - eProsima_user_DllExport uint32_t index() const; + eProsima_user_DllExport uint32_t index() const + { + return m_index; + } /*! * @brief This function returns a reference to member index * @return Reference to member index */ - eProsima_user_DllExport uint32_t& index(); + eProsima_user_DllExport uint32_t& index() + { + return m_index; + } + + private: @@ -160,8 +186,6 @@ class AllocTestType }; -#endif // _FAST_DDS_GENERATED_ALLOCTESTTYPE_H_ - +#endif // _FAST_DDS_GENERATED_ALLOCTESTTYPE_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/profiling/allocations/AllocTestTypeCdrAux.hpp b/test/profiling/allocations/AllocTestTypeCdrAux.hpp index 9c9494f96d2..6f8fd371dbd 100644 --- a/test/profiling/allocations/AllocTestTypeCdrAux.hpp +++ b/test/profiling/allocations/AllocTestTypeCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_ALLOCTESTTYPECDRAUX_HPP_ #define _FAST_DDS_GENERATED_ALLOCTESTTYPECDRAUX_HPP_ -#include "AllocTestType.h" +#include "AllocTestType.hpp" constexpr uint32_t AllocTestType_max_cdr_typesize {8UL}; constexpr uint32_t AllocTestType_max_key_cdr_typesize {0UL}; diff --git a/test/profiling/allocations/AllocTestTypePubSubTypes.cxx b/test/profiling/allocations/AllocTestTypePubSubTypes.cxx index 3aa18060dc2..bde22381d45 100644 --- a/test/profiling/allocations/AllocTestTypePubSubTypes.cxx +++ b/test/profiling/allocations/AllocTestTypePubSubTypes.cxx @@ -219,3 +219,6 @@ bool AllocTestTypePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "AllocTestTypeCdrAux.ipp" diff --git a/test/profiling/allocations/AllocTestTypePubSubTypes.h b/test/profiling/allocations/AllocTestTypePubSubTypes.h index 80298136ea2..54775b698c2 100644 --- a/test/profiling/allocations/AllocTestTypePubSubTypes.h +++ b/test/profiling/allocations/AllocTestTypePubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "AllocTestType.h" +#include "AllocTestType.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) diff --git a/test/profiling/allocations/AllocTestTypev1.cxx b/test/profiling/allocations/AllocTestTypev1.cxx deleted file mode 100644 index 5d4e51b63a9..00000000000 --- a/test/profiling/allocations/AllocTestTypev1.cxx +++ /dev/null @@ -1,223 +0,0 @@ -// 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 AllocTestType.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "AllocTestType.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define AllocTestType_max_cdr_typesize 8ULL; - - - - -AllocTestType::AllocTestType() -{ - // unsigned long m_index - m_index = 0; - -} - -AllocTestType::~AllocTestType() -{ -} - -AllocTestType::AllocTestType( - const AllocTestType& x) -{ - m_index = x.m_index; - -} - -AllocTestType::AllocTestType( - AllocTestType&& x) noexcept -{ - m_index = x.m_index; - -} - -AllocTestType& AllocTestType::operator =( - const AllocTestType& x) -{ - m_index = x.m_index; - - return *this; -} - -AllocTestType& AllocTestType::operator =( - AllocTestType&& x) noexcept -{ - m_index = x.m_index; - - return *this; -} - -bool AllocTestType::operator ==( - const AllocTestType& x) const -{ - return (m_index == x.m_index); -} - -bool AllocTestType::operator !=( - const AllocTestType& x) const -{ - return !(*this == x); -} - -size_t AllocTestType::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return AllocTestType_max_cdr_typesize; -} - -size_t AllocTestType::getCdrSerializedSize( - const AllocTestType& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void AllocTestType::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_index; - -} - -void AllocTestType::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_index; - - -} - - -bool AllocTestType::isKeyDefined() -{ - return false; -} - -void AllocTestType::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ -void AllocTestType::index( - uint32_t _index) -{ - m_index = _index; -} - -/*! - * @brief This function returns the value of member index - * @return Value of member index - */ -uint32_t AllocTestType::index() const -{ - return m_index; -} - -/*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ -uint32_t& AllocTestType::index() -{ - return m_index; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/profiling/allocations/AllocTestTypev1.h b/test/profiling/allocations/AllocTestTypev1.h deleted file mode 100644 index 7fbced57c4c..00000000000 --- a/test/profiling/allocations/AllocTestTypev1.h +++ /dev/null @@ -1,215 +0,0 @@ -// 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 AllocTestType.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_ALLOCTESTTYPE_H_ -#define _FAST_DDS_GENERATED_ALLOCTESTTYPE_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(ALLOCTESTTYPE_SOURCE) -#define ALLOCTESTTYPE_DllAPI __declspec( dllexport ) -#else -#define ALLOCTESTTYPE_DllAPI __declspec( dllimport ) -#endif // ALLOCTESTTYPE_SOURCE -#else -#define ALLOCTESTTYPE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define ALLOCTESTTYPE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure AllocTestType defined by the user in the IDL file. - * @ingroup AllocTestType - */ -class AllocTestType -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport AllocTestType(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~AllocTestType(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object AllocTestType that will be copied. - */ - eProsima_user_DllExport AllocTestType( - const AllocTestType& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object AllocTestType that will be copied. - */ - eProsima_user_DllExport AllocTestType( - AllocTestType&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object AllocTestType that will be copied. - */ - eProsima_user_DllExport AllocTestType& operator =( - const AllocTestType& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object AllocTestType that will be copied. - */ - eProsima_user_DllExport AllocTestType& operator =( - AllocTestType&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x AllocTestType object to compare. - */ - eProsima_user_DllExport bool operator ==( - const AllocTestType& x) const; - - /*! - * @brief Comparison operator. - * @param x AllocTestType object to compare. - */ - eProsima_user_DllExport bool operator !=( - const AllocTestType& x) const; - - /*! - * @brief This function sets a value in member index - * @param _index New value for member index - */ - eProsima_user_DllExport void index( - uint32_t _index); - - /*! - * @brief This function returns the value of member index - * @return Value of member index - */ - eProsima_user_DllExport uint32_t index() const; - - /*! - * @brief This function returns a reference to member index - * @return Reference to member index - */ - eProsima_user_DllExport uint32_t& index(); - - - /*! - * @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 AllocTestType& 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 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: - - uint32_t m_index; - -}; - - -#endif // _FAST_DDS_GENERATED_ALLOCTESTTYPE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/unittest/dds/publisher/CMakeLists.txt b/test/unittest/dds/publisher/CMakeLists.txt index 3fe6c9a9aee..00d79a50ba4 100644 --- a/test/unittest/dds/publisher/CMakeLists.txt +++ b/test/unittest/dds/publisher/CMakeLists.txt @@ -222,8 +222,6 @@ set(DATAWRITERTESTS_SOURCE DataWriterTests.cpp ${PROJECT_SOURCE_DIR}/src/cpp/statistics/rtps/StatisticsBase.cpp ${PROJECT_SOURCE_DIR}/src/cpp/statistics/rtps/reader/StatisticsReaderImpl.cpp ${PROJECT_SOURCE_DIR}/src/cpp/statistics/rtps/writer/StatisticsWriterImpl.cpp - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/types.cxx - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesv1.cxx ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesPubSubTypes.cxx ) diff --git a/test/unittest/dds/status/CMakeLists.txt b/test/unittest/dds/status/CMakeLists.txt index cc88494cb57..e5e1eb38eca 100644 --- a/test/unittest/dds/status/CMakeLists.txt +++ b/test/unittest/dds/status/CMakeLists.txt @@ -112,8 +112,6 @@ if (FASTDDS_STATISTICS) set(statistics_sources ${PROJECT_SOURCE_DIR}/src/cpp/statistics/fastdds/domain/DomainParticipantImpl.cpp ${PROJECT_SOURCE_DIR}/src/cpp/statistics/fastdds/domain/DomainParticipantStatisticsListener.cpp - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/types.cxx - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesv1.cxx ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesPubSubTypes.cxx ) diff --git a/test/unittest/dds/topic/DDSSQLFilter/DDSSQLFilterTests.cpp b/test/unittest/dds/topic/DDSSQLFilter/DDSSQLFilterTests.cpp index a0a1cbe3e17..91e5ad00643 100644 --- a/test/unittest/dds/topic/DDSSQLFilter/DDSSQLFilterTests.cpp +++ b/test/unittest/dds/topic/DDSSQLFilter/DDSSQLFilterTests.cpp @@ -29,7 +29,7 @@ #include "fastdds/dds/core/StackAllocatedSequence.hpp" #include "fastdds/dds/log/Log.hpp" -#include "data_types/ContentFilterTestType.h" +#include "data_types/ContentFilterTestType.hpp" #include "data_types/ContentFilterTestTypePubSubTypes.h" #include "data_types/ContentFilterTestTypeTypeObject.h" @@ -120,7 +120,6 @@ static bool are_types_compatible( } using DDSFilterFactory = DDSSQLFilter::DDSFilterFactory; -using ReturnCode_t = DDSFilterFactory::ReturnCode_t; static ReturnCode_t create_content_filter( DDSFilterFactory& factory, diff --git a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestType.cxx b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestType.cxx deleted file mode 100644 index 78827cf683c..00000000000 --- a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestType.cxx +++ /dev/null @@ -1,3341 +0,0 @@ -// 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 ContentFilterTestType.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "ContentFilterTestType.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include "ContentFilterTestTypeTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -StructType::StructType() -{ - // Just to register all known types - registerContentFilterTestTypeTypes(); -} - -StructType::~StructType() -{ -} - -StructType::StructType( - const StructType& x) -{ - 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_long_double_field = x.m_long_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; -} - -StructType::StructType( - StructType&& x) noexcept -{ - 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_long_double_field = x.m_long_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; -} - -StructType& StructType::operator =( - const StructType& x) -{ - - 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_long_double_field = x.m_long_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 *this; -} - -StructType& StructType::operator =( - StructType&& x) noexcept -{ - - 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_long_double_field = x.m_long_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; - return *this; -} - -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_long_double_field == x.m_long_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 StructType::operator !=( - const StructType& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member char_field - * @param _char_field New value for member char_field - */ -void StructType::char_field( - char _char_field) -{ - m_char_field = _char_field; -} - -/*! - * @brief This function returns the value of member char_field - * @return Value of member char_field - */ -char StructType::char_field() const -{ - return m_char_field; -} - -/*! - * @brief This function returns a reference to member char_field - * @return Reference to member char_field - */ -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 - */ -void StructType::uint8_field( - uint8_t _uint8_field) -{ - m_uint8_field = _uint8_field; -} - -/*! - * @brief This function returns the value of member uint8_field - * @return Value of member uint8_field - */ -uint8_t StructType::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& 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 - */ -void StructType::int16_field( - int16_t _int16_field) -{ - m_int16_field = _int16_field; -} - -/*! - * @brief This function returns the value of member int16_field - * @return Value of member int16_field - */ -int16_t StructType::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& 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 - */ -void StructType::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 StructType::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& 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 - */ -void StructType::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 StructType::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& 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 - */ -void StructType::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 StructType::uint32_field() const -{ - return m_uint32_field; -} - -/*! - * @brief This function returns a reference to member uint32_field - * @return Reference to member uint32_field - */ -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 - */ -void StructType::int64_field( - int64_t _int64_field) -{ - m_int64_field = _int64_field; -} - -/*! - * @brief This function returns the value of member int64_field - * @return Value of member int64_field - */ -int64_t StructType::int64_field() const -{ - return m_int64_field; -} - -/*! - * @brief This function returns a reference to member int64_field - * @return Reference to member int64_field - */ -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 - */ -void StructType::uint64_field( - uint64_t _uint64_field) -{ - m_uint64_field = _uint64_field; -} - -/*! - * @brief This function returns the value of member uint64_field - * @return Value of member uint64_field - */ -uint64_t StructType::uint64_field() const -{ - return m_uint64_field; -} - -/*! - * @brief This function returns a reference to member uint64_field - * @return Reference to member uint64_field - */ -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 - */ -void StructType::float_field( - float _float_field) -{ - m_float_field = _float_field; -} - -/*! - * @brief This function returns the value of member float_field - * @return Value of member float_field - */ -float StructType::float_field() const -{ - return m_float_field; -} - -/*! - * @brief This function returns a reference to member float_field - * @return Reference to member float_field - */ -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 - */ -void StructType::double_field( - double _double_field) -{ - m_double_field = _double_field; -} - -/*! - * @brief This function returns the value of member double_field - * @return Value of member double_field - */ -double StructType::double_field() const -{ - return m_double_field; -} - -/*! - * @brief This function returns a reference to member double_field - * @return Reference to member double_field - */ -double& StructType::double_field() -{ - return m_double_field; -} - - -/*! - * @brief This function sets a value in member long_double_field - * @param _long_double_field New value for member long_double_field - */ -void StructType::long_double_field( - long double _long_double_field) -{ - m_long_double_field = _long_double_field; -} - -/*! - * @brief This function returns the value of member long_double_field - * @return Value of member long_double_field - */ -long double StructType::long_double_field() const -{ - return m_long_double_field; -} - -/*! - * @brief This function returns a reference to member long_double_field - * @return Reference to member long_double_field - */ -long double& StructType::long_double_field() -{ - return m_long_double_field; -} - - -/*! - * @brief This function sets a value in member bool_field - * @param _bool_field New value for member bool_field - */ -void StructType::bool_field( - bool _bool_field) -{ - m_bool_field = _bool_field; -} - -/*! - * @brief This function returns the value of member bool_field - * @return Value of member bool_field - */ -bool StructType::bool_field() const -{ - return m_bool_field; -} - -/*! - * @brief This function returns a reference to member bool_field - * @return Reference to member bool_field - */ -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 - */ -void StructType::string_field( - const std::string& _string_field) -{ - m_string_field = _string_field; -} - -/*! - * @brief This function moves the value in member string_field - * @param _string_field New value to be moved in member string_field - */ -void StructType::string_field( - std::string&& _string_field) -{ - m_string_field = std::move(_string_field); -} - -/*! - * @brief This function returns a constant reference to member string_field - * @return Constant reference to member string_field - */ -const std::string& StructType::string_field() const -{ - return m_string_field; -} - -/*! - * @brief This function returns a reference to member string_field - * @return Reference to member string_field - */ -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 - */ -void StructType::enum_field( - Color _enum_field) -{ - m_enum_field = _enum_field; -} - -/*! - * @brief This function returns the value of member enum_field - * @return Value of member enum_field - */ -Color StructType::enum_field() const -{ - return m_enum_field; -} - -/*! - * @brief This function returns a reference to member enum_field - * @return Reference to member enum_field - */ -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 - */ -void StructType::enum2_field( - Material _enum2_field) -{ - m_enum2_field = _enum2_field; -} - -/*! - * @brief This function returns the value of member enum2_field - * @return Value of member enum2_field - */ -Material StructType::enum2_field() const -{ - return m_enum2_field; -} - -/*! - * @brief This function returns a reference to member enum2_field - * @return Reference to member enum2_field - */ -Material& StructType::enum2_field() -{ - return m_enum2_field; -} - - - - - - - - -ContentFilterTestType::ContentFilterTestType() -{ - // Just to register all known types - registerContentFilterTestTypeTypes(); -} - -ContentFilterTestType::~ContentFilterTestType() -{ -} - -ContentFilterTestType::ContentFilterTestType( - const ContentFilterTestType& x) -{ - 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_long_double_field = x.m_long_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_long_double_field = x.m_array_long_double_field; - m_array_bool_field = x.m_array_bool_field; - m_array_string_field = x.m_array_string_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_long_double_field = x.m_bounded_sequence_long_double_field; - m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; - m_bounded_sequence_string_field = x.m_bounded_sequence_string_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_long_double_field = x.m_unbounded_sequence_long_double_field; - m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; - m_unbounded_sequence_string_field = x.m_unbounded_sequence_string_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; -} - -ContentFilterTestType::ContentFilterTestType( - ContentFilterTestType&& x) noexcept -{ - 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_long_double_field = x.m_long_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_long_double_field = std::move(x.m_array_long_double_field); - m_array_bool_field = std::move(x.m_array_bool_field); - m_array_string_field = std::move(x.m_array_string_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_long_double_field = std::move(x.m_bounded_sequence_long_double_field); - m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); - m_bounded_sequence_string_field = std::move(x.m_bounded_sequence_string_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_long_double_field = std::move(x.m_unbounded_sequence_long_double_field); - m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); - m_unbounded_sequence_string_field = std::move(x.m_unbounded_sequence_string_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); -} - -ContentFilterTestType& ContentFilterTestType::operator =( - const ContentFilterTestType& x) -{ - - 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_long_double_field = x.m_long_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_long_double_field = x.m_array_long_double_field; - m_array_bool_field = x.m_array_bool_field; - m_array_string_field = x.m_array_string_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_long_double_field = x.m_bounded_sequence_long_double_field; - m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; - m_bounded_sequence_string_field = x.m_bounded_sequence_string_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_long_double_field = x.m_unbounded_sequence_long_double_field; - m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; - m_unbounded_sequence_string_field = x.m_unbounded_sequence_string_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 *this; -} - -ContentFilterTestType& ContentFilterTestType::operator =( - ContentFilterTestType&& x) noexcept -{ - - 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_long_double_field = x.m_long_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_long_double_field = std::move(x.m_array_long_double_field); - m_array_bool_field = std::move(x.m_array_bool_field); - m_array_string_field = std::move(x.m_array_string_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_long_double_field = std::move(x.m_bounded_sequence_long_double_field); - m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); - m_bounded_sequence_string_field = std::move(x.m_bounded_sequence_string_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_long_double_field = std::move(x.m_unbounded_sequence_long_double_field); - m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); - m_unbounded_sequence_string_field = std::move(x.m_unbounded_sequence_string_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 ContentFilterTestType::operator ==( - const ContentFilterTestType& 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_long_double_field == x.m_long_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_long_double_field == x.m_array_long_double_field && - m_array_bool_field == x.m_array_bool_field && - m_array_string_field == x.m_array_string_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_long_double_field == x.m_bounded_sequence_long_double_field && - m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && - m_bounded_sequence_string_field == x.m_bounded_sequence_string_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_long_double_field == x.m_unbounded_sequence_long_double_field && - m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && - m_unbounded_sequence_string_field == x.m_unbounded_sequence_string_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 ContentFilterTestType::operator !=( - const ContentFilterTestType& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member char_field - * @param _char_field New value for member char_field - */ -void ContentFilterTestType::char_field( - char _char_field) -{ - m_char_field = _char_field; -} - -/*! - * @brief This function returns the value of member char_field - * @return Value of member char_field - */ -char ContentFilterTestType::char_field() const -{ - return m_char_field; -} - -/*! - * @brief This function returns a reference to member char_field - * @return Reference to member char_field - */ -char& ContentFilterTestType::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 - */ -void ContentFilterTestType::uint8_field( - uint8_t _uint8_field) -{ - m_uint8_field = _uint8_field; -} - -/*! - * @brief This function returns the value of member uint8_field - * @return Value of member uint8_field - */ -uint8_t ContentFilterTestType::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& ContentFilterTestType::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 - */ -void ContentFilterTestType::int16_field( - int16_t _int16_field) -{ - m_int16_field = _int16_field; -} - -/*! - * @brief This function returns the value of member int16_field - * @return Value of member int16_field - */ -int16_t ContentFilterTestType::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& ContentFilterTestType::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 ContentFilterTestType::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 ContentFilterTestType::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& ContentFilterTestType::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 ContentFilterTestType::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 ContentFilterTestType::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& ContentFilterTestType::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 ContentFilterTestType::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 ContentFilterTestType::uint32_field() const -{ - return m_uint32_field; -} - -/*! - * @brief This function returns a reference to member uint32_field - * @return Reference to member uint32_field - */ -uint32_t& ContentFilterTestType::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 - */ -void ContentFilterTestType::int64_field( - int64_t _int64_field) -{ - m_int64_field = _int64_field; -} - -/*! - * @brief This function returns the value of member int64_field - * @return Value of member int64_field - */ -int64_t ContentFilterTestType::int64_field() const -{ - return m_int64_field; -} - -/*! - * @brief This function returns a reference to member int64_field - * @return Reference to member int64_field - */ -int64_t& ContentFilterTestType::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 - */ -void ContentFilterTestType::uint64_field( - uint64_t _uint64_field) -{ - m_uint64_field = _uint64_field; -} - -/*! - * @brief This function returns the value of member uint64_field - * @return Value of member uint64_field - */ -uint64_t ContentFilterTestType::uint64_field() const -{ - return m_uint64_field; -} - -/*! - * @brief This function returns a reference to member uint64_field - * @return Reference to member uint64_field - */ -uint64_t& ContentFilterTestType::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 - */ -void ContentFilterTestType::float_field( - float _float_field) -{ - m_float_field = _float_field; -} - -/*! - * @brief This function returns the value of member float_field - * @return Value of member float_field - */ -float ContentFilterTestType::float_field() const -{ - return m_float_field; -} - -/*! - * @brief This function returns a reference to member float_field - * @return Reference to member float_field - */ -float& ContentFilterTestType::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 - */ -void ContentFilterTestType::double_field( - double _double_field) -{ - m_double_field = _double_field; -} - -/*! - * @brief This function returns the value of member double_field - * @return Value of member double_field - */ -double ContentFilterTestType::double_field() const -{ - return m_double_field; -} - -/*! - * @brief This function returns a reference to member double_field - * @return Reference to member double_field - */ -double& ContentFilterTestType::double_field() -{ - return m_double_field; -} - - -/*! - * @brief This function sets a value in member long_double_field - * @param _long_double_field New value for member long_double_field - */ -void ContentFilterTestType::long_double_field( - long double _long_double_field) -{ - m_long_double_field = _long_double_field; -} - -/*! - * @brief This function returns the value of member long_double_field - * @return Value of member long_double_field - */ -long double ContentFilterTestType::long_double_field() const -{ - return m_long_double_field; -} - -/*! - * @brief This function returns a reference to member long_double_field - * @return Reference to member long_double_field - */ -long double& ContentFilterTestType::long_double_field() -{ - return m_long_double_field; -} - - -/*! - * @brief This function sets a value in member bool_field - * @param _bool_field New value for member bool_field - */ -void ContentFilterTestType::bool_field( - bool _bool_field) -{ - m_bool_field = _bool_field; -} - -/*! - * @brief This function returns the value of member bool_field - * @return Value of member bool_field - */ -bool ContentFilterTestType::bool_field() const -{ - return m_bool_field; -} - -/*! - * @brief This function returns a reference to member bool_field - * @return Reference to member bool_field - */ -bool& ContentFilterTestType::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 - */ -void ContentFilterTestType::string_field( - const std::string& _string_field) -{ - m_string_field = _string_field; -} - -/*! - * @brief This function moves the value in member string_field - * @param _string_field New value to be moved in member string_field - */ -void ContentFilterTestType::string_field( - std::string&& _string_field) -{ - m_string_field = std::move(_string_field); -} - -/*! - * @brief This function returns a constant reference to member string_field - * @return Constant reference to member string_field - */ -const std::string& ContentFilterTestType::string_field() const -{ - return m_string_field; -} - -/*! - * @brief This function returns a reference to member string_field - * @return Reference to member string_field - */ -std::string& ContentFilterTestType::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 - */ -void ContentFilterTestType::enum_field( - Color _enum_field) -{ - m_enum_field = _enum_field; -} - -/*! - * @brief This function returns the value of member enum_field - * @return Value of member enum_field - */ -Color ContentFilterTestType::enum_field() const -{ - return m_enum_field; -} - -/*! - * @brief This function returns a reference to member enum_field - * @return Reference to member enum_field - */ -Color& ContentFilterTestType::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 - */ -void ContentFilterTestType::enum2_field( - Material _enum2_field) -{ - m_enum2_field = _enum2_field; -} - -/*! - * @brief This function returns the value of member enum2_field - * @return Value of member enum2_field - */ -Material ContentFilterTestType::enum2_field() const -{ - return m_enum2_field; -} - -/*! - * @brief This function returns a reference to member enum2_field - * @return Reference to member enum2_field - */ -Material& ContentFilterTestType::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 - */ -void ContentFilterTestType::struct_field( - const StructType& _struct_field) -{ - m_struct_field = _struct_field; -} - -/*! - * @brief This function moves the value in member struct_field - * @param _struct_field New value to be moved in member struct_field - */ -void ContentFilterTestType::struct_field( - StructType&& _struct_field) -{ - m_struct_field = std::move(_struct_field); -} - -/*! - * @brief This function returns a constant reference to member struct_field - * @return Constant reference to member struct_field - */ -const StructType& ContentFilterTestType::struct_field() const -{ - return m_struct_field; -} - -/*! - * @brief This function returns a reference to member struct_field - * @return Reference to member struct_field - */ -StructType& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_char_field( - const std::array& _array_char_field) -{ - m_array_char_field = _array_char_field; -} - -/*! - * @brief This function moves the value in member array_char_field - * @param _array_char_field New value to be moved in member array_char_field - */ -void ContentFilterTestType::array_char_field( - std::array&& _array_char_field) -{ - m_array_char_field = std::move(_array_char_field); -} - -/*! - * @brief This function returns a constant reference to member array_char_field - * @return Constant reference to member array_char_field - */ -const std::array& ContentFilterTestType::array_char_field() const -{ - return m_array_char_field; -} - -/*! - * @brief This function returns a reference to member array_char_field - * @return Reference to member array_char_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_uint8_field( - const std::array& _array_uint8_field) -{ - m_array_uint8_field = _array_uint8_field; -} - -/*! - * @brief This function moves the value in member array_uint8_field - * @param _array_uint8_field New value to be moved in member array_uint8_field - */ -void ContentFilterTestType::array_uint8_field( - std::array&& _array_uint8_field) -{ - m_array_uint8_field = std::move(_array_uint8_field); -} - -/*! - * @brief This function returns a constant reference to member array_uint8_field - * @return Constant reference to member array_uint8_field - */ -const std::array& ContentFilterTestType::array_uint8_field() const -{ - return m_array_uint8_field; -} - -/*! - * @brief This function returns a reference to member array_uint8_field - * @return Reference to member array_uint8_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_int16_field( - const std::array& _array_int16_field) -{ - m_array_int16_field = _array_int16_field; -} - -/*! - * @brief This function moves the value in member array_int16_field - * @param _array_int16_field New value to be moved in member array_int16_field - */ -void ContentFilterTestType::array_int16_field( - std::array&& _array_int16_field) -{ - m_array_int16_field = std::move(_array_int16_field); -} - -/*! - * @brief This function returns a constant reference to member array_int16_field - * @return Constant reference to member array_int16_field - */ -const std::array& ContentFilterTestType::array_int16_field() const -{ - return m_array_int16_field; -} - -/*! - * @brief This function returns a reference to member array_int16_field - * @return Reference to member array_int16_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_uint16_field( - const std::array& _array_uint16_field) -{ - m_array_uint16_field = _array_uint16_field; -} - -/*! - * @brief This function moves the value in member array_uint16_field - * @param _array_uint16_field New value to be moved in member array_uint16_field - */ -void ContentFilterTestType::array_uint16_field( - std::array&& _array_uint16_field) -{ - m_array_uint16_field = std::move(_array_uint16_field); -} - -/*! - * @brief This function returns a constant reference to member array_uint16_field - * @return Constant reference to member array_uint16_field - */ -const std::array& ContentFilterTestType::array_uint16_field() const -{ - return m_array_uint16_field; -} - -/*! - * @brief This function returns a reference to member array_uint16_field - * @return Reference to member array_uint16_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_int32_field( - const std::array& _array_int32_field) -{ - m_array_int32_field = _array_int32_field; -} - -/*! - * @brief This function moves the value in member array_int32_field - * @param _array_int32_field New value to be moved in member array_int32_field - */ -void ContentFilterTestType::array_int32_field( - std::array&& _array_int32_field) -{ - m_array_int32_field = std::move(_array_int32_field); -} - -/*! - * @brief This function returns a constant reference to member array_int32_field - * @return Constant reference to member array_int32_field - */ -const std::array& ContentFilterTestType::array_int32_field() const -{ - return m_array_int32_field; -} - -/*! - * @brief This function returns a reference to member array_int32_field - * @return Reference to member array_int32_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_uint32_field( - const std::array& _array_uint32_field) -{ - m_array_uint32_field = _array_uint32_field; -} - -/*! - * @brief This function moves the value in member array_uint32_field - * @param _array_uint32_field New value to be moved in member array_uint32_field - */ -void ContentFilterTestType::array_uint32_field( - std::array&& _array_uint32_field) -{ - m_array_uint32_field = std::move(_array_uint32_field); -} - -/*! - * @brief This function returns a constant reference to member array_uint32_field - * @return Constant reference to member array_uint32_field - */ -const std::array& ContentFilterTestType::array_uint32_field() const -{ - return m_array_uint32_field; -} - -/*! - * @brief This function returns a reference to member array_uint32_field - * @return Reference to member array_uint32_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_int64_field( - const std::array& _array_int64_field) -{ - m_array_int64_field = _array_int64_field; -} - -/*! - * @brief This function moves the value in member array_int64_field - * @param _array_int64_field New value to be moved in member array_int64_field - */ -void ContentFilterTestType::array_int64_field( - std::array&& _array_int64_field) -{ - m_array_int64_field = std::move(_array_int64_field); -} - -/*! - * @brief This function returns a constant reference to member array_int64_field - * @return Constant reference to member array_int64_field - */ -const std::array& ContentFilterTestType::array_int64_field() const -{ - return m_array_int64_field; -} - -/*! - * @brief This function returns a reference to member array_int64_field - * @return Reference to member array_int64_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_uint64_field( - const std::array& _array_uint64_field) -{ - m_array_uint64_field = _array_uint64_field; -} - -/*! - * @brief This function moves the value in member array_uint64_field - * @param _array_uint64_field New value to be moved in member array_uint64_field - */ -void ContentFilterTestType::array_uint64_field( - std::array&& _array_uint64_field) -{ - m_array_uint64_field = std::move(_array_uint64_field); -} - -/*! - * @brief This function returns a constant reference to member array_uint64_field - * @return Constant reference to member array_uint64_field - */ -const std::array& ContentFilterTestType::array_uint64_field() const -{ - return m_array_uint64_field; -} - -/*! - * @brief This function returns a reference to member array_uint64_field - * @return Reference to member array_uint64_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_float_field( - const std::array& _array_float_field) -{ - m_array_float_field = _array_float_field; -} - -/*! - * @brief This function moves the value in member array_float_field - * @param _array_float_field New value to be moved in member array_float_field - */ -void ContentFilterTestType::array_float_field( - std::array&& _array_float_field) -{ - m_array_float_field = std::move(_array_float_field); -} - -/*! - * @brief This function returns a constant reference to member array_float_field - * @return Constant reference to member array_float_field - */ -const std::array& ContentFilterTestType::array_float_field() const -{ - return m_array_float_field; -} - -/*! - * @brief This function returns a reference to member array_float_field - * @return Reference to member array_float_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_double_field( - const std::array& _array_double_field) -{ - m_array_double_field = _array_double_field; -} - -/*! - * @brief This function moves the value in member array_double_field - * @param _array_double_field New value to be moved in member array_double_field - */ -void ContentFilterTestType::array_double_field( - std::array&& _array_double_field) -{ - m_array_double_field = std::move(_array_double_field); -} - -/*! - * @brief This function returns a constant reference to member array_double_field - * @return Constant reference to member array_double_field - */ -const std::array& ContentFilterTestType::array_double_field() const -{ - return m_array_double_field; -} - -/*! - * @brief This function returns a reference to member array_double_field - * @return Reference to member array_double_field - */ -std::array& ContentFilterTestType::array_double_field() -{ - return m_array_double_field; -} - - -/*! - * @brief This function copies the value in member array_long_double_field - * @param _array_long_double_field New value to be copied in member array_long_double_field - */ -void ContentFilterTestType::array_long_double_field( - const std::array& _array_long_double_field) -{ - m_array_long_double_field = _array_long_double_field; -} - -/*! - * @brief This function moves the value in member array_long_double_field - * @param _array_long_double_field New value to be moved in member array_long_double_field - */ -void ContentFilterTestType::array_long_double_field( - std::array&& _array_long_double_field) -{ - m_array_long_double_field = std::move(_array_long_double_field); -} - -/*! - * @brief This function returns a constant reference to member array_long_double_field - * @return Constant reference to member array_long_double_field - */ -const std::array& ContentFilterTestType::array_long_double_field() const -{ - return m_array_long_double_field; -} - -/*! - * @brief This function returns a reference to member array_long_double_field - * @return Reference to member array_long_double_field - */ -std::array& ContentFilterTestType::array_long_double_field() -{ - return m_array_long_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 - */ -void ContentFilterTestType::array_bool_field( - const std::array& _array_bool_field) -{ - m_array_bool_field = _array_bool_field; -} - -/*! - * @brief This function moves the value in member array_bool_field - * @param _array_bool_field New value to be moved in member array_bool_field - */ -void ContentFilterTestType::array_bool_field( - std::array&& _array_bool_field) -{ - m_array_bool_field = std::move(_array_bool_field); -} - -/*! - * @brief This function returns a constant reference to member array_bool_field - * @return Constant reference to member array_bool_field - */ -const std::array& ContentFilterTestType::array_bool_field() const -{ - return m_array_bool_field; -} - -/*! - * @brief This function returns a reference to member array_bool_field - * @return Reference to member array_bool_field - */ -std::array& ContentFilterTestType::array_bool_field() -{ - return m_array_bool_field; -} - - -/*! - * @brief This function copies the value in member array_string_field - * @param _array_string_field New value to be copied in member array_string_field - */ -void ContentFilterTestType::array_string_field( - const std::array& _array_string_field) -{ - m_array_string_field = _array_string_field; -} - -/*! - * @brief This function moves the value in member array_string_field - * @param _array_string_field New value to be moved in member array_string_field - */ -void ContentFilterTestType::array_string_field( - std::array&& _array_string_field) -{ - m_array_string_field = std::move(_array_string_field); -} - -/*! - * @brief This function returns a constant reference to member array_string_field - * @return Constant reference to member array_string_field - */ -const std::array& ContentFilterTestType::array_string_field() const -{ - return m_array_string_field; -} - -/*! - * @brief This function returns a reference to member array_string_field - * @return Reference to member array_string_field - */ -std::array& ContentFilterTestType::array_string_field() -{ - return m_array_string_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 - */ -void ContentFilterTestType::array_enum_field( - const std::array& _array_enum_field) -{ - m_array_enum_field = _array_enum_field; -} - -/*! - * @brief This function moves the value in member array_enum_field - * @param _array_enum_field New value to be moved in member array_enum_field - */ -void ContentFilterTestType::array_enum_field( - std::array&& _array_enum_field) -{ - m_array_enum_field = std::move(_array_enum_field); -} - -/*! - * @brief This function returns a constant reference to member array_enum_field - * @return Constant reference to member array_enum_field - */ -const std::array& ContentFilterTestType::array_enum_field() const -{ - return m_array_enum_field; -} - -/*! - * @brief This function returns a reference to member array_enum_field - * @return Reference to member array_enum_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_enum2_field( - const std::array& _array_enum2_field) -{ - m_array_enum2_field = _array_enum2_field; -} - -/*! - * @brief This function moves the value in member array_enum2_field - * @param _array_enum2_field New value to be moved in member array_enum2_field - */ -void ContentFilterTestType::array_enum2_field( - std::array&& _array_enum2_field) -{ - m_array_enum2_field = std::move(_array_enum2_field); -} - -/*! - * @brief This function returns a constant reference to member array_enum2_field - * @return Constant reference to member array_enum2_field - */ -const std::array& ContentFilterTestType::array_enum2_field() const -{ - return m_array_enum2_field; -} - -/*! - * @brief This function returns a reference to member array_enum2_field - * @return Reference to member array_enum2_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_struct_field( - const std::array& _array_struct_field) -{ - m_array_struct_field = _array_struct_field; -} - -/*! - * @brief This function moves the value in member array_struct_field - * @param _array_struct_field New value to be moved in member array_struct_field - */ -void ContentFilterTestType::array_struct_field( - std::array&& _array_struct_field) -{ - m_array_struct_field = std::move(_array_struct_field); -} - -/*! - * @brief This function returns a constant reference to member array_struct_field - * @return Constant reference to member array_struct_field - */ -const std::array& ContentFilterTestType::array_struct_field() const -{ - return m_array_struct_field; -} - -/*! - * @brief This function returns a reference to member array_struct_field - * @return Reference to member array_struct_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_char_field( - const std::vector& _bounded_sequence_char_field) -{ - m_bounded_sequence_char_field = _bounded_sequence_char_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_char_field - * @param _bounded_sequence_char_field New value to be moved in member bounded_sequence_char_field - */ -void ContentFilterTestType::bounded_sequence_char_field( - std::vector&& _bounded_sequence_char_field) -{ - m_bounded_sequence_char_field = std::move(_bounded_sequence_char_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_char_field - * @return Constant reference to member bounded_sequence_char_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_char_field() const -{ - return m_bounded_sequence_char_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_char_field - * @return Reference to member bounded_sequence_char_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_uint8_field( - const std::vector& _bounded_sequence_uint8_field) -{ - m_bounded_sequence_uint8_field = _bounded_sequence_uint8_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_uint8_field - * @param _bounded_sequence_uint8_field New value to be moved in member bounded_sequence_uint8_field - */ -void ContentFilterTestType::bounded_sequence_uint8_field( - std::vector&& _bounded_sequence_uint8_field) -{ - m_bounded_sequence_uint8_field = std::move(_bounded_sequence_uint8_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_uint8_field - * @return Constant reference to member bounded_sequence_uint8_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_uint8_field() const -{ - return m_bounded_sequence_uint8_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_uint8_field - * @return Reference to member bounded_sequence_uint8_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_int16_field( - const std::vector& _bounded_sequence_int16_field) -{ - m_bounded_sequence_int16_field = _bounded_sequence_int16_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_int16_field - * @param _bounded_sequence_int16_field New value to be moved in member bounded_sequence_int16_field - */ -void ContentFilterTestType::bounded_sequence_int16_field( - std::vector&& _bounded_sequence_int16_field) -{ - m_bounded_sequence_int16_field = std::move(_bounded_sequence_int16_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_int16_field - * @return Constant reference to member bounded_sequence_int16_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_int16_field() const -{ - return m_bounded_sequence_int16_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_int16_field - * @return Reference to member bounded_sequence_int16_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_uint16_field( - const std::vector& _bounded_sequence_uint16_field) -{ - m_bounded_sequence_uint16_field = _bounded_sequence_uint16_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_uint16_field - * @param _bounded_sequence_uint16_field New value to be moved in member bounded_sequence_uint16_field - */ -void ContentFilterTestType::bounded_sequence_uint16_field( - std::vector&& _bounded_sequence_uint16_field) -{ - m_bounded_sequence_uint16_field = std::move(_bounded_sequence_uint16_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_uint16_field - * @return Constant reference to member bounded_sequence_uint16_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_uint16_field() const -{ - return m_bounded_sequence_uint16_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_uint16_field - * @return Reference to member bounded_sequence_uint16_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_int32_field( - const std::vector& _bounded_sequence_int32_field) -{ - m_bounded_sequence_int32_field = _bounded_sequence_int32_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_int32_field - * @param _bounded_sequence_int32_field New value to be moved in member bounded_sequence_int32_field - */ -void ContentFilterTestType::bounded_sequence_int32_field( - std::vector&& _bounded_sequence_int32_field) -{ - m_bounded_sequence_int32_field = std::move(_bounded_sequence_int32_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_int32_field - * @return Constant reference to member bounded_sequence_int32_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_int32_field() const -{ - return m_bounded_sequence_int32_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_int32_field - * @return Reference to member bounded_sequence_int32_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_uint32_field( - const std::vector& _bounded_sequence_uint32_field) -{ - m_bounded_sequence_uint32_field = _bounded_sequence_uint32_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_uint32_field - * @param _bounded_sequence_uint32_field New value to be moved in member bounded_sequence_uint32_field - */ -void ContentFilterTestType::bounded_sequence_uint32_field( - std::vector&& _bounded_sequence_uint32_field) -{ - m_bounded_sequence_uint32_field = std::move(_bounded_sequence_uint32_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_uint32_field - * @return Constant reference to member bounded_sequence_uint32_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_uint32_field() const -{ - return m_bounded_sequence_uint32_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_uint32_field - * @return Reference to member bounded_sequence_uint32_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_int64_field( - const std::vector& _bounded_sequence_int64_field) -{ - m_bounded_sequence_int64_field = _bounded_sequence_int64_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_int64_field - * @param _bounded_sequence_int64_field New value to be moved in member bounded_sequence_int64_field - */ -void ContentFilterTestType::bounded_sequence_int64_field( - std::vector&& _bounded_sequence_int64_field) -{ - m_bounded_sequence_int64_field = std::move(_bounded_sequence_int64_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_int64_field - * @return Constant reference to member bounded_sequence_int64_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_int64_field() const -{ - return m_bounded_sequence_int64_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_int64_field - * @return Reference to member bounded_sequence_int64_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_uint64_field( - const std::vector& _bounded_sequence_uint64_field) -{ - m_bounded_sequence_uint64_field = _bounded_sequence_uint64_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_uint64_field - * @param _bounded_sequence_uint64_field New value to be moved in member bounded_sequence_uint64_field - */ -void ContentFilterTestType::bounded_sequence_uint64_field( - std::vector&& _bounded_sequence_uint64_field) -{ - m_bounded_sequence_uint64_field = std::move(_bounded_sequence_uint64_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_uint64_field - * @return Constant reference to member bounded_sequence_uint64_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_uint64_field() const -{ - return m_bounded_sequence_uint64_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_uint64_field - * @return Reference to member bounded_sequence_uint64_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_float_field( - const std::vector& _bounded_sequence_float_field) -{ - m_bounded_sequence_float_field = _bounded_sequence_float_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_float_field - * @param _bounded_sequence_float_field New value to be moved in member bounded_sequence_float_field - */ -void ContentFilterTestType::bounded_sequence_float_field( - std::vector&& _bounded_sequence_float_field) -{ - m_bounded_sequence_float_field = std::move(_bounded_sequence_float_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_float_field - * @return Constant reference to member bounded_sequence_float_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_float_field() const -{ - return m_bounded_sequence_float_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_float_field - * @return Reference to member bounded_sequence_float_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_double_field( - const std::vector& _bounded_sequence_double_field) -{ - m_bounded_sequence_double_field = _bounded_sequence_double_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_double_field - * @param _bounded_sequence_double_field New value to be moved in member bounded_sequence_double_field - */ -void ContentFilterTestType::bounded_sequence_double_field( - std::vector&& _bounded_sequence_double_field) -{ - m_bounded_sequence_double_field = std::move(_bounded_sequence_double_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_double_field - * @return Constant reference to member bounded_sequence_double_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_double_field() const -{ - return m_bounded_sequence_double_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_double_field - * @return Reference to member bounded_sequence_double_field - */ -std::vector& ContentFilterTestType::bounded_sequence_double_field() -{ - return m_bounded_sequence_double_field; -} - - -/*! - * @brief This function copies the value in member bounded_sequence_long_double_field - * @param _bounded_sequence_long_double_field New value to be copied in member bounded_sequence_long_double_field - */ -void ContentFilterTestType::bounded_sequence_long_double_field( - const std::vector& _bounded_sequence_long_double_field) -{ - m_bounded_sequence_long_double_field = _bounded_sequence_long_double_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_long_double_field - * @param _bounded_sequence_long_double_field New value to be moved in member bounded_sequence_long_double_field - */ -void ContentFilterTestType::bounded_sequence_long_double_field( - std::vector&& _bounded_sequence_long_double_field) -{ - m_bounded_sequence_long_double_field = std::move(_bounded_sequence_long_double_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_long_double_field - * @return Constant reference to member bounded_sequence_long_double_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_long_double_field() const -{ - return m_bounded_sequence_long_double_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_long_double_field - * @return Reference to member bounded_sequence_long_double_field - */ -std::vector& ContentFilterTestType::bounded_sequence_long_double_field() -{ - return m_bounded_sequence_long_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 - */ -void ContentFilterTestType::bounded_sequence_bool_field( - const std::vector& _bounded_sequence_bool_field) -{ - m_bounded_sequence_bool_field = _bounded_sequence_bool_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_bool_field - * @param _bounded_sequence_bool_field New value to be moved in member bounded_sequence_bool_field - */ -void ContentFilterTestType::bounded_sequence_bool_field( - std::vector&& _bounded_sequence_bool_field) -{ - m_bounded_sequence_bool_field = std::move(_bounded_sequence_bool_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_bool_field - * @return Constant reference to member bounded_sequence_bool_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_bool_field() const -{ - return m_bounded_sequence_bool_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_bool_field - * @return Reference to member bounded_sequence_bool_field - */ -std::vector& ContentFilterTestType::bounded_sequence_bool_field() -{ - return m_bounded_sequence_bool_field; -} - - -/*! - * @brief This function copies the value in member bounded_sequence_string_field - * @param _bounded_sequence_string_field New value to be copied in member bounded_sequence_string_field - */ -void ContentFilterTestType::bounded_sequence_string_field( - const std::vector& _bounded_sequence_string_field) -{ - m_bounded_sequence_string_field = _bounded_sequence_string_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_string_field - * @param _bounded_sequence_string_field New value to be moved in member bounded_sequence_string_field - */ -void ContentFilterTestType::bounded_sequence_string_field( - std::vector&& _bounded_sequence_string_field) -{ - m_bounded_sequence_string_field = std::move(_bounded_sequence_string_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_string_field - * @return Constant reference to member bounded_sequence_string_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_string_field() const -{ - return m_bounded_sequence_string_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_string_field - * @return Reference to member bounded_sequence_string_field - */ -std::vector& ContentFilterTestType::bounded_sequence_string_field() -{ - return m_bounded_sequence_string_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 - */ -void ContentFilterTestType::bounded_sequence_enum_field( - const std::vector& _bounded_sequence_enum_field) -{ - m_bounded_sequence_enum_field = _bounded_sequence_enum_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_enum_field - * @param _bounded_sequence_enum_field New value to be moved in member bounded_sequence_enum_field - */ -void ContentFilterTestType::bounded_sequence_enum_field( - std::vector&& _bounded_sequence_enum_field) -{ - m_bounded_sequence_enum_field = std::move(_bounded_sequence_enum_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_enum_field - * @return Constant reference to member bounded_sequence_enum_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_enum_field() const -{ - return m_bounded_sequence_enum_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_enum_field - * @return Reference to member bounded_sequence_enum_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_enum2_field( - const std::vector& _bounded_sequence_enum2_field) -{ - m_bounded_sequence_enum2_field = _bounded_sequence_enum2_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_enum2_field - * @param _bounded_sequence_enum2_field New value to be moved in member bounded_sequence_enum2_field - */ -void ContentFilterTestType::bounded_sequence_enum2_field( - std::vector&& _bounded_sequence_enum2_field) -{ - m_bounded_sequence_enum2_field = std::move(_bounded_sequence_enum2_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_enum2_field - * @return Constant reference to member bounded_sequence_enum2_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_enum2_field() const -{ - return m_bounded_sequence_enum2_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_enum2_field - * @return Reference to member bounded_sequence_enum2_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_struct_field( - const std::vector& _bounded_sequence_struct_field) -{ - m_bounded_sequence_struct_field = _bounded_sequence_struct_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_struct_field - * @param _bounded_sequence_struct_field New value to be moved in member bounded_sequence_struct_field - */ -void ContentFilterTestType::bounded_sequence_struct_field( - std::vector&& _bounded_sequence_struct_field) -{ - m_bounded_sequence_struct_field = std::move(_bounded_sequence_struct_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_struct_field - * @return Constant reference to member bounded_sequence_struct_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_struct_field() const -{ - return m_bounded_sequence_struct_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_struct_field - * @return Reference to member bounded_sequence_struct_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_char_field( - const std::vector& _unbounded_sequence_char_field) -{ - m_unbounded_sequence_char_field = _unbounded_sequence_char_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_char_field - * @param _unbounded_sequence_char_field New value to be moved in member unbounded_sequence_char_field - */ -void ContentFilterTestType::unbounded_sequence_char_field( - std::vector&& _unbounded_sequence_char_field) -{ - m_unbounded_sequence_char_field = std::move(_unbounded_sequence_char_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_char_field - * @return Constant reference to member unbounded_sequence_char_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_char_field() const -{ - return m_unbounded_sequence_char_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_char_field - * @return Reference to member unbounded_sequence_char_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_uint8_field( - const std::vector& _unbounded_sequence_uint8_field) -{ - m_unbounded_sequence_uint8_field = _unbounded_sequence_uint8_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_uint8_field - * @param _unbounded_sequence_uint8_field New value to be moved in member unbounded_sequence_uint8_field - */ -void ContentFilterTestType::unbounded_sequence_uint8_field( - std::vector&& _unbounded_sequence_uint8_field) -{ - m_unbounded_sequence_uint8_field = std::move(_unbounded_sequence_uint8_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_uint8_field - * @return Constant reference to member unbounded_sequence_uint8_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_uint8_field() const -{ - return m_unbounded_sequence_uint8_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_uint8_field - * @return Reference to member unbounded_sequence_uint8_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_int16_field( - const std::vector& _unbounded_sequence_int16_field) -{ - m_unbounded_sequence_int16_field = _unbounded_sequence_int16_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_int16_field - * @param _unbounded_sequence_int16_field New value to be moved in member unbounded_sequence_int16_field - */ -void ContentFilterTestType::unbounded_sequence_int16_field( - std::vector&& _unbounded_sequence_int16_field) -{ - m_unbounded_sequence_int16_field = std::move(_unbounded_sequence_int16_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_int16_field - * @return Constant reference to member unbounded_sequence_int16_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_int16_field() const -{ - return m_unbounded_sequence_int16_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_int16_field - * @return Reference to member unbounded_sequence_int16_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_uint16_field( - const std::vector& _unbounded_sequence_uint16_field) -{ - m_unbounded_sequence_uint16_field = _unbounded_sequence_uint16_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_uint16_field - * @param _unbounded_sequence_uint16_field New value to be moved in member unbounded_sequence_uint16_field - */ -void ContentFilterTestType::unbounded_sequence_uint16_field( - std::vector&& _unbounded_sequence_uint16_field) -{ - m_unbounded_sequence_uint16_field = std::move(_unbounded_sequence_uint16_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_uint16_field - * @return Constant reference to member unbounded_sequence_uint16_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_uint16_field() const -{ - return m_unbounded_sequence_uint16_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_uint16_field - * @return Reference to member unbounded_sequence_uint16_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_int32_field( - const std::vector& _unbounded_sequence_int32_field) -{ - m_unbounded_sequence_int32_field = _unbounded_sequence_int32_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_int32_field - * @param _unbounded_sequence_int32_field New value to be moved in member unbounded_sequence_int32_field - */ -void ContentFilterTestType::unbounded_sequence_int32_field( - std::vector&& _unbounded_sequence_int32_field) -{ - m_unbounded_sequence_int32_field = std::move(_unbounded_sequence_int32_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_int32_field - * @return Constant reference to member unbounded_sequence_int32_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_int32_field() const -{ - return m_unbounded_sequence_int32_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_int32_field - * @return Reference to member unbounded_sequence_int32_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_uint32_field( - const std::vector& _unbounded_sequence_uint32_field) -{ - m_unbounded_sequence_uint32_field = _unbounded_sequence_uint32_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_uint32_field - * @param _unbounded_sequence_uint32_field New value to be moved in member unbounded_sequence_uint32_field - */ -void ContentFilterTestType::unbounded_sequence_uint32_field( - std::vector&& _unbounded_sequence_uint32_field) -{ - m_unbounded_sequence_uint32_field = std::move(_unbounded_sequence_uint32_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_uint32_field - * @return Constant reference to member unbounded_sequence_uint32_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_uint32_field() const -{ - return m_unbounded_sequence_uint32_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_uint32_field - * @return Reference to member unbounded_sequence_uint32_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_int64_field( - const std::vector& _unbounded_sequence_int64_field) -{ - m_unbounded_sequence_int64_field = _unbounded_sequence_int64_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_int64_field - * @param _unbounded_sequence_int64_field New value to be moved in member unbounded_sequence_int64_field - */ -void ContentFilterTestType::unbounded_sequence_int64_field( - std::vector&& _unbounded_sequence_int64_field) -{ - m_unbounded_sequence_int64_field = std::move(_unbounded_sequence_int64_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_int64_field - * @return Constant reference to member unbounded_sequence_int64_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_int64_field() const -{ - return m_unbounded_sequence_int64_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_int64_field - * @return Reference to member unbounded_sequence_int64_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_uint64_field( - const std::vector& _unbounded_sequence_uint64_field) -{ - m_unbounded_sequence_uint64_field = _unbounded_sequence_uint64_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_uint64_field - * @param _unbounded_sequence_uint64_field New value to be moved in member unbounded_sequence_uint64_field - */ -void ContentFilterTestType::unbounded_sequence_uint64_field( - std::vector&& _unbounded_sequence_uint64_field) -{ - m_unbounded_sequence_uint64_field = std::move(_unbounded_sequence_uint64_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_uint64_field - * @return Constant reference to member unbounded_sequence_uint64_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_uint64_field() const -{ - return m_unbounded_sequence_uint64_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_uint64_field - * @return Reference to member unbounded_sequence_uint64_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_float_field( - const std::vector& _unbounded_sequence_float_field) -{ - m_unbounded_sequence_float_field = _unbounded_sequence_float_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_float_field - * @param _unbounded_sequence_float_field New value to be moved in member unbounded_sequence_float_field - */ -void ContentFilterTestType::unbounded_sequence_float_field( - std::vector&& _unbounded_sequence_float_field) -{ - m_unbounded_sequence_float_field = std::move(_unbounded_sequence_float_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_float_field - * @return Constant reference to member unbounded_sequence_float_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_float_field() const -{ - return m_unbounded_sequence_float_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_float_field - * @return Reference to member unbounded_sequence_float_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_double_field( - const std::vector& _unbounded_sequence_double_field) -{ - m_unbounded_sequence_double_field = _unbounded_sequence_double_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_double_field - * @param _unbounded_sequence_double_field New value to be moved in member unbounded_sequence_double_field - */ -void ContentFilterTestType::unbounded_sequence_double_field( - std::vector&& _unbounded_sequence_double_field) -{ - m_unbounded_sequence_double_field = std::move(_unbounded_sequence_double_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_double_field - * @return Constant reference to member unbounded_sequence_double_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_double_field() const -{ - return m_unbounded_sequence_double_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_double_field - * @return Reference to member unbounded_sequence_double_field - */ -std::vector& ContentFilterTestType::unbounded_sequence_double_field() -{ - return m_unbounded_sequence_double_field; -} - - -/*! - * @brief This function copies the value in member unbounded_sequence_long_double_field - * @param _unbounded_sequence_long_double_field New value to be copied in member unbounded_sequence_long_double_field - */ -void ContentFilterTestType::unbounded_sequence_long_double_field( - const std::vector& _unbounded_sequence_long_double_field) -{ - m_unbounded_sequence_long_double_field = _unbounded_sequence_long_double_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_long_double_field - * @param _unbounded_sequence_long_double_field New value to be moved in member unbounded_sequence_long_double_field - */ -void ContentFilterTestType::unbounded_sequence_long_double_field( - std::vector&& _unbounded_sequence_long_double_field) -{ - m_unbounded_sequence_long_double_field = std::move(_unbounded_sequence_long_double_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_long_double_field - * @return Constant reference to member unbounded_sequence_long_double_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_long_double_field() const -{ - return m_unbounded_sequence_long_double_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_long_double_field - * @return Reference to member unbounded_sequence_long_double_field - */ -std::vector& ContentFilterTestType::unbounded_sequence_long_double_field() -{ - return m_unbounded_sequence_long_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 - */ -void ContentFilterTestType::unbounded_sequence_bool_field( - const std::vector& _unbounded_sequence_bool_field) -{ - m_unbounded_sequence_bool_field = _unbounded_sequence_bool_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_bool_field - * @param _unbounded_sequence_bool_field New value to be moved in member unbounded_sequence_bool_field - */ -void ContentFilterTestType::unbounded_sequence_bool_field( - std::vector&& _unbounded_sequence_bool_field) -{ - m_unbounded_sequence_bool_field = std::move(_unbounded_sequence_bool_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_bool_field - * @return Constant reference to member unbounded_sequence_bool_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_bool_field() const -{ - return m_unbounded_sequence_bool_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_bool_field - * @return Reference to member unbounded_sequence_bool_field - */ -std::vector& ContentFilterTestType::unbounded_sequence_bool_field() -{ - return m_unbounded_sequence_bool_field; -} - - -/*! - * @brief This function copies the value in member unbounded_sequence_string_field - * @param _unbounded_sequence_string_field New value to be copied in member unbounded_sequence_string_field - */ -void ContentFilterTestType::unbounded_sequence_string_field( - const std::vector& _unbounded_sequence_string_field) -{ - m_unbounded_sequence_string_field = _unbounded_sequence_string_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_string_field - * @param _unbounded_sequence_string_field New value to be moved in member unbounded_sequence_string_field - */ -void ContentFilterTestType::unbounded_sequence_string_field( - std::vector&& _unbounded_sequence_string_field) -{ - m_unbounded_sequence_string_field = std::move(_unbounded_sequence_string_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_string_field - * @return Constant reference to member unbounded_sequence_string_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_string_field() const -{ - return m_unbounded_sequence_string_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_string_field - * @return Reference to member unbounded_sequence_string_field - */ -std::vector& ContentFilterTestType::unbounded_sequence_string_field() -{ - return m_unbounded_sequence_string_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 - */ -void ContentFilterTestType::unbounded_sequence_enum_field( - const std::vector& _unbounded_sequence_enum_field) -{ - m_unbounded_sequence_enum_field = _unbounded_sequence_enum_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_enum_field - * @param _unbounded_sequence_enum_field New value to be moved in member unbounded_sequence_enum_field - */ -void ContentFilterTestType::unbounded_sequence_enum_field( - std::vector&& _unbounded_sequence_enum_field) -{ - m_unbounded_sequence_enum_field = std::move(_unbounded_sequence_enum_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_enum_field - * @return Constant reference to member unbounded_sequence_enum_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_enum_field() const -{ - return m_unbounded_sequence_enum_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_enum_field - * @return Reference to member unbounded_sequence_enum_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_enum2_field( - const std::vector& _unbounded_sequence_enum2_field) -{ - m_unbounded_sequence_enum2_field = _unbounded_sequence_enum2_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_enum2_field - * @param _unbounded_sequence_enum2_field New value to be moved in member unbounded_sequence_enum2_field - */ -void ContentFilterTestType::unbounded_sequence_enum2_field( - std::vector&& _unbounded_sequence_enum2_field) -{ - m_unbounded_sequence_enum2_field = std::move(_unbounded_sequence_enum2_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_enum2_field - * @return Constant reference to member unbounded_sequence_enum2_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_enum2_field() const -{ - return m_unbounded_sequence_enum2_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_enum2_field - * @return Reference to member unbounded_sequence_enum2_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_struct_field( - const std::vector& _unbounded_sequence_struct_field) -{ - m_unbounded_sequence_struct_field = _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 ContentFilterTestType::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& ContentFilterTestType::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& ContentFilterTestType::unbounded_sequence_struct_field() -{ - return m_unbounded_sequence_struct_field; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "ContentFilterTestTypeCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestType.h b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestType.hpp similarity index 58% rename from test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestType.h rename to test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestType.hpp index 898fe5080b4..f31c28325fd 100644 --- a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestType.h +++ b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestType.hpp @@ -13,32 +13,30 @@ // limitations under the License. /*! - * @file ContentFilterTestType.h + * @file ContentFilterTestType.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "ContentFilterTestTypev1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_CONTENTFILTERTESTTYPE_H_ -#define _FAST_DDS_GENERATED_CONTENTFILTERTESTTYPE_H_ +#ifndef _FAST_DDS_GENERATED_CONTENTFILTERTESTTYPE_HPP_ +#define _FAST_DDS_GENERATED_CONTENTFILTERTESTTYPE_HPP_ #include #include #include #include #include +#include #include #include #include #include +#include +#include "ContentFilterTestTypeTypeObject.h" #if defined(_WIN32) #if defined(EPROSIMA_USER_DLL_EXPORT) @@ -64,15 +62,6 @@ #define CONTENTFILTERTESTTYPE_DllAPI #endif // _WIN32 -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 ContentFilterTestType @@ -110,73 +99,210 @@ class StructType /*! * @brief Default constructor. */ - eProsima_user_DllExport StructType(); + eProsima_user_DllExport StructType() + { + // Just to register all known types + registerContentFilterTestTypeTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~StructType(); + eProsima_user_DllExport ~StructType() + { + } /*! * @brief Copy constructor. * @param x Reference to the object StructType that will be copied. */ eProsima_user_DllExport StructType( - const StructType& x); + const StructType& x) + { + 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_long_double_field = x.m_long_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; + + } /*! * @brief Move constructor. * @param x Reference to the object StructType that will be copied. */ eProsima_user_DllExport StructType( - StructType&& x) noexcept; + StructType&& x) noexcept + { + 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_long_double_field = x.m_long_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; + } /*! * @brief Copy assignment. * @param x Reference to the object StructType that will be copied. */ eProsima_user_DllExport StructType& operator =( - const StructType& x); + const StructType& x) + { + + 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_long_double_field = x.m_long_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 *this; + } /*! * @brief Move assignment. * @param x Reference to the object StructType that will be copied. */ eProsima_user_DllExport StructType& operator =( - StructType&& x) noexcept; + StructType&& x) noexcept + { + + 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_long_double_field = x.m_long_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; + return *this; + } /*! * @brief Comparison operator. * @param x StructType object to compare. */ eProsima_user_DllExport bool operator ==( - const StructType& x) const; + 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_long_double_field == x.m_long_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); + } /*! * @brief Comparison operator. * @param x StructType object to compare. */ eProsima_user_DllExport bool operator !=( - const StructType& x) const; + const StructType& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member char_field * @param _char_field New value for member char_field */ eProsima_user_DllExport void char_field( - char _char_field); + char _char_field) + { + m_char_field = _char_field; + } /*! * @brief This function returns the value of member char_field * @return Value of member char_field */ - eProsima_user_DllExport char char_field() const; + eProsima_user_DllExport char char_field() const + { + return m_char_field; + } /*! * @brief This function returns a reference to member char_field * @return Reference to member char_field */ - eProsima_user_DllExport char& char_field(); + eProsima_user_DllExport char& char_field() + { + return m_char_field; + } /*! @@ -184,19 +310,28 @@ class StructType * @param _uint8_field New value for member uint8_field */ eProsima_user_DllExport void uint8_field( - uint8_t _uint8_field); + uint8_t _uint8_field) + { + m_uint8_field = _uint8_field; + } /*! * @brief This function returns the value of member uint8_field * @return Value of member uint8_field */ - eProsima_user_DllExport uint8_t uint8_field() const; + eProsima_user_DllExport uint8_t uint8_field() const + { + return m_uint8_field; + } /*! * @brief This function returns a reference to member uint8_field * @return Reference to member uint8_field */ - eProsima_user_DllExport uint8_t& uint8_field(); + eProsima_user_DllExport uint8_t& uint8_field() + { + return m_uint8_field; + } /*! @@ -204,19 +339,28 @@ class StructType * @param _int16_field New value for member int16_field */ eProsima_user_DllExport void int16_field( - int16_t _int16_field); + int16_t _int16_field) + { + m_int16_field = _int16_field; + } /*! * @brief This function returns the value of member int16_field * @return Value of member int16_field */ - eProsima_user_DllExport int16_t int16_field() const; + eProsima_user_DllExport int16_t int16_field() const + { + return m_int16_field; + } /*! * @brief This function returns a reference to member int16_field * @return Reference to member int16_field */ - eProsima_user_DllExport int16_t& int16_field(); + eProsima_user_DllExport int16_t& int16_field() + { + return m_int16_field; + } /*! @@ -224,19 +368,28 @@ class StructType * @param _uint16_field New value for member uint16_field */ eProsima_user_DllExport void uint16_field( - uint16_t _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 */ - eProsima_user_DllExport uint16_t uint16_field() const; + eProsima_user_DllExport uint16_t uint16_field() const + { + return m_uint16_field; + } /*! * @brief This function returns a reference to member uint16_field * @return Reference to member uint16_field */ - eProsima_user_DllExport uint16_t& uint16_field(); + eProsima_user_DllExport uint16_t& uint16_field() + { + return m_uint16_field; + } /*! @@ -244,19 +397,28 @@ class StructType * @param _int32_field New value for member int32_field */ eProsima_user_DllExport void int32_field( - int32_t _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 */ - eProsima_user_DllExport int32_t int32_field() const; + eProsima_user_DllExport int32_t int32_field() const + { + return m_int32_field; + } /*! * @brief This function returns a reference to member int32_field * @return Reference to member int32_field */ - eProsima_user_DllExport int32_t& int32_field(); + eProsima_user_DllExport int32_t& int32_field() + { + return m_int32_field; + } /*! @@ -264,19 +426,28 @@ class StructType * @param _uint32_field New value for member uint32_field */ eProsima_user_DllExport void uint32_field( - uint32_t _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 */ - eProsima_user_DllExport uint32_t uint32_field() const; + eProsima_user_DllExport uint32_t uint32_field() const + { + return m_uint32_field; + } /*! * @brief This function returns a reference to member uint32_field * @return Reference to member uint32_field */ - eProsima_user_DllExport uint32_t& uint32_field(); + eProsima_user_DllExport uint32_t& uint32_field() + { + return m_uint32_field; + } /*! @@ -284,19 +455,28 @@ class StructType * @param _int64_field New value for member int64_field */ eProsima_user_DllExport void int64_field( - int64_t _int64_field); + int64_t _int64_field) + { + m_int64_field = _int64_field; + } /*! * @brief This function returns the value of member int64_field * @return Value of member int64_field */ - eProsima_user_DllExport int64_t int64_field() const; + eProsima_user_DllExport int64_t int64_field() const + { + return m_int64_field; + } /*! * @brief This function returns a reference to member int64_field * @return Reference to member int64_field */ - eProsima_user_DllExport int64_t& int64_field(); + eProsima_user_DllExport int64_t& int64_field() + { + return m_int64_field; + } /*! @@ -304,19 +484,28 @@ class StructType * @param _uint64_field New value for member uint64_field */ eProsima_user_DllExport void uint64_field( - uint64_t _uint64_field); + uint64_t _uint64_field) + { + m_uint64_field = _uint64_field; + } /*! * @brief This function returns the value of member uint64_field * @return Value of member uint64_field */ - eProsima_user_DllExport uint64_t uint64_field() const; + eProsima_user_DllExport uint64_t uint64_field() const + { + return m_uint64_field; + } /*! * @brief This function returns a reference to member uint64_field * @return Reference to member uint64_field */ - eProsima_user_DllExport uint64_t& uint64_field(); + eProsima_user_DllExport uint64_t& uint64_field() + { + return m_uint64_field; + } /*! @@ -324,19 +513,28 @@ class StructType * @param _float_field New value for member float_field */ eProsima_user_DllExport void float_field( - float _float_field); + float _float_field) + { + m_float_field = _float_field; + } /*! * @brief This function returns the value of member float_field * @return Value of member float_field */ - eProsima_user_DllExport float float_field() const; + eProsima_user_DllExport float float_field() const + { + return m_float_field; + } /*! * @brief This function returns a reference to member float_field * @return Reference to member float_field */ - eProsima_user_DllExport float& float_field(); + eProsima_user_DllExport float& float_field() + { + return m_float_field; + } /*! @@ -344,19 +542,28 @@ class StructType * @param _double_field New value for member double_field */ eProsima_user_DllExport void double_field( - double _double_field); + double _double_field) + { + m_double_field = _double_field; + } /*! * @brief This function returns the value of member double_field * @return Value of member double_field */ - eProsima_user_DllExport double double_field() const; + eProsima_user_DllExport double double_field() const + { + return m_double_field; + } /*! * @brief This function returns a reference to member double_field * @return Reference to member double_field */ - eProsima_user_DllExport double& double_field(); + eProsima_user_DllExport double& double_field() + { + return m_double_field; + } /*! @@ -364,19 +571,28 @@ class StructType * @param _long_double_field New value for member long_double_field */ eProsima_user_DllExport void long_double_field( - long double _long_double_field); + long double _long_double_field) + { + m_long_double_field = _long_double_field; + } /*! * @brief This function returns the value of member long_double_field * @return Value of member long_double_field */ - eProsima_user_DllExport long double long_double_field() const; + eProsima_user_DllExport long double long_double_field() const + { + return m_long_double_field; + } /*! * @brief This function returns a reference to member long_double_field * @return Reference to member long_double_field */ - eProsima_user_DllExport long double& long_double_field(); + eProsima_user_DllExport long double& long_double_field() + { + return m_long_double_field; + } /*! @@ -384,19 +600,28 @@ class StructType * @param _bool_field New value for member bool_field */ eProsima_user_DllExport void bool_field( - bool _bool_field); + bool _bool_field) + { + m_bool_field = _bool_field; + } /*! * @brief This function returns the value of member bool_field * @return Value of member bool_field */ - eProsima_user_DllExport bool bool_field() const; + eProsima_user_DllExport bool bool_field() const + { + return m_bool_field; + } /*! * @brief This function returns a reference to member bool_field * @return Reference to member bool_field */ - eProsima_user_DllExport bool& bool_field(); + eProsima_user_DllExport bool& bool_field() + { + return m_bool_field; + } /*! @@ -404,26 +629,38 @@ class StructType * @param _string_field New value to be copied in member string_field */ eProsima_user_DllExport void string_field( - const std::string& _string_field); + const std::string& _string_field) + { + m_string_field = _string_field; + } /*! * @brief This function moves the value in member string_field * @param _string_field New value to be moved in member string_field */ eProsima_user_DllExport void string_field( - std::string&& _string_field); + std::string&& _string_field) + { + m_string_field = std::move(_string_field); + } /*! * @brief This function returns a constant reference to member string_field * @return Constant reference to member string_field */ - eProsima_user_DllExport const std::string& string_field() const; + eProsima_user_DllExport const std::string& string_field() const + { + return m_string_field; + } /*! * @brief This function returns a reference to member string_field * @return Reference to member string_field */ - eProsima_user_DllExport std::string& string_field(); + eProsima_user_DllExport std::string& string_field() + { + return m_string_field; + } /*! @@ -431,19 +668,28 @@ class StructType * @param _enum_field New value for member enum_field */ eProsima_user_DllExport void enum_field( - Color _enum_field); + Color _enum_field) + { + m_enum_field = _enum_field; + } /*! * @brief This function returns the value of member enum_field * @return Value of member enum_field */ - eProsima_user_DllExport Color enum_field() const; + eProsima_user_DllExport Color enum_field() const + { + return m_enum_field; + } /*! * @brief This function returns a reference to member enum_field * @return Reference to member enum_field */ - eProsima_user_DllExport Color& enum_field(); + eProsima_user_DllExport Color& enum_field() + { + return m_enum_field; + } /*! @@ -451,19 +697,30 @@ class StructType * @param _enum2_field New value for member enum2_field */ eProsima_user_DllExport void enum2_field( - Material _enum2_field); + Material _enum2_field) + { + m_enum2_field = _enum2_field; + } /*! * @brief This function returns the value of member enum2_field * @return Value of member enum2_field */ - eProsima_user_DllExport Material enum2_field() const; + eProsima_user_DllExport Material enum2_field() const + { + return m_enum2_field; + } /*! * @brief This function returns a reference to member enum2_field * @return Reference to member enum2_field */ - eProsima_user_DllExport Material& enum2_field(); + eProsima_user_DllExport Material& enum2_field() + { + return m_enum2_field; + } + + private: @@ -488,8 +745,6 @@ const uint32_t max_array_size = 3; const uint32_t max_seq_size = 5; - - /*! * @brief This class represents the structure ContentFilterTestType defined by the user in the IDL file. * @ingroup ContentFilterTestType @@ -501,73 +756,553 @@ class ContentFilterTestType /*! * @brief Default constructor. */ - eProsima_user_DllExport ContentFilterTestType(); + eProsima_user_DllExport ContentFilterTestType() + { + // Just to register all known types + registerContentFilterTestTypeTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ContentFilterTestType(); + eProsima_user_DllExport ~ContentFilterTestType() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ContentFilterTestType that will be copied. */ eProsima_user_DllExport ContentFilterTestType( - const ContentFilterTestType& x); + const ContentFilterTestType& x) + { + 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_long_double_field = x.m_long_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_long_double_field = x.m_array_long_double_field; + + m_array_bool_field = x.m_array_bool_field; + + m_array_string_field = x.m_array_string_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_long_double_field = x.m_bounded_sequence_long_double_field; + + m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; + + m_bounded_sequence_string_field = x.m_bounded_sequence_string_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_long_double_field = x.m_unbounded_sequence_long_double_field; + + m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; + + m_unbounded_sequence_string_field = x.m_unbounded_sequence_string_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; + + } /*! * @brief Move constructor. * @param x Reference to the object ContentFilterTestType that will be copied. */ eProsima_user_DllExport ContentFilterTestType( - ContentFilterTestType&& x) noexcept; + ContentFilterTestType&& x) noexcept + { + 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_long_double_field = x.m_long_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_long_double_field = std::move(x.m_array_long_double_field); + m_array_bool_field = std::move(x.m_array_bool_field); + m_array_string_field = std::move(x.m_array_string_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_long_double_field = std::move(x.m_bounded_sequence_long_double_field); + m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); + m_bounded_sequence_string_field = std::move(x.m_bounded_sequence_string_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_long_double_field = std::move(x.m_unbounded_sequence_long_double_field); + m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); + m_unbounded_sequence_string_field = std::move(x.m_unbounded_sequence_string_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); + } /*! * @brief Copy assignment. * @param x Reference to the object ContentFilterTestType that will be copied. */ eProsima_user_DllExport ContentFilterTestType& operator =( - const ContentFilterTestType& x); + const ContentFilterTestType& x) + { + + 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_long_double_field = x.m_long_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_long_double_field = x.m_array_long_double_field; + + m_array_bool_field = x.m_array_bool_field; + + m_array_string_field = x.m_array_string_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_long_double_field = x.m_bounded_sequence_long_double_field; + + m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; + + m_bounded_sequence_string_field = x.m_bounded_sequence_string_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_long_double_field = x.m_unbounded_sequence_long_double_field; + + m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; + + m_unbounded_sequence_string_field = x.m_unbounded_sequence_string_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 *this; + } /*! * @brief Move assignment. * @param x Reference to the object ContentFilterTestType that will be copied. */ eProsima_user_DllExport ContentFilterTestType& operator =( - ContentFilterTestType&& x) noexcept; + ContentFilterTestType&& x) noexcept + { + + 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_long_double_field = x.m_long_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_long_double_field = std::move(x.m_array_long_double_field); + m_array_bool_field = std::move(x.m_array_bool_field); + m_array_string_field = std::move(x.m_array_string_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_long_double_field = std::move(x.m_bounded_sequence_long_double_field); + m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); + m_bounded_sequence_string_field = std::move(x.m_bounded_sequence_string_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_long_double_field = std::move(x.m_unbounded_sequence_long_double_field); + m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); + m_unbounded_sequence_string_field = std::move(x.m_unbounded_sequence_string_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; + } /*! * @brief Comparison operator. * @param x ContentFilterTestType object to compare. */ eProsima_user_DllExport bool operator ==( - const ContentFilterTestType& x) const; + const ContentFilterTestType& 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_long_double_field == x.m_long_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_long_double_field == x.m_array_long_double_field && + m_array_bool_field == x.m_array_bool_field && + m_array_string_field == x.m_array_string_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_long_double_field == x.m_bounded_sequence_long_double_field && + m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && + m_bounded_sequence_string_field == x.m_bounded_sequence_string_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_long_double_field == x.m_unbounded_sequence_long_double_field && + m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && + m_unbounded_sequence_string_field == x.m_unbounded_sequence_string_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); + } /*! * @brief Comparison operator. * @param x ContentFilterTestType object to compare. */ eProsima_user_DllExport bool operator !=( - const ContentFilterTestType& x) const; + const ContentFilterTestType& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member char_field * @param _char_field New value for member char_field */ eProsima_user_DllExport void char_field( - char _char_field); + char _char_field) + { + m_char_field = _char_field; + } /*! * @brief This function returns the value of member char_field * @return Value of member char_field */ - eProsima_user_DllExport char char_field() const; + eProsima_user_DllExport char char_field() const + { + return m_char_field; + } /*! * @brief This function returns a reference to member char_field * @return Reference to member char_field */ - eProsima_user_DllExport char& char_field(); + eProsima_user_DllExport char& char_field() + { + return m_char_field; + } /*! @@ -575,19 +1310,28 @@ class ContentFilterTestType * @param _uint8_field New value for member uint8_field */ eProsima_user_DllExport void uint8_field( - uint8_t _uint8_field); + uint8_t _uint8_field) + { + m_uint8_field = _uint8_field; + } /*! * @brief This function returns the value of member uint8_field * @return Value of member uint8_field */ - eProsima_user_DllExport uint8_t uint8_field() const; + eProsima_user_DllExport uint8_t uint8_field() const + { + return m_uint8_field; + } /*! * @brief This function returns a reference to member uint8_field * @return Reference to member uint8_field */ - eProsima_user_DllExport uint8_t& uint8_field(); + eProsima_user_DllExport uint8_t& uint8_field() + { + return m_uint8_field; + } /*! @@ -595,19 +1339,28 @@ class ContentFilterTestType * @param _int16_field New value for member int16_field */ eProsima_user_DllExport void int16_field( - int16_t _int16_field); + int16_t _int16_field) + { + m_int16_field = _int16_field; + } /*! * @brief This function returns the value of member int16_field * @return Value of member int16_field */ - eProsima_user_DllExport int16_t int16_field() const; + eProsima_user_DllExport int16_t int16_field() const + { + return m_int16_field; + } /*! * @brief This function returns a reference to member int16_field * @return Reference to member int16_field */ - eProsima_user_DllExport int16_t& int16_field(); + eProsima_user_DllExport int16_t& int16_field() + { + return m_int16_field; + } /*! @@ -615,19 +1368,28 @@ class ContentFilterTestType * @param _uint16_field New value for member uint16_field */ eProsima_user_DllExport void uint16_field( - uint16_t _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 */ - eProsima_user_DllExport uint16_t uint16_field() const; + eProsima_user_DllExport uint16_t uint16_field() const + { + return m_uint16_field; + } /*! * @brief This function returns a reference to member uint16_field * @return Reference to member uint16_field */ - eProsima_user_DllExport uint16_t& uint16_field(); + eProsima_user_DllExport uint16_t& uint16_field() + { + return m_uint16_field; + } /*! @@ -635,19 +1397,28 @@ class ContentFilterTestType * @param _int32_field New value for member int32_field */ eProsima_user_DllExport void int32_field( - int32_t _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 */ - eProsima_user_DllExport int32_t int32_field() const; + eProsima_user_DllExport int32_t int32_field() const + { + return m_int32_field; + } /*! * @brief This function returns a reference to member int32_field * @return Reference to member int32_field */ - eProsima_user_DllExport int32_t& int32_field(); + eProsima_user_DllExport int32_t& int32_field() + { + return m_int32_field; + } /*! @@ -655,19 +1426,28 @@ class ContentFilterTestType * @param _uint32_field New value for member uint32_field */ eProsima_user_DllExport void uint32_field( - uint32_t _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 */ - eProsima_user_DllExport uint32_t uint32_field() const; + eProsima_user_DllExport uint32_t uint32_field() const + { + return m_uint32_field; + } /*! * @brief This function returns a reference to member uint32_field * @return Reference to member uint32_field */ - eProsima_user_DllExport uint32_t& uint32_field(); + eProsima_user_DllExport uint32_t& uint32_field() + { + return m_uint32_field; + } /*! @@ -675,19 +1455,28 @@ class ContentFilterTestType * @param _int64_field New value for member int64_field */ eProsima_user_DllExport void int64_field( - int64_t _int64_field); + int64_t _int64_field) + { + m_int64_field = _int64_field; + } /*! * @brief This function returns the value of member int64_field * @return Value of member int64_field */ - eProsima_user_DllExport int64_t int64_field() const; + eProsima_user_DllExport int64_t int64_field() const + { + return m_int64_field; + } /*! * @brief This function returns a reference to member int64_field * @return Reference to member int64_field */ - eProsima_user_DllExport int64_t& int64_field(); + eProsima_user_DllExport int64_t& int64_field() + { + return m_int64_field; + } /*! @@ -695,19 +1484,28 @@ class ContentFilterTestType * @param _uint64_field New value for member uint64_field */ eProsima_user_DllExport void uint64_field( - uint64_t _uint64_field); + uint64_t _uint64_field) + { + m_uint64_field = _uint64_field; + } /*! * @brief This function returns the value of member uint64_field * @return Value of member uint64_field */ - eProsima_user_DllExport uint64_t uint64_field() const; + eProsima_user_DllExport uint64_t uint64_field() const + { + return m_uint64_field; + } /*! * @brief This function returns a reference to member uint64_field * @return Reference to member uint64_field */ - eProsima_user_DllExport uint64_t& uint64_field(); + eProsima_user_DllExport uint64_t& uint64_field() + { + return m_uint64_field; + } /*! @@ -715,19 +1513,28 @@ class ContentFilterTestType * @param _float_field New value for member float_field */ eProsima_user_DllExport void float_field( - float _float_field); + float _float_field) + { + m_float_field = _float_field; + } /*! * @brief This function returns the value of member float_field * @return Value of member float_field */ - eProsima_user_DllExport float float_field() const; + eProsima_user_DllExport float float_field() const + { + return m_float_field; + } /*! * @brief This function returns a reference to member float_field * @return Reference to member float_field */ - eProsima_user_DllExport float& float_field(); + eProsima_user_DllExport float& float_field() + { + return m_float_field; + } /*! @@ -735,19 +1542,28 @@ class ContentFilterTestType * @param _double_field New value for member double_field */ eProsima_user_DllExport void double_field( - double _double_field); + double _double_field) + { + m_double_field = _double_field; + } /*! * @brief This function returns the value of member double_field * @return Value of member double_field */ - eProsima_user_DllExport double double_field() const; + eProsima_user_DllExport double double_field() const + { + return m_double_field; + } /*! * @brief This function returns a reference to member double_field * @return Reference to member double_field */ - eProsima_user_DllExport double& double_field(); + eProsima_user_DllExport double& double_field() + { + return m_double_field; + } /*! @@ -755,19 +1571,28 @@ class ContentFilterTestType * @param _long_double_field New value for member long_double_field */ eProsima_user_DllExport void long_double_field( - long double _long_double_field); + long double _long_double_field) + { + m_long_double_field = _long_double_field; + } /*! * @brief This function returns the value of member long_double_field * @return Value of member long_double_field */ - eProsima_user_DllExport long double long_double_field() const; + eProsima_user_DllExport long double long_double_field() const + { + return m_long_double_field; + } /*! * @brief This function returns a reference to member long_double_field * @return Reference to member long_double_field */ - eProsima_user_DllExport long double& long_double_field(); + eProsima_user_DllExport long double& long_double_field() + { + return m_long_double_field; + } /*! @@ -775,19 +1600,28 @@ class ContentFilterTestType * @param _bool_field New value for member bool_field */ eProsima_user_DllExport void bool_field( - bool _bool_field); + bool _bool_field) + { + m_bool_field = _bool_field; + } /*! * @brief This function returns the value of member bool_field * @return Value of member bool_field */ - eProsima_user_DllExport bool bool_field() const; + eProsima_user_DllExport bool bool_field() const + { + return m_bool_field; + } /*! * @brief This function returns a reference to member bool_field * @return Reference to member bool_field */ - eProsima_user_DllExport bool& bool_field(); + eProsima_user_DllExport bool& bool_field() + { + return m_bool_field; + } /*! @@ -795,26 +1629,38 @@ class ContentFilterTestType * @param _string_field New value to be copied in member string_field */ eProsima_user_DllExport void string_field( - const std::string& _string_field); + const std::string& _string_field) + { + m_string_field = _string_field; + } /*! * @brief This function moves the value in member string_field * @param _string_field New value to be moved in member string_field */ eProsima_user_DllExport void string_field( - std::string&& _string_field); + std::string&& _string_field) + { + m_string_field = std::move(_string_field); + } /*! * @brief This function returns a constant reference to member string_field * @return Constant reference to member string_field */ - eProsima_user_DllExport const std::string& string_field() const; + eProsima_user_DllExport const std::string& string_field() const + { + return m_string_field; + } /*! * @brief This function returns a reference to member string_field * @return Reference to member string_field */ - eProsima_user_DllExport std::string& string_field(); + eProsima_user_DllExport std::string& string_field() + { + return m_string_field; + } /*! @@ -822,19 +1668,28 @@ class ContentFilterTestType * @param _enum_field New value for member enum_field */ eProsima_user_DllExport void enum_field( - Color _enum_field); + Color _enum_field) + { + m_enum_field = _enum_field; + } /*! * @brief This function returns the value of member enum_field * @return Value of member enum_field */ - eProsima_user_DllExport Color enum_field() const; + eProsima_user_DllExport Color enum_field() const + { + return m_enum_field; + } /*! * @brief This function returns a reference to member enum_field * @return Reference to member enum_field */ - eProsima_user_DllExport Color& enum_field(); + eProsima_user_DllExport Color& enum_field() + { + return m_enum_field; + } /*! @@ -842,19 +1697,28 @@ class ContentFilterTestType * @param _enum2_field New value for member enum2_field */ eProsima_user_DllExport void enum2_field( - Material _enum2_field); + Material _enum2_field) + { + m_enum2_field = _enum2_field; + } /*! * @brief This function returns the value of member enum2_field * @return Value of member enum2_field */ - eProsima_user_DllExport Material enum2_field() const; + eProsima_user_DllExport Material enum2_field() const + { + return m_enum2_field; + } /*! * @brief This function returns a reference to member enum2_field * @return Reference to member enum2_field */ - eProsima_user_DllExport Material& enum2_field(); + eProsima_user_DllExport Material& enum2_field() + { + return m_enum2_field; + } /*! @@ -862,26 +1726,38 @@ class ContentFilterTestType * @param _struct_field New value to be copied in member struct_field */ eProsima_user_DllExport void struct_field( - const StructType& _struct_field); + const StructType& _struct_field) + { + m_struct_field = _struct_field; + } /*! * @brief This function moves the value in member struct_field * @param _struct_field New value to be moved in member struct_field */ eProsima_user_DllExport void struct_field( - StructType&& _struct_field); + StructType&& _struct_field) + { + m_struct_field = std::move(_struct_field); + } /*! * @brief This function returns a constant reference to member struct_field * @return Constant reference to member struct_field */ - eProsima_user_DllExport const StructType& struct_field() const; + eProsima_user_DllExport const StructType& struct_field() const + { + return m_struct_field; + } /*! * @brief This function returns a reference to member struct_field * @return Reference to member struct_field */ - eProsima_user_DllExport StructType& struct_field(); + eProsima_user_DllExport StructType& struct_field() + { + return m_struct_field; + } /*! @@ -889,26 +1765,38 @@ class ContentFilterTestType * @param _array_char_field New value to be copied in member array_char_field */ eProsima_user_DllExport void array_char_field( - const std::array& _array_char_field); + const std::array& _array_char_field) + { + m_array_char_field = _array_char_field; + } /*! * @brief This function moves the value in member array_char_field * @param _array_char_field New value to be moved in member array_char_field */ eProsima_user_DllExport void array_char_field( - std::array&& _array_char_field); + std::array&& _array_char_field) + { + m_array_char_field = std::move(_array_char_field); + } /*! * @brief This function returns a constant reference to member array_char_field * @return Constant reference to member array_char_field */ - eProsima_user_DllExport const std::array& array_char_field() const; + eProsima_user_DllExport const std::array& array_char_field() const + { + return m_array_char_field; + } /*! * @brief This function returns a reference to member array_char_field * @return Reference to member array_char_field */ - eProsima_user_DllExport std::array& array_char_field(); + eProsima_user_DllExport std::array& array_char_field() + { + return m_array_char_field; + } /*! @@ -916,26 +1804,38 @@ class ContentFilterTestType * @param _array_uint8_field New value to be copied in member array_uint8_field */ eProsima_user_DllExport void array_uint8_field( - const std::array& _array_uint8_field); + const std::array& _array_uint8_field) + { + m_array_uint8_field = _array_uint8_field; + } /*! * @brief This function moves the value in member array_uint8_field * @param _array_uint8_field New value to be moved in member array_uint8_field */ eProsima_user_DllExport void array_uint8_field( - std::array&& _array_uint8_field); + std::array&& _array_uint8_field) + { + m_array_uint8_field = std::move(_array_uint8_field); + } /*! * @brief This function returns a constant reference to member array_uint8_field * @return Constant reference to member array_uint8_field */ - eProsima_user_DllExport const std::array& array_uint8_field() const; + eProsima_user_DllExport const std::array& array_uint8_field() const + { + return m_array_uint8_field; + } /*! * @brief This function returns a reference to member array_uint8_field * @return Reference to member array_uint8_field */ - eProsima_user_DllExport std::array& array_uint8_field(); + eProsima_user_DllExport std::array& array_uint8_field() + { + return m_array_uint8_field; + } /*! @@ -943,26 +1843,38 @@ class ContentFilterTestType * @param _array_int16_field New value to be copied in member array_int16_field */ eProsima_user_DllExport void array_int16_field( - const std::array& _array_int16_field); + const std::array& _array_int16_field) + { + m_array_int16_field = _array_int16_field; + } /*! * @brief This function moves the value in member array_int16_field * @param _array_int16_field New value to be moved in member array_int16_field */ eProsima_user_DllExport void array_int16_field( - std::array&& _array_int16_field); + std::array&& _array_int16_field) + { + m_array_int16_field = std::move(_array_int16_field); + } /*! * @brief This function returns a constant reference to member array_int16_field * @return Constant reference to member array_int16_field */ - eProsima_user_DllExport const std::array& array_int16_field() const; + eProsima_user_DllExport const std::array& array_int16_field() const + { + return m_array_int16_field; + } /*! * @brief This function returns a reference to member array_int16_field * @return Reference to member array_int16_field */ - eProsima_user_DllExport std::array& array_int16_field(); + eProsima_user_DllExport std::array& array_int16_field() + { + return m_array_int16_field; + } /*! @@ -970,26 +1882,38 @@ class ContentFilterTestType * @param _array_uint16_field New value to be copied in member array_uint16_field */ eProsima_user_DllExport void array_uint16_field( - const std::array& _array_uint16_field); + const std::array& _array_uint16_field) + { + m_array_uint16_field = _array_uint16_field; + } /*! * @brief This function moves the value in member array_uint16_field * @param _array_uint16_field New value to be moved in member array_uint16_field */ eProsima_user_DllExport void array_uint16_field( - std::array&& _array_uint16_field); + std::array&& _array_uint16_field) + { + m_array_uint16_field = std::move(_array_uint16_field); + } /*! * @brief This function returns a constant reference to member array_uint16_field * @return Constant reference to member array_uint16_field */ - eProsima_user_DllExport const std::array& array_uint16_field() const; + eProsima_user_DllExport const std::array& array_uint16_field() const + { + return m_array_uint16_field; + } /*! * @brief This function returns a reference to member array_uint16_field * @return Reference to member array_uint16_field */ - eProsima_user_DllExport std::array& array_uint16_field(); + eProsima_user_DllExport std::array& array_uint16_field() + { + return m_array_uint16_field; + } /*! @@ -997,26 +1921,38 @@ class ContentFilterTestType * @param _array_int32_field New value to be copied in member array_int32_field */ eProsima_user_DllExport void array_int32_field( - const std::array& _array_int32_field); + const std::array& _array_int32_field) + { + m_array_int32_field = _array_int32_field; + } /*! * @brief This function moves the value in member array_int32_field * @param _array_int32_field New value to be moved in member array_int32_field */ eProsima_user_DllExport void array_int32_field( - std::array&& _array_int32_field); + std::array&& _array_int32_field) + { + m_array_int32_field = std::move(_array_int32_field); + } /*! * @brief This function returns a constant reference to member array_int32_field * @return Constant reference to member array_int32_field */ - eProsima_user_DllExport const std::array& array_int32_field() const; + eProsima_user_DllExport const std::array& array_int32_field() const + { + return m_array_int32_field; + } /*! * @brief This function returns a reference to member array_int32_field * @return Reference to member array_int32_field */ - eProsima_user_DllExport std::array& array_int32_field(); + eProsima_user_DllExport std::array& array_int32_field() + { + return m_array_int32_field; + } /*! @@ -1024,26 +1960,38 @@ class ContentFilterTestType * @param _array_uint32_field New value to be copied in member array_uint32_field */ eProsima_user_DllExport void array_uint32_field( - const std::array& _array_uint32_field); + const std::array& _array_uint32_field) + { + m_array_uint32_field = _array_uint32_field; + } /*! * @brief This function moves the value in member array_uint32_field * @param _array_uint32_field New value to be moved in member array_uint32_field */ eProsima_user_DllExport void array_uint32_field( - std::array&& _array_uint32_field); + std::array&& _array_uint32_field) + { + m_array_uint32_field = std::move(_array_uint32_field); + } /*! * @brief This function returns a constant reference to member array_uint32_field * @return Constant reference to member array_uint32_field */ - eProsima_user_DllExport const std::array& array_uint32_field() const; + eProsima_user_DllExport const std::array& array_uint32_field() const + { + return m_array_uint32_field; + } /*! * @brief This function returns a reference to member array_uint32_field * @return Reference to member array_uint32_field */ - eProsima_user_DllExport std::array& array_uint32_field(); + eProsima_user_DllExport std::array& array_uint32_field() + { + return m_array_uint32_field; + } /*! @@ -1051,26 +1999,38 @@ class ContentFilterTestType * @param _array_int64_field New value to be copied in member array_int64_field */ eProsima_user_DllExport void array_int64_field( - const std::array& _array_int64_field); + const std::array& _array_int64_field) + { + m_array_int64_field = _array_int64_field; + } /*! * @brief This function moves the value in member array_int64_field * @param _array_int64_field New value to be moved in member array_int64_field */ eProsima_user_DllExport void array_int64_field( - std::array&& _array_int64_field); + std::array&& _array_int64_field) + { + m_array_int64_field = std::move(_array_int64_field); + } /*! * @brief This function returns a constant reference to member array_int64_field * @return Constant reference to member array_int64_field */ - eProsima_user_DllExport const std::array& array_int64_field() const; + eProsima_user_DllExport const std::array& array_int64_field() const + { + return m_array_int64_field; + } /*! * @brief This function returns a reference to member array_int64_field * @return Reference to member array_int64_field */ - eProsima_user_DllExport std::array& array_int64_field(); + eProsima_user_DllExport std::array& array_int64_field() + { + return m_array_int64_field; + } /*! @@ -1078,26 +2038,38 @@ class ContentFilterTestType * @param _array_uint64_field New value to be copied in member array_uint64_field */ eProsima_user_DllExport void array_uint64_field( - const std::array& _array_uint64_field); + const std::array& _array_uint64_field) + { + m_array_uint64_field = _array_uint64_field; + } /*! * @brief This function moves the value in member array_uint64_field * @param _array_uint64_field New value to be moved in member array_uint64_field */ eProsima_user_DllExport void array_uint64_field( - std::array&& _array_uint64_field); + std::array&& _array_uint64_field) + { + m_array_uint64_field = std::move(_array_uint64_field); + } /*! * @brief This function returns a constant reference to member array_uint64_field * @return Constant reference to member array_uint64_field */ - eProsima_user_DllExport const std::array& array_uint64_field() const; + eProsima_user_DllExport const std::array& array_uint64_field() const + { + return m_array_uint64_field; + } /*! * @brief This function returns a reference to member array_uint64_field * @return Reference to member array_uint64_field */ - eProsima_user_DllExport std::array& array_uint64_field(); + eProsima_user_DllExport std::array& array_uint64_field() + { + return m_array_uint64_field; + } /*! @@ -1105,26 +2077,38 @@ class ContentFilterTestType * @param _array_float_field New value to be copied in member array_float_field */ eProsima_user_DllExport void array_float_field( - const std::array& _array_float_field); + const std::array& _array_float_field) + { + m_array_float_field = _array_float_field; + } /*! * @brief This function moves the value in member array_float_field * @param _array_float_field New value to be moved in member array_float_field */ eProsima_user_DllExport void array_float_field( - std::array&& _array_float_field); + std::array&& _array_float_field) + { + m_array_float_field = std::move(_array_float_field); + } /*! * @brief This function returns a constant reference to member array_float_field * @return Constant reference to member array_float_field */ - eProsima_user_DllExport const std::array& array_float_field() const; + eProsima_user_DllExport const std::array& array_float_field() const + { + return m_array_float_field; + } /*! * @brief This function returns a reference to member array_float_field * @return Reference to member array_float_field */ - eProsima_user_DllExport std::array& array_float_field(); + eProsima_user_DllExport std::array& array_float_field() + { + return m_array_float_field; + } /*! @@ -1132,26 +2116,38 @@ class ContentFilterTestType * @param _array_double_field New value to be copied in member array_double_field */ eProsima_user_DllExport void array_double_field( - const std::array& _array_double_field); + const std::array& _array_double_field) + { + m_array_double_field = _array_double_field; + } /*! * @brief This function moves the value in member array_double_field * @param _array_double_field New value to be moved in member array_double_field */ eProsima_user_DllExport void array_double_field( - std::array&& _array_double_field); + std::array&& _array_double_field) + { + m_array_double_field = std::move(_array_double_field); + } /*! * @brief This function returns a constant reference to member array_double_field * @return Constant reference to member array_double_field */ - eProsima_user_DllExport const std::array& array_double_field() const; + eProsima_user_DllExport const std::array& array_double_field() const + { + return m_array_double_field; + } /*! * @brief This function returns a reference to member array_double_field * @return Reference to member array_double_field */ - eProsima_user_DllExport std::array& array_double_field(); + eProsima_user_DllExport std::array& array_double_field() + { + return m_array_double_field; + } /*! @@ -1159,26 +2155,38 @@ class ContentFilterTestType * @param _array_long_double_field New value to be copied in member array_long_double_field */ eProsima_user_DllExport void array_long_double_field( - const std::array& _array_long_double_field); + const std::array& _array_long_double_field) + { + m_array_long_double_field = _array_long_double_field; + } /*! * @brief This function moves the value in member array_long_double_field * @param _array_long_double_field New value to be moved in member array_long_double_field */ eProsima_user_DllExport void array_long_double_field( - std::array&& _array_long_double_field); + std::array&& _array_long_double_field) + { + m_array_long_double_field = std::move(_array_long_double_field); + } /*! * @brief This function returns a constant reference to member array_long_double_field * @return Constant reference to member array_long_double_field */ - eProsima_user_DllExport const std::array& array_long_double_field() const; + eProsima_user_DllExport const std::array& array_long_double_field() const + { + return m_array_long_double_field; + } /*! * @brief This function returns a reference to member array_long_double_field * @return Reference to member array_long_double_field */ - eProsima_user_DllExport std::array& array_long_double_field(); + eProsima_user_DllExport std::array& array_long_double_field() + { + return m_array_long_double_field; + } /*! @@ -1186,26 +2194,38 @@ class ContentFilterTestType * @param _array_bool_field New value to be copied in member array_bool_field */ eProsima_user_DllExport void array_bool_field( - const std::array& _array_bool_field); + const std::array& _array_bool_field) + { + m_array_bool_field = _array_bool_field; + } /*! * @brief This function moves the value in member array_bool_field * @param _array_bool_field New value to be moved in member array_bool_field */ eProsima_user_DllExport void array_bool_field( - std::array&& _array_bool_field); + std::array&& _array_bool_field) + { + m_array_bool_field = std::move(_array_bool_field); + } /*! * @brief This function returns a constant reference to member array_bool_field * @return Constant reference to member array_bool_field */ - eProsima_user_DllExport const std::array& array_bool_field() const; + eProsima_user_DllExport const std::array& array_bool_field() const + { + return m_array_bool_field; + } /*! * @brief This function returns a reference to member array_bool_field * @return Reference to member array_bool_field */ - eProsima_user_DllExport std::array& array_bool_field(); + eProsima_user_DllExport std::array& array_bool_field() + { + return m_array_bool_field; + } /*! @@ -1213,26 +2233,38 @@ class ContentFilterTestType * @param _array_string_field New value to be copied in member array_string_field */ eProsima_user_DllExport void array_string_field( - const std::array& _array_string_field); + const std::array& _array_string_field) + { + m_array_string_field = _array_string_field; + } /*! * @brief This function moves the value in member array_string_field * @param _array_string_field New value to be moved in member array_string_field */ eProsima_user_DllExport void array_string_field( - std::array&& _array_string_field); + std::array&& _array_string_field) + { + m_array_string_field = std::move(_array_string_field); + } /*! * @brief This function returns a constant reference to member array_string_field * @return Constant reference to member array_string_field */ - eProsima_user_DllExport const std::array& array_string_field() const; + eProsima_user_DllExport const std::array& array_string_field() const + { + return m_array_string_field; + } /*! * @brief This function returns a reference to member array_string_field * @return Reference to member array_string_field */ - eProsima_user_DllExport std::array& array_string_field(); + eProsima_user_DllExport std::array& array_string_field() + { + return m_array_string_field; + } /*! @@ -1240,26 +2272,38 @@ class ContentFilterTestType * @param _array_enum_field New value to be copied in member array_enum_field */ eProsima_user_DllExport void array_enum_field( - const std::array& _array_enum_field); + const std::array& _array_enum_field) + { + m_array_enum_field = _array_enum_field; + } /*! * @brief This function moves the value in member array_enum_field * @param _array_enum_field New value to be moved in member array_enum_field */ eProsima_user_DllExport void array_enum_field( - std::array&& _array_enum_field); + std::array&& _array_enum_field) + { + m_array_enum_field = std::move(_array_enum_field); + } /*! * @brief This function returns a constant reference to member array_enum_field * @return Constant reference to member array_enum_field */ - eProsima_user_DllExport const std::array& array_enum_field() const; + eProsima_user_DllExport const std::array& array_enum_field() const + { + return m_array_enum_field; + } /*! * @brief This function returns a reference to member array_enum_field * @return Reference to member array_enum_field */ - eProsima_user_DllExport std::array& array_enum_field(); + eProsima_user_DllExport std::array& array_enum_field() + { + return m_array_enum_field; + } /*! @@ -1267,26 +2311,38 @@ class ContentFilterTestType * @param _array_enum2_field New value to be copied in member array_enum2_field */ eProsima_user_DllExport void array_enum2_field( - const std::array& _array_enum2_field); + const std::array& _array_enum2_field) + { + m_array_enum2_field = _array_enum2_field; + } /*! * @brief This function moves the value in member array_enum2_field * @param _array_enum2_field New value to be moved in member array_enum2_field */ eProsima_user_DllExport void array_enum2_field( - std::array&& _array_enum2_field); + std::array&& _array_enum2_field) + { + m_array_enum2_field = std::move(_array_enum2_field); + } /*! * @brief This function returns a constant reference to member array_enum2_field * @return Constant reference to member array_enum2_field */ - eProsima_user_DllExport const std::array& array_enum2_field() const; + eProsima_user_DllExport const std::array& array_enum2_field() const + { + return m_array_enum2_field; + } /*! * @brief This function returns a reference to member array_enum2_field * @return Reference to member array_enum2_field */ - eProsima_user_DllExport std::array& array_enum2_field(); + eProsima_user_DllExport std::array& array_enum2_field() + { + return m_array_enum2_field; + } /*! @@ -1294,26 +2350,38 @@ class ContentFilterTestType * @param _array_struct_field New value to be copied in member array_struct_field */ eProsima_user_DllExport void array_struct_field( - const std::array& _array_struct_field); + const std::array& _array_struct_field) + { + m_array_struct_field = _array_struct_field; + } /*! * @brief This function moves the value in member array_struct_field * @param _array_struct_field New value to be moved in member array_struct_field */ eProsima_user_DllExport void array_struct_field( - std::array&& _array_struct_field); + std::array&& _array_struct_field) + { + m_array_struct_field = std::move(_array_struct_field); + } /*! * @brief This function returns a constant reference to member array_struct_field * @return Constant reference to member array_struct_field */ - eProsima_user_DllExport const std::array& array_struct_field() const; + eProsima_user_DllExport const std::array& array_struct_field() const + { + return m_array_struct_field; + } /*! * @brief This function returns a reference to member array_struct_field * @return Reference to member array_struct_field */ - eProsima_user_DllExport std::array& array_struct_field(); + eProsima_user_DllExport std::array& array_struct_field() + { + return m_array_struct_field; + } /*! @@ -1321,26 +2389,38 @@ class ContentFilterTestType * @param _bounded_sequence_char_field New value to be copied in member bounded_sequence_char_field */ eProsima_user_DllExport void bounded_sequence_char_field( - const std::vector& _bounded_sequence_char_field); + const std::vector& _bounded_sequence_char_field) + { + m_bounded_sequence_char_field = _bounded_sequence_char_field; + } /*! * @brief This function moves the value in member bounded_sequence_char_field * @param _bounded_sequence_char_field New value to be moved in member bounded_sequence_char_field */ eProsima_user_DllExport void bounded_sequence_char_field( - std::vector&& _bounded_sequence_char_field); + std::vector&& _bounded_sequence_char_field) + { + m_bounded_sequence_char_field = std::move(_bounded_sequence_char_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_char_field * @return Constant reference to member bounded_sequence_char_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_char_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_char_field() const + { + return m_bounded_sequence_char_field; + } /*! * @brief This function returns a reference to member bounded_sequence_char_field * @return Reference to member bounded_sequence_char_field */ - eProsima_user_DllExport std::vector& bounded_sequence_char_field(); + eProsima_user_DllExport std::vector& bounded_sequence_char_field() + { + return m_bounded_sequence_char_field; + } /*! @@ -1348,26 +2428,38 @@ class ContentFilterTestType * @param _bounded_sequence_uint8_field New value to be copied in member bounded_sequence_uint8_field */ eProsima_user_DllExport void bounded_sequence_uint8_field( - const std::vector& _bounded_sequence_uint8_field); + const std::vector& _bounded_sequence_uint8_field) + { + m_bounded_sequence_uint8_field = _bounded_sequence_uint8_field; + } /*! * @brief This function moves the value in member bounded_sequence_uint8_field * @param _bounded_sequence_uint8_field New value to be moved in member bounded_sequence_uint8_field */ eProsima_user_DllExport void bounded_sequence_uint8_field( - std::vector&& _bounded_sequence_uint8_field); + std::vector&& _bounded_sequence_uint8_field) + { + m_bounded_sequence_uint8_field = std::move(_bounded_sequence_uint8_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_uint8_field * @return Constant reference to member bounded_sequence_uint8_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_uint8_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_uint8_field() const + { + return m_bounded_sequence_uint8_field; + } /*! * @brief This function returns a reference to member bounded_sequence_uint8_field * @return Reference to member bounded_sequence_uint8_field */ - eProsima_user_DllExport std::vector& bounded_sequence_uint8_field(); + eProsima_user_DllExport std::vector& bounded_sequence_uint8_field() + { + return m_bounded_sequence_uint8_field; + } /*! @@ -1375,26 +2467,38 @@ class ContentFilterTestType * @param _bounded_sequence_int16_field New value to be copied in member bounded_sequence_int16_field */ eProsima_user_DllExport void bounded_sequence_int16_field( - const std::vector& _bounded_sequence_int16_field); + const std::vector& _bounded_sequence_int16_field) + { + m_bounded_sequence_int16_field = _bounded_sequence_int16_field; + } /*! * @brief This function moves the value in member bounded_sequence_int16_field * @param _bounded_sequence_int16_field New value to be moved in member bounded_sequence_int16_field */ eProsima_user_DllExport void bounded_sequence_int16_field( - std::vector&& _bounded_sequence_int16_field); + std::vector&& _bounded_sequence_int16_field) + { + m_bounded_sequence_int16_field = std::move(_bounded_sequence_int16_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_int16_field * @return Constant reference to member bounded_sequence_int16_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_int16_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_int16_field() const + { + return m_bounded_sequence_int16_field; + } /*! * @brief This function returns a reference to member bounded_sequence_int16_field * @return Reference to member bounded_sequence_int16_field */ - eProsima_user_DllExport std::vector& bounded_sequence_int16_field(); + eProsima_user_DllExport std::vector& bounded_sequence_int16_field() + { + return m_bounded_sequence_int16_field; + } /*! @@ -1402,26 +2506,38 @@ class ContentFilterTestType * @param _bounded_sequence_uint16_field New value to be copied in member bounded_sequence_uint16_field */ eProsima_user_DllExport void bounded_sequence_uint16_field( - const std::vector& _bounded_sequence_uint16_field); + const std::vector& _bounded_sequence_uint16_field) + { + m_bounded_sequence_uint16_field = _bounded_sequence_uint16_field; + } /*! * @brief This function moves the value in member bounded_sequence_uint16_field * @param _bounded_sequence_uint16_field New value to be moved in member bounded_sequence_uint16_field */ eProsima_user_DllExport void bounded_sequence_uint16_field( - std::vector&& _bounded_sequence_uint16_field); + std::vector&& _bounded_sequence_uint16_field) + { + m_bounded_sequence_uint16_field = std::move(_bounded_sequence_uint16_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_uint16_field * @return Constant reference to member bounded_sequence_uint16_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_uint16_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_uint16_field() const + { + return m_bounded_sequence_uint16_field; + } /*! * @brief This function returns a reference to member bounded_sequence_uint16_field * @return Reference to member bounded_sequence_uint16_field */ - eProsima_user_DllExport std::vector& bounded_sequence_uint16_field(); + eProsima_user_DllExport std::vector& bounded_sequence_uint16_field() + { + return m_bounded_sequence_uint16_field; + } /*! @@ -1429,26 +2545,38 @@ class ContentFilterTestType * @param _bounded_sequence_int32_field New value to be copied in member bounded_sequence_int32_field */ eProsima_user_DllExport void bounded_sequence_int32_field( - const std::vector& _bounded_sequence_int32_field); + const std::vector& _bounded_sequence_int32_field) + { + m_bounded_sequence_int32_field = _bounded_sequence_int32_field; + } /*! * @brief This function moves the value in member bounded_sequence_int32_field * @param _bounded_sequence_int32_field New value to be moved in member bounded_sequence_int32_field */ eProsima_user_DllExport void bounded_sequence_int32_field( - std::vector&& _bounded_sequence_int32_field); + std::vector&& _bounded_sequence_int32_field) + { + m_bounded_sequence_int32_field = std::move(_bounded_sequence_int32_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_int32_field * @return Constant reference to member bounded_sequence_int32_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_int32_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_int32_field() const + { + return m_bounded_sequence_int32_field; + } /*! * @brief This function returns a reference to member bounded_sequence_int32_field * @return Reference to member bounded_sequence_int32_field */ - eProsima_user_DllExport std::vector& bounded_sequence_int32_field(); + eProsima_user_DllExport std::vector& bounded_sequence_int32_field() + { + return m_bounded_sequence_int32_field; + } /*! @@ -1456,26 +2584,38 @@ class ContentFilterTestType * @param _bounded_sequence_uint32_field New value to be copied in member bounded_sequence_uint32_field */ eProsima_user_DllExport void bounded_sequence_uint32_field( - const std::vector& _bounded_sequence_uint32_field); + const std::vector& _bounded_sequence_uint32_field) + { + m_bounded_sequence_uint32_field = _bounded_sequence_uint32_field; + } /*! * @brief This function moves the value in member bounded_sequence_uint32_field * @param _bounded_sequence_uint32_field New value to be moved in member bounded_sequence_uint32_field */ eProsima_user_DllExport void bounded_sequence_uint32_field( - std::vector&& _bounded_sequence_uint32_field); + std::vector&& _bounded_sequence_uint32_field) + { + m_bounded_sequence_uint32_field = std::move(_bounded_sequence_uint32_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_uint32_field * @return Constant reference to member bounded_sequence_uint32_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_uint32_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_uint32_field() const + { + return m_bounded_sequence_uint32_field; + } /*! * @brief This function returns a reference to member bounded_sequence_uint32_field * @return Reference to member bounded_sequence_uint32_field */ - eProsima_user_DllExport std::vector& bounded_sequence_uint32_field(); + eProsima_user_DllExport std::vector& bounded_sequence_uint32_field() + { + return m_bounded_sequence_uint32_field; + } /*! @@ -1483,26 +2623,38 @@ class ContentFilterTestType * @param _bounded_sequence_int64_field New value to be copied in member bounded_sequence_int64_field */ eProsima_user_DllExport void bounded_sequence_int64_field( - const std::vector& _bounded_sequence_int64_field); + const std::vector& _bounded_sequence_int64_field) + { + m_bounded_sequence_int64_field = _bounded_sequence_int64_field; + } /*! * @brief This function moves the value in member bounded_sequence_int64_field * @param _bounded_sequence_int64_field New value to be moved in member bounded_sequence_int64_field */ eProsima_user_DllExport void bounded_sequence_int64_field( - std::vector&& _bounded_sequence_int64_field); + std::vector&& _bounded_sequence_int64_field) + { + m_bounded_sequence_int64_field = std::move(_bounded_sequence_int64_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_int64_field * @return Constant reference to member bounded_sequence_int64_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_int64_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_int64_field() const + { + return m_bounded_sequence_int64_field; + } /*! * @brief This function returns a reference to member bounded_sequence_int64_field * @return Reference to member bounded_sequence_int64_field */ - eProsima_user_DllExport std::vector& bounded_sequence_int64_field(); + eProsima_user_DllExport std::vector& bounded_sequence_int64_field() + { + return m_bounded_sequence_int64_field; + } /*! @@ -1510,26 +2662,38 @@ class ContentFilterTestType * @param _bounded_sequence_uint64_field New value to be copied in member bounded_sequence_uint64_field */ eProsima_user_DllExport void bounded_sequence_uint64_field( - const std::vector& _bounded_sequence_uint64_field); + const std::vector& _bounded_sequence_uint64_field) + { + m_bounded_sequence_uint64_field = _bounded_sequence_uint64_field; + } /*! * @brief This function moves the value in member bounded_sequence_uint64_field * @param _bounded_sequence_uint64_field New value to be moved in member bounded_sequence_uint64_field */ eProsima_user_DllExport void bounded_sequence_uint64_field( - std::vector&& _bounded_sequence_uint64_field); + std::vector&& _bounded_sequence_uint64_field) + { + m_bounded_sequence_uint64_field = std::move(_bounded_sequence_uint64_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_uint64_field * @return Constant reference to member bounded_sequence_uint64_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_uint64_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_uint64_field() const + { + return m_bounded_sequence_uint64_field; + } /*! * @brief This function returns a reference to member bounded_sequence_uint64_field * @return Reference to member bounded_sequence_uint64_field */ - eProsima_user_DllExport std::vector& bounded_sequence_uint64_field(); + eProsima_user_DllExport std::vector& bounded_sequence_uint64_field() + { + return m_bounded_sequence_uint64_field; + } /*! @@ -1537,26 +2701,38 @@ class ContentFilterTestType * @param _bounded_sequence_float_field New value to be copied in member bounded_sequence_float_field */ eProsima_user_DllExport void bounded_sequence_float_field( - const std::vector& _bounded_sequence_float_field); + const std::vector& _bounded_sequence_float_field) + { + m_bounded_sequence_float_field = _bounded_sequence_float_field; + } /*! * @brief This function moves the value in member bounded_sequence_float_field * @param _bounded_sequence_float_field New value to be moved in member bounded_sequence_float_field */ eProsima_user_DllExport void bounded_sequence_float_field( - std::vector&& _bounded_sequence_float_field); + std::vector&& _bounded_sequence_float_field) + { + m_bounded_sequence_float_field = std::move(_bounded_sequence_float_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_float_field * @return Constant reference to member bounded_sequence_float_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_float_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_float_field() const + { + return m_bounded_sequence_float_field; + } /*! * @brief This function returns a reference to member bounded_sequence_float_field * @return Reference to member bounded_sequence_float_field */ - eProsima_user_DllExport std::vector& bounded_sequence_float_field(); + eProsima_user_DllExport std::vector& bounded_sequence_float_field() + { + return m_bounded_sequence_float_field; + } /*! @@ -1564,26 +2740,38 @@ class ContentFilterTestType * @param _bounded_sequence_double_field New value to be copied in member bounded_sequence_double_field */ eProsima_user_DllExport void bounded_sequence_double_field( - const std::vector& _bounded_sequence_double_field); + const std::vector& _bounded_sequence_double_field) + { + m_bounded_sequence_double_field = _bounded_sequence_double_field; + } /*! * @brief This function moves the value in member bounded_sequence_double_field * @param _bounded_sequence_double_field New value to be moved in member bounded_sequence_double_field */ eProsima_user_DllExport void bounded_sequence_double_field( - std::vector&& _bounded_sequence_double_field); + std::vector&& _bounded_sequence_double_field) + { + m_bounded_sequence_double_field = std::move(_bounded_sequence_double_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_double_field * @return Constant reference to member bounded_sequence_double_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_double_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_double_field() const + { + return m_bounded_sequence_double_field; + } /*! * @brief This function returns a reference to member bounded_sequence_double_field * @return Reference to member bounded_sequence_double_field */ - eProsima_user_DllExport std::vector& bounded_sequence_double_field(); + eProsima_user_DllExport std::vector& bounded_sequence_double_field() + { + return m_bounded_sequence_double_field; + } /*! @@ -1591,26 +2779,38 @@ class ContentFilterTestType * @param _bounded_sequence_long_double_field New value to be copied in member bounded_sequence_long_double_field */ eProsima_user_DllExport void bounded_sequence_long_double_field( - const std::vector& _bounded_sequence_long_double_field); + const std::vector& _bounded_sequence_long_double_field) + { + m_bounded_sequence_long_double_field = _bounded_sequence_long_double_field; + } /*! * @brief This function moves the value in member bounded_sequence_long_double_field * @param _bounded_sequence_long_double_field New value to be moved in member bounded_sequence_long_double_field */ eProsima_user_DllExport void bounded_sequence_long_double_field( - std::vector&& _bounded_sequence_long_double_field); + std::vector&& _bounded_sequence_long_double_field) + { + m_bounded_sequence_long_double_field = std::move(_bounded_sequence_long_double_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_long_double_field * @return Constant reference to member bounded_sequence_long_double_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_long_double_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_long_double_field() const + { + return m_bounded_sequence_long_double_field; + } /*! * @brief This function returns a reference to member bounded_sequence_long_double_field * @return Reference to member bounded_sequence_long_double_field */ - eProsima_user_DllExport std::vector& bounded_sequence_long_double_field(); + eProsima_user_DllExport std::vector& bounded_sequence_long_double_field() + { + return m_bounded_sequence_long_double_field; + } /*! @@ -1618,26 +2818,38 @@ class ContentFilterTestType * @param _bounded_sequence_bool_field New value to be copied in member bounded_sequence_bool_field */ eProsima_user_DllExport void bounded_sequence_bool_field( - const std::vector& _bounded_sequence_bool_field); + const std::vector& _bounded_sequence_bool_field) + { + m_bounded_sequence_bool_field = _bounded_sequence_bool_field; + } /*! * @brief This function moves the value in member bounded_sequence_bool_field * @param _bounded_sequence_bool_field New value to be moved in member bounded_sequence_bool_field */ eProsima_user_DllExport void bounded_sequence_bool_field( - std::vector&& _bounded_sequence_bool_field); + std::vector&& _bounded_sequence_bool_field) + { + m_bounded_sequence_bool_field = std::move(_bounded_sequence_bool_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_bool_field * @return Constant reference to member bounded_sequence_bool_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_bool_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_bool_field() const + { + return m_bounded_sequence_bool_field; + } /*! * @brief This function returns a reference to member bounded_sequence_bool_field * @return Reference to member bounded_sequence_bool_field */ - eProsima_user_DllExport std::vector& bounded_sequence_bool_field(); + eProsima_user_DllExport std::vector& bounded_sequence_bool_field() + { + return m_bounded_sequence_bool_field; + } /*! @@ -1645,26 +2857,38 @@ class ContentFilterTestType * @param _bounded_sequence_string_field New value to be copied in member bounded_sequence_string_field */ eProsima_user_DllExport void bounded_sequence_string_field( - const std::vector& _bounded_sequence_string_field); + const std::vector& _bounded_sequence_string_field) + { + m_bounded_sequence_string_field = _bounded_sequence_string_field; + } /*! * @brief This function moves the value in member bounded_sequence_string_field * @param _bounded_sequence_string_field New value to be moved in member bounded_sequence_string_field */ eProsima_user_DllExport void bounded_sequence_string_field( - std::vector&& _bounded_sequence_string_field); + std::vector&& _bounded_sequence_string_field) + { + m_bounded_sequence_string_field = std::move(_bounded_sequence_string_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_string_field * @return Constant reference to member bounded_sequence_string_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_string_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_string_field() const + { + return m_bounded_sequence_string_field; + } /*! * @brief This function returns a reference to member bounded_sequence_string_field * @return Reference to member bounded_sequence_string_field */ - eProsima_user_DllExport std::vector& bounded_sequence_string_field(); + eProsima_user_DllExport std::vector& bounded_sequence_string_field() + { + return m_bounded_sequence_string_field; + } /*! @@ -1672,26 +2896,38 @@ class ContentFilterTestType * @param _bounded_sequence_enum_field New value to be copied in member bounded_sequence_enum_field */ eProsima_user_DllExport void bounded_sequence_enum_field( - const std::vector& _bounded_sequence_enum_field); + const std::vector& _bounded_sequence_enum_field) + { + m_bounded_sequence_enum_field = _bounded_sequence_enum_field; + } /*! * @brief This function moves the value in member bounded_sequence_enum_field * @param _bounded_sequence_enum_field New value to be moved in member bounded_sequence_enum_field */ eProsima_user_DllExport void bounded_sequence_enum_field( - std::vector&& _bounded_sequence_enum_field); + std::vector&& _bounded_sequence_enum_field) + { + m_bounded_sequence_enum_field = std::move(_bounded_sequence_enum_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_enum_field * @return Constant reference to member bounded_sequence_enum_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_enum_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_enum_field() const + { + return m_bounded_sequence_enum_field; + } /*! * @brief This function returns a reference to member bounded_sequence_enum_field * @return Reference to member bounded_sequence_enum_field */ - eProsima_user_DllExport std::vector& bounded_sequence_enum_field(); + eProsima_user_DllExport std::vector& bounded_sequence_enum_field() + { + return m_bounded_sequence_enum_field; + } /*! @@ -1699,26 +2935,38 @@ class ContentFilterTestType * @param _bounded_sequence_enum2_field New value to be copied in member bounded_sequence_enum2_field */ eProsima_user_DllExport void bounded_sequence_enum2_field( - const std::vector& _bounded_sequence_enum2_field); + const std::vector& _bounded_sequence_enum2_field) + { + m_bounded_sequence_enum2_field = _bounded_sequence_enum2_field; + } /*! * @brief This function moves the value in member bounded_sequence_enum2_field * @param _bounded_sequence_enum2_field New value to be moved in member bounded_sequence_enum2_field */ eProsima_user_DllExport void bounded_sequence_enum2_field( - std::vector&& _bounded_sequence_enum2_field); + std::vector&& _bounded_sequence_enum2_field) + { + m_bounded_sequence_enum2_field = std::move(_bounded_sequence_enum2_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_enum2_field * @return Constant reference to member bounded_sequence_enum2_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_enum2_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_enum2_field() const + { + return m_bounded_sequence_enum2_field; + } /*! * @brief This function returns a reference to member bounded_sequence_enum2_field * @return Reference to member bounded_sequence_enum2_field */ - eProsima_user_DllExport std::vector& bounded_sequence_enum2_field(); + eProsima_user_DllExport std::vector& bounded_sequence_enum2_field() + { + return m_bounded_sequence_enum2_field; + } /*! @@ -1726,26 +2974,38 @@ class ContentFilterTestType * @param _bounded_sequence_struct_field New value to be copied in member bounded_sequence_struct_field */ eProsima_user_DllExport void bounded_sequence_struct_field( - const std::vector& _bounded_sequence_struct_field); + const std::vector& _bounded_sequence_struct_field) + { + m_bounded_sequence_struct_field = _bounded_sequence_struct_field; + } /*! * @brief This function moves the value in member bounded_sequence_struct_field * @param _bounded_sequence_struct_field New value to be moved in member bounded_sequence_struct_field */ eProsima_user_DllExport void bounded_sequence_struct_field( - std::vector&& _bounded_sequence_struct_field); + std::vector&& _bounded_sequence_struct_field) + { + m_bounded_sequence_struct_field = std::move(_bounded_sequence_struct_field); + } /*! * @brief This function returns a constant reference to member bounded_sequence_struct_field * @return Constant reference to member bounded_sequence_struct_field */ - eProsima_user_DllExport const std::vector& bounded_sequence_struct_field() const; + eProsima_user_DllExport const std::vector& bounded_sequence_struct_field() const + { + return m_bounded_sequence_struct_field; + } /*! * @brief This function returns a reference to member bounded_sequence_struct_field * @return Reference to member bounded_sequence_struct_field */ - eProsima_user_DllExport std::vector& bounded_sequence_struct_field(); + eProsima_user_DllExport std::vector& bounded_sequence_struct_field() + { + return m_bounded_sequence_struct_field; + } /*! @@ -1753,26 +3013,38 @@ class ContentFilterTestType * @param _unbounded_sequence_char_field New value to be copied in member unbounded_sequence_char_field */ eProsima_user_DllExport void unbounded_sequence_char_field( - const std::vector& _unbounded_sequence_char_field); + const std::vector& _unbounded_sequence_char_field) + { + m_unbounded_sequence_char_field = _unbounded_sequence_char_field; + } /*! * @brief This function moves the value in member unbounded_sequence_char_field * @param _unbounded_sequence_char_field New value to be moved in member unbounded_sequence_char_field */ eProsima_user_DllExport void unbounded_sequence_char_field( - std::vector&& _unbounded_sequence_char_field); + std::vector&& _unbounded_sequence_char_field) + { + m_unbounded_sequence_char_field = std::move(_unbounded_sequence_char_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_char_field * @return Constant reference to member unbounded_sequence_char_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_char_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_char_field() const + { + return m_unbounded_sequence_char_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_char_field * @return Reference to member unbounded_sequence_char_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_char_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_char_field() + { + return m_unbounded_sequence_char_field; + } /*! @@ -1780,26 +3052,38 @@ class ContentFilterTestType * @param _unbounded_sequence_uint8_field New value to be copied in member unbounded_sequence_uint8_field */ eProsima_user_DllExport void unbounded_sequence_uint8_field( - const std::vector& _unbounded_sequence_uint8_field); + const std::vector& _unbounded_sequence_uint8_field) + { + m_unbounded_sequence_uint8_field = _unbounded_sequence_uint8_field; + } /*! * @brief This function moves the value in member unbounded_sequence_uint8_field * @param _unbounded_sequence_uint8_field New value to be moved in member unbounded_sequence_uint8_field */ eProsima_user_DllExport void unbounded_sequence_uint8_field( - std::vector&& _unbounded_sequence_uint8_field); + std::vector&& _unbounded_sequence_uint8_field) + { + m_unbounded_sequence_uint8_field = std::move(_unbounded_sequence_uint8_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_uint8_field * @return Constant reference to member unbounded_sequence_uint8_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_uint8_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_uint8_field() const + { + return m_unbounded_sequence_uint8_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_uint8_field * @return Reference to member unbounded_sequence_uint8_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_uint8_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_uint8_field() + { + return m_unbounded_sequence_uint8_field; + } /*! @@ -1807,26 +3091,38 @@ class ContentFilterTestType * @param _unbounded_sequence_int16_field New value to be copied in member unbounded_sequence_int16_field */ eProsima_user_DllExport void unbounded_sequence_int16_field( - const std::vector& _unbounded_sequence_int16_field); + const std::vector& _unbounded_sequence_int16_field) + { + m_unbounded_sequence_int16_field = _unbounded_sequence_int16_field; + } /*! * @brief This function moves the value in member unbounded_sequence_int16_field * @param _unbounded_sequence_int16_field New value to be moved in member unbounded_sequence_int16_field */ eProsima_user_DllExport void unbounded_sequence_int16_field( - std::vector&& _unbounded_sequence_int16_field); + std::vector&& _unbounded_sequence_int16_field) + { + m_unbounded_sequence_int16_field = std::move(_unbounded_sequence_int16_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_int16_field * @return Constant reference to member unbounded_sequence_int16_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_int16_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_int16_field() const + { + return m_unbounded_sequence_int16_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_int16_field * @return Reference to member unbounded_sequence_int16_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_int16_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_int16_field() + { + return m_unbounded_sequence_int16_field; + } /*! @@ -1834,26 +3130,38 @@ class ContentFilterTestType * @param _unbounded_sequence_uint16_field New value to be copied in member unbounded_sequence_uint16_field */ eProsima_user_DllExport void unbounded_sequence_uint16_field( - const std::vector& _unbounded_sequence_uint16_field); + const std::vector& _unbounded_sequence_uint16_field) + { + m_unbounded_sequence_uint16_field = _unbounded_sequence_uint16_field; + } /*! * @brief This function moves the value in member unbounded_sequence_uint16_field * @param _unbounded_sequence_uint16_field New value to be moved in member unbounded_sequence_uint16_field */ eProsima_user_DllExport void unbounded_sequence_uint16_field( - std::vector&& _unbounded_sequence_uint16_field); + std::vector&& _unbounded_sequence_uint16_field) + { + m_unbounded_sequence_uint16_field = std::move(_unbounded_sequence_uint16_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_uint16_field * @return Constant reference to member unbounded_sequence_uint16_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_uint16_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_uint16_field() const + { + return m_unbounded_sequence_uint16_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_uint16_field * @return Reference to member unbounded_sequence_uint16_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_uint16_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_uint16_field() + { + return m_unbounded_sequence_uint16_field; + } /*! @@ -1861,26 +3169,38 @@ class ContentFilterTestType * @param _unbounded_sequence_int32_field New value to be copied in member unbounded_sequence_int32_field */ eProsima_user_DllExport void unbounded_sequence_int32_field( - const std::vector& _unbounded_sequence_int32_field); + const std::vector& _unbounded_sequence_int32_field) + { + m_unbounded_sequence_int32_field = _unbounded_sequence_int32_field; + } /*! * @brief This function moves the value in member unbounded_sequence_int32_field * @param _unbounded_sequence_int32_field New value to be moved in member unbounded_sequence_int32_field */ eProsima_user_DllExport void unbounded_sequence_int32_field( - std::vector&& _unbounded_sequence_int32_field); + std::vector&& _unbounded_sequence_int32_field) + { + m_unbounded_sequence_int32_field = std::move(_unbounded_sequence_int32_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_int32_field * @return Constant reference to member unbounded_sequence_int32_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_int32_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_int32_field() const + { + return m_unbounded_sequence_int32_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_int32_field * @return Reference to member unbounded_sequence_int32_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_int32_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_int32_field() + { + return m_unbounded_sequence_int32_field; + } /*! @@ -1888,26 +3208,38 @@ class ContentFilterTestType * @param _unbounded_sequence_uint32_field New value to be copied in member unbounded_sequence_uint32_field */ eProsima_user_DllExport void unbounded_sequence_uint32_field( - const std::vector& _unbounded_sequence_uint32_field); + const std::vector& _unbounded_sequence_uint32_field) + { + m_unbounded_sequence_uint32_field = _unbounded_sequence_uint32_field; + } /*! * @brief This function moves the value in member unbounded_sequence_uint32_field * @param _unbounded_sequence_uint32_field New value to be moved in member unbounded_sequence_uint32_field */ eProsima_user_DllExport void unbounded_sequence_uint32_field( - std::vector&& _unbounded_sequence_uint32_field); + std::vector&& _unbounded_sequence_uint32_field) + { + m_unbounded_sequence_uint32_field = std::move(_unbounded_sequence_uint32_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_uint32_field * @return Constant reference to member unbounded_sequence_uint32_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_uint32_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_uint32_field() const + { + return m_unbounded_sequence_uint32_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_uint32_field * @return Reference to member unbounded_sequence_uint32_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_uint32_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_uint32_field() + { + return m_unbounded_sequence_uint32_field; + } /*! @@ -1915,26 +3247,38 @@ class ContentFilterTestType * @param _unbounded_sequence_int64_field New value to be copied in member unbounded_sequence_int64_field */ eProsima_user_DllExport void unbounded_sequence_int64_field( - const std::vector& _unbounded_sequence_int64_field); + const std::vector& _unbounded_sequence_int64_field) + { + m_unbounded_sequence_int64_field = _unbounded_sequence_int64_field; + } /*! * @brief This function moves the value in member unbounded_sequence_int64_field * @param _unbounded_sequence_int64_field New value to be moved in member unbounded_sequence_int64_field */ eProsima_user_DllExport void unbounded_sequence_int64_field( - std::vector&& _unbounded_sequence_int64_field); + std::vector&& _unbounded_sequence_int64_field) + { + m_unbounded_sequence_int64_field = std::move(_unbounded_sequence_int64_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_int64_field * @return Constant reference to member unbounded_sequence_int64_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_int64_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_int64_field() const + { + return m_unbounded_sequence_int64_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_int64_field * @return Reference to member unbounded_sequence_int64_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_int64_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_int64_field() + { + return m_unbounded_sequence_int64_field; + } /*! @@ -1942,26 +3286,38 @@ class ContentFilterTestType * @param _unbounded_sequence_uint64_field New value to be copied in member unbounded_sequence_uint64_field */ eProsima_user_DllExport void unbounded_sequence_uint64_field( - const std::vector& _unbounded_sequence_uint64_field); + const std::vector& _unbounded_sequence_uint64_field) + { + m_unbounded_sequence_uint64_field = _unbounded_sequence_uint64_field; + } /*! * @brief This function moves the value in member unbounded_sequence_uint64_field * @param _unbounded_sequence_uint64_field New value to be moved in member unbounded_sequence_uint64_field */ eProsima_user_DllExport void unbounded_sequence_uint64_field( - std::vector&& _unbounded_sequence_uint64_field); + std::vector&& _unbounded_sequence_uint64_field) + { + m_unbounded_sequence_uint64_field = std::move(_unbounded_sequence_uint64_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_uint64_field * @return Constant reference to member unbounded_sequence_uint64_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_uint64_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_uint64_field() const + { + return m_unbounded_sequence_uint64_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_uint64_field * @return Reference to member unbounded_sequence_uint64_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_uint64_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_uint64_field() + { + return m_unbounded_sequence_uint64_field; + } /*! @@ -1969,26 +3325,38 @@ class ContentFilterTestType * @param _unbounded_sequence_float_field New value to be copied in member unbounded_sequence_float_field */ eProsima_user_DllExport void unbounded_sequence_float_field( - const std::vector& _unbounded_sequence_float_field); + const std::vector& _unbounded_sequence_float_field) + { + m_unbounded_sequence_float_field = _unbounded_sequence_float_field; + } /*! * @brief This function moves the value in member unbounded_sequence_float_field * @param _unbounded_sequence_float_field New value to be moved in member unbounded_sequence_float_field */ eProsima_user_DllExport void unbounded_sequence_float_field( - std::vector&& _unbounded_sequence_float_field); + std::vector&& _unbounded_sequence_float_field) + { + m_unbounded_sequence_float_field = std::move(_unbounded_sequence_float_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_float_field * @return Constant reference to member unbounded_sequence_float_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_float_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_float_field() const + { + return m_unbounded_sequence_float_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_float_field * @return Reference to member unbounded_sequence_float_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_float_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_float_field() + { + return m_unbounded_sequence_float_field; + } /*! @@ -1996,26 +3364,38 @@ class ContentFilterTestType * @param _unbounded_sequence_double_field New value to be copied in member unbounded_sequence_double_field */ eProsima_user_DllExport void unbounded_sequence_double_field( - const std::vector& _unbounded_sequence_double_field); + const std::vector& _unbounded_sequence_double_field) + { + m_unbounded_sequence_double_field = _unbounded_sequence_double_field; + } /*! * @brief This function moves the value in member unbounded_sequence_double_field * @param _unbounded_sequence_double_field New value to be moved in member unbounded_sequence_double_field */ eProsima_user_DllExport void unbounded_sequence_double_field( - std::vector&& _unbounded_sequence_double_field); + std::vector&& _unbounded_sequence_double_field) + { + m_unbounded_sequence_double_field = std::move(_unbounded_sequence_double_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_double_field * @return Constant reference to member unbounded_sequence_double_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_double_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_double_field() const + { + return m_unbounded_sequence_double_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_double_field * @return Reference to member unbounded_sequence_double_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_double_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_double_field() + { + return m_unbounded_sequence_double_field; + } /*! @@ -2023,26 +3403,38 @@ class ContentFilterTestType * @param _unbounded_sequence_long_double_field New value to be copied in member unbounded_sequence_long_double_field */ eProsima_user_DllExport void unbounded_sequence_long_double_field( - const std::vector& _unbounded_sequence_long_double_field); + const std::vector& _unbounded_sequence_long_double_field) + { + m_unbounded_sequence_long_double_field = _unbounded_sequence_long_double_field; + } /*! * @brief This function moves the value in member unbounded_sequence_long_double_field * @param _unbounded_sequence_long_double_field New value to be moved in member unbounded_sequence_long_double_field */ eProsima_user_DllExport void unbounded_sequence_long_double_field( - std::vector&& _unbounded_sequence_long_double_field); + std::vector&& _unbounded_sequence_long_double_field) + { + m_unbounded_sequence_long_double_field = std::move(_unbounded_sequence_long_double_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_long_double_field * @return Constant reference to member unbounded_sequence_long_double_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_long_double_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_long_double_field() const + { + return m_unbounded_sequence_long_double_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_long_double_field * @return Reference to member unbounded_sequence_long_double_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_long_double_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_long_double_field() + { + return m_unbounded_sequence_long_double_field; + } /*! @@ -2050,26 +3442,38 @@ class ContentFilterTestType * @param _unbounded_sequence_bool_field New value to be copied in member unbounded_sequence_bool_field */ eProsima_user_DllExport void unbounded_sequence_bool_field( - const std::vector& _unbounded_sequence_bool_field); + const std::vector& _unbounded_sequence_bool_field) + { + m_unbounded_sequence_bool_field = _unbounded_sequence_bool_field; + } /*! * @brief This function moves the value in member unbounded_sequence_bool_field * @param _unbounded_sequence_bool_field New value to be moved in member unbounded_sequence_bool_field */ eProsima_user_DllExport void unbounded_sequence_bool_field( - std::vector&& _unbounded_sequence_bool_field); + std::vector&& _unbounded_sequence_bool_field) + { + m_unbounded_sequence_bool_field = std::move(_unbounded_sequence_bool_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_bool_field * @return Constant reference to member unbounded_sequence_bool_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_bool_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_bool_field() const + { + return m_unbounded_sequence_bool_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_bool_field * @return Reference to member unbounded_sequence_bool_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_bool_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_bool_field() + { + return m_unbounded_sequence_bool_field; + } /*! @@ -2077,26 +3481,38 @@ class ContentFilterTestType * @param _unbounded_sequence_string_field New value to be copied in member unbounded_sequence_string_field */ eProsima_user_DllExport void unbounded_sequence_string_field( - const std::vector& _unbounded_sequence_string_field); + const std::vector& _unbounded_sequence_string_field) + { + m_unbounded_sequence_string_field = _unbounded_sequence_string_field; + } /*! * @brief This function moves the value in member unbounded_sequence_string_field * @param _unbounded_sequence_string_field New value to be moved in member unbounded_sequence_string_field */ eProsima_user_DllExport void unbounded_sequence_string_field( - std::vector&& _unbounded_sequence_string_field); + std::vector&& _unbounded_sequence_string_field) + { + m_unbounded_sequence_string_field = std::move(_unbounded_sequence_string_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_string_field * @return Constant reference to member unbounded_sequence_string_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_string_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_string_field() const + { + return m_unbounded_sequence_string_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_string_field * @return Reference to member unbounded_sequence_string_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_string_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_string_field() + { + return m_unbounded_sequence_string_field; + } /*! @@ -2104,26 +3520,38 @@ class ContentFilterTestType * @param _unbounded_sequence_enum_field New value to be copied in member unbounded_sequence_enum_field */ eProsima_user_DllExport void unbounded_sequence_enum_field( - const std::vector& _unbounded_sequence_enum_field); + const std::vector& _unbounded_sequence_enum_field) + { + m_unbounded_sequence_enum_field = _unbounded_sequence_enum_field; + } /*! * @brief This function moves the value in member unbounded_sequence_enum_field * @param _unbounded_sequence_enum_field New value to be moved in member unbounded_sequence_enum_field */ eProsima_user_DllExport void unbounded_sequence_enum_field( - std::vector&& _unbounded_sequence_enum_field); + std::vector&& _unbounded_sequence_enum_field) + { + m_unbounded_sequence_enum_field = std::move(_unbounded_sequence_enum_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_enum_field * @return Constant reference to member unbounded_sequence_enum_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_enum_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_enum_field() const + { + return m_unbounded_sequence_enum_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_enum_field * @return Reference to member unbounded_sequence_enum_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_enum_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_enum_field() + { + return m_unbounded_sequence_enum_field; + } /*! @@ -2131,26 +3559,38 @@ class ContentFilterTestType * @param _unbounded_sequence_enum2_field New value to be copied in member unbounded_sequence_enum2_field */ eProsima_user_DllExport void unbounded_sequence_enum2_field( - const std::vector& _unbounded_sequence_enum2_field); + const std::vector& _unbounded_sequence_enum2_field) + { + m_unbounded_sequence_enum2_field = _unbounded_sequence_enum2_field; + } /*! * @brief This function moves the value in member unbounded_sequence_enum2_field * @param _unbounded_sequence_enum2_field New value to be moved in member unbounded_sequence_enum2_field */ eProsima_user_DllExport void unbounded_sequence_enum2_field( - std::vector&& _unbounded_sequence_enum2_field); + std::vector&& _unbounded_sequence_enum2_field) + { + m_unbounded_sequence_enum2_field = std::move(_unbounded_sequence_enum2_field); + } /*! * @brief This function returns a constant reference to member unbounded_sequence_enum2_field * @return Constant reference to member unbounded_sequence_enum2_field */ - eProsima_user_DllExport const std::vector& unbounded_sequence_enum2_field() const; + eProsima_user_DllExport const std::vector& unbounded_sequence_enum2_field() const + { + return m_unbounded_sequence_enum2_field; + } /*! * @brief This function returns a reference to member unbounded_sequence_enum2_field * @return Reference to member unbounded_sequence_enum2_field */ - eProsima_user_DllExport std::vector& unbounded_sequence_enum2_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_enum2_field() + { + return m_unbounded_sequence_enum2_field; + } /*! @@ -2158,26 +3598,40 @@ class ContentFilterTestType * @param _unbounded_sequence_struct_field New value to be copied in member unbounded_sequence_struct_field */ eProsima_user_DllExport void unbounded_sequence_struct_field( - const std::vector& _unbounded_sequence_struct_field); + const std::vector& _unbounded_sequence_struct_field) + { + m_unbounded_sequence_struct_field = _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 */ eProsima_user_DllExport void unbounded_sequence_struct_field( - std::vector&& _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 */ - eProsima_user_DllExport const std::vector& unbounded_sequence_struct_field() const; + eProsima_user_DllExport const std::vector& 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 */ - eProsima_user_DllExport std::vector& unbounded_sequence_struct_field(); + eProsima_user_DllExport std::vector& unbounded_sequence_struct_field() + { + return m_unbounded_sequence_struct_field; + } + + private: @@ -2248,8 +3702,6 @@ class ContentFilterTestType }; -#endif // _FAST_DDS_GENERATED_CONTENTFILTERTESTTYPE_H_ - +#endif // _FAST_DDS_GENERATED_CONTENTFILTERTESTTYPE_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeCdrAux.hpp b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeCdrAux.hpp index f1ae8c42f15..b7f88249c84 100644 --- a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeCdrAux.hpp +++ b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_CONTENTFILTERTESTTYPECDRAUX_HPP_ #define _FAST_DDS_GENERATED_CONTENTFILTERTESTTYPECDRAUX_HPP_ -#include "ContentFilterTestType.h" +#include "ContentFilterTestType.hpp" constexpr uint32_t StructType_max_cdr_typesize {344UL}; constexpr uint32_t StructType_max_key_cdr_typesize {0UL}; @@ -49,10 +49,6 @@ eProsima_user_DllExport void serialize_key( - - - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const ContentFilterTestType& data); diff --git a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeCdrAux.ipp b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeCdrAux.ipp index 6e0b9053b9d..98a775f5d87 100644 --- a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeCdrAux.ipp +++ b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeCdrAux.ipp @@ -228,10 +228,6 @@ void serialize_key( - - - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, diff --git a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypePubSubTypes.cxx b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypePubSubTypes.cxx index c4bd34e1232..483957965f6 100644 --- a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypePubSubTypes.cxx +++ b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypePubSubTypes.cxx @@ -223,10 +223,6 @@ bool StructTypePubSubType::getKey( - - - - ContentFilterTestTypePubSubType::ContentFilterTestTypePubSubType() { setName("ContentFilterTestType"); @@ -415,3 +411,6 @@ bool ContentFilterTestTypePubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "ContentFilterTestTypeCdrAux.ipp" diff --git a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypePubSubTypes.h b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypePubSubTypes.h index 776f184b73e..3121b9138a9 100644 --- a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypePubSubTypes.h +++ b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypePubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "ContentFilterTestType.h" +#include "ContentFilterTestType.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -132,10 +132,6 @@ class StructTypePubSubType : public eprosima::fastdds::dds::TopicDataType - - - - /*! * @brief This class represents the TopicDataType of the type ContentFilterTestType defined by the user in the IDL file. * @ingroup ContentFilterTestType diff --git a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeTypeObject.cxx b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeTypeObject.cxx index c9ec87ccb80..fc5b683e35e 100644 --- a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeTypeObject.cxx +++ b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeTypeObject.cxx @@ -24,7 +24,7 @@ namespace { char dummy; } #endif -#include "ContentFilterTestType.h" +#include "ContentFilterTestType.hpp" #include "ContentFilterTestTypeTypeObject.h" #include #include @@ -1329,10 +1329,6 @@ const TypeObject* GetCompleteStructTypeObject() - - - - const TypeIdentifier* GetContentFilterTestTypeIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("ContentFilterTestType", complete); diff --git a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeTypeObject.h b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeTypeObject.h index f9d5ec3dc0f..6a8b605bdbb 100644 --- a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeTypeObject.h +++ b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypeTypeObject.h @@ -75,10 +75,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteStructTypeObject(); - - - - eProsima_user_DllExport const TypeIdentifier* GetContentFilterTestTypeIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetContentFilterTestTypeObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalContentFilterTestTypeObject(); diff --git a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypev1.cxx b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypev1.cxx deleted file mode 100644 index 6b2d8da6280..00000000000 --- a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypev1.cxx +++ /dev/null @@ -1,5318 +0,0 @@ -// 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 ContentFilterTestType.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "ContentFilterTestType.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include "ContentFilterTestTypeTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define StructType_max_cdr_typesize 344ULL; -#define ContentFilterTestType_max_cdr_typesize 73360ULL; - - - - - - -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; - // long double m_long_double_field - m_long_double_field = 0.0; - // boolean m_bool_field - m_bool_field = false; - // /type_d() m_string_field - - // Color m_enum_field - m_enum_field = ::RED; - // Material m_enum2_field - m_enum2_field = ::WOOD; - - // Just to register all known types - registerContentFilterTestTypeTypes(); -} - -StructType::~StructType() -{ -} - -StructType::StructType( - const StructType& x) -{ - 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_long_double_field = x.m_long_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; - -} - -StructType::StructType( - StructType&& x) noexcept -{ - 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_long_double_field = x.m_long_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; - -} - -StructType& StructType::operator =( - const StructType& x) -{ - 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_long_double_field = x.m_long_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 *this; -} - -StructType& StructType::operator =( - StructType&& x) noexcept -{ - 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_long_double_field = x.m_long_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; - - return *this; -} - -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_long_double_field == x.m_long_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 StructType::operator !=( - const StructType& x) const -{ - 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 += 16 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); // 128 bits, but aligned as 64 - - - 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 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_long_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 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_long_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; - } - - -} - - -bool StructType::isKeyDefined() -{ - return false; -} - -void StructType::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member char_field - * @param _char_field New value for member char_field - */ -void StructType::char_field( - char _char_field) -{ - m_char_field = _char_field; -} - -/*! - * @brief This function returns the value of member char_field - * @return Value of member char_field - */ -char StructType::char_field() const -{ - return m_char_field; -} - -/*! - * @brief This function returns a reference to member char_field - * @return Reference to member char_field - */ -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 - */ -void StructType::uint8_field( - uint8_t _uint8_field) -{ - m_uint8_field = _uint8_field; -} - -/*! - * @brief This function returns the value of member uint8_field - * @return Value of member uint8_field - */ -uint8_t StructType::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& 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 - */ -void StructType::int16_field( - int16_t _int16_field) -{ - m_int16_field = _int16_field; -} - -/*! - * @brief This function returns the value of member int16_field - * @return Value of member int16_field - */ -int16_t StructType::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& 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 - */ -void StructType::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 StructType::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& 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 - */ -void StructType::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 StructType::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& 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 - */ -void StructType::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 StructType::uint32_field() const -{ - return m_uint32_field; -} - -/*! - * @brief This function returns a reference to member uint32_field - * @return Reference to member uint32_field - */ -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 - */ -void StructType::int64_field( - int64_t _int64_field) -{ - m_int64_field = _int64_field; -} - -/*! - * @brief This function returns the value of member int64_field - * @return Value of member int64_field - */ -int64_t StructType::int64_field() const -{ - return m_int64_field; -} - -/*! - * @brief This function returns a reference to member int64_field - * @return Reference to member int64_field - */ -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 - */ -void StructType::uint64_field( - uint64_t _uint64_field) -{ - m_uint64_field = _uint64_field; -} - -/*! - * @brief This function returns the value of member uint64_field - * @return Value of member uint64_field - */ -uint64_t StructType::uint64_field() const -{ - return m_uint64_field; -} - -/*! - * @brief This function returns a reference to member uint64_field - * @return Reference to member uint64_field - */ -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 - */ -void StructType::float_field( - float _float_field) -{ - m_float_field = _float_field; -} - -/*! - * @brief This function returns the value of member float_field - * @return Value of member float_field - */ -float StructType::float_field() const -{ - return m_float_field; -} - -/*! - * @brief This function returns a reference to member float_field - * @return Reference to member float_field - */ -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 - */ -void StructType::double_field( - double _double_field) -{ - m_double_field = _double_field; -} - -/*! - * @brief This function returns the value of member double_field - * @return Value of member double_field - */ -double StructType::double_field() const -{ - return m_double_field; -} - -/*! - * @brief This function returns a reference to member double_field - * @return Reference to member double_field - */ -double& StructType::double_field() -{ - return m_double_field; -} - - -/*! - * @brief This function sets a value in member long_double_field - * @param _long_double_field New value for member long_double_field - */ -void StructType::long_double_field( - long double _long_double_field) -{ - m_long_double_field = _long_double_field; -} - -/*! - * @brief This function returns the value of member long_double_field - * @return Value of member long_double_field - */ -long double StructType::long_double_field() const -{ - return m_long_double_field; -} - -/*! - * @brief This function returns a reference to member long_double_field - * @return Reference to member long_double_field - */ -long double& StructType::long_double_field() -{ - return m_long_double_field; -} - - -/*! - * @brief This function sets a value in member bool_field - * @param _bool_field New value for member bool_field - */ -void StructType::bool_field( - bool _bool_field) -{ - m_bool_field = _bool_field; -} - -/*! - * @brief This function returns the value of member bool_field - * @return Value of member bool_field - */ -bool StructType::bool_field() const -{ - return m_bool_field; -} - -/*! - * @brief This function returns a reference to member bool_field - * @return Reference to member bool_field - */ -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 - */ -void StructType::string_field( - const std::string& _string_field) -{ - m_string_field = _string_field; -} - -/*! - * @brief This function moves the value in member string_field - * @param _string_field New value to be moved in member string_field - */ -void StructType::string_field( - std::string&& _string_field) -{ - m_string_field = std::move(_string_field); -} - -/*! - * @brief This function returns a constant reference to member string_field - * @return Constant reference to member string_field - */ -const std::string& StructType::string_field() const -{ - return m_string_field; -} - -/*! - * @brief This function returns a reference to member string_field - * @return Reference to member string_field - */ -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 - */ -void StructType::enum_field( - Color _enum_field) -{ - m_enum_field = _enum_field; -} - -/*! - * @brief This function returns the value of member enum_field - * @return Value of member enum_field - */ -Color StructType::enum_field() const -{ - return m_enum_field; -} - -/*! - * @brief This function returns a reference to member enum_field - * @return Reference to member enum_field - */ -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 - */ -void StructType::enum2_field( - Material _enum2_field) -{ - m_enum2_field = _enum2_field; -} - -/*! - * @brief This function returns the value of member enum2_field - * @return Value of member enum2_field - */ -Material StructType::enum2_field() const -{ - return m_enum2_field; -} - -/*! - * @brief This function returns a reference to member enum2_field - * @return Reference to member enum2_field - */ -Material& StructType::enum2_field() -{ - return m_enum2_field; -} - - - - - - - - - -ContentFilterTestType::ContentFilterTestType() -{ - // 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; - // long double m_long_double_field - m_long_double_field = 0.0; - // boolean m_bool_field - m_bool_field = false; - // /type_d() 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, ((max_array_size)) * 1); - // octet m_array_uint8_field - memset(&m_array_uint8_field, 0, ((max_array_size)) * 1); - // short m_array_int16_field - memset(&m_array_int16_field, 0, ((max_array_size)) * 2); - // unsigned short m_array_uint16_field - memset(&m_array_uint16_field, 0, ((max_array_size)) * 2); - // long m_array_int32_field - memset(&m_array_int32_field, 0, ((max_array_size)) * 4); - // unsigned long m_array_uint32_field - memset(&m_array_uint32_field, 0, ((max_array_size)) * 4); - // long long m_array_int64_field - memset(&m_array_int64_field, 0, ((max_array_size)) * 8); - // unsigned long long m_array_uint64_field - memset(&m_array_uint64_field, 0, ((max_array_size)) * 8); - // float m_array_float_field - memset(&m_array_float_field, 0, ((max_array_size)) * 4); - // double m_array_double_field - memset(&m_array_double_field, 0, ((max_array_size)) * 8); - // long double m_array_long_double_field - memset(&m_array_long_double_field, 0, ((max_array_size)) * 16); - // boolean m_array_bool_field - memset(&m_array_bool_field, 0, ((max_array_size)) * 1); - // /type_d() m_array_string_field - - // Color m_array_enum_field - memset(&m_array_enum_field, 0, ((max_array_size)) * 4); - // Material m_array_enum2_field - memset(&m_array_enum2_field, 0, ((max_array_size)) * 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_long_double_field - - // sequence m_bounded_sequence_bool_field - - // sequence m_bounded_sequence_string_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_long_double_field - - // sequence m_unbounded_sequence_bool_field - - // sequence m_unbounded_sequence_string_field - - // sequence m_unbounded_sequence_enum_field - - // sequence m_unbounded_sequence_enum2_field - - // sequence m_unbounded_sequence_struct_field - - - // Just to register all known types - registerContentFilterTestTypeTypes(); -} - -ContentFilterTestType::~ContentFilterTestType() -{ -} - -ContentFilterTestType::ContentFilterTestType( - const ContentFilterTestType& x) -{ - 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_long_double_field = x.m_long_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_long_double_field = x.m_array_long_double_field; - - - m_array_bool_field = x.m_array_bool_field; - - - m_array_string_field = x.m_array_string_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_long_double_field = x.m_bounded_sequence_long_double_field; - - - m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; - - - m_bounded_sequence_string_field = x.m_bounded_sequence_string_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_long_double_field = x.m_unbounded_sequence_long_double_field; - - - m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; - - - m_unbounded_sequence_string_field = x.m_unbounded_sequence_string_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; - -} - -ContentFilterTestType::ContentFilterTestType( - ContentFilterTestType&& x) noexcept -{ - 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_long_double_field = x.m_long_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_long_double_field = std::move(x.m_array_long_double_field); - - - m_array_bool_field = std::move(x.m_array_bool_field); - - - m_array_string_field = std::move(x.m_array_string_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_long_double_field = std::move(x.m_bounded_sequence_long_double_field); - - - m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); - - - m_bounded_sequence_string_field = std::move(x.m_bounded_sequence_string_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_long_double_field = std::move(x.m_unbounded_sequence_long_double_field); - - - m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); - - - m_unbounded_sequence_string_field = std::move(x.m_unbounded_sequence_string_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); - -} - -ContentFilterTestType& ContentFilterTestType::operator =( - const ContentFilterTestType& x) -{ - 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_long_double_field = x.m_long_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_long_double_field = x.m_array_long_double_field; - - - m_array_bool_field = x.m_array_bool_field; - - - m_array_string_field = x.m_array_string_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_long_double_field = x.m_bounded_sequence_long_double_field; - - - m_bounded_sequence_bool_field = x.m_bounded_sequence_bool_field; - - - m_bounded_sequence_string_field = x.m_bounded_sequence_string_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_long_double_field = x.m_unbounded_sequence_long_double_field; - - - m_unbounded_sequence_bool_field = x.m_unbounded_sequence_bool_field; - - - m_unbounded_sequence_string_field = x.m_unbounded_sequence_string_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 *this; -} - -ContentFilterTestType& ContentFilterTestType::operator =( - ContentFilterTestType&& x) noexcept -{ - 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_long_double_field = x.m_long_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_long_double_field = std::move(x.m_array_long_double_field); - - - m_array_bool_field = std::move(x.m_array_bool_field); - - - m_array_string_field = std::move(x.m_array_string_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_long_double_field = std::move(x.m_bounded_sequence_long_double_field); - - - m_bounded_sequence_bool_field = std::move(x.m_bounded_sequence_bool_field); - - - m_bounded_sequence_string_field = std::move(x.m_bounded_sequence_string_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_long_double_field = std::move(x.m_unbounded_sequence_long_double_field); - - - m_unbounded_sequence_bool_field = std::move(x.m_unbounded_sequence_bool_field); - - - m_unbounded_sequence_string_field = std::move(x.m_unbounded_sequence_string_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 ContentFilterTestType::operator ==( - const ContentFilterTestType& 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_long_double_field == x.m_long_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_long_double_field == x.m_array_long_double_field && - m_array_bool_field == x.m_array_bool_field && - m_array_string_field == x.m_array_string_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_long_double_field == x.m_bounded_sequence_long_double_field && - m_bounded_sequence_bool_field == x.m_bounded_sequence_bool_field && - m_bounded_sequence_string_field == x.m_bounded_sequence_string_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_long_double_field == x.m_unbounded_sequence_long_double_field && - m_unbounded_sequence_bool_field == x.m_unbounded_sequence_bool_field && - m_unbounded_sequence_string_field == x.m_unbounded_sequence_string_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 ContentFilterTestType::operator !=( - const ContentFilterTestType& x) const -{ - return !(*this == x); -} - -size_t ContentFilterTestType::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ContentFilterTestType_max_cdr_typesize; -} - -size_t ContentFilterTestType::getCdrSerializedSize( - const ContentFilterTestType& 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 += 16 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); // 128 bits, but aligned as 64 - - - 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 += (((max_array_size)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - current_alignment += (((max_array_size)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - current_alignment += (((max_array_size)) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - - current_alignment += (((max_array_size)) * 2) + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - - current_alignment += (((max_array_size)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - current_alignment += (((max_array_size)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - current_alignment += (((max_array_size)) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - - current_alignment += (((max_array_size)) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - - current_alignment += (((max_array_size)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - current_alignment += (((max_array_size)) * 8) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - - current_alignment += (((max_array_size)) * 16) + eprosima::fastcdr::Cdr::alignment(current_alignment, 16); - - - - current_alignment += (((max_array_size)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - - for(size_t a = 0; a < data.array_string_field().size(); ++a) - { - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.array_string_field().at(a).size() + 1; - - } - - - - current_alignment += (((max_array_size)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - current_alignment += (((max_array_size)) * 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_long_double_field().size() > 0) - { - current_alignment += (data.bounded_sequence_long_double_field().size() * 16) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); // 128 bits, but aligned as 64 - } - - - - - 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); - - - for(size_t a = 0; a < data.bounded_sequence_string_field().size(); ++a) - { - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + - data.bounded_sequence_string_field().at(a).size() + 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_long_double_field().size() > 0) - { - current_alignment += (data.unbounded_sequence_long_double_field().size() * 16) + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); // 128 bits, but aligned as 64 - } - - - - - 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); - - - for(size_t a = 0; a < data.unbounded_sequence_string_field().size(); ++a) - { - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + - data.unbounded_sequence_string_field().at(a).size() + 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 ContentFilterTestType::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_long_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_long_double_field; - - - scdr << m_array_bool_field; - - - for (const auto& str : m_array_string_field) - { - scdr << str.c_str(); - } - - - - - - 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_long_double_field; - - - scdr << m_bounded_sequence_bool_field; - - - scdr << m_bounded_sequence_string_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_long_double_field; - - - scdr << m_unbounded_sequence_bool_field; - - - scdr << m_unbounded_sequence_string_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 ContentFilterTestType::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_long_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_long_double_field; - - - - dcdr >> m_array_bool_field; - - - - for (auto& str : m_array_string_field) - { - dcdr >> str; - } - - - - - - - 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_long_double_field; - - - - dcdr >> m_bounded_sequence_bool_field; - - - - dcdr >> m_bounded_sequence_string_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_long_double_field; - - - - dcdr >> m_unbounded_sequence_bool_field; - - - - dcdr >> m_unbounded_sequence_string_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 ContentFilterTestType::isKeyDefined() -{ - return false; -} - -void ContentFilterTestType::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member char_field - * @param _char_field New value for member char_field - */ -void ContentFilterTestType::char_field( - char _char_field) -{ - m_char_field = _char_field; -} - -/*! - * @brief This function returns the value of member char_field - * @return Value of member char_field - */ -char ContentFilterTestType::char_field() const -{ - return m_char_field; -} - -/*! - * @brief This function returns a reference to member char_field - * @return Reference to member char_field - */ -char& ContentFilterTestType::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 - */ -void ContentFilterTestType::uint8_field( - uint8_t _uint8_field) -{ - m_uint8_field = _uint8_field; -} - -/*! - * @brief This function returns the value of member uint8_field - * @return Value of member uint8_field - */ -uint8_t ContentFilterTestType::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& ContentFilterTestType::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 - */ -void ContentFilterTestType::int16_field( - int16_t _int16_field) -{ - m_int16_field = _int16_field; -} - -/*! - * @brief This function returns the value of member int16_field - * @return Value of member int16_field - */ -int16_t ContentFilterTestType::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& ContentFilterTestType::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 ContentFilterTestType::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 ContentFilterTestType::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& ContentFilterTestType::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 ContentFilterTestType::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 ContentFilterTestType::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& ContentFilterTestType::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 ContentFilterTestType::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 ContentFilterTestType::uint32_field() const -{ - return m_uint32_field; -} - -/*! - * @brief This function returns a reference to member uint32_field - * @return Reference to member uint32_field - */ -uint32_t& ContentFilterTestType::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 - */ -void ContentFilterTestType::int64_field( - int64_t _int64_field) -{ - m_int64_field = _int64_field; -} - -/*! - * @brief This function returns the value of member int64_field - * @return Value of member int64_field - */ -int64_t ContentFilterTestType::int64_field() const -{ - return m_int64_field; -} - -/*! - * @brief This function returns a reference to member int64_field - * @return Reference to member int64_field - */ -int64_t& ContentFilterTestType::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 - */ -void ContentFilterTestType::uint64_field( - uint64_t _uint64_field) -{ - m_uint64_field = _uint64_field; -} - -/*! - * @brief This function returns the value of member uint64_field - * @return Value of member uint64_field - */ -uint64_t ContentFilterTestType::uint64_field() const -{ - return m_uint64_field; -} - -/*! - * @brief This function returns a reference to member uint64_field - * @return Reference to member uint64_field - */ -uint64_t& ContentFilterTestType::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 - */ -void ContentFilterTestType::float_field( - float _float_field) -{ - m_float_field = _float_field; -} - -/*! - * @brief This function returns the value of member float_field - * @return Value of member float_field - */ -float ContentFilterTestType::float_field() const -{ - return m_float_field; -} - -/*! - * @brief This function returns a reference to member float_field - * @return Reference to member float_field - */ -float& ContentFilterTestType::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 - */ -void ContentFilterTestType::double_field( - double _double_field) -{ - m_double_field = _double_field; -} - -/*! - * @brief This function returns the value of member double_field - * @return Value of member double_field - */ -double ContentFilterTestType::double_field() const -{ - return m_double_field; -} - -/*! - * @brief This function returns a reference to member double_field - * @return Reference to member double_field - */ -double& ContentFilterTestType::double_field() -{ - return m_double_field; -} - - -/*! - * @brief This function sets a value in member long_double_field - * @param _long_double_field New value for member long_double_field - */ -void ContentFilterTestType::long_double_field( - long double _long_double_field) -{ - m_long_double_field = _long_double_field; -} - -/*! - * @brief This function returns the value of member long_double_field - * @return Value of member long_double_field - */ -long double ContentFilterTestType::long_double_field() const -{ - return m_long_double_field; -} - -/*! - * @brief This function returns a reference to member long_double_field - * @return Reference to member long_double_field - */ -long double& ContentFilterTestType::long_double_field() -{ - return m_long_double_field; -} - - -/*! - * @brief This function sets a value in member bool_field - * @param _bool_field New value for member bool_field - */ -void ContentFilterTestType::bool_field( - bool _bool_field) -{ - m_bool_field = _bool_field; -} - -/*! - * @brief This function returns the value of member bool_field - * @return Value of member bool_field - */ -bool ContentFilterTestType::bool_field() const -{ - return m_bool_field; -} - -/*! - * @brief This function returns a reference to member bool_field - * @return Reference to member bool_field - */ -bool& ContentFilterTestType::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 - */ -void ContentFilterTestType::string_field( - const std::string& _string_field) -{ - m_string_field = _string_field; -} - -/*! - * @brief This function moves the value in member string_field - * @param _string_field New value to be moved in member string_field - */ -void ContentFilterTestType::string_field( - std::string&& _string_field) -{ - m_string_field = std::move(_string_field); -} - -/*! - * @brief This function returns a constant reference to member string_field - * @return Constant reference to member string_field - */ -const std::string& ContentFilterTestType::string_field() const -{ - return m_string_field; -} - -/*! - * @brief This function returns a reference to member string_field - * @return Reference to member string_field - */ -std::string& ContentFilterTestType::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 - */ -void ContentFilterTestType::enum_field( - Color _enum_field) -{ - m_enum_field = _enum_field; -} - -/*! - * @brief This function returns the value of member enum_field - * @return Value of member enum_field - */ -Color ContentFilterTestType::enum_field() const -{ - return m_enum_field; -} - -/*! - * @brief This function returns a reference to member enum_field - * @return Reference to member enum_field - */ -Color& ContentFilterTestType::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 - */ -void ContentFilterTestType::enum2_field( - Material _enum2_field) -{ - m_enum2_field = _enum2_field; -} - -/*! - * @brief This function returns the value of member enum2_field - * @return Value of member enum2_field - */ -Material ContentFilterTestType::enum2_field() const -{ - return m_enum2_field; -} - -/*! - * @brief This function returns a reference to member enum2_field - * @return Reference to member enum2_field - */ -Material& ContentFilterTestType::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 - */ -void ContentFilterTestType::struct_field( - const StructType& _struct_field) -{ - m_struct_field = _struct_field; -} - -/*! - * @brief This function moves the value in member struct_field - * @param _struct_field New value to be moved in member struct_field - */ -void ContentFilterTestType::struct_field( - StructType&& _struct_field) -{ - m_struct_field = std::move(_struct_field); -} - -/*! - * @brief This function returns a constant reference to member struct_field - * @return Constant reference to member struct_field - */ -const StructType& ContentFilterTestType::struct_field() const -{ - return m_struct_field; -} - -/*! - * @brief This function returns a reference to member struct_field - * @return Reference to member struct_field - */ -StructType& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_char_field( - const std::array& _array_char_field) -{ - m_array_char_field = _array_char_field; -} - -/*! - * @brief This function moves the value in member array_char_field - * @param _array_char_field New value to be moved in member array_char_field - */ -void ContentFilterTestType::array_char_field( - std::array&& _array_char_field) -{ - m_array_char_field = std::move(_array_char_field); -} - -/*! - * @brief This function returns a constant reference to member array_char_field - * @return Constant reference to member array_char_field - */ -const std::array& ContentFilterTestType::array_char_field() const -{ - return m_array_char_field; -} - -/*! - * @brief This function returns a reference to member array_char_field - * @return Reference to member array_char_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_uint8_field( - const std::array& _array_uint8_field) -{ - m_array_uint8_field = _array_uint8_field; -} - -/*! - * @brief This function moves the value in member array_uint8_field - * @param _array_uint8_field New value to be moved in member array_uint8_field - */ -void ContentFilterTestType::array_uint8_field( - std::array&& _array_uint8_field) -{ - m_array_uint8_field = std::move(_array_uint8_field); -} - -/*! - * @brief This function returns a constant reference to member array_uint8_field - * @return Constant reference to member array_uint8_field - */ -const std::array& ContentFilterTestType::array_uint8_field() const -{ - return m_array_uint8_field; -} - -/*! - * @brief This function returns a reference to member array_uint8_field - * @return Reference to member array_uint8_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_int16_field( - const std::array& _array_int16_field) -{ - m_array_int16_field = _array_int16_field; -} - -/*! - * @brief This function moves the value in member array_int16_field - * @param _array_int16_field New value to be moved in member array_int16_field - */ -void ContentFilterTestType::array_int16_field( - std::array&& _array_int16_field) -{ - m_array_int16_field = std::move(_array_int16_field); -} - -/*! - * @brief This function returns a constant reference to member array_int16_field - * @return Constant reference to member array_int16_field - */ -const std::array& ContentFilterTestType::array_int16_field() const -{ - return m_array_int16_field; -} - -/*! - * @brief This function returns a reference to member array_int16_field - * @return Reference to member array_int16_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_uint16_field( - const std::array& _array_uint16_field) -{ - m_array_uint16_field = _array_uint16_field; -} - -/*! - * @brief This function moves the value in member array_uint16_field - * @param _array_uint16_field New value to be moved in member array_uint16_field - */ -void ContentFilterTestType::array_uint16_field( - std::array&& _array_uint16_field) -{ - m_array_uint16_field = std::move(_array_uint16_field); -} - -/*! - * @brief This function returns a constant reference to member array_uint16_field - * @return Constant reference to member array_uint16_field - */ -const std::array& ContentFilterTestType::array_uint16_field() const -{ - return m_array_uint16_field; -} - -/*! - * @brief This function returns a reference to member array_uint16_field - * @return Reference to member array_uint16_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_int32_field( - const std::array& _array_int32_field) -{ - m_array_int32_field = _array_int32_field; -} - -/*! - * @brief This function moves the value in member array_int32_field - * @param _array_int32_field New value to be moved in member array_int32_field - */ -void ContentFilterTestType::array_int32_field( - std::array&& _array_int32_field) -{ - m_array_int32_field = std::move(_array_int32_field); -} - -/*! - * @brief This function returns a constant reference to member array_int32_field - * @return Constant reference to member array_int32_field - */ -const std::array& ContentFilterTestType::array_int32_field() const -{ - return m_array_int32_field; -} - -/*! - * @brief This function returns a reference to member array_int32_field - * @return Reference to member array_int32_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_uint32_field( - const std::array& _array_uint32_field) -{ - m_array_uint32_field = _array_uint32_field; -} - -/*! - * @brief This function moves the value in member array_uint32_field - * @param _array_uint32_field New value to be moved in member array_uint32_field - */ -void ContentFilterTestType::array_uint32_field( - std::array&& _array_uint32_field) -{ - m_array_uint32_field = std::move(_array_uint32_field); -} - -/*! - * @brief This function returns a constant reference to member array_uint32_field - * @return Constant reference to member array_uint32_field - */ -const std::array& ContentFilterTestType::array_uint32_field() const -{ - return m_array_uint32_field; -} - -/*! - * @brief This function returns a reference to member array_uint32_field - * @return Reference to member array_uint32_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_int64_field( - const std::array& _array_int64_field) -{ - m_array_int64_field = _array_int64_field; -} - -/*! - * @brief This function moves the value in member array_int64_field - * @param _array_int64_field New value to be moved in member array_int64_field - */ -void ContentFilterTestType::array_int64_field( - std::array&& _array_int64_field) -{ - m_array_int64_field = std::move(_array_int64_field); -} - -/*! - * @brief This function returns a constant reference to member array_int64_field - * @return Constant reference to member array_int64_field - */ -const std::array& ContentFilterTestType::array_int64_field() const -{ - return m_array_int64_field; -} - -/*! - * @brief This function returns a reference to member array_int64_field - * @return Reference to member array_int64_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_uint64_field( - const std::array& _array_uint64_field) -{ - m_array_uint64_field = _array_uint64_field; -} - -/*! - * @brief This function moves the value in member array_uint64_field - * @param _array_uint64_field New value to be moved in member array_uint64_field - */ -void ContentFilterTestType::array_uint64_field( - std::array&& _array_uint64_field) -{ - m_array_uint64_field = std::move(_array_uint64_field); -} - -/*! - * @brief This function returns a constant reference to member array_uint64_field - * @return Constant reference to member array_uint64_field - */ -const std::array& ContentFilterTestType::array_uint64_field() const -{ - return m_array_uint64_field; -} - -/*! - * @brief This function returns a reference to member array_uint64_field - * @return Reference to member array_uint64_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_float_field( - const std::array& _array_float_field) -{ - m_array_float_field = _array_float_field; -} - -/*! - * @brief This function moves the value in member array_float_field - * @param _array_float_field New value to be moved in member array_float_field - */ -void ContentFilterTestType::array_float_field( - std::array&& _array_float_field) -{ - m_array_float_field = std::move(_array_float_field); -} - -/*! - * @brief This function returns a constant reference to member array_float_field - * @return Constant reference to member array_float_field - */ -const std::array& ContentFilterTestType::array_float_field() const -{ - return m_array_float_field; -} - -/*! - * @brief This function returns a reference to member array_float_field - * @return Reference to member array_float_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_double_field( - const std::array& _array_double_field) -{ - m_array_double_field = _array_double_field; -} - -/*! - * @brief This function moves the value in member array_double_field - * @param _array_double_field New value to be moved in member array_double_field - */ -void ContentFilterTestType::array_double_field( - std::array&& _array_double_field) -{ - m_array_double_field = std::move(_array_double_field); -} - -/*! - * @brief This function returns a constant reference to member array_double_field - * @return Constant reference to member array_double_field - */ -const std::array& ContentFilterTestType::array_double_field() const -{ - return m_array_double_field; -} - -/*! - * @brief This function returns a reference to member array_double_field - * @return Reference to member array_double_field - */ -std::array& ContentFilterTestType::array_double_field() -{ - return m_array_double_field; -} - - -/*! - * @brief This function copies the value in member array_long_double_field - * @param _array_long_double_field New value to be copied in member array_long_double_field - */ -void ContentFilterTestType::array_long_double_field( - const std::array& _array_long_double_field) -{ - m_array_long_double_field = _array_long_double_field; -} - -/*! - * @brief This function moves the value in member array_long_double_field - * @param _array_long_double_field New value to be moved in member array_long_double_field - */ -void ContentFilterTestType::array_long_double_field( - std::array&& _array_long_double_field) -{ - m_array_long_double_field = std::move(_array_long_double_field); -} - -/*! - * @brief This function returns a constant reference to member array_long_double_field - * @return Constant reference to member array_long_double_field - */ -const std::array& ContentFilterTestType::array_long_double_field() const -{ - return m_array_long_double_field; -} - -/*! - * @brief This function returns a reference to member array_long_double_field - * @return Reference to member array_long_double_field - */ -std::array& ContentFilterTestType::array_long_double_field() -{ - return m_array_long_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 - */ -void ContentFilterTestType::array_bool_field( - const std::array& _array_bool_field) -{ - m_array_bool_field = _array_bool_field; -} - -/*! - * @brief This function moves the value in member array_bool_field - * @param _array_bool_field New value to be moved in member array_bool_field - */ -void ContentFilterTestType::array_bool_field( - std::array&& _array_bool_field) -{ - m_array_bool_field = std::move(_array_bool_field); -} - -/*! - * @brief This function returns a constant reference to member array_bool_field - * @return Constant reference to member array_bool_field - */ -const std::array& ContentFilterTestType::array_bool_field() const -{ - return m_array_bool_field; -} - -/*! - * @brief This function returns a reference to member array_bool_field - * @return Reference to member array_bool_field - */ -std::array& ContentFilterTestType::array_bool_field() -{ - return m_array_bool_field; -} - - -/*! - * @brief This function copies the value in member array_string_field - * @param _array_string_field New value to be copied in member array_string_field - */ -void ContentFilterTestType::array_string_field( - const std::array& _array_string_field) -{ - m_array_string_field = _array_string_field; -} - -/*! - * @brief This function moves the value in member array_string_field - * @param _array_string_field New value to be moved in member array_string_field - */ -void ContentFilterTestType::array_string_field( - std::array&& _array_string_field) -{ - m_array_string_field = std::move(_array_string_field); -} - -/*! - * @brief This function returns a constant reference to member array_string_field - * @return Constant reference to member array_string_field - */ -const std::array& ContentFilterTestType::array_string_field() const -{ - return m_array_string_field; -} - -/*! - * @brief This function returns a reference to member array_string_field - * @return Reference to member array_string_field - */ -std::array& ContentFilterTestType::array_string_field() -{ - return m_array_string_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 - */ -void ContentFilterTestType::array_enum_field( - const std::array& _array_enum_field) -{ - m_array_enum_field = _array_enum_field; -} - -/*! - * @brief This function moves the value in member array_enum_field - * @param _array_enum_field New value to be moved in member array_enum_field - */ -void ContentFilterTestType::array_enum_field( - std::array&& _array_enum_field) -{ - m_array_enum_field = std::move(_array_enum_field); -} - -/*! - * @brief This function returns a constant reference to member array_enum_field - * @return Constant reference to member array_enum_field - */ -const std::array& ContentFilterTestType::array_enum_field() const -{ - return m_array_enum_field; -} - -/*! - * @brief This function returns a reference to member array_enum_field - * @return Reference to member array_enum_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_enum2_field( - const std::array& _array_enum2_field) -{ - m_array_enum2_field = _array_enum2_field; -} - -/*! - * @brief This function moves the value in member array_enum2_field - * @param _array_enum2_field New value to be moved in member array_enum2_field - */ -void ContentFilterTestType::array_enum2_field( - std::array&& _array_enum2_field) -{ - m_array_enum2_field = std::move(_array_enum2_field); -} - -/*! - * @brief This function returns a constant reference to member array_enum2_field - * @return Constant reference to member array_enum2_field - */ -const std::array& ContentFilterTestType::array_enum2_field() const -{ - return m_array_enum2_field; -} - -/*! - * @brief This function returns a reference to member array_enum2_field - * @return Reference to member array_enum2_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::array_struct_field( - const std::array& _array_struct_field) -{ - m_array_struct_field = _array_struct_field; -} - -/*! - * @brief This function moves the value in member array_struct_field - * @param _array_struct_field New value to be moved in member array_struct_field - */ -void ContentFilterTestType::array_struct_field( - std::array&& _array_struct_field) -{ - m_array_struct_field = std::move(_array_struct_field); -} - -/*! - * @brief This function returns a constant reference to member array_struct_field - * @return Constant reference to member array_struct_field - */ -const std::array& ContentFilterTestType::array_struct_field() const -{ - return m_array_struct_field; -} - -/*! - * @brief This function returns a reference to member array_struct_field - * @return Reference to member array_struct_field - */ -std::array& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_char_field( - const std::vector& _bounded_sequence_char_field) -{ - m_bounded_sequence_char_field = _bounded_sequence_char_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_char_field - * @param _bounded_sequence_char_field New value to be moved in member bounded_sequence_char_field - */ -void ContentFilterTestType::bounded_sequence_char_field( - std::vector&& _bounded_sequence_char_field) -{ - m_bounded_sequence_char_field = std::move(_bounded_sequence_char_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_char_field - * @return Constant reference to member bounded_sequence_char_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_char_field() const -{ - return m_bounded_sequence_char_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_char_field - * @return Reference to member bounded_sequence_char_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_uint8_field( - const std::vector& _bounded_sequence_uint8_field) -{ - m_bounded_sequence_uint8_field = _bounded_sequence_uint8_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_uint8_field - * @param _bounded_sequence_uint8_field New value to be moved in member bounded_sequence_uint8_field - */ -void ContentFilterTestType::bounded_sequence_uint8_field( - std::vector&& _bounded_sequence_uint8_field) -{ - m_bounded_sequence_uint8_field = std::move(_bounded_sequence_uint8_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_uint8_field - * @return Constant reference to member bounded_sequence_uint8_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_uint8_field() const -{ - return m_bounded_sequence_uint8_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_uint8_field - * @return Reference to member bounded_sequence_uint8_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_int16_field( - const std::vector& _bounded_sequence_int16_field) -{ - m_bounded_sequence_int16_field = _bounded_sequence_int16_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_int16_field - * @param _bounded_sequence_int16_field New value to be moved in member bounded_sequence_int16_field - */ -void ContentFilterTestType::bounded_sequence_int16_field( - std::vector&& _bounded_sequence_int16_field) -{ - m_bounded_sequence_int16_field = std::move(_bounded_sequence_int16_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_int16_field - * @return Constant reference to member bounded_sequence_int16_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_int16_field() const -{ - return m_bounded_sequence_int16_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_int16_field - * @return Reference to member bounded_sequence_int16_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_uint16_field( - const std::vector& _bounded_sequence_uint16_field) -{ - m_bounded_sequence_uint16_field = _bounded_sequence_uint16_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_uint16_field - * @param _bounded_sequence_uint16_field New value to be moved in member bounded_sequence_uint16_field - */ -void ContentFilterTestType::bounded_sequence_uint16_field( - std::vector&& _bounded_sequence_uint16_field) -{ - m_bounded_sequence_uint16_field = std::move(_bounded_sequence_uint16_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_uint16_field - * @return Constant reference to member bounded_sequence_uint16_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_uint16_field() const -{ - return m_bounded_sequence_uint16_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_uint16_field - * @return Reference to member bounded_sequence_uint16_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_int32_field( - const std::vector& _bounded_sequence_int32_field) -{ - m_bounded_sequence_int32_field = _bounded_sequence_int32_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_int32_field - * @param _bounded_sequence_int32_field New value to be moved in member bounded_sequence_int32_field - */ -void ContentFilterTestType::bounded_sequence_int32_field( - std::vector&& _bounded_sequence_int32_field) -{ - m_bounded_sequence_int32_field = std::move(_bounded_sequence_int32_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_int32_field - * @return Constant reference to member bounded_sequence_int32_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_int32_field() const -{ - return m_bounded_sequence_int32_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_int32_field - * @return Reference to member bounded_sequence_int32_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_uint32_field( - const std::vector& _bounded_sequence_uint32_field) -{ - m_bounded_sequence_uint32_field = _bounded_sequence_uint32_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_uint32_field - * @param _bounded_sequence_uint32_field New value to be moved in member bounded_sequence_uint32_field - */ -void ContentFilterTestType::bounded_sequence_uint32_field( - std::vector&& _bounded_sequence_uint32_field) -{ - m_bounded_sequence_uint32_field = std::move(_bounded_sequence_uint32_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_uint32_field - * @return Constant reference to member bounded_sequence_uint32_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_uint32_field() const -{ - return m_bounded_sequence_uint32_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_uint32_field - * @return Reference to member bounded_sequence_uint32_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_int64_field( - const std::vector& _bounded_sequence_int64_field) -{ - m_bounded_sequence_int64_field = _bounded_sequence_int64_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_int64_field - * @param _bounded_sequence_int64_field New value to be moved in member bounded_sequence_int64_field - */ -void ContentFilterTestType::bounded_sequence_int64_field( - std::vector&& _bounded_sequence_int64_field) -{ - m_bounded_sequence_int64_field = std::move(_bounded_sequence_int64_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_int64_field - * @return Constant reference to member bounded_sequence_int64_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_int64_field() const -{ - return m_bounded_sequence_int64_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_int64_field - * @return Reference to member bounded_sequence_int64_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_uint64_field( - const std::vector& _bounded_sequence_uint64_field) -{ - m_bounded_sequence_uint64_field = _bounded_sequence_uint64_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_uint64_field - * @param _bounded_sequence_uint64_field New value to be moved in member bounded_sequence_uint64_field - */ -void ContentFilterTestType::bounded_sequence_uint64_field( - std::vector&& _bounded_sequence_uint64_field) -{ - m_bounded_sequence_uint64_field = std::move(_bounded_sequence_uint64_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_uint64_field - * @return Constant reference to member bounded_sequence_uint64_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_uint64_field() const -{ - return m_bounded_sequence_uint64_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_uint64_field - * @return Reference to member bounded_sequence_uint64_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_float_field( - const std::vector& _bounded_sequence_float_field) -{ - m_bounded_sequence_float_field = _bounded_sequence_float_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_float_field - * @param _bounded_sequence_float_field New value to be moved in member bounded_sequence_float_field - */ -void ContentFilterTestType::bounded_sequence_float_field( - std::vector&& _bounded_sequence_float_field) -{ - m_bounded_sequence_float_field = std::move(_bounded_sequence_float_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_float_field - * @return Constant reference to member bounded_sequence_float_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_float_field() const -{ - return m_bounded_sequence_float_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_float_field - * @return Reference to member bounded_sequence_float_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_double_field( - const std::vector& _bounded_sequence_double_field) -{ - m_bounded_sequence_double_field = _bounded_sequence_double_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_double_field - * @param _bounded_sequence_double_field New value to be moved in member bounded_sequence_double_field - */ -void ContentFilterTestType::bounded_sequence_double_field( - std::vector&& _bounded_sequence_double_field) -{ - m_bounded_sequence_double_field = std::move(_bounded_sequence_double_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_double_field - * @return Constant reference to member bounded_sequence_double_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_double_field() const -{ - return m_bounded_sequence_double_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_double_field - * @return Reference to member bounded_sequence_double_field - */ -std::vector& ContentFilterTestType::bounded_sequence_double_field() -{ - return m_bounded_sequence_double_field; -} - - -/*! - * @brief This function copies the value in member bounded_sequence_long_double_field - * @param _bounded_sequence_long_double_field New value to be copied in member bounded_sequence_long_double_field - */ -void ContentFilterTestType::bounded_sequence_long_double_field( - const std::vector& _bounded_sequence_long_double_field) -{ - m_bounded_sequence_long_double_field = _bounded_sequence_long_double_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_long_double_field - * @param _bounded_sequence_long_double_field New value to be moved in member bounded_sequence_long_double_field - */ -void ContentFilterTestType::bounded_sequence_long_double_field( - std::vector&& _bounded_sequence_long_double_field) -{ - m_bounded_sequence_long_double_field = std::move(_bounded_sequence_long_double_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_long_double_field - * @return Constant reference to member bounded_sequence_long_double_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_long_double_field() const -{ - return m_bounded_sequence_long_double_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_long_double_field - * @return Reference to member bounded_sequence_long_double_field - */ -std::vector& ContentFilterTestType::bounded_sequence_long_double_field() -{ - return m_bounded_sequence_long_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 - */ -void ContentFilterTestType::bounded_sequence_bool_field( - const std::vector& _bounded_sequence_bool_field) -{ - m_bounded_sequence_bool_field = _bounded_sequence_bool_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_bool_field - * @param _bounded_sequence_bool_field New value to be moved in member bounded_sequence_bool_field - */ -void ContentFilterTestType::bounded_sequence_bool_field( - std::vector&& _bounded_sequence_bool_field) -{ - m_bounded_sequence_bool_field = std::move(_bounded_sequence_bool_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_bool_field - * @return Constant reference to member bounded_sequence_bool_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_bool_field() const -{ - return m_bounded_sequence_bool_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_bool_field - * @return Reference to member bounded_sequence_bool_field - */ -std::vector& ContentFilterTestType::bounded_sequence_bool_field() -{ - return m_bounded_sequence_bool_field; -} - - -/*! - * @brief This function copies the value in member bounded_sequence_string_field - * @param _bounded_sequence_string_field New value to be copied in member bounded_sequence_string_field - */ -void ContentFilterTestType::bounded_sequence_string_field( - const std::vector& _bounded_sequence_string_field) -{ - m_bounded_sequence_string_field = _bounded_sequence_string_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_string_field - * @param _bounded_sequence_string_field New value to be moved in member bounded_sequence_string_field - */ -void ContentFilterTestType::bounded_sequence_string_field( - std::vector&& _bounded_sequence_string_field) -{ - m_bounded_sequence_string_field = std::move(_bounded_sequence_string_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_string_field - * @return Constant reference to member bounded_sequence_string_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_string_field() const -{ - return m_bounded_sequence_string_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_string_field - * @return Reference to member bounded_sequence_string_field - */ -std::vector& ContentFilterTestType::bounded_sequence_string_field() -{ - return m_bounded_sequence_string_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 - */ -void ContentFilterTestType::bounded_sequence_enum_field( - const std::vector& _bounded_sequence_enum_field) -{ - m_bounded_sequence_enum_field = _bounded_sequence_enum_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_enum_field - * @param _bounded_sequence_enum_field New value to be moved in member bounded_sequence_enum_field - */ -void ContentFilterTestType::bounded_sequence_enum_field( - std::vector&& _bounded_sequence_enum_field) -{ - m_bounded_sequence_enum_field = std::move(_bounded_sequence_enum_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_enum_field - * @return Constant reference to member bounded_sequence_enum_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_enum_field() const -{ - return m_bounded_sequence_enum_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_enum_field - * @return Reference to member bounded_sequence_enum_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_enum2_field( - const std::vector& _bounded_sequence_enum2_field) -{ - m_bounded_sequence_enum2_field = _bounded_sequence_enum2_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_enum2_field - * @param _bounded_sequence_enum2_field New value to be moved in member bounded_sequence_enum2_field - */ -void ContentFilterTestType::bounded_sequence_enum2_field( - std::vector&& _bounded_sequence_enum2_field) -{ - m_bounded_sequence_enum2_field = std::move(_bounded_sequence_enum2_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_enum2_field - * @return Constant reference to member bounded_sequence_enum2_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_enum2_field() const -{ - return m_bounded_sequence_enum2_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_enum2_field - * @return Reference to member bounded_sequence_enum2_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::bounded_sequence_struct_field( - const std::vector& _bounded_sequence_struct_field) -{ - m_bounded_sequence_struct_field = _bounded_sequence_struct_field; -} - -/*! - * @brief This function moves the value in member bounded_sequence_struct_field - * @param _bounded_sequence_struct_field New value to be moved in member bounded_sequence_struct_field - */ -void ContentFilterTestType::bounded_sequence_struct_field( - std::vector&& _bounded_sequence_struct_field) -{ - m_bounded_sequence_struct_field = std::move(_bounded_sequence_struct_field); -} - -/*! - * @brief This function returns a constant reference to member bounded_sequence_struct_field - * @return Constant reference to member bounded_sequence_struct_field - */ -const std::vector& ContentFilterTestType::bounded_sequence_struct_field() const -{ - return m_bounded_sequence_struct_field; -} - -/*! - * @brief This function returns a reference to member bounded_sequence_struct_field - * @return Reference to member bounded_sequence_struct_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_char_field( - const std::vector& _unbounded_sequence_char_field) -{ - m_unbounded_sequence_char_field = _unbounded_sequence_char_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_char_field - * @param _unbounded_sequence_char_field New value to be moved in member unbounded_sequence_char_field - */ -void ContentFilterTestType::unbounded_sequence_char_field( - std::vector&& _unbounded_sequence_char_field) -{ - m_unbounded_sequence_char_field = std::move(_unbounded_sequence_char_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_char_field - * @return Constant reference to member unbounded_sequence_char_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_char_field() const -{ - return m_unbounded_sequence_char_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_char_field - * @return Reference to member unbounded_sequence_char_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_uint8_field( - const std::vector& _unbounded_sequence_uint8_field) -{ - m_unbounded_sequence_uint8_field = _unbounded_sequence_uint8_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_uint8_field - * @param _unbounded_sequence_uint8_field New value to be moved in member unbounded_sequence_uint8_field - */ -void ContentFilterTestType::unbounded_sequence_uint8_field( - std::vector&& _unbounded_sequence_uint8_field) -{ - m_unbounded_sequence_uint8_field = std::move(_unbounded_sequence_uint8_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_uint8_field - * @return Constant reference to member unbounded_sequence_uint8_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_uint8_field() const -{ - return m_unbounded_sequence_uint8_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_uint8_field - * @return Reference to member unbounded_sequence_uint8_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_int16_field( - const std::vector& _unbounded_sequence_int16_field) -{ - m_unbounded_sequence_int16_field = _unbounded_sequence_int16_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_int16_field - * @param _unbounded_sequence_int16_field New value to be moved in member unbounded_sequence_int16_field - */ -void ContentFilterTestType::unbounded_sequence_int16_field( - std::vector&& _unbounded_sequence_int16_field) -{ - m_unbounded_sequence_int16_field = std::move(_unbounded_sequence_int16_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_int16_field - * @return Constant reference to member unbounded_sequence_int16_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_int16_field() const -{ - return m_unbounded_sequence_int16_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_int16_field - * @return Reference to member unbounded_sequence_int16_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_uint16_field( - const std::vector& _unbounded_sequence_uint16_field) -{ - m_unbounded_sequence_uint16_field = _unbounded_sequence_uint16_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_uint16_field - * @param _unbounded_sequence_uint16_field New value to be moved in member unbounded_sequence_uint16_field - */ -void ContentFilterTestType::unbounded_sequence_uint16_field( - std::vector&& _unbounded_sequence_uint16_field) -{ - m_unbounded_sequence_uint16_field = std::move(_unbounded_sequence_uint16_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_uint16_field - * @return Constant reference to member unbounded_sequence_uint16_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_uint16_field() const -{ - return m_unbounded_sequence_uint16_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_uint16_field - * @return Reference to member unbounded_sequence_uint16_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_int32_field( - const std::vector& _unbounded_sequence_int32_field) -{ - m_unbounded_sequence_int32_field = _unbounded_sequence_int32_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_int32_field - * @param _unbounded_sequence_int32_field New value to be moved in member unbounded_sequence_int32_field - */ -void ContentFilterTestType::unbounded_sequence_int32_field( - std::vector&& _unbounded_sequence_int32_field) -{ - m_unbounded_sequence_int32_field = std::move(_unbounded_sequence_int32_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_int32_field - * @return Constant reference to member unbounded_sequence_int32_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_int32_field() const -{ - return m_unbounded_sequence_int32_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_int32_field - * @return Reference to member unbounded_sequence_int32_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_uint32_field( - const std::vector& _unbounded_sequence_uint32_field) -{ - m_unbounded_sequence_uint32_field = _unbounded_sequence_uint32_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_uint32_field - * @param _unbounded_sequence_uint32_field New value to be moved in member unbounded_sequence_uint32_field - */ -void ContentFilterTestType::unbounded_sequence_uint32_field( - std::vector&& _unbounded_sequence_uint32_field) -{ - m_unbounded_sequence_uint32_field = std::move(_unbounded_sequence_uint32_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_uint32_field - * @return Constant reference to member unbounded_sequence_uint32_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_uint32_field() const -{ - return m_unbounded_sequence_uint32_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_uint32_field - * @return Reference to member unbounded_sequence_uint32_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_int64_field( - const std::vector& _unbounded_sequence_int64_field) -{ - m_unbounded_sequence_int64_field = _unbounded_sequence_int64_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_int64_field - * @param _unbounded_sequence_int64_field New value to be moved in member unbounded_sequence_int64_field - */ -void ContentFilterTestType::unbounded_sequence_int64_field( - std::vector&& _unbounded_sequence_int64_field) -{ - m_unbounded_sequence_int64_field = std::move(_unbounded_sequence_int64_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_int64_field - * @return Constant reference to member unbounded_sequence_int64_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_int64_field() const -{ - return m_unbounded_sequence_int64_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_int64_field - * @return Reference to member unbounded_sequence_int64_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_uint64_field( - const std::vector& _unbounded_sequence_uint64_field) -{ - m_unbounded_sequence_uint64_field = _unbounded_sequence_uint64_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_uint64_field - * @param _unbounded_sequence_uint64_field New value to be moved in member unbounded_sequence_uint64_field - */ -void ContentFilterTestType::unbounded_sequence_uint64_field( - std::vector&& _unbounded_sequence_uint64_field) -{ - m_unbounded_sequence_uint64_field = std::move(_unbounded_sequence_uint64_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_uint64_field - * @return Constant reference to member unbounded_sequence_uint64_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_uint64_field() const -{ - return m_unbounded_sequence_uint64_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_uint64_field - * @return Reference to member unbounded_sequence_uint64_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_float_field( - const std::vector& _unbounded_sequence_float_field) -{ - m_unbounded_sequence_float_field = _unbounded_sequence_float_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_float_field - * @param _unbounded_sequence_float_field New value to be moved in member unbounded_sequence_float_field - */ -void ContentFilterTestType::unbounded_sequence_float_field( - std::vector&& _unbounded_sequence_float_field) -{ - m_unbounded_sequence_float_field = std::move(_unbounded_sequence_float_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_float_field - * @return Constant reference to member unbounded_sequence_float_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_float_field() const -{ - return m_unbounded_sequence_float_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_float_field - * @return Reference to member unbounded_sequence_float_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_double_field( - const std::vector& _unbounded_sequence_double_field) -{ - m_unbounded_sequence_double_field = _unbounded_sequence_double_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_double_field - * @param _unbounded_sequence_double_field New value to be moved in member unbounded_sequence_double_field - */ -void ContentFilterTestType::unbounded_sequence_double_field( - std::vector&& _unbounded_sequence_double_field) -{ - m_unbounded_sequence_double_field = std::move(_unbounded_sequence_double_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_double_field - * @return Constant reference to member unbounded_sequence_double_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_double_field() const -{ - return m_unbounded_sequence_double_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_double_field - * @return Reference to member unbounded_sequence_double_field - */ -std::vector& ContentFilterTestType::unbounded_sequence_double_field() -{ - return m_unbounded_sequence_double_field; -} - - -/*! - * @brief This function copies the value in member unbounded_sequence_long_double_field - * @param _unbounded_sequence_long_double_field New value to be copied in member unbounded_sequence_long_double_field - */ -void ContentFilterTestType::unbounded_sequence_long_double_field( - const std::vector& _unbounded_sequence_long_double_field) -{ - m_unbounded_sequence_long_double_field = _unbounded_sequence_long_double_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_long_double_field - * @param _unbounded_sequence_long_double_field New value to be moved in member unbounded_sequence_long_double_field - */ -void ContentFilterTestType::unbounded_sequence_long_double_field( - std::vector&& _unbounded_sequence_long_double_field) -{ - m_unbounded_sequence_long_double_field = std::move(_unbounded_sequence_long_double_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_long_double_field - * @return Constant reference to member unbounded_sequence_long_double_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_long_double_field() const -{ - return m_unbounded_sequence_long_double_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_long_double_field - * @return Reference to member unbounded_sequence_long_double_field - */ -std::vector& ContentFilterTestType::unbounded_sequence_long_double_field() -{ - return m_unbounded_sequence_long_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 - */ -void ContentFilterTestType::unbounded_sequence_bool_field( - const std::vector& _unbounded_sequence_bool_field) -{ - m_unbounded_sequence_bool_field = _unbounded_sequence_bool_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_bool_field - * @param _unbounded_sequence_bool_field New value to be moved in member unbounded_sequence_bool_field - */ -void ContentFilterTestType::unbounded_sequence_bool_field( - std::vector&& _unbounded_sequence_bool_field) -{ - m_unbounded_sequence_bool_field = std::move(_unbounded_sequence_bool_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_bool_field - * @return Constant reference to member unbounded_sequence_bool_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_bool_field() const -{ - return m_unbounded_sequence_bool_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_bool_field - * @return Reference to member unbounded_sequence_bool_field - */ -std::vector& ContentFilterTestType::unbounded_sequence_bool_field() -{ - return m_unbounded_sequence_bool_field; -} - - -/*! - * @brief This function copies the value in member unbounded_sequence_string_field - * @param _unbounded_sequence_string_field New value to be copied in member unbounded_sequence_string_field - */ -void ContentFilterTestType::unbounded_sequence_string_field( - const std::vector& _unbounded_sequence_string_field) -{ - m_unbounded_sequence_string_field = _unbounded_sequence_string_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_string_field - * @param _unbounded_sequence_string_field New value to be moved in member unbounded_sequence_string_field - */ -void ContentFilterTestType::unbounded_sequence_string_field( - std::vector&& _unbounded_sequence_string_field) -{ - m_unbounded_sequence_string_field = std::move(_unbounded_sequence_string_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_string_field - * @return Constant reference to member unbounded_sequence_string_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_string_field() const -{ - return m_unbounded_sequence_string_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_string_field - * @return Reference to member unbounded_sequence_string_field - */ -std::vector& ContentFilterTestType::unbounded_sequence_string_field() -{ - return m_unbounded_sequence_string_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 - */ -void ContentFilterTestType::unbounded_sequence_enum_field( - const std::vector& _unbounded_sequence_enum_field) -{ - m_unbounded_sequence_enum_field = _unbounded_sequence_enum_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_enum_field - * @param _unbounded_sequence_enum_field New value to be moved in member unbounded_sequence_enum_field - */ -void ContentFilterTestType::unbounded_sequence_enum_field( - std::vector&& _unbounded_sequence_enum_field) -{ - m_unbounded_sequence_enum_field = std::move(_unbounded_sequence_enum_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_enum_field - * @return Constant reference to member unbounded_sequence_enum_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_enum_field() const -{ - return m_unbounded_sequence_enum_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_enum_field - * @return Reference to member unbounded_sequence_enum_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_enum2_field( - const std::vector& _unbounded_sequence_enum2_field) -{ - m_unbounded_sequence_enum2_field = _unbounded_sequence_enum2_field; -} - -/*! - * @brief This function moves the value in member unbounded_sequence_enum2_field - * @param _unbounded_sequence_enum2_field New value to be moved in member unbounded_sequence_enum2_field - */ -void ContentFilterTestType::unbounded_sequence_enum2_field( - std::vector&& _unbounded_sequence_enum2_field) -{ - m_unbounded_sequence_enum2_field = std::move(_unbounded_sequence_enum2_field); -} - -/*! - * @brief This function returns a constant reference to member unbounded_sequence_enum2_field - * @return Constant reference to member unbounded_sequence_enum2_field - */ -const std::vector& ContentFilterTestType::unbounded_sequence_enum2_field() const -{ - return m_unbounded_sequence_enum2_field; -} - -/*! - * @brief This function returns a reference to member unbounded_sequence_enum2_field - * @return Reference to member unbounded_sequence_enum2_field - */ -std::vector& ContentFilterTestType::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 - */ -void ContentFilterTestType::unbounded_sequence_struct_field( - const std::vector& _unbounded_sequence_struct_field) -{ - m_unbounded_sequence_struct_field = _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 ContentFilterTestType::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& ContentFilterTestType::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& ContentFilterTestType::unbounded_sequence_struct_field() -{ - return m_unbounded_sequence_struct_field; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypev1.h b/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypev1.h deleted file mode 100644 index d4aafaa5ca3..00000000000 --- a/test/unittest/dds/topic/DDSSQLFilter/data_types/ContentFilterTestTypev1.h +++ /dev/null @@ -1,2358 +0,0 @@ -// 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 ContentFilterTestType.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_CONTENTFILTERTESTTYPE_H_ -#define _FAST_DDS_GENERATED_CONTENTFILTERTESTTYPE_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(CONTENTFILTERTESTTYPE_SOURCE) -#define CONTENTFILTERTESTTYPE_DllAPI __declspec( dllexport ) -#else -#define CONTENTFILTERTESTTYPE_DllAPI __declspec( dllimport ) -#endif // CONTENTFILTERTESTTYPE_SOURCE -#else -#define CONTENTFILTERTESTTYPE_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define CONTENTFILTERTESTTYPE_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - -/*! - * @brief This class represents the enumeration Color defined by the user in the IDL file. - * @ingroup ContentFilterTestType - */ -enum Color : uint32_t -{ - RED, - GREEN, - BLUE, - YELLOW, - MAGENTA -}; -/*! - * @brief This class represents the enumeration Material defined by the user in the IDL file. - * @ingroup ContentFilterTestType - */ -enum Material : uint32_t -{ - WOOD, - PLASTIC, - METAL, - CONCRETE, - STONE -}; - - -/*! - * @brief This class represents the structure StructType defined by the user in the IDL file. - * @ingroup ContentFilterTestType - */ -class StructType -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport StructType(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~StructType(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object StructType that will be copied. - */ - eProsima_user_DllExport StructType( - const StructType& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object StructType that will be copied. - */ - eProsima_user_DllExport StructType( - StructType&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object StructType that will be copied. - */ - eProsima_user_DllExport StructType& operator =( - const StructType& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object StructType that will be copied. - */ - eProsima_user_DllExport StructType& operator =( - StructType&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x StructType object to compare. - */ - eProsima_user_DllExport bool operator ==( - const StructType& x) const; - - /*! - * @brief Comparison operator. - * @param x StructType object to compare. - */ - eProsima_user_DllExport bool operator !=( - const StructType& x) const; - - /*! - * @brief This function sets a value in member char_field - * @param _char_field New value for member char_field - */ - eProsima_user_DllExport void char_field( - char _char_field); - - /*! - * @brief This function returns the value of member char_field - * @return Value of member char_field - */ - eProsima_user_DllExport char char_field() const; - - /*! - * @brief This function returns a reference to member char_field - * @return Reference to member char_field - */ - 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 - */ - eProsima_user_DllExport void uint8_field( - uint8_t _uint8_field); - - /*! - * @brief This function returns the value of member uint8_field - * @return Value of member uint8_field - */ - eProsima_user_DllExport uint8_t uint8_field() const; - - /*! - * @brief This function returns a reference to member uint8_field - * @return Reference to member uint8_field - */ - 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 - */ - eProsima_user_DllExport void int16_field( - int16_t _int16_field); - - /*! - * @brief This function returns the value of member int16_field - * @return Value of member int16_field - */ - eProsima_user_DllExport int16_t int16_field() const; - - /*! - * @brief This function returns a reference to member int16_field - * @return Reference to member int16_field - */ - 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 - */ - eProsima_user_DllExport void uint16_field( - uint16_t _uint16_field); - - /*! - * @brief This function returns the value of member uint16_field - * @return Value of member uint16_field - */ - eProsima_user_DllExport uint16_t uint16_field() const; - - /*! - * @brief This function returns a reference to member uint16_field - * @return Reference to member uint16_field - */ - 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 - */ - eProsima_user_DllExport void int32_field( - int32_t _int32_field); - - /*! - * @brief This function returns the value of member int32_field - * @return Value of member int32_field - */ - eProsima_user_DllExport int32_t int32_field() const; - - /*! - * @brief This function returns a reference to member int32_field - * @return Reference to member int32_field - */ - 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 - */ - eProsima_user_DllExport void uint32_field( - uint32_t _uint32_field); - - /*! - * @brief This function returns the value of member uint32_field - * @return Value of member uint32_field - */ - eProsima_user_DllExport uint32_t uint32_field() const; - - /*! - * @brief This function returns a reference to member uint32_field - * @return Reference to member uint32_field - */ - 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 - */ - eProsima_user_DllExport void int64_field( - int64_t _int64_field); - - /*! - * @brief This function returns the value of member int64_field - * @return Value of member int64_field - */ - eProsima_user_DllExport int64_t int64_field() const; - - /*! - * @brief This function returns a reference to member int64_field - * @return Reference to member int64_field - */ - 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 - */ - eProsima_user_DllExport void uint64_field( - uint64_t _uint64_field); - - /*! - * @brief This function returns the value of member uint64_field - * @return Value of member uint64_field - */ - eProsima_user_DllExport uint64_t uint64_field() const; - - /*! - * @brief This function returns a reference to member uint64_field - * @return Reference to member uint64_field - */ - 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 - */ - eProsima_user_DllExport void float_field( - float _float_field); - - /*! - * @brief This function returns the value of member float_field - * @return Value of member float_field - */ - eProsima_user_DllExport float float_field() const; - - /*! - * @brief This function returns a reference to member float_field - * @return Reference to member float_field - */ - 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 - */ - eProsima_user_DllExport void double_field( - double _double_field); - - /*! - * @brief This function returns the value of member double_field - * @return Value of member double_field - */ - eProsima_user_DllExport double double_field() const; - - /*! - * @brief This function returns a reference to member double_field - * @return Reference to member double_field - */ - eProsima_user_DllExport double& double_field(); - - - /*! - * @brief This function sets a value in member long_double_field - * @param _long_double_field New value for member long_double_field - */ - eProsima_user_DllExport void long_double_field( - long double _long_double_field); - - /*! - * @brief This function returns the value of member long_double_field - * @return Value of member long_double_field - */ - eProsima_user_DllExport long double long_double_field() const; - - /*! - * @brief This function returns a reference to member long_double_field - * @return Reference to member long_double_field - */ - eProsima_user_DllExport long double& long_double_field(); - - - /*! - * @brief This function sets a value in member bool_field - * @param _bool_field New value for member bool_field - */ - eProsima_user_DllExport void bool_field( - bool _bool_field); - - /*! - * @brief This function returns the value of member bool_field - * @return Value of member bool_field - */ - eProsima_user_DllExport bool bool_field() const; - - /*! - * @brief This function returns a reference to member bool_field - * @return Reference to member bool_field - */ - 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 - */ - eProsima_user_DllExport void string_field( - const std::string& _string_field); - - /*! - * @brief This function moves the value in member string_field - * @param _string_field New value to be moved in member string_field - */ - eProsima_user_DllExport void string_field( - std::string&& _string_field); - - /*! - * @brief This function returns a constant reference to member string_field - * @return Constant reference to member string_field - */ - eProsima_user_DllExport const std::string& string_field() const; - - /*! - * @brief This function returns a reference to member string_field - * @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 - */ - eProsima_user_DllExport void enum_field( - Color _enum_field); - - /*! - * @brief This function returns the value of member enum_field - * @return Value of member enum_field - */ - eProsima_user_DllExport Color enum_field() const; - - /*! - * @brief This function returns a reference to member enum_field - * @return Reference to member enum_field - */ - 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 - */ - eProsima_user_DllExport void enum2_field( - Material _enum2_field); - - /*! - * @brief This function returns the value of member enum2_field - * @return Value of member enum2_field - */ - eProsima_user_DllExport Material enum2_field() const; - - /*! - * @brief This function returns a reference to member enum2_field - * @return Reference to member enum2_field - */ - eProsima_user_DllExport 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 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 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; - long double m_long_double_field; - bool m_bool_field; - std::string m_string_field; - Color m_enum_field; - Material m_enum2_field; - -}; - -const uint32_t max_array_size = 3; - -const uint32_t max_seq_size = 5; - - - - - -/*! - * @brief This class represents the structure ContentFilterTestType defined by the user in the IDL file. - * @ingroup ContentFilterTestType - */ -class ContentFilterTestType -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ContentFilterTestType(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ContentFilterTestType(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ContentFilterTestType that will be copied. - */ - eProsima_user_DllExport ContentFilterTestType( - const ContentFilterTestType& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ContentFilterTestType that will be copied. - */ - eProsima_user_DllExport ContentFilterTestType( - ContentFilterTestType&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ContentFilterTestType that will be copied. - */ - eProsima_user_DllExport ContentFilterTestType& operator =( - const ContentFilterTestType& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ContentFilterTestType that will be copied. - */ - eProsima_user_DllExport ContentFilterTestType& operator =( - ContentFilterTestType&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ContentFilterTestType object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ContentFilterTestType& x) const; - - /*! - * @brief Comparison operator. - * @param x ContentFilterTestType object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ContentFilterTestType& x) const; - - /*! - * @brief This function sets a value in member char_field - * @param _char_field New value for member char_field - */ - eProsima_user_DllExport void char_field( - char _char_field); - - /*! - * @brief This function returns the value of member char_field - * @return Value of member char_field - */ - eProsima_user_DllExport char char_field() const; - - /*! - * @brief This function returns a reference to member char_field - * @return Reference to member char_field - */ - 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 - */ - eProsima_user_DllExport void uint8_field( - uint8_t _uint8_field); - - /*! - * @brief This function returns the value of member uint8_field - * @return Value of member uint8_field - */ - eProsima_user_DllExport uint8_t uint8_field() const; - - /*! - * @brief This function returns a reference to member uint8_field - * @return Reference to member uint8_field - */ - 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 - */ - eProsima_user_DllExport void int16_field( - int16_t _int16_field); - - /*! - * @brief This function returns the value of member int16_field - * @return Value of member int16_field - */ - eProsima_user_DllExport int16_t int16_field() const; - - /*! - * @brief This function returns a reference to member int16_field - * @return Reference to member int16_field - */ - 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 - */ - eProsima_user_DllExport void uint16_field( - uint16_t _uint16_field); - - /*! - * @brief This function returns the value of member uint16_field - * @return Value of member uint16_field - */ - eProsima_user_DllExport uint16_t uint16_field() const; - - /*! - * @brief This function returns a reference to member uint16_field - * @return Reference to member uint16_field - */ - 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 - */ - eProsima_user_DllExport void int32_field( - int32_t _int32_field); - - /*! - * @brief This function returns the value of member int32_field - * @return Value of member int32_field - */ - eProsima_user_DllExport int32_t int32_field() const; - - /*! - * @brief This function returns a reference to member int32_field - * @return Reference to member int32_field - */ - 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 - */ - eProsima_user_DllExport void uint32_field( - uint32_t _uint32_field); - - /*! - * @brief This function returns the value of member uint32_field - * @return Value of member uint32_field - */ - eProsima_user_DllExport uint32_t uint32_field() const; - - /*! - * @brief This function returns a reference to member uint32_field - * @return Reference to member uint32_field - */ - 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 - */ - eProsima_user_DllExport void int64_field( - int64_t _int64_field); - - /*! - * @brief This function returns the value of member int64_field - * @return Value of member int64_field - */ - eProsima_user_DllExport int64_t int64_field() const; - - /*! - * @brief This function returns a reference to member int64_field - * @return Reference to member int64_field - */ - 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 - */ - eProsima_user_DllExport void uint64_field( - uint64_t _uint64_field); - - /*! - * @brief This function returns the value of member uint64_field - * @return Value of member uint64_field - */ - eProsima_user_DllExport uint64_t uint64_field() const; - - /*! - * @brief This function returns a reference to member uint64_field - * @return Reference to member uint64_field - */ - 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 - */ - eProsima_user_DllExport void float_field( - float _float_field); - - /*! - * @brief This function returns the value of member float_field - * @return Value of member float_field - */ - eProsima_user_DllExport float float_field() const; - - /*! - * @brief This function returns a reference to member float_field - * @return Reference to member float_field - */ - 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 - */ - eProsima_user_DllExport void double_field( - double _double_field); - - /*! - * @brief This function returns the value of member double_field - * @return Value of member double_field - */ - eProsima_user_DllExport double double_field() const; - - /*! - * @brief This function returns a reference to member double_field - * @return Reference to member double_field - */ - eProsima_user_DllExport double& double_field(); - - - /*! - * @brief This function sets a value in member long_double_field - * @param _long_double_field New value for member long_double_field - */ - eProsima_user_DllExport void long_double_field( - long double _long_double_field); - - /*! - * @brief This function returns the value of member long_double_field - * @return Value of member long_double_field - */ - eProsima_user_DllExport long double long_double_field() const; - - /*! - * @brief This function returns a reference to member long_double_field - * @return Reference to member long_double_field - */ - eProsima_user_DllExport long double& long_double_field(); - - - /*! - * @brief This function sets a value in member bool_field - * @param _bool_field New value for member bool_field - */ - eProsima_user_DllExport void bool_field( - bool _bool_field); - - /*! - * @brief This function returns the value of member bool_field - * @return Value of member bool_field - */ - eProsima_user_DllExport bool bool_field() const; - - /*! - * @brief This function returns a reference to member bool_field - * @return Reference to member bool_field - */ - 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 - */ - eProsima_user_DllExport void string_field( - const std::string& _string_field); - - /*! - * @brief This function moves the value in member string_field - * @param _string_field New value to be moved in member string_field - */ - eProsima_user_DllExport void string_field( - std::string&& _string_field); - - /*! - * @brief This function returns a constant reference to member string_field - * @return Constant reference to member string_field - */ - eProsima_user_DllExport const std::string& string_field() const; - - /*! - * @brief This function returns a reference to member string_field - * @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 - */ - eProsima_user_DllExport void enum_field( - Color _enum_field); - - /*! - * @brief This function returns the value of member enum_field - * @return Value of member enum_field - */ - eProsima_user_DllExport Color enum_field() const; - - /*! - * @brief This function returns a reference to member enum_field - * @return Reference to member enum_field - */ - 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 - */ - eProsima_user_DllExport void enum2_field( - Material _enum2_field); - - /*! - * @brief This function returns the value of member enum2_field - * @return Value of member enum2_field - */ - eProsima_user_DllExport Material enum2_field() const; - - /*! - * @brief This function returns a reference to member enum2_field - * @return Reference to member enum2_field - */ - 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 - */ - eProsima_user_DllExport void struct_field( - const StructType& _struct_field); - - /*! - * @brief This function moves the value in member struct_field - * @param _struct_field New value to be moved in member struct_field - */ - eProsima_user_DllExport void struct_field( - StructType&& _struct_field); - - /*! - * @brief This function returns a constant reference to member struct_field - * @return Constant reference to member struct_field - */ - eProsima_user_DllExport const StructType& struct_field() const; - - /*! - * @brief This function returns a reference to member struct_field - * @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 - */ - eProsima_user_DllExport void array_char_field( - const std::array& _array_char_field); - - /*! - * @brief This function moves the value in member array_char_field - * @param _array_char_field New value to be moved in member array_char_field - */ - eProsima_user_DllExport void array_char_field( - std::array&& _array_char_field); - - /*! - * @brief This function returns a constant reference to member array_char_field - * @return Constant reference to member array_char_field - */ - eProsima_user_DllExport const std::array& array_char_field() const; - - /*! - * @brief This function returns a reference to member array_char_field - * @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 - */ - eProsima_user_DllExport void array_uint8_field( - const std::array& _array_uint8_field); - - /*! - * @brief This function moves the value in member array_uint8_field - * @param _array_uint8_field New value to be moved in member array_uint8_field - */ - eProsima_user_DllExport void array_uint8_field( - std::array&& _array_uint8_field); - - /*! - * @brief This function returns a constant reference to member array_uint8_field - * @return Constant reference to member array_uint8_field - */ - eProsima_user_DllExport const std::array& array_uint8_field() const; - - /*! - * @brief This function returns a reference to member array_uint8_field - * @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 - */ - eProsima_user_DllExport void array_int16_field( - const std::array& _array_int16_field); - - /*! - * @brief This function moves the value in member array_int16_field - * @param _array_int16_field New value to be moved in member array_int16_field - */ - eProsima_user_DllExport void array_int16_field( - std::array&& _array_int16_field); - - /*! - * @brief This function returns a constant reference to member array_int16_field - * @return Constant reference to member array_int16_field - */ - eProsima_user_DllExport const std::array& array_int16_field() const; - - /*! - * @brief This function returns a reference to member array_int16_field - * @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 - */ - eProsima_user_DllExport void array_uint16_field( - const std::array& _array_uint16_field); - - /*! - * @brief This function moves the value in member array_uint16_field - * @param _array_uint16_field New value to be moved in member array_uint16_field - */ - eProsima_user_DllExport void array_uint16_field( - std::array&& _array_uint16_field); - - /*! - * @brief This function returns a constant reference to member array_uint16_field - * @return Constant reference to member array_uint16_field - */ - eProsima_user_DllExport const std::array& array_uint16_field() const; - - /*! - * @brief This function returns a reference to member array_uint16_field - * @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 - */ - eProsima_user_DllExport void array_int32_field( - const std::array& _array_int32_field); - - /*! - * @brief This function moves the value in member array_int32_field - * @param _array_int32_field New value to be moved in member array_int32_field - */ - eProsima_user_DllExport void array_int32_field( - std::array&& _array_int32_field); - - /*! - * @brief This function returns a constant reference to member array_int32_field - * @return Constant reference to member array_int32_field - */ - eProsima_user_DllExport const std::array& array_int32_field() const; - - /*! - * @brief This function returns a reference to member array_int32_field - * @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 - */ - eProsima_user_DllExport void array_uint32_field( - const std::array& _array_uint32_field); - - /*! - * @brief This function moves the value in member array_uint32_field - * @param _array_uint32_field New value to be moved in member array_uint32_field - */ - eProsima_user_DllExport void array_uint32_field( - std::array&& _array_uint32_field); - - /*! - * @brief This function returns a constant reference to member array_uint32_field - * @return Constant reference to member array_uint32_field - */ - eProsima_user_DllExport const std::array& array_uint32_field() const; - - /*! - * @brief This function returns a reference to member array_uint32_field - * @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 - */ - eProsima_user_DllExport void array_int64_field( - const std::array& _array_int64_field); - - /*! - * @brief This function moves the value in member array_int64_field - * @param _array_int64_field New value to be moved in member array_int64_field - */ - eProsima_user_DllExport void array_int64_field( - std::array&& _array_int64_field); - - /*! - * @brief This function returns a constant reference to member array_int64_field - * @return Constant reference to member array_int64_field - */ - eProsima_user_DllExport const std::array& array_int64_field() const; - - /*! - * @brief This function returns a reference to member array_int64_field - * @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 - */ - eProsima_user_DllExport void array_uint64_field( - const std::array& _array_uint64_field); - - /*! - * @brief This function moves the value in member array_uint64_field - * @param _array_uint64_field New value to be moved in member array_uint64_field - */ - eProsima_user_DllExport void array_uint64_field( - std::array&& _array_uint64_field); - - /*! - * @brief This function returns a constant reference to member array_uint64_field - * @return Constant reference to member array_uint64_field - */ - eProsima_user_DllExport const std::array& array_uint64_field() const; - - /*! - * @brief This function returns a reference to member array_uint64_field - * @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 - */ - eProsima_user_DllExport void array_float_field( - const std::array& _array_float_field); - - /*! - * @brief This function moves the value in member array_float_field - * @param _array_float_field New value to be moved in member array_float_field - */ - eProsima_user_DllExport void array_float_field( - std::array&& _array_float_field); - - /*! - * @brief This function returns a constant reference to member array_float_field - * @return Constant reference to member array_float_field - */ - eProsima_user_DllExport const std::array& array_float_field() const; - - /*! - * @brief This function returns a reference to member array_float_field - * @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 - */ - eProsima_user_DllExport void array_double_field( - const std::array& _array_double_field); - - /*! - * @brief This function moves the value in member array_double_field - * @param _array_double_field New value to be moved in member array_double_field - */ - eProsima_user_DllExport void array_double_field( - std::array&& _array_double_field); - - /*! - * @brief This function returns a constant reference to member array_double_field - * @return Constant reference to member array_double_field - */ - eProsima_user_DllExport const std::array& array_double_field() const; - - /*! - * @brief This function returns a reference to member array_double_field - * @return Reference to member array_double_field - */ - eProsima_user_DllExport std::array& array_double_field(); - - - /*! - * @brief This function copies the value in member array_long_double_field - * @param _array_long_double_field New value to be copied in member array_long_double_field - */ - eProsima_user_DllExport void array_long_double_field( - const std::array& _array_long_double_field); - - /*! - * @brief This function moves the value in member array_long_double_field - * @param _array_long_double_field New value to be moved in member array_long_double_field - */ - eProsima_user_DllExport void array_long_double_field( - std::array&& _array_long_double_field); - - /*! - * @brief This function returns a constant reference to member array_long_double_field - * @return Constant reference to member array_long_double_field - */ - eProsima_user_DllExport const std::array& array_long_double_field() const; - - /*! - * @brief This function returns a reference to member array_long_double_field - * @return Reference to member array_long_double_field - */ - eProsima_user_DllExport std::array& array_long_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 - */ - eProsima_user_DllExport void array_bool_field( - const std::array& _array_bool_field); - - /*! - * @brief This function moves the value in member array_bool_field - * @param _array_bool_field New value to be moved in member array_bool_field - */ - eProsima_user_DllExport void array_bool_field( - std::array&& _array_bool_field); - - /*! - * @brief This function returns a constant reference to member array_bool_field - * @return Constant reference to member array_bool_field - */ - eProsima_user_DllExport const std::array& array_bool_field() const; - - /*! - * @brief This function returns a reference to member array_bool_field - * @return Reference to member array_bool_field - */ - eProsima_user_DllExport std::array& array_bool_field(); - - - /*! - * @brief This function copies the value in member array_string_field - * @param _array_string_field New value to be copied in member array_string_field - */ - eProsima_user_DllExport void array_string_field( - const std::array& _array_string_field); - - /*! - * @brief This function moves the value in member array_string_field - * @param _array_string_field New value to be moved in member array_string_field - */ - eProsima_user_DllExport void array_string_field( - std::array&& _array_string_field); - - /*! - * @brief This function returns a constant reference to member array_string_field - * @return Constant reference to member array_string_field - */ - eProsima_user_DllExport const std::array& array_string_field() const; - - /*! - * @brief This function returns a reference to member array_string_field - * @return Reference to member array_string_field - */ - eProsima_user_DllExport std::array& array_string_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 - */ - eProsima_user_DllExport void array_enum_field( - const std::array& _array_enum_field); - - /*! - * @brief This function moves the value in member array_enum_field - * @param _array_enum_field New value to be moved in member array_enum_field - */ - eProsima_user_DllExport void array_enum_field( - std::array&& _array_enum_field); - - /*! - * @brief This function returns a constant reference to member array_enum_field - * @return Constant reference to member array_enum_field - */ - eProsima_user_DllExport const std::array& array_enum_field() const; - - /*! - * @brief This function returns a reference to member array_enum_field - * @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 - */ - eProsima_user_DllExport void array_enum2_field( - const std::array& _array_enum2_field); - - /*! - * @brief This function moves the value in member array_enum2_field - * @param _array_enum2_field New value to be moved in member array_enum2_field - */ - eProsima_user_DllExport void array_enum2_field( - std::array&& _array_enum2_field); - - /*! - * @brief This function returns a constant reference to member array_enum2_field - * @return Constant reference to member array_enum2_field - */ - eProsima_user_DllExport const std::array& array_enum2_field() const; - - /*! - * @brief This function returns a reference to member array_enum2_field - * @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 - */ - eProsima_user_DllExport void array_struct_field( - const std::array& _array_struct_field); - - /*! - * @brief This function moves the value in member array_struct_field - * @param _array_struct_field New value to be moved in member array_struct_field - */ - eProsima_user_DllExport void array_struct_field( - std::array&& _array_struct_field); - - /*! - * @brief This function returns a constant reference to member array_struct_field - * @return Constant reference to member array_struct_field - */ - eProsima_user_DllExport const std::array& array_struct_field() const; - - /*! - * @brief This function returns a reference to member array_struct_field - * @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 - */ - eProsima_user_DllExport void bounded_sequence_char_field( - const std::vector& _bounded_sequence_char_field); - - /*! - * @brief This function moves the value in member bounded_sequence_char_field - * @param _bounded_sequence_char_field New value to be moved in member bounded_sequence_char_field - */ - eProsima_user_DllExport void bounded_sequence_char_field( - std::vector&& _bounded_sequence_char_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_char_field - * @return Constant reference to member bounded_sequence_char_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_char_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_char_field - * @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 - */ - eProsima_user_DllExport void bounded_sequence_uint8_field( - const std::vector& _bounded_sequence_uint8_field); - - /*! - * @brief This function moves the value in member bounded_sequence_uint8_field - * @param _bounded_sequence_uint8_field New value to be moved in member bounded_sequence_uint8_field - */ - eProsima_user_DllExport void bounded_sequence_uint8_field( - std::vector&& _bounded_sequence_uint8_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_uint8_field - * @return Constant reference to member bounded_sequence_uint8_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_uint8_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_uint8_field - * @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 - */ - eProsima_user_DllExport void bounded_sequence_int16_field( - const std::vector& _bounded_sequence_int16_field); - - /*! - * @brief This function moves the value in member bounded_sequence_int16_field - * @param _bounded_sequence_int16_field New value to be moved in member bounded_sequence_int16_field - */ - eProsima_user_DllExport void bounded_sequence_int16_field( - std::vector&& _bounded_sequence_int16_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_int16_field - * @return Constant reference to member bounded_sequence_int16_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_int16_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_int16_field - * @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 - */ - eProsima_user_DllExport void bounded_sequence_uint16_field( - const std::vector& _bounded_sequence_uint16_field); - - /*! - * @brief This function moves the value in member bounded_sequence_uint16_field - * @param _bounded_sequence_uint16_field New value to be moved in member bounded_sequence_uint16_field - */ - eProsima_user_DllExport void bounded_sequence_uint16_field( - std::vector&& _bounded_sequence_uint16_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_uint16_field - * @return Constant reference to member bounded_sequence_uint16_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_uint16_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_uint16_field - * @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 - */ - eProsima_user_DllExport void bounded_sequence_int32_field( - const std::vector& _bounded_sequence_int32_field); - - /*! - * @brief This function moves the value in member bounded_sequence_int32_field - * @param _bounded_sequence_int32_field New value to be moved in member bounded_sequence_int32_field - */ - eProsima_user_DllExport void bounded_sequence_int32_field( - std::vector&& _bounded_sequence_int32_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_int32_field - * @return Constant reference to member bounded_sequence_int32_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_int32_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_int32_field - * @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 - */ - eProsima_user_DllExport void bounded_sequence_uint32_field( - const std::vector& _bounded_sequence_uint32_field); - - /*! - * @brief This function moves the value in member bounded_sequence_uint32_field - * @param _bounded_sequence_uint32_field New value to be moved in member bounded_sequence_uint32_field - */ - eProsima_user_DllExport void bounded_sequence_uint32_field( - std::vector&& _bounded_sequence_uint32_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_uint32_field - * @return Constant reference to member bounded_sequence_uint32_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_uint32_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_uint32_field - * @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 - */ - eProsima_user_DllExport void bounded_sequence_int64_field( - const std::vector& _bounded_sequence_int64_field); - - /*! - * @brief This function moves the value in member bounded_sequence_int64_field - * @param _bounded_sequence_int64_field New value to be moved in member bounded_sequence_int64_field - */ - eProsima_user_DllExport void bounded_sequence_int64_field( - std::vector&& _bounded_sequence_int64_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_int64_field - * @return Constant reference to member bounded_sequence_int64_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_int64_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_int64_field - * @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 - */ - eProsima_user_DllExport void bounded_sequence_uint64_field( - const std::vector& _bounded_sequence_uint64_field); - - /*! - * @brief This function moves the value in member bounded_sequence_uint64_field - * @param _bounded_sequence_uint64_field New value to be moved in member bounded_sequence_uint64_field - */ - eProsima_user_DllExport void bounded_sequence_uint64_field( - std::vector&& _bounded_sequence_uint64_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_uint64_field - * @return Constant reference to member bounded_sequence_uint64_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_uint64_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_uint64_field - * @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 - */ - eProsima_user_DllExport void bounded_sequence_float_field( - const std::vector& _bounded_sequence_float_field); - - /*! - * @brief This function moves the value in member bounded_sequence_float_field - * @param _bounded_sequence_float_field New value to be moved in member bounded_sequence_float_field - */ - eProsima_user_DllExport void bounded_sequence_float_field( - std::vector&& _bounded_sequence_float_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_float_field - * @return Constant reference to member bounded_sequence_float_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_float_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_float_field - * @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 - */ - eProsima_user_DllExport void bounded_sequence_double_field( - const std::vector& _bounded_sequence_double_field); - - /*! - * @brief This function moves the value in member bounded_sequence_double_field - * @param _bounded_sequence_double_field New value to be moved in member bounded_sequence_double_field - */ - eProsima_user_DllExport void bounded_sequence_double_field( - std::vector&& _bounded_sequence_double_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_double_field - * @return Constant reference to member bounded_sequence_double_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_double_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_double_field - * @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_long_double_field - * @param _bounded_sequence_long_double_field New value to be copied in member bounded_sequence_long_double_field - */ - eProsima_user_DllExport void bounded_sequence_long_double_field( - const std::vector& _bounded_sequence_long_double_field); - - /*! - * @brief This function moves the value in member bounded_sequence_long_double_field - * @param _bounded_sequence_long_double_field New value to be moved in member bounded_sequence_long_double_field - */ - eProsima_user_DllExport void bounded_sequence_long_double_field( - std::vector&& _bounded_sequence_long_double_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_long_double_field - * @return Constant reference to member bounded_sequence_long_double_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_long_double_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_long_double_field - * @return Reference to member bounded_sequence_long_double_field - */ - eProsima_user_DllExport std::vector& bounded_sequence_long_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 - */ - eProsima_user_DllExport void bounded_sequence_bool_field( - const std::vector& _bounded_sequence_bool_field); - - /*! - * @brief This function moves the value in member bounded_sequence_bool_field - * @param _bounded_sequence_bool_field New value to be moved in member bounded_sequence_bool_field - */ - eProsima_user_DllExport void bounded_sequence_bool_field( - std::vector&& _bounded_sequence_bool_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_bool_field - * @return Constant reference to member bounded_sequence_bool_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_bool_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_bool_field - * @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_string_field - * @param _bounded_sequence_string_field New value to be copied in member bounded_sequence_string_field - */ - eProsima_user_DllExport void bounded_sequence_string_field( - const std::vector& _bounded_sequence_string_field); - - /*! - * @brief This function moves the value in member bounded_sequence_string_field - * @param _bounded_sequence_string_field New value to be moved in member bounded_sequence_string_field - */ - eProsima_user_DllExport void bounded_sequence_string_field( - std::vector&& _bounded_sequence_string_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_string_field - * @return Constant reference to member bounded_sequence_string_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_string_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_string_field - * @return Reference to member bounded_sequence_string_field - */ - eProsima_user_DllExport std::vector& bounded_sequence_string_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 - */ - eProsima_user_DllExport void bounded_sequence_enum_field( - const std::vector& _bounded_sequence_enum_field); - - /*! - * @brief This function moves the value in member bounded_sequence_enum_field - * @param _bounded_sequence_enum_field New value to be moved in member bounded_sequence_enum_field - */ - eProsima_user_DllExport void bounded_sequence_enum_field( - std::vector&& _bounded_sequence_enum_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_enum_field - * @return Constant reference to member bounded_sequence_enum_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_enum_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_enum_field - * @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 - */ - eProsima_user_DllExport void bounded_sequence_enum2_field( - const std::vector& _bounded_sequence_enum2_field); - - /*! - * @brief This function moves the value in member bounded_sequence_enum2_field - * @param _bounded_sequence_enum2_field New value to be moved in member bounded_sequence_enum2_field - */ - eProsima_user_DllExport void bounded_sequence_enum2_field( - std::vector&& _bounded_sequence_enum2_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_enum2_field - * @return Constant reference to member bounded_sequence_enum2_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_enum2_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_enum2_field - * @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 - */ - eProsima_user_DllExport void bounded_sequence_struct_field( - const std::vector& _bounded_sequence_struct_field); - - /*! - * @brief This function moves the value in member bounded_sequence_struct_field - * @param _bounded_sequence_struct_field New value to be moved in member bounded_sequence_struct_field - */ - eProsima_user_DllExport void bounded_sequence_struct_field( - std::vector&& _bounded_sequence_struct_field); - - /*! - * @brief This function returns a constant reference to member bounded_sequence_struct_field - * @return Constant reference to member bounded_sequence_struct_field - */ - eProsima_user_DllExport const std::vector& bounded_sequence_struct_field() const; - - /*! - * @brief This function returns a reference to member bounded_sequence_struct_field - * @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 - */ - eProsima_user_DllExport void unbounded_sequence_char_field( - const std::vector& _unbounded_sequence_char_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_char_field - * @param _unbounded_sequence_char_field New value to be moved in member unbounded_sequence_char_field - */ - eProsima_user_DllExport void unbounded_sequence_char_field( - std::vector&& _unbounded_sequence_char_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_char_field - * @return Constant reference to member unbounded_sequence_char_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_char_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_char_field - * @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 - */ - eProsima_user_DllExport void unbounded_sequence_uint8_field( - const std::vector& _unbounded_sequence_uint8_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_uint8_field - * @param _unbounded_sequence_uint8_field New value to be moved in member unbounded_sequence_uint8_field - */ - eProsima_user_DllExport void unbounded_sequence_uint8_field( - std::vector&& _unbounded_sequence_uint8_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_uint8_field - * @return Constant reference to member unbounded_sequence_uint8_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_uint8_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_uint8_field - * @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 - */ - eProsima_user_DllExport void unbounded_sequence_int16_field( - const std::vector& _unbounded_sequence_int16_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_int16_field - * @param _unbounded_sequence_int16_field New value to be moved in member unbounded_sequence_int16_field - */ - eProsima_user_DllExport void unbounded_sequence_int16_field( - std::vector&& _unbounded_sequence_int16_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_int16_field - * @return Constant reference to member unbounded_sequence_int16_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_int16_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_int16_field - * @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 - */ - eProsima_user_DllExport void unbounded_sequence_uint16_field( - const std::vector& _unbounded_sequence_uint16_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_uint16_field - * @param _unbounded_sequence_uint16_field New value to be moved in member unbounded_sequence_uint16_field - */ - eProsima_user_DllExport void unbounded_sequence_uint16_field( - std::vector&& _unbounded_sequence_uint16_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_uint16_field - * @return Constant reference to member unbounded_sequence_uint16_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_uint16_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_uint16_field - * @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 - */ - eProsima_user_DllExport void unbounded_sequence_int32_field( - const std::vector& _unbounded_sequence_int32_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_int32_field - * @param _unbounded_sequence_int32_field New value to be moved in member unbounded_sequence_int32_field - */ - eProsima_user_DllExport void unbounded_sequence_int32_field( - std::vector&& _unbounded_sequence_int32_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_int32_field - * @return Constant reference to member unbounded_sequence_int32_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_int32_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_int32_field - * @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 - */ - eProsima_user_DllExport void unbounded_sequence_uint32_field( - const std::vector& _unbounded_sequence_uint32_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_uint32_field - * @param _unbounded_sequence_uint32_field New value to be moved in member unbounded_sequence_uint32_field - */ - eProsima_user_DllExport void unbounded_sequence_uint32_field( - std::vector&& _unbounded_sequence_uint32_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_uint32_field - * @return Constant reference to member unbounded_sequence_uint32_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_uint32_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_uint32_field - * @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 - */ - eProsima_user_DllExport void unbounded_sequence_int64_field( - const std::vector& _unbounded_sequence_int64_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_int64_field - * @param _unbounded_sequence_int64_field New value to be moved in member unbounded_sequence_int64_field - */ - eProsima_user_DllExport void unbounded_sequence_int64_field( - std::vector&& _unbounded_sequence_int64_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_int64_field - * @return Constant reference to member unbounded_sequence_int64_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_int64_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_int64_field - * @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 - */ - eProsima_user_DllExport void unbounded_sequence_uint64_field( - const std::vector& _unbounded_sequence_uint64_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_uint64_field - * @param _unbounded_sequence_uint64_field New value to be moved in member unbounded_sequence_uint64_field - */ - eProsima_user_DllExport void unbounded_sequence_uint64_field( - std::vector&& _unbounded_sequence_uint64_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_uint64_field - * @return Constant reference to member unbounded_sequence_uint64_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_uint64_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_uint64_field - * @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 - */ - eProsima_user_DllExport void unbounded_sequence_float_field( - const std::vector& _unbounded_sequence_float_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_float_field - * @param _unbounded_sequence_float_field New value to be moved in member unbounded_sequence_float_field - */ - eProsima_user_DllExport void unbounded_sequence_float_field( - std::vector&& _unbounded_sequence_float_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_float_field - * @return Constant reference to member unbounded_sequence_float_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_float_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_float_field - * @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 - */ - eProsima_user_DllExport void unbounded_sequence_double_field( - const std::vector& _unbounded_sequence_double_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_double_field - * @param _unbounded_sequence_double_field New value to be moved in member unbounded_sequence_double_field - */ - eProsima_user_DllExport void unbounded_sequence_double_field( - std::vector&& _unbounded_sequence_double_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_double_field - * @return Constant reference to member unbounded_sequence_double_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_double_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_double_field - * @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_long_double_field - * @param _unbounded_sequence_long_double_field New value to be copied in member unbounded_sequence_long_double_field - */ - eProsima_user_DllExport void unbounded_sequence_long_double_field( - const std::vector& _unbounded_sequence_long_double_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_long_double_field - * @param _unbounded_sequence_long_double_field New value to be moved in member unbounded_sequence_long_double_field - */ - eProsima_user_DllExport void unbounded_sequence_long_double_field( - std::vector&& _unbounded_sequence_long_double_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_long_double_field - * @return Constant reference to member unbounded_sequence_long_double_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_long_double_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_long_double_field - * @return Reference to member unbounded_sequence_long_double_field - */ - eProsima_user_DllExport std::vector& unbounded_sequence_long_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 - */ - eProsima_user_DllExport void unbounded_sequence_bool_field( - const std::vector& _unbounded_sequence_bool_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_bool_field - * @param _unbounded_sequence_bool_field New value to be moved in member unbounded_sequence_bool_field - */ - eProsima_user_DllExport void unbounded_sequence_bool_field( - std::vector&& _unbounded_sequence_bool_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_bool_field - * @return Constant reference to member unbounded_sequence_bool_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_bool_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_bool_field - * @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_string_field - * @param _unbounded_sequence_string_field New value to be copied in member unbounded_sequence_string_field - */ - eProsima_user_DllExport void unbounded_sequence_string_field( - const std::vector& _unbounded_sequence_string_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_string_field - * @param _unbounded_sequence_string_field New value to be moved in member unbounded_sequence_string_field - */ - eProsima_user_DllExport void unbounded_sequence_string_field( - std::vector&& _unbounded_sequence_string_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_string_field - * @return Constant reference to member unbounded_sequence_string_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_string_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_string_field - * @return Reference to member unbounded_sequence_string_field - */ - eProsima_user_DllExport std::vector& unbounded_sequence_string_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 - */ - eProsima_user_DllExport void unbounded_sequence_enum_field( - const std::vector& _unbounded_sequence_enum_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_enum_field - * @param _unbounded_sequence_enum_field New value to be moved in member unbounded_sequence_enum_field - */ - eProsima_user_DllExport void unbounded_sequence_enum_field( - std::vector&& _unbounded_sequence_enum_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_enum_field - * @return Constant reference to member unbounded_sequence_enum_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_enum_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_enum_field - * @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 - */ - eProsima_user_DllExport void unbounded_sequence_enum2_field( - const std::vector& _unbounded_sequence_enum2_field); - - /*! - * @brief This function moves the value in member unbounded_sequence_enum2_field - * @param _unbounded_sequence_enum2_field New value to be moved in member unbounded_sequence_enum2_field - */ - eProsima_user_DllExport void unbounded_sequence_enum2_field( - std::vector&& _unbounded_sequence_enum2_field); - - /*! - * @brief This function returns a constant reference to member unbounded_sequence_enum2_field - * @return Constant reference to member unbounded_sequence_enum2_field - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_enum2_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_enum2_field - * @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 - */ - eProsima_user_DllExport void unbounded_sequence_struct_field( - const std::vector& _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 - */ - eProsima_user_DllExport void unbounded_sequence_struct_field( - std::vector&& _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 - */ - eProsima_user_DllExport const std::vector& unbounded_sequence_struct_field() const; - - /*! - * @brief This function returns a reference to member unbounded_sequence_struct_field - * @return Reference to member unbounded_sequence_struct_field - */ - 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 ContentFilterTestType& 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 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; - long double m_long_double_field; - bool m_bool_field; - std::string m_string_field; - Color m_enum_field; - Material m_enum2_field; - 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_long_double_field; - std::array m_array_bool_field; - std::array m_array_string_field; - std::array m_array_enum_field; - std::array m_array_enum2_field; - std::array m_array_struct_field; - std::vector m_bounded_sequence_char_field; - std::vector m_bounded_sequence_uint8_field; - std::vector m_bounded_sequence_int16_field; - std::vector m_bounded_sequence_uint16_field; - std::vector m_bounded_sequence_int32_field; - std::vector m_bounded_sequence_uint32_field; - std::vector m_bounded_sequence_int64_field; - std::vector m_bounded_sequence_uint64_field; - std::vector m_bounded_sequence_float_field; - std::vector m_bounded_sequence_double_field; - std::vector m_bounded_sequence_long_double_field; - std::vector m_bounded_sequence_bool_field; - std::vector m_bounded_sequence_string_field; - std::vector m_bounded_sequence_enum_field; - std::vector m_bounded_sequence_enum2_field; - std::vector m_bounded_sequence_struct_field; - std::vector m_unbounded_sequence_char_field; - std::vector m_unbounded_sequence_uint8_field; - std::vector m_unbounded_sequence_int16_field; - std::vector m_unbounded_sequence_uint16_field; - std::vector m_unbounded_sequence_int32_field; - std::vector m_unbounded_sequence_uint32_field; - std::vector m_unbounded_sequence_int64_field; - std::vector m_unbounded_sequence_uint64_field; - std::vector m_unbounded_sequence_float_field; - std::vector m_unbounded_sequence_double_field; - std::vector m_unbounded_sequence_long_double_field; - std::vector m_unbounded_sequence_bool_field; - std::vector m_unbounded_sequence_string_field; - std::vector m_unbounded_sequence_enum_field; - std::vector m_unbounded_sequence_enum2_field; - std::vector m_unbounded_sequence_struct_field; - -}; - - -#endif // _FAST_DDS_GENERATED_CONTENTFILTERTESTTYPE_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/unittest/dynamic_types/CMakeLists.txt b/test/unittest/dynamic_types/CMakeLists.txt index ec6df1e2111..d8ad415e476 100644 --- a/test/unittest/dynamic_types/CMakeLists.txt +++ b/test/unittest/dynamic_types/CMakeLists.txt @@ -72,8 +72,6 @@ endif() set(DYNAMIC_TYPES_TEST_SOURCE DynamicTypesTests.cpp - idl/Basic.cxx - idl/Basicv1.cxx idl/BasicPubSubTypes.cxx idl/BasicTypeObject.cxx ${DYNAMIC_TYPES_SOURCE} @@ -92,8 +90,6 @@ set(DYNAMIC_TYPES_TEST_SOURCE set(DYNAMIC_COMPLEX_TYPES_TEST_SOURCE DynamicComplexTypesTests.cpp - idl/Test.cxx - idl/Testv1.cxx idl/TestPubSubTypes.cxx idl/TestTypeObject.cxx ${DYNAMIC_TYPES_SOURCE} @@ -101,8 +97,6 @@ set(DYNAMIC_COMPLEX_TYPES_TEST_SOURCE set(DYNAMIC_TYPES_4_2_TEST_SOURCE DynamicTypes_4_2_Tests.cpp - idl/new_features_4_2.cxx - idl/new_features_4_2v1.cxx idl/new_features_4_2PubSubTypes.cxx idl/new_features_4_2TypeObject.cxx ${DYNAMIC_TYPES_SOURCE} diff --git a/test/unittest/dynamic_types/DynamicComplexTypesTests.cpp b/test/unittest/dynamic_types/DynamicComplexTypesTests.cpp index 75930dcc02f..aed16202357 100644 --- a/test/unittest/dynamic_types/DynamicComplexTypesTests.cpp +++ b/test/unittest/dynamic_types/DynamicComplexTypesTests.cpp @@ -31,7 +31,7 @@ #include #include -#include "idl/Test.h" +#include "idl/Test.hpp" #include "idl/TestPubSubTypes.h" #include "idl/TestTypeObject.h" diff --git a/test/unittest/dynamic_types/idl/Basic.cxx b/test/unittest/dynamic_types/idl/Basic.cxx deleted file mode 100644 index 90e2adc8191..00000000000 --- a/test/unittest/dynamic_types/idl/Basic.cxx +++ /dev/null @@ -1,3858 +0,0 @@ -// 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 Basic.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Basic.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include "BasicTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -EnumStruct::EnumStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -EnumStruct::~EnumStruct() -{ -} - -EnumStruct::EnumStruct( - const EnumStruct& x) -{ - m_my_enum = x.m_my_enum; -} - -EnumStruct::EnumStruct( - EnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; -} - -EnumStruct& EnumStruct::operator =( - const EnumStruct& x) -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -EnumStruct& EnumStruct::operator =( - EnumStruct&& x) noexcept -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -bool EnumStruct::operator ==( - const EnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool EnumStruct::operator !=( - const EnumStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void EnumStruct::my_enum( - MyEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyEnum EnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyEnum& EnumStruct::my_enum() -{ - return m_my_enum; -} - - - - -AliasStruct::AliasStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -AliasStruct::~AliasStruct() -{ -} - -AliasStruct::AliasStruct( - const AliasStruct& x) -{ - m_my_alias = x.m_my_alias; -} - -AliasStruct::AliasStruct( - AliasStruct&& x) noexcept -{ - m_my_alias = x.m_my_alias; -} - -AliasStruct& AliasStruct::operator =( - const AliasStruct& x) -{ - - m_my_alias = x.m_my_alias; - return *this; -} - -AliasStruct& AliasStruct::operator =( - AliasStruct&& x) noexcept -{ - - m_my_alias = x.m_my_alias; - return *this; -} - -bool AliasStruct::operator ==( - const AliasStruct& x) const -{ - return (m_my_alias == x.m_my_alias); -} - -bool AliasStruct::operator !=( - const AliasStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_alias - * @param _my_alias New value for member my_alias - */ -void AliasStruct::my_alias( - MyAliasEnum _my_alias) -{ - m_my_alias = _my_alias; -} - -/*! - * @brief This function returns the value of member my_alias - * @return Value of member my_alias - */ -MyAliasEnum AliasStruct::my_alias() const -{ - return m_my_alias; -} - -/*! - * @brief This function returns a reference to member my_alias - * @return Reference to member my_alias - */ -MyAliasEnum& AliasStruct::my_alias() -{ - return m_my_alias; -} - - - - -AliasAliasStruct::AliasAliasStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -AliasAliasStruct::~AliasAliasStruct() -{ -} - -AliasAliasStruct::AliasAliasStruct( - const AliasAliasStruct& x) -{ - m_my_alias_alias = x.m_my_alias_alias; -} - -AliasAliasStruct::AliasAliasStruct( - AliasAliasStruct&& x) noexcept -{ - m_my_alias_alias = x.m_my_alias_alias; -} - -AliasAliasStruct& AliasAliasStruct::operator =( - const AliasAliasStruct& x) -{ - - m_my_alias_alias = x.m_my_alias_alias; - return *this; -} - -AliasAliasStruct& AliasAliasStruct::operator =( - AliasAliasStruct&& x) noexcept -{ - - m_my_alias_alias = x.m_my_alias_alias; - return *this; -} - -bool AliasAliasStruct::operator ==( - const AliasAliasStruct& x) const -{ - return (m_my_alias_alias == x.m_my_alias_alias); -} - -bool AliasAliasStruct::operator !=( - const AliasAliasStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_alias_alias - * @param _my_alias_alias New value for member my_alias_alias - */ -void AliasAliasStruct::my_alias_alias( - MyAliasAliasEnum _my_alias_alias) -{ - m_my_alias_alias = _my_alias_alias; -} - -/*! - * @brief This function returns the value of member my_alias_alias - * @return Value of member my_alias_alias - */ -MyAliasAliasEnum AliasAliasStruct::my_alias_alias() const -{ - return m_my_alias_alias; -} - -/*! - * @brief This function returns a reference to member my_alias_alias - * @return Reference to member my_alias_alias - */ -MyAliasAliasEnum& AliasAliasStruct::my_alias_alias() -{ - return m_my_alias_alias; -} - - - - -BoolStruct::BoolStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -BoolStruct::~BoolStruct() -{ -} - -BoolStruct::BoolStruct( - const BoolStruct& x) -{ - m_my_bool = x.m_my_bool; -} - -BoolStruct::BoolStruct( - BoolStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; -} - -BoolStruct& BoolStruct::operator =( - const BoolStruct& x) -{ - - m_my_bool = x.m_my_bool; - return *this; -} - -BoolStruct& BoolStruct::operator =( - BoolStruct&& x) noexcept -{ - - m_my_bool = x.m_my_bool; - return *this; -} - -bool BoolStruct::operator ==( - const BoolStruct& x) const -{ - return (m_my_bool == x.m_my_bool); -} - -bool BoolStruct::operator !=( - const BoolStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BoolStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BoolStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BoolStruct::my_bool() -{ - return m_my_bool; -} - - - - -OctetStruct::OctetStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -OctetStruct::~OctetStruct() -{ -} - -OctetStruct::OctetStruct( - const OctetStruct& x) -{ - m_my_octet = x.m_my_octet; -} - -OctetStruct::OctetStruct( - OctetStruct&& x) noexcept -{ - m_my_octet = x.m_my_octet; -} - -OctetStruct& OctetStruct::operator =( - const OctetStruct& x) -{ - - m_my_octet = x.m_my_octet; - return *this; -} - -OctetStruct& OctetStruct::operator =( - OctetStruct&& x) noexcept -{ - - m_my_octet = x.m_my_octet; - return *this; -} - -bool OctetStruct::operator ==( - const OctetStruct& x) const -{ - return (m_my_octet == x.m_my_octet); -} - -bool OctetStruct::operator !=( - const OctetStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_octet - * @param _my_octet New value for member my_octet - */ -void OctetStruct::my_octet( - uint8_t _my_octet) -{ - m_my_octet = _my_octet; -} - -/*! - * @brief This function returns the value of member my_octet - * @return Value of member my_octet - */ -uint8_t OctetStruct::my_octet() const -{ - return m_my_octet; -} - -/*! - * @brief This function returns a reference to member my_octet - * @return Reference to member my_octet - */ -uint8_t& OctetStruct::my_octet() -{ - return m_my_octet; -} - - - - -ShortStruct::ShortStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -ShortStruct::~ShortStruct() -{ -} - -ShortStruct::ShortStruct( - const ShortStruct& x) -{ - m_my_int16 = x.m_my_int16; -} - -ShortStruct::ShortStruct( - ShortStruct&& x) noexcept -{ - m_my_int16 = x.m_my_int16; -} - -ShortStruct& ShortStruct::operator =( - const ShortStruct& x) -{ - - m_my_int16 = x.m_my_int16; - return *this; -} - -ShortStruct& ShortStruct::operator =( - ShortStruct&& x) noexcept -{ - - m_my_int16 = x.m_my_int16; - return *this; -} - -bool ShortStruct::operator ==( - const ShortStruct& x) const -{ - return (m_my_int16 == x.m_my_int16); -} - -bool ShortStruct::operator !=( - const ShortStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_int16 - * @param _my_int16 New value for member my_int16 - */ -void ShortStruct::my_int16( - int16_t _my_int16) -{ - m_my_int16 = _my_int16; -} - -/*! - * @brief This function returns the value of member my_int16 - * @return Value of member my_int16 - */ -int16_t ShortStruct::my_int16() const -{ - return m_my_int16; -} - -/*! - * @brief This function returns a reference to member my_int16 - * @return Reference to member my_int16 - */ -int16_t& ShortStruct::my_int16() -{ - return m_my_int16; -} - - - - -LongStruct::LongStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -LongStruct::~LongStruct() -{ -} - -LongStruct::LongStruct( - const LongStruct& x) -{ - m_my_int32 = x.m_my_int32; -} - -LongStruct::LongStruct( - LongStruct&& x) noexcept -{ - m_my_int32 = x.m_my_int32; -} - -LongStruct& LongStruct::operator =( - const LongStruct& x) -{ - - m_my_int32 = x.m_my_int32; - return *this; -} - -LongStruct& LongStruct::operator =( - LongStruct&& x) noexcept -{ - - m_my_int32 = x.m_my_int32; - return *this; -} - -bool LongStruct::operator ==( - const LongStruct& x) const -{ - return (m_my_int32 == x.m_my_int32); -} - -bool LongStruct::operator !=( - const LongStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void LongStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t LongStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& LongStruct::my_int32() -{ - return m_my_int32; -} - - - - -LongLongStruct::LongLongStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -LongLongStruct::~LongLongStruct() -{ -} - -LongLongStruct::LongLongStruct( - const LongLongStruct& x) -{ - m_my_int64 = x.m_my_int64; -} - -LongLongStruct::LongLongStruct( - LongLongStruct&& x) noexcept -{ - m_my_int64 = x.m_my_int64; -} - -LongLongStruct& LongLongStruct::operator =( - const LongLongStruct& x) -{ - - m_my_int64 = x.m_my_int64; - return *this; -} - -LongLongStruct& LongLongStruct::operator =( - LongLongStruct&& x) noexcept -{ - - m_my_int64 = x.m_my_int64; - return *this; -} - -bool LongLongStruct::operator ==( - const LongLongStruct& x) const -{ - return (m_my_int64 == x.m_my_int64); -} - -bool LongLongStruct::operator !=( - const LongLongStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_int64 - * @param _my_int64 New value for member my_int64 - */ -void LongLongStruct::my_int64( - int64_t _my_int64) -{ - m_my_int64 = _my_int64; -} - -/*! - * @brief This function returns the value of member my_int64 - * @return Value of member my_int64 - */ -int64_t LongLongStruct::my_int64() const -{ - return m_my_int64; -} - -/*! - * @brief This function returns a reference to member my_int64 - * @return Reference to member my_int64 - */ -int64_t& LongLongStruct::my_int64() -{ - return m_my_int64; -} - - - - -UShortStruct::UShortStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -UShortStruct::~UShortStruct() -{ -} - -UShortStruct::UShortStruct( - const UShortStruct& x) -{ - m_my_uint16 = x.m_my_uint16; -} - -UShortStruct::UShortStruct( - UShortStruct&& x) noexcept -{ - m_my_uint16 = x.m_my_uint16; -} - -UShortStruct& UShortStruct::operator =( - const UShortStruct& x) -{ - - m_my_uint16 = x.m_my_uint16; - return *this; -} - -UShortStruct& UShortStruct::operator =( - UShortStruct&& x) noexcept -{ - - m_my_uint16 = x.m_my_uint16; - return *this; -} - -bool UShortStruct::operator ==( - const UShortStruct& x) const -{ - return (m_my_uint16 == x.m_my_uint16); -} - -bool UShortStruct::operator !=( - const UShortStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_uint16 - * @param _my_uint16 New value for member my_uint16 - */ -void UShortStruct::my_uint16( - uint16_t _my_uint16) -{ - m_my_uint16 = _my_uint16; -} - -/*! - * @brief This function returns the value of member my_uint16 - * @return Value of member my_uint16 - */ -uint16_t UShortStruct::my_uint16() const -{ - return m_my_uint16; -} - -/*! - * @brief This function returns a reference to member my_uint16 - * @return Reference to member my_uint16 - */ -uint16_t& UShortStruct::my_uint16() -{ - return m_my_uint16; -} - - - - -ULongStruct::ULongStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -ULongStruct::~ULongStruct() -{ -} - -ULongStruct::ULongStruct( - const ULongStruct& x) -{ - m_my_uint32 = x.m_my_uint32; -} - -ULongStruct::ULongStruct( - ULongStruct&& x) noexcept -{ - m_my_uint32 = x.m_my_uint32; -} - -ULongStruct& ULongStruct::operator =( - const ULongStruct& x) -{ - - m_my_uint32 = x.m_my_uint32; - return *this; -} - -ULongStruct& ULongStruct::operator =( - ULongStruct&& x) noexcept -{ - - m_my_uint32 = x.m_my_uint32; - return *this; -} - -bool ULongStruct::operator ==( - const ULongStruct& x) const -{ - return (m_my_uint32 == x.m_my_uint32); -} - -bool ULongStruct::operator !=( - const ULongStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_uint32 - * @param _my_uint32 New value for member my_uint32 - */ -void ULongStruct::my_uint32( - uint32_t _my_uint32) -{ - m_my_uint32 = _my_uint32; -} - -/*! - * @brief This function returns the value of member my_uint32 - * @return Value of member my_uint32 - */ -uint32_t ULongStruct::my_uint32() const -{ - return m_my_uint32; -} - -/*! - * @brief This function returns a reference to member my_uint32 - * @return Reference to member my_uint32 - */ -uint32_t& ULongStruct::my_uint32() -{ - return m_my_uint32; -} - - - - -ULongLongStruct::ULongLongStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -ULongLongStruct::~ULongLongStruct() -{ -} - -ULongLongStruct::ULongLongStruct( - const ULongLongStruct& x) -{ - m_my_uint64 = x.m_my_uint64; -} - -ULongLongStruct::ULongLongStruct( - ULongLongStruct&& x) noexcept -{ - m_my_uint64 = x.m_my_uint64; -} - -ULongLongStruct& ULongLongStruct::operator =( - const ULongLongStruct& x) -{ - - m_my_uint64 = x.m_my_uint64; - return *this; -} - -ULongLongStruct& ULongLongStruct::operator =( - ULongLongStruct&& x) noexcept -{ - - m_my_uint64 = x.m_my_uint64; - return *this; -} - -bool ULongLongStruct::operator ==( - const ULongLongStruct& x) const -{ - return (m_my_uint64 == x.m_my_uint64); -} - -bool ULongLongStruct::operator !=( - const ULongLongStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_uint64 - * @param _my_uint64 New value for member my_uint64 - */ -void ULongLongStruct::my_uint64( - uint64_t _my_uint64) -{ - m_my_uint64 = _my_uint64; -} - -/*! - * @brief This function returns the value of member my_uint64 - * @return Value of member my_uint64 - */ -uint64_t ULongLongStruct::my_uint64() const -{ - return m_my_uint64; -} - -/*! - * @brief This function returns a reference to member my_uint64 - * @return Reference to member my_uint64 - */ -uint64_t& ULongLongStruct::my_uint64() -{ - return m_my_uint64; -} - - - - -FloatStruct::FloatStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -FloatStruct::~FloatStruct() -{ -} - -FloatStruct::FloatStruct( - const FloatStruct& x) -{ - m_my_float32 = x.m_my_float32; -} - -FloatStruct::FloatStruct( - FloatStruct&& x) noexcept -{ - m_my_float32 = x.m_my_float32; -} - -FloatStruct& FloatStruct::operator =( - const FloatStruct& x) -{ - - m_my_float32 = x.m_my_float32; - return *this; -} - -FloatStruct& FloatStruct::operator =( - FloatStruct&& x) noexcept -{ - - m_my_float32 = x.m_my_float32; - return *this; -} - -bool FloatStruct::operator ==( - const FloatStruct& x) const -{ - return (m_my_float32 == x.m_my_float32); -} - -bool FloatStruct::operator !=( - const FloatStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_float32 - * @param _my_float32 New value for member my_float32 - */ -void FloatStruct::my_float32( - float _my_float32) -{ - m_my_float32 = _my_float32; -} - -/*! - * @brief This function returns the value of member my_float32 - * @return Value of member my_float32 - */ -float FloatStruct::my_float32() const -{ - return m_my_float32; -} - -/*! - * @brief This function returns a reference to member my_float32 - * @return Reference to member my_float32 - */ -float& FloatStruct::my_float32() -{ - return m_my_float32; -} - - - - -DoubleStruct::DoubleStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -DoubleStruct::~DoubleStruct() -{ -} - -DoubleStruct::DoubleStruct( - const DoubleStruct& x) -{ - m_my_float64 = x.m_my_float64; -} - -DoubleStruct::DoubleStruct( - DoubleStruct&& x) noexcept -{ - m_my_float64 = x.m_my_float64; -} - -DoubleStruct& DoubleStruct::operator =( - const DoubleStruct& x) -{ - - m_my_float64 = x.m_my_float64; - return *this; -} - -DoubleStruct& DoubleStruct::operator =( - DoubleStruct&& x) noexcept -{ - - m_my_float64 = x.m_my_float64; - return *this; -} - -bool DoubleStruct::operator ==( - const DoubleStruct& x) const -{ - return (m_my_float64 == x.m_my_float64); -} - -bool DoubleStruct::operator !=( - const DoubleStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_float64 - * @param _my_float64 New value for member my_float64 - */ -void DoubleStruct::my_float64( - double _my_float64) -{ - m_my_float64 = _my_float64; -} - -/*! - * @brief This function returns the value of member my_float64 - * @return Value of member my_float64 - */ -double DoubleStruct::my_float64() const -{ - return m_my_float64; -} - -/*! - * @brief This function returns a reference to member my_float64 - * @return Reference to member my_float64 - */ -double& DoubleStruct::my_float64() -{ - return m_my_float64; -} - - - - -LongDoubleStruct::LongDoubleStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -LongDoubleStruct::~LongDoubleStruct() -{ -} - -LongDoubleStruct::LongDoubleStruct( - const LongDoubleStruct& x) -{ - m_my_float128 = x.m_my_float128; -} - -LongDoubleStruct::LongDoubleStruct( - LongDoubleStruct&& x) noexcept -{ - m_my_float128 = x.m_my_float128; -} - -LongDoubleStruct& LongDoubleStruct::operator =( - const LongDoubleStruct& x) -{ - - m_my_float128 = x.m_my_float128; - return *this; -} - -LongDoubleStruct& LongDoubleStruct::operator =( - LongDoubleStruct&& x) noexcept -{ - - m_my_float128 = x.m_my_float128; - return *this; -} - -bool LongDoubleStruct::operator ==( - const LongDoubleStruct& x) const -{ - return (m_my_float128 == x.m_my_float128); -} - -bool LongDoubleStruct::operator !=( - const LongDoubleStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_float128 - * @param _my_float128 New value for member my_float128 - */ -void LongDoubleStruct::my_float128( - long double _my_float128) -{ - m_my_float128 = _my_float128; -} - -/*! - * @brief This function returns the value of member my_float128 - * @return Value of member my_float128 - */ -long double LongDoubleStruct::my_float128() const -{ - return m_my_float128; -} - -/*! - * @brief This function returns a reference to member my_float128 - * @return Reference to member my_float128 - */ -long double& LongDoubleStruct::my_float128() -{ - return m_my_float128; -} - - - - -CharStruct::CharStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -CharStruct::~CharStruct() -{ -} - -CharStruct::CharStruct( - const CharStruct& x) -{ - m_my_char = x.m_my_char; -} - -CharStruct::CharStruct( - CharStruct&& x) noexcept -{ - m_my_char = x.m_my_char; -} - -CharStruct& CharStruct::operator =( - const CharStruct& x) -{ - - m_my_char = x.m_my_char; - return *this; -} - -CharStruct& CharStruct::operator =( - CharStruct&& x) noexcept -{ - - m_my_char = x.m_my_char; - return *this; -} - -bool CharStruct::operator ==( - const CharStruct& x) const -{ - return (m_my_char == x.m_my_char); -} - -bool CharStruct::operator !=( - const CharStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_char - * @param _my_char New value for member my_char - */ -void CharStruct::my_char( - char _my_char) -{ - m_my_char = _my_char; -} - -/*! - * @brief This function returns the value of member my_char - * @return Value of member my_char - */ -char CharStruct::my_char() const -{ - return m_my_char; -} - -/*! - * @brief This function returns a reference to member my_char - * @return Reference to member my_char - */ -char& CharStruct::my_char() -{ - return m_my_char; -} - - - - -WCharStruct::WCharStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -WCharStruct::~WCharStruct() -{ -} - -WCharStruct::WCharStruct( - const WCharStruct& x) -{ - m_my_wchar = x.m_my_wchar; -} - -WCharStruct::WCharStruct( - WCharStruct&& x) noexcept -{ - m_my_wchar = x.m_my_wchar; -} - -WCharStruct& WCharStruct::operator =( - const WCharStruct& x) -{ - - m_my_wchar = x.m_my_wchar; - return *this; -} - -WCharStruct& WCharStruct::operator =( - WCharStruct&& x) noexcept -{ - - m_my_wchar = x.m_my_wchar; - return *this; -} - -bool WCharStruct::operator ==( - const WCharStruct& x) const -{ - return (m_my_wchar == x.m_my_wchar); -} - -bool WCharStruct::operator !=( - const WCharStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_wchar - * @param _my_wchar New value for member my_wchar - */ -void WCharStruct::my_wchar( - wchar_t _my_wchar) -{ - m_my_wchar = _my_wchar; -} - -/*! - * @brief This function returns the value of member my_wchar - * @return Value of member my_wchar - */ -wchar_t WCharStruct::my_wchar() const -{ - return m_my_wchar; -} - -/*! - * @brief This function returns a reference to member my_wchar - * @return Reference to member my_wchar - */ -wchar_t& WCharStruct::my_wchar() -{ - return m_my_wchar; -} - - - - -StringStruct::StringStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -StringStruct::~StringStruct() -{ -} - -StringStruct::StringStruct( - const StringStruct& x) -{ - m_my_string = x.m_my_string; -} - -StringStruct::StringStruct( - StringStruct&& x) noexcept -{ - m_my_string = std::move(x.m_my_string); -} - -StringStruct& StringStruct::operator =( - const StringStruct& x) -{ - - m_my_string = x.m_my_string; - return *this; -} - -StringStruct& StringStruct::operator =( - StringStruct&& x) noexcept -{ - - m_my_string = std::move(x.m_my_string); - return *this; -} - -bool StringStruct::operator ==( - const StringStruct& x) const -{ - return (m_my_string == x.m_my_string); -} - -bool StringStruct::operator !=( - const StringStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void StringStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void StringStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& StringStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& StringStruct::my_string() -{ - return m_my_string; -} - - - - -WStringStruct::WStringStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -WStringStruct::~WStringStruct() -{ -} - -WStringStruct::WStringStruct( - const WStringStruct& x) -{ - m_my_wstring = x.m_my_wstring; -} - -WStringStruct::WStringStruct( - WStringStruct&& x) noexcept -{ - m_my_wstring = std::move(x.m_my_wstring); -} - -WStringStruct& WStringStruct::operator =( - const WStringStruct& x) -{ - - m_my_wstring = x.m_my_wstring; - return *this; -} - -WStringStruct& WStringStruct::operator =( - WStringStruct&& x) noexcept -{ - - m_my_wstring = std::move(x.m_my_wstring); - return *this; -} - -bool WStringStruct::operator ==( - const WStringStruct& x) const -{ - return (m_my_wstring == x.m_my_wstring); -} - -bool WStringStruct::operator !=( - const WStringStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_wstring - * @param _my_wstring New value to be copied in member my_wstring - */ -void WStringStruct::my_wstring( - const std::wstring& _my_wstring) -{ - m_my_wstring = _my_wstring; -} - -/*! - * @brief This function moves the value in member my_wstring - * @param _my_wstring New value to be moved in member my_wstring - */ -void WStringStruct::my_wstring( - std::wstring&& _my_wstring) -{ - m_my_wstring = std::move(_my_wstring); -} - -/*! - * @brief This function returns a constant reference to member my_wstring - * @return Constant reference to member my_wstring - */ -const std::wstring& WStringStruct::my_wstring() const -{ - return m_my_wstring; -} - -/*! - * @brief This function returns a reference to member my_wstring - * @return Reference to member my_wstring - */ -std::wstring& WStringStruct::my_wstring() -{ - return m_my_wstring; -} - - - - -LargeStringStruct::LargeStringStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -LargeStringStruct::~LargeStringStruct() -{ -} - -LargeStringStruct::LargeStringStruct( - const LargeStringStruct& x) -{ - m_my_large_string = x.m_my_large_string; -} - -LargeStringStruct::LargeStringStruct( - LargeStringStruct&& x) noexcept -{ - m_my_large_string = std::move(x.m_my_large_string); -} - -LargeStringStruct& LargeStringStruct::operator =( - const LargeStringStruct& x) -{ - - m_my_large_string = x.m_my_large_string; - return *this; -} - -LargeStringStruct& LargeStringStruct::operator =( - LargeStringStruct&& x) noexcept -{ - - m_my_large_string = std::move(x.m_my_large_string); - return *this; -} - -bool LargeStringStruct::operator ==( - const LargeStringStruct& x) const -{ - return (m_my_large_string == x.m_my_large_string); -} - -bool LargeStringStruct::operator !=( - const LargeStringStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_large_string - * @param _my_large_string New value to be copied in member my_large_string - */ -void LargeStringStruct::my_large_string( - const eprosima::fastcdr::fixed_string<41925>& _my_large_string) -{ - m_my_large_string = _my_large_string; -} - -/*! - * @brief This function moves the value in member my_large_string - * @param _my_large_string New value to be moved in member my_large_string - */ -void LargeStringStruct::my_large_string( - eprosima::fastcdr::fixed_string<41925>&& _my_large_string) -{ - m_my_large_string = std::move(_my_large_string); -} - -/*! - * @brief This function returns a constant reference to member my_large_string - * @return Constant reference to member my_large_string - */ -const eprosima::fastcdr::fixed_string<41925>& LargeStringStruct::my_large_string() const -{ - return m_my_large_string; -} - -/*! - * @brief This function returns a reference to member my_large_string - * @return Reference to member my_large_string - */ -eprosima::fastcdr::fixed_string<41925>& LargeStringStruct::my_large_string() -{ - return m_my_large_string; -} - - - - -LargeWStringStruct::LargeWStringStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -LargeWStringStruct::~LargeWStringStruct() -{ -} - -LargeWStringStruct::LargeWStringStruct( - const LargeWStringStruct& x) -{ - m_my_large_wstring = x.m_my_large_wstring; -} - -LargeWStringStruct::LargeWStringStruct( - LargeWStringStruct&& x) noexcept -{ - m_my_large_wstring = std::move(x.m_my_large_wstring); -} - -LargeWStringStruct& LargeWStringStruct::operator =( - const LargeWStringStruct& x) -{ - - m_my_large_wstring = x.m_my_large_wstring; - return *this; -} - -LargeWStringStruct& LargeWStringStruct::operator =( - LargeWStringStruct&& x) noexcept -{ - - m_my_large_wstring = std::move(x.m_my_large_wstring); - return *this; -} - -bool LargeWStringStruct::operator ==( - const LargeWStringStruct& x) const -{ - return (m_my_large_wstring == x.m_my_large_wstring); -} - -bool LargeWStringStruct::operator !=( - const LargeWStringStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_large_wstring - * @param _my_large_wstring New value to be copied in member my_large_wstring - */ -void LargeWStringStruct::my_large_wstring( - const std::wstring& _my_large_wstring) -{ - m_my_large_wstring = _my_large_wstring; -} - -/*! - * @brief This function moves the value in member my_large_wstring - * @param _my_large_wstring New value to be moved in member my_large_wstring - */ -void LargeWStringStruct::my_large_wstring( - std::wstring&& _my_large_wstring) -{ - m_my_large_wstring = std::move(_my_large_wstring); -} - -/*! - * @brief This function returns a constant reference to member my_large_wstring - * @return Constant reference to member my_large_wstring - */ -const std::wstring& LargeWStringStruct::my_large_wstring() const -{ - return m_my_large_wstring; -} - -/*! - * @brief This function returns a reference to member my_large_wstring - * @return Reference to member my_large_wstring - */ -std::wstring& LargeWStringStruct::my_large_wstring() -{ - return m_my_large_wstring; -} - - - - -ArraytStruct::ArraytStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -ArraytStruct::~ArraytStruct() -{ -} - -ArraytStruct::ArraytStruct( - const ArraytStruct& x) -{ - m_my_array = x.m_my_array; -} - -ArraytStruct::ArraytStruct( - ArraytStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); -} - -ArraytStruct& ArraytStruct::operator =( - const ArraytStruct& x) -{ - - m_my_array = x.m_my_array; - return *this; -} - -ArraytStruct& ArraytStruct::operator =( - ArraytStruct&& x) noexcept -{ - - m_my_array = std::move(x.m_my_array); - return *this; -} - -bool ArraytStruct::operator ==( - const ArraytStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArraytStruct::operator !=( - const ArraytStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArraytStruct::my_array( - const std::array, 2>, 2>& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArraytStruct::my_array( - std::array, 2>, 2>&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array, 2>, 2>& ArraytStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array, 2>, 2>& ArraytStruct::my_array() -{ - return m_my_array; -} - - - - - -ArrayArrayStruct::ArrayArrayStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -ArrayArrayStruct::~ArrayArrayStruct() -{ -} - -ArrayArrayStruct::ArrayArrayStruct( - const ArrayArrayStruct& x) -{ - m_my_array_array = x.m_my_array_array; -} - -ArrayArrayStruct::ArrayArrayStruct( - ArrayArrayStruct&& x) noexcept -{ - m_my_array_array = std::move(x.m_my_array_array); -} - -ArrayArrayStruct& ArrayArrayStruct::operator =( - const ArrayArrayStruct& x) -{ - - m_my_array_array = x.m_my_array_array; - return *this; -} - -ArrayArrayStruct& ArrayArrayStruct::operator =( - ArrayArrayStruct&& x) noexcept -{ - - m_my_array_array = std::move(x.m_my_array_array); - return *this; -} - -bool ArrayArrayStruct::operator ==( - const ArrayArrayStruct& x) const -{ - return (m_my_array_array == x.m_my_array_array); -} - -bool ArrayArrayStruct::operator !=( - const ArrayArrayStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_array_array - * @param _my_array_array New value to be copied in member my_array_array - */ -void ArrayArrayStruct::my_array_array( - const std::array, 2>& _my_array_array) -{ - m_my_array_array = _my_array_array; -} - -/*! - * @brief This function moves the value in member my_array_array - * @param _my_array_array New value to be moved in member my_array_array - */ -void ArrayArrayStruct::my_array_array( - std::array, 2>&& _my_array_array) -{ - m_my_array_array = std::move(_my_array_array); -} - -/*! - * @brief This function returns a constant reference to member my_array_array - * @return Constant reference to member my_array_array - */ -const std::array, 2>& ArrayArrayStruct::my_array_array() const -{ - return m_my_array_array; -} - -/*! - * @brief This function returns a reference to member my_array_array - * @return Reference to member my_array_array - */ -std::array, 2>& ArrayArrayStruct::my_array_array() -{ - return m_my_array_array; -} - - - - - - -SequenceStruct::SequenceStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -SequenceStruct::~SequenceStruct() -{ -} - -SequenceStruct::SequenceStruct( - const SequenceStruct& x) -{ - m_my_sequence = x.m_my_sequence; -} - -SequenceStruct::SequenceStruct( - SequenceStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); -} - -SequenceStruct& SequenceStruct::operator =( - const SequenceStruct& x) -{ - - m_my_sequence = x.m_my_sequence; - return *this; -} - -SequenceStruct& SequenceStruct::operator =( - SequenceStruct&& x) noexcept -{ - - m_my_sequence = std::move(x.m_my_sequence); - return *this; -} - -bool SequenceStruct::operator ==( - const SequenceStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceStruct::operator !=( - const SequenceStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - - - -SequenceSequenceStruct::SequenceSequenceStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -SequenceSequenceStruct::~SequenceSequenceStruct() -{ -} - -SequenceSequenceStruct::SequenceSequenceStruct( - const SequenceSequenceStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; -} - -SequenceSequenceStruct::SequenceSequenceStruct( - SequenceSequenceStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); -} - -SequenceSequenceStruct& SequenceSequenceStruct::operator =( - const SequenceSequenceStruct& x) -{ - - m_my_sequence_sequence = x.m_my_sequence_sequence; - return *this; -} - -SequenceSequenceStruct& SequenceSequenceStruct::operator =( - SequenceSequenceStruct&& x) noexcept -{ - - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - return *this; -} - -bool SequenceSequenceStruct::operator ==( - const SequenceSequenceStruct& x) const -{ - return (m_my_sequence_sequence == x.m_my_sequence_sequence); -} - -bool SequenceSequenceStruct::operator !=( - const SequenceSequenceStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ -void SequenceSequenceStruct::my_sequence_sequence( - const std::vector>& _my_sequence_sequence) -{ - m_my_sequence_sequence = _my_sequence_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ -void SequenceSequenceStruct::my_sequence_sequence( - std::vector>&& _my_sequence_sequence) -{ - m_my_sequence_sequence = std::move(_my_sequence_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ -const std::vector>& SequenceSequenceStruct::my_sequence_sequence() const -{ - return m_my_sequence_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ -std::vector>& SequenceSequenceStruct::my_sequence_sequence() -{ - return m_my_sequence_sequence; -} - - - - - - -MapStruct::MapStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -MapStruct::~MapStruct() -{ -} - -MapStruct::MapStruct( - const MapStruct& x) -{ - m_my_map = x.m_my_map; -} - -MapStruct::MapStruct( - MapStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); -} - -MapStruct& MapStruct::operator =( - const MapStruct& x) -{ - - m_my_map = x.m_my_map; - return *this; -} - -MapStruct& MapStruct::operator =( - MapStruct&& x) noexcept -{ - - m_my_map = std::move(x.m_my_map); - return *this; -} - -bool MapStruct::operator ==( - const MapStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapStruct::operator !=( - const MapStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapStruct::my_map() -{ - return m_my_map; -} - - - - - - - - -MapMapStruct::MapMapStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -MapMapStruct::~MapMapStruct() -{ -} - -MapMapStruct::MapMapStruct( - const MapMapStruct& x) -{ - m_my_map_map = x.m_my_map_map; -} - -MapMapStruct::MapMapStruct( - MapMapStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); -} - -MapMapStruct& MapMapStruct::operator =( - const MapMapStruct& x) -{ - - m_my_map_map = x.m_my_map_map; - return *this; -} - -MapMapStruct& MapMapStruct::operator =( - MapMapStruct&& x) noexcept -{ - - m_my_map_map = std::move(x.m_my_map_map); - return *this; -} - -bool MapMapStruct::operator ==( - const MapMapStruct& x) const -{ - return (m_my_map_map == x.m_my_map_map); -} - -bool MapMapStruct::operator !=( - const MapMapStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ -void MapMapStruct::my_map_map( - const std::map>& _my_map_map) -{ - m_my_map_map = _my_map_map; -} - -/*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ -void MapMapStruct::my_map_map( - std::map>&& _my_map_map) -{ - m_my_map_map = std::move(_my_map_map); -} - -/*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ -const std::map>& MapMapStruct::my_map_map() const -{ - return m_my_map_map; -} - -/*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ -std::map>& MapMapStruct::my_map_map() -{ - return m_my_map_map; -} - - -MyBitset::MyBitset(){ - // Just to register all known types - registerBasicTypes(); -} - -MyBitset::~MyBitset() -{ -} - -MyBitset::MyBitset( - const MyBitset& x){ - m_bitset = x.m_bitset; -} - -MyBitset::MyBitset( - MyBitset&& x) noexcept { - m_bitset = x.m_bitset; -} - -MyBitset& MyBitset::operator =( - const MyBitset& x) -{ - - m_bitset = x.m_bitset; - - return *this; -} - -MyBitset& MyBitset::operator =( - MyBitset&& x) noexcept -{ - - m_bitset = x.m_bitset; - - return *this; -} - -bool MyBitset::operator ==( - const MyBitset& x) const -{ - - return m_bitset == x.m_bitset; -} - -bool MyBitset::operator !=( - const MyBitset& x) const -{ - return !(*this == x); -} - - -void MyBitset::a( - char _a) -{ - int base = 0; - int size = 2; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_a & 0x01)); - _a = _a >> 1; - } - -} - -char MyBitset::a() const -{ - int base = 0; - int size = 2; - std::bitset<2> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - - -void MyBitset::b( - uint32_t _b) -{ - int base = 10; - int size = 20; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_b & 0x01)); - _b = _b >> 1; - } - -} - -uint32_t MyBitset::b() const -{ - int base = 10; - int size = 20; - std::bitset<20> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -std::bitset<30> MyBitset::bitset() const -{ - std::string str_value; - - str_value = m_bitset.to_string() + str_value; - - return std::bitset<30>(str_value); -} - -void MyBitset::bitset( - const std::bitset<30>& bitset) -{ - std::string str_value {bitset.to_string()}; - size_t base_diff {0}; - size_t last_post {std::string::npos}; - - base_diff += 30; - m_bitset = std::bitset<30>(str_value.substr(str_value.length() - base_diff, last_post)); -} - - - -BitsetStruct::BitsetStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -BitsetStruct::~BitsetStruct() -{ -} - -BitsetStruct::BitsetStruct( - const BitsetStruct& x) -{ - m_a = x.m_a; -} - -BitsetStruct::BitsetStruct( - BitsetStruct&& x) noexcept -{ - m_a = std::move(x.m_a); -} - -BitsetStruct& BitsetStruct::operator =( - const BitsetStruct& x) -{ - - m_a = x.m_a; - return *this; -} - -BitsetStruct& BitsetStruct::operator =( - BitsetStruct&& x) noexcept -{ - - m_a = std::move(x.m_a); - return *this; -} - -bool BitsetStruct::operator ==( - const BitsetStruct& x) const -{ - return (m_a == x.m_a); -} - -bool BitsetStruct::operator !=( - const BitsetStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member a - * @param _a New value to be copied in member a - */ -void BitsetStruct::a( - const MyBitset& _a) -{ - m_a = _a; -} - -/*! - * @brief This function moves the value in member a - * @param _a New value to be moved in member a - */ -void BitsetStruct::a( - MyBitset&& _a) -{ - m_a = std::move(_a); -} - -/*! - * @brief This function returns a constant reference to member a - * @return Constant reference to member a - */ -const MyBitset& BitsetStruct::a() const -{ - return m_a; -} - -/*! - * @brief This function returns a reference to member a - * @return Reference to member a - */ -MyBitset& BitsetStruct::a() -{ - return m_a; -} - - - - -StructStruct::StructStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -StructStruct::~StructStruct() -{ -} - -StructStruct::StructStruct( - const StructStruct& x) -{ - m_a = x.m_a; - m_b = x.m_b; -} - -StructStruct::StructStruct( - StructStruct&& x) noexcept -{ - m_a = x.m_a; - m_b = x.m_b; -} - -StructStruct& StructStruct::operator =( - const StructStruct& x) -{ - - m_a = x.m_a; - m_b = x.m_b; - return *this; -} - -StructStruct& StructStruct::operator =( - StructStruct&& x) noexcept -{ - - m_a = x.m_a; - m_b = x.m_b; - return *this; -} - -bool StructStruct::operator ==( - const StructStruct& x) const -{ - return (m_a == x.m_a && - m_b == x.m_b); -} - -bool StructStruct::operator !=( - const StructStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member a - * @param _a New value for member a - */ -void StructStruct::a( - int32_t _a) -{ - m_a = _a; -} - -/*! - * @brief This function returns the value of member a - * @return Value of member a - */ -int32_t StructStruct::a() const -{ - return m_a; -} - -/*! - * @brief This function returns a reference to member a - * @return Reference to member a - */ -int32_t& StructStruct::a() -{ - return m_a; -} - - -/*! - * @brief This function sets a value in member b - * @param _b New value for member b - */ -void StructStruct::b( - int64_t _b) -{ - m_b = _b; -} - -/*! - * @brief This function returns the value of member b - * @return Value of member b - */ -int64_t StructStruct::b() const -{ - return m_b; -} - -/*! - * @brief This function returns a reference to member b - * @return Reference to member b - */ -int64_t& StructStruct::b() -{ - return m_b; -} - - - - -StructStructStruct::StructStructStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -StructStructStruct::~StructStructStruct() -{ -} - -StructStructStruct::StructStructStruct( - const StructStructStruct& x) -{ - m_child_struct = x.m_child_struct; - m_child_int64 = x.m_child_int64; -} - -StructStructStruct::StructStructStruct( - StructStructStruct&& x) noexcept -{ - m_child_struct = std::move(x.m_child_struct); - m_child_int64 = x.m_child_int64; -} - -StructStructStruct& StructStructStruct::operator =( - const StructStructStruct& x) -{ - - m_child_struct = x.m_child_struct; - m_child_int64 = x.m_child_int64; - return *this; -} - -StructStructStruct& StructStructStruct::operator =( - StructStructStruct&& x) noexcept -{ - - m_child_struct = std::move(x.m_child_struct); - m_child_int64 = x.m_child_int64; - return *this; -} - -bool StructStructStruct::operator ==( - const StructStructStruct& x) const -{ - return (m_child_struct == x.m_child_struct && - m_child_int64 == x.m_child_int64); -} - -bool StructStructStruct::operator !=( - const StructStructStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member child_struct - * @param _child_struct New value to be copied in member child_struct - */ -void StructStructStruct::child_struct( - const StructStruct& _child_struct) -{ - m_child_struct = _child_struct; -} - -/*! - * @brief This function moves the value in member child_struct - * @param _child_struct New value to be moved in member child_struct - */ -void StructStructStruct::child_struct( - StructStruct&& _child_struct) -{ - m_child_struct = std::move(_child_struct); -} - -/*! - * @brief This function returns a constant reference to member child_struct - * @return Constant reference to member child_struct - */ -const StructStruct& StructStructStruct::child_struct() const -{ - return m_child_struct; -} - -/*! - * @brief This function returns a reference to member child_struct - * @return Reference to member child_struct - */ -StructStruct& StructStructStruct::child_struct() -{ - return m_child_struct; -} - - -/*! - * @brief This function sets a value in member child_int64 - * @param _child_int64 New value for member child_int64 - */ -void StructStructStruct::child_int64( - int64_t _child_int64) -{ - m_child_int64 = _child_int64; -} - -/*! - * @brief This function returns the value of member child_int64 - * @return Value of member child_int64 - */ -int64_t StructStructStruct::child_int64() const -{ - return m_child_int64; -} - -/*! - * @brief This function returns a reference to member child_int64 - * @return Reference to member child_int64 - */ -int64_t& StructStructStruct::child_int64() -{ - return m_child_int64; -} - - - - -SimpleUnion::SimpleUnion() -{ - m__d = A; -} - -SimpleUnion::~SimpleUnion() -{ -} - -SimpleUnion::SimpleUnion( - const SimpleUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleUnion::SimpleUnion( - SimpleUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleUnion& SimpleUnion::operator =( - const SimpleUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleUnion& SimpleUnion::operator =( - SimpleUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleUnion::operator ==( - const SimpleUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleUnion::operator !=( - const SimpleUnion& x) const -{ - return !(*this == x); -} - -void SimpleUnion::_d( - int32_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch (__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleUnion::_d() -{ - return m__d; -} - -void SimpleUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t SimpleUnion::first() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleUnion::first() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t SimpleUnion::second() const -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleUnion::second() -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - - - -UnionUnion::UnionUnion() -{ - m__d = A; -} - -UnionUnion::~UnionUnion() -{ -} - -UnionUnion::UnionUnion( - const UnionUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -UnionUnion::UnionUnion( - UnionUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = std::move(x.m_second); - - break; - - default: - break; - } -} - -UnionUnion& UnionUnion::operator =( - const UnionUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -UnionUnion& UnionUnion::operator =( - UnionUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = std::move(x.m_second); - - break; - - default: - break; - } - - return *this; -} - -bool UnionUnion::operator ==( - const UnionUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool UnionUnion::operator !=( - const UnionUnion& x) const -{ - return !(*this == x); -} - -void UnionUnion::_d( - int32_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch (__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t UnionUnion::_d() const -{ - return m__d; -} - -int32_t& UnionUnion::_d() -{ - return m__d; -} - -void UnionUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t UnionUnion::first() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& UnionUnion::first() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void UnionUnion::second( - const SimpleUnion& _second) -{ - m_second = _second; - m__d = B; - -} - -void UnionUnion::second( - SimpleUnion&& _second) -{ - m_second = std::move(_second); - m__d = B; - -} - -const SimpleUnion& UnionUnion::second() const -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -SimpleUnion& UnionUnion::second() -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - - - -WCharUnion::WCharUnion() -{ - m__d = A; -} - -WCharUnion::~WCharUnion() -{ -} - -WCharUnion::WCharUnion( - const WCharUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -WCharUnion::WCharUnion( - WCharUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -WCharUnion& WCharUnion::operator =( - const WCharUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -WCharUnion& WCharUnion::operator =( - WCharUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool WCharUnion::operator ==( - const WCharUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool WCharUnion::operator !=( - const WCharUnion& x) const -{ - return !(*this == x); -} - -void WCharUnion::_d( - wchar_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch (__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -wchar_t WCharUnion::_d() const -{ - return m__d; -} - -wchar_t& WCharUnion::_d() -{ - return m__d; -} - -void WCharUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t WCharUnion::first() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& WCharUnion::first() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void WCharUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t WCharUnion::second() const -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& WCharUnion::second() -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - - - -SimpleUnionStruct::SimpleUnionStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -SimpleUnionStruct::~SimpleUnionStruct() -{ -} - -SimpleUnionStruct::SimpleUnionStruct( - const SimpleUnionStruct& x) -{ - m_my_union = x.m_my_union; -} - -SimpleUnionStruct::SimpleUnionStruct( - SimpleUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -SimpleUnionStruct& SimpleUnionStruct::operator =( - const SimpleUnionStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -SimpleUnionStruct& SimpleUnionStruct::operator =( - SimpleUnionStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool SimpleUnionStruct::operator ==( - const SimpleUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleUnionStruct::operator !=( - const SimpleUnionStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleUnionStruct::my_union( - const SimpleUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleUnionStruct::my_union( - SimpleUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleUnion& SimpleUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleUnion& SimpleUnionStruct::my_union() -{ - return m_my_union; -} - - - - -UnionUnionUnionStruct::UnionUnionUnionStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -UnionUnionUnionStruct::~UnionUnionUnionStruct() -{ -} - -UnionUnionUnionStruct::UnionUnionUnionStruct( - const UnionUnionUnionStruct& x) -{ - m_my_union = x.m_my_union; -} - -UnionUnionUnionStruct::UnionUnionUnionStruct( - UnionUnionUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -UnionUnionUnionStruct& UnionUnionUnionStruct::operator =( - const UnionUnionUnionStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -UnionUnionUnionStruct& UnionUnionUnionStruct::operator =( - UnionUnionUnionStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool UnionUnionUnionStruct::operator ==( - const UnionUnionUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool UnionUnionUnionStruct::operator !=( - const UnionUnionUnionStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void UnionUnionUnionStruct::my_union( - const UnionUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void UnionUnionUnionStruct::my_union( - UnionUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const UnionUnion& UnionUnionUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -UnionUnion& UnionUnionUnionStruct::my_union() -{ - return m_my_union; -} - - - - -WCharUnionStruct::WCharUnionStruct() -{ - // Just to register all known types - registerBasicTypes(); -} - -WCharUnionStruct::~WCharUnionStruct() -{ -} - -WCharUnionStruct::WCharUnionStruct( - const WCharUnionStruct& x) -{ - m_my_union = x.m_my_union; -} - -WCharUnionStruct::WCharUnionStruct( - WCharUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -WCharUnionStruct& WCharUnionStruct::operator =( - const WCharUnionStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -WCharUnionStruct& WCharUnionStruct::operator =( - WCharUnionStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool WCharUnionStruct::operator ==( - const WCharUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool WCharUnionStruct::operator !=( - const WCharUnionStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void WCharUnionStruct::my_union( - const WCharUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void WCharUnionStruct::my_union( - WCharUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const WCharUnion& WCharUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -WCharUnion& WCharUnionStruct::my_union() -{ - return m_my_union; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "BasicCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/unittest/dynamic_types/idl/Basic.h b/test/unittest/dynamic_types/idl/Basic.hpp similarity index 57% rename from test/unittest/dynamic_types/idl/Basic.h rename to test/unittest/dynamic_types/idl/Basic.hpp index 3f82c93abc2..0b34b4b45d7 100644 --- a/test/unittest/dynamic_types/idl/Basic.h +++ b/test/unittest/dynamic_types/idl/Basic.hpp @@ -13,32 +13,30 @@ // limitations under the License. /*! - * @file Basic.h + * @file Basic.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "Basicv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_BASIC_H_ -#define _FAST_DDS_GENERATED_BASIC_H_ +#ifndef _FAST_DDS_GENERATED_BASIC_HPP_ +#define _FAST_DDS_GENERATED_BASIC_HPP_ #include #include #include #include #include +#include #include #include #include #include +#include +#include "BasicTypeObject.h" #if defined(_WIN32) #if defined(EPROSIMA_USER_DLL_EXPORT) @@ -64,15 +62,6 @@ #define BASIC_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! * @brief This class represents the enumeration MyEnum defined by the user in the IDL file. * @ingroup Basic @@ -100,73 +89,114 @@ class EnumStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport EnumStruct(); + eProsima_user_DllExport EnumStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~EnumStruct(); + eProsima_user_DllExport ~EnumStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object EnumStruct that will be copied. */ eProsima_user_DllExport EnumStruct( - const EnumStruct& x); + const EnumStruct& x) + { + m_my_enum = x.m_my_enum; + + } /*! * @brief Move constructor. * @param x Reference to the object EnumStruct that will be copied. */ eProsima_user_DllExport EnumStruct( - EnumStruct&& x) noexcept; + EnumStruct&& x) noexcept + { + m_my_enum = x.m_my_enum; + } /*! * @brief Copy assignment. * @param x Reference to the object EnumStruct that will be copied. */ eProsima_user_DllExport EnumStruct& operator =( - const EnumStruct& x); + const EnumStruct& x) + { + + m_my_enum = x.m_my_enum; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object EnumStruct that will be copied. */ eProsima_user_DllExport EnumStruct& operator =( - EnumStruct&& x) noexcept; + EnumStruct&& x) noexcept + { + + m_my_enum = x.m_my_enum; + return *this; + } /*! * @brief Comparison operator. * @param x EnumStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const EnumStruct& x) const; + const EnumStruct& x) const + { + return (m_my_enum == x.m_my_enum); + } /*! * @brief Comparison operator. * @param x EnumStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const EnumStruct& x) const; + const EnumStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_enum * @param _my_enum New value for member my_enum */ eProsima_user_DllExport void my_enum( - MyEnum _my_enum); + MyEnum _my_enum) + { + m_my_enum = _my_enum; + } /*! * @brief This function returns the value of member my_enum * @return Value of member my_enum */ - eProsima_user_DllExport MyEnum my_enum() const; + eProsima_user_DllExport MyEnum my_enum() const + { + return m_my_enum; + } /*! * @brief This function returns a reference to member my_enum * @return Reference to member my_enum */ - eProsima_user_DllExport MyEnum& my_enum(); + eProsima_user_DllExport MyEnum& my_enum() + { + return m_my_enum; + } + + private: @@ -186,73 +216,114 @@ class AliasStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport AliasStruct(); + eProsima_user_DllExport AliasStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~AliasStruct(); + eProsima_user_DllExport ~AliasStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object AliasStruct that will be copied. */ eProsima_user_DllExport AliasStruct( - const AliasStruct& x); + const AliasStruct& x) + { + m_my_alias = x.m_my_alias; + + } /*! * @brief Move constructor. * @param x Reference to the object AliasStruct that will be copied. */ eProsima_user_DllExport AliasStruct( - AliasStruct&& x) noexcept; + AliasStruct&& x) noexcept + { + m_my_alias = x.m_my_alias; + } /*! * @brief Copy assignment. * @param x Reference to the object AliasStruct that will be copied. */ eProsima_user_DllExport AliasStruct& operator =( - const AliasStruct& x); + const AliasStruct& x) + { + + m_my_alias = x.m_my_alias; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object AliasStruct that will be copied. */ eProsima_user_DllExport AliasStruct& operator =( - AliasStruct&& x) noexcept; + AliasStruct&& x) noexcept + { + + m_my_alias = x.m_my_alias; + return *this; + } /*! * @brief Comparison operator. * @param x AliasStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const AliasStruct& x) const; + const AliasStruct& x) const + { + return (m_my_alias == x.m_my_alias); + } /*! * @brief Comparison operator. * @param x AliasStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const AliasStruct& x) const; + const AliasStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_alias * @param _my_alias New value for member my_alias */ eProsima_user_DllExport void my_alias( - MyAliasEnum _my_alias); + MyAliasEnum _my_alias) + { + m_my_alias = _my_alias; + } /*! * @brief This function returns the value of member my_alias * @return Value of member my_alias */ - eProsima_user_DllExport MyAliasEnum my_alias() const; + eProsima_user_DllExport MyAliasEnum my_alias() const + { + return m_my_alias; + } /*! * @brief This function returns a reference to member my_alias * @return Reference to member my_alias */ - eProsima_user_DllExport MyAliasEnum& my_alias(); + eProsima_user_DllExport MyAliasEnum& my_alias() + { + return m_my_alias; + } + + private: @@ -272,73 +343,114 @@ class AliasAliasStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport AliasAliasStruct(); + eProsima_user_DllExport AliasAliasStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~AliasAliasStruct(); + eProsima_user_DllExport ~AliasAliasStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object AliasAliasStruct that will be copied. */ eProsima_user_DllExport AliasAliasStruct( - const AliasAliasStruct& x); + const AliasAliasStruct& x) + { + m_my_alias_alias = x.m_my_alias_alias; + + } /*! * @brief Move constructor. * @param x Reference to the object AliasAliasStruct that will be copied. */ eProsima_user_DllExport AliasAliasStruct( - AliasAliasStruct&& x) noexcept; + AliasAliasStruct&& x) noexcept + { + m_my_alias_alias = x.m_my_alias_alias; + } /*! * @brief Copy assignment. * @param x Reference to the object AliasAliasStruct that will be copied. */ eProsima_user_DllExport AliasAliasStruct& operator =( - const AliasAliasStruct& x); + const AliasAliasStruct& x) + { + + m_my_alias_alias = x.m_my_alias_alias; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object AliasAliasStruct that will be copied. */ eProsima_user_DllExport AliasAliasStruct& operator =( - AliasAliasStruct&& x) noexcept; + AliasAliasStruct&& x) noexcept + { + + m_my_alias_alias = x.m_my_alias_alias; + return *this; + } /*! * @brief Comparison operator. * @param x AliasAliasStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const AliasAliasStruct& x) const; + const AliasAliasStruct& x) const + { + return (m_my_alias_alias == x.m_my_alias_alias); + } /*! * @brief Comparison operator. * @param x AliasAliasStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const AliasAliasStruct& x) const; + const AliasAliasStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_alias_alias * @param _my_alias_alias New value for member my_alias_alias */ eProsima_user_DllExport void my_alias_alias( - MyAliasAliasEnum _my_alias_alias); + MyAliasAliasEnum _my_alias_alias) + { + m_my_alias_alias = _my_alias_alias; + } /*! * @brief This function returns the value of member my_alias_alias * @return Value of member my_alias_alias */ - eProsima_user_DllExport MyAliasAliasEnum my_alias_alias() const; + eProsima_user_DllExport MyAliasAliasEnum my_alias_alias() const + { + return m_my_alias_alias; + } /*! * @brief This function returns a reference to member my_alias_alias * @return Reference to member my_alias_alias */ - eProsima_user_DllExport MyAliasAliasEnum& my_alias_alias(); + eProsima_user_DllExport MyAliasAliasEnum& my_alias_alias() + { + return m_my_alias_alias; + } + + private: @@ -358,73 +470,114 @@ class BoolStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BoolStruct(); + eProsima_user_DllExport BoolStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BoolStruct(); + eProsima_user_DllExport ~BoolStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BoolStruct that will be copied. */ eProsima_user_DllExport BoolStruct( - const BoolStruct& x); + const BoolStruct& x) + { + m_my_bool = x.m_my_bool; + + } /*! * @brief Move constructor. * @param x Reference to the object BoolStruct that will be copied. */ eProsima_user_DllExport BoolStruct( - BoolStruct&& x) noexcept; + BoolStruct&& x) noexcept + { + m_my_bool = x.m_my_bool; + } /*! * @brief Copy assignment. * @param x Reference to the object BoolStruct that will be copied. */ eProsima_user_DllExport BoolStruct& operator =( - const BoolStruct& x); + const BoolStruct& x) + { + + m_my_bool = x.m_my_bool; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BoolStruct that will be copied. */ eProsima_user_DllExport BoolStruct& operator =( - BoolStruct&& x) noexcept; + BoolStruct&& x) noexcept + { + + m_my_bool = x.m_my_bool; + return *this; + } /*! * @brief Comparison operator. * @param x BoolStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BoolStruct& x) const; + const BoolStruct& x) const + { + return (m_my_bool == x.m_my_bool); + } /*! * @brief Comparison operator. * @param x BoolStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BoolStruct& x) const; + const BoolStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_bool * @param _my_bool New value for member my_bool */ eProsima_user_DllExport void my_bool( - bool _my_bool); + bool _my_bool) + { + m_my_bool = _my_bool; + } /*! * @brief This function returns the value of member my_bool * @return Value of member my_bool */ - eProsima_user_DllExport bool my_bool() const; + eProsima_user_DllExport bool my_bool() const + { + return m_my_bool; + } /*! * @brief This function returns a reference to member my_bool * @return Reference to member my_bool */ - eProsima_user_DllExport bool& my_bool(); + eProsima_user_DllExport bool& my_bool() + { + return m_my_bool; + } + + private: @@ -444,73 +597,114 @@ class OctetStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport OctetStruct(); + eProsima_user_DllExport OctetStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~OctetStruct(); + eProsima_user_DllExport ~OctetStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object OctetStruct that will be copied. */ eProsima_user_DllExport OctetStruct( - const OctetStruct& x); + const OctetStruct& x) + { + m_my_octet = x.m_my_octet; + + } /*! * @brief Move constructor. * @param x Reference to the object OctetStruct that will be copied. */ eProsima_user_DllExport OctetStruct( - OctetStruct&& x) noexcept; + OctetStruct&& x) noexcept + { + m_my_octet = x.m_my_octet; + } /*! * @brief Copy assignment. * @param x Reference to the object OctetStruct that will be copied. */ eProsima_user_DllExport OctetStruct& operator =( - const OctetStruct& x); + const OctetStruct& x) + { + + m_my_octet = x.m_my_octet; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object OctetStruct that will be copied. */ eProsima_user_DllExport OctetStruct& operator =( - OctetStruct&& x) noexcept; + OctetStruct&& x) noexcept + { + + m_my_octet = x.m_my_octet; + return *this; + } /*! * @brief Comparison operator. * @param x OctetStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const OctetStruct& x) const; + const OctetStruct& x) const + { + return (m_my_octet == x.m_my_octet); + } /*! * @brief Comparison operator. * @param x OctetStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const OctetStruct& x) const; + const OctetStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_octet * @param _my_octet New value for member my_octet */ eProsima_user_DllExport void my_octet( - uint8_t _my_octet); + uint8_t _my_octet) + { + m_my_octet = _my_octet; + } /*! * @brief This function returns the value of member my_octet * @return Value of member my_octet */ - eProsima_user_DllExport uint8_t my_octet() const; + eProsima_user_DllExport uint8_t my_octet() const + { + return m_my_octet; + } /*! * @brief This function returns a reference to member my_octet * @return Reference to member my_octet */ - eProsima_user_DllExport uint8_t& my_octet(); + eProsima_user_DllExport uint8_t& my_octet() + { + return m_my_octet; + } + + private: @@ -530,73 +724,114 @@ class ShortStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ShortStruct(); + eProsima_user_DllExport ShortStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ShortStruct(); + eProsima_user_DllExport ~ShortStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ShortStruct that will be copied. */ eProsima_user_DllExport ShortStruct( - const ShortStruct& x); + const ShortStruct& x) + { + m_my_int16 = x.m_my_int16; + + } /*! * @brief Move constructor. * @param x Reference to the object ShortStruct that will be copied. */ eProsima_user_DllExport ShortStruct( - ShortStruct&& x) noexcept; + ShortStruct&& x) noexcept + { + m_my_int16 = x.m_my_int16; + } /*! * @brief Copy assignment. * @param x Reference to the object ShortStruct that will be copied. */ eProsima_user_DllExport ShortStruct& operator =( - const ShortStruct& x); + const ShortStruct& x) + { + + m_my_int16 = x.m_my_int16; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ShortStruct that will be copied. */ eProsima_user_DllExport ShortStruct& operator =( - ShortStruct&& x) noexcept; + ShortStruct&& x) noexcept + { + + m_my_int16 = x.m_my_int16; + return *this; + } /*! * @brief Comparison operator. * @param x ShortStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ShortStruct& x) const; + const ShortStruct& x) const + { + return (m_my_int16 == x.m_my_int16); + } /*! * @brief Comparison operator. * @param x ShortStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ShortStruct& x) const; + const ShortStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_int16 * @param _my_int16 New value for member my_int16 */ eProsima_user_DllExport void my_int16( - int16_t _my_int16); + int16_t _my_int16) + { + m_my_int16 = _my_int16; + } /*! * @brief This function returns the value of member my_int16 * @return Value of member my_int16 */ - eProsima_user_DllExport int16_t my_int16() const; + eProsima_user_DllExport int16_t my_int16() const + { + return m_my_int16; + } /*! * @brief This function returns a reference to member my_int16 * @return Reference to member my_int16 */ - eProsima_user_DllExport int16_t& my_int16(); + eProsima_user_DllExport int16_t& my_int16() + { + return m_my_int16; + } + + private: @@ -616,73 +851,114 @@ class LongStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport LongStruct(); + eProsima_user_DllExport LongStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~LongStruct(); + eProsima_user_DllExport ~LongStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object LongStruct that will be copied. */ eProsima_user_DllExport LongStruct( - const LongStruct& x); + const LongStruct& x) + { + m_my_int32 = x.m_my_int32; + + } /*! * @brief Move constructor. * @param x Reference to the object LongStruct that will be copied. */ eProsima_user_DllExport LongStruct( - LongStruct&& x) noexcept; + LongStruct&& x) noexcept + { + m_my_int32 = x.m_my_int32; + } /*! * @brief Copy assignment. * @param x Reference to the object LongStruct that will be copied. */ eProsima_user_DllExport LongStruct& operator =( - const LongStruct& x); + const LongStruct& x) + { + + m_my_int32 = x.m_my_int32; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object LongStruct that will be copied. */ eProsima_user_DllExport LongStruct& operator =( - LongStruct&& x) noexcept; + LongStruct&& x) noexcept + { + + m_my_int32 = x.m_my_int32; + return *this; + } /*! * @brief Comparison operator. * @param x LongStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const LongStruct& x) const; + const LongStruct& x) const + { + return (m_my_int32 == x.m_my_int32); + } /*! * @brief Comparison operator. * @param x LongStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const LongStruct& x) const; + const LongStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_int32 * @param _my_int32 New value for member my_int32 */ eProsima_user_DllExport void my_int32( - int32_t _my_int32); + int32_t _my_int32) + { + m_my_int32 = _my_int32; + } /*! * @brief This function returns the value of member my_int32 * @return Value of member my_int32 */ - eProsima_user_DllExport int32_t my_int32() const; + eProsima_user_DllExport int32_t my_int32() const + { + return m_my_int32; + } /*! * @brief This function returns a reference to member my_int32 * @return Reference to member my_int32 */ - eProsima_user_DllExport int32_t& my_int32(); + eProsima_user_DllExport int32_t& my_int32() + { + return m_my_int32; + } + + private: @@ -702,73 +978,114 @@ class LongLongStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport LongLongStruct(); + eProsima_user_DllExport LongLongStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~LongLongStruct(); + eProsima_user_DllExport ~LongLongStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object LongLongStruct that will be copied. */ eProsima_user_DllExport LongLongStruct( - const LongLongStruct& x); + const LongLongStruct& x) + { + m_my_int64 = x.m_my_int64; + + } /*! * @brief Move constructor. * @param x Reference to the object LongLongStruct that will be copied. */ eProsima_user_DllExport LongLongStruct( - LongLongStruct&& x) noexcept; + LongLongStruct&& x) noexcept + { + m_my_int64 = x.m_my_int64; + } /*! * @brief Copy assignment. * @param x Reference to the object LongLongStruct that will be copied. */ eProsima_user_DllExport LongLongStruct& operator =( - const LongLongStruct& x); + const LongLongStruct& x) + { + + m_my_int64 = x.m_my_int64; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object LongLongStruct that will be copied. */ eProsima_user_DllExport LongLongStruct& operator =( - LongLongStruct&& x) noexcept; + LongLongStruct&& x) noexcept + { + + m_my_int64 = x.m_my_int64; + return *this; + } /*! * @brief Comparison operator. * @param x LongLongStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const LongLongStruct& x) const; + const LongLongStruct& x) const + { + return (m_my_int64 == x.m_my_int64); + } /*! * @brief Comparison operator. * @param x LongLongStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const LongLongStruct& x) const; + const LongLongStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_int64 * @param _my_int64 New value for member my_int64 */ eProsima_user_DllExport void my_int64( - int64_t _my_int64); + int64_t _my_int64) + { + m_my_int64 = _my_int64; + } /*! * @brief This function returns the value of member my_int64 * @return Value of member my_int64 */ - eProsima_user_DllExport int64_t my_int64() const; + eProsima_user_DllExport int64_t my_int64() const + { + return m_my_int64; + } /*! * @brief This function returns a reference to member my_int64 * @return Reference to member my_int64 */ - eProsima_user_DllExport int64_t& my_int64(); + eProsima_user_DllExport int64_t& my_int64() + { + return m_my_int64; + } + + private: @@ -788,73 +1105,114 @@ class UShortStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport UShortStruct(); + eProsima_user_DllExport UShortStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~UShortStruct(); + eProsima_user_DllExport ~UShortStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object UShortStruct that will be copied. */ eProsima_user_DllExport UShortStruct( - const UShortStruct& x); + const UShortStruct& x) + { + m_my_uint16 = x.m_my_uint16; + + } /*! * @brief Move constructor. * @param x Reference to the object UShortStruct that will be copied. */ eProsima_user_DllExport UShortStruct( - UShortStruct&& x) noexcept; + UShortStruct&& x) noexcept + { + m_my_uint16 = x.m_my_uint16; + } /*! * @brief Copy assignment. * @param x Reference to the object UShortStruct that will be copied. */ eProsima_user_DllExport UShortStruct& operator =( - const UShortStruct& x); + const UShortStruct& x) + { + + m_my_uint16 = x.m_my_uint16; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object UShortStruct that will be copied. */ eProsima_user_DllExport UShortStruct& operator =( - UShortStruct&& x) noexcept; + UShortStruct&& x) noexcept + { + + m_my_uint16 = x.m_my_uint16; + return *this; + } /*! * @brief Comparison operator. * @param x UShortStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const UShortStruct& x) const; + const UShortStruct& x) const + { + return (m_my_uint16 == x.m_my_uint16); + } /*! * @brief Comparison operator. * @param x UShortStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const UShortStruct& x) const; + const UShortStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_uint16 * @param _my_uint16 New value for member my_uint16 */ eProsima_user_DllExport void my_uint16( - uint16_t _my_uint16); + uint16_t _my_uint16) + { + m_my_uint16 = _my_uint16; + } /*! * @brief This function returns the value of member my_uint16 * @return Value of member my_uint16 */ - eProsima_user_DllExport uint16_t my_uint16() const; + eProsima_user_DllExport uint16_t my_uint16() const + { + return m_my_uint16; + } /*! * @brief This function returns a reference to member my_uint16 * @return Reference to member my_uint16 */ - eProsima_user_DllExport uint16_t& my_uint16(); + eProsima_user_DllExport uint16_t& my_uint16() + { + return m_my_uint16; + } + + private: @@ -874,73 +1232,114 @@ class ULongStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ULongStruct(); + eProsima_user_DllExport ULongStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ULongStruct(); + eProsima_user_DllExport ~ULongStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ULongStruct that will be copied. */ eProsima_user_DllExport ULongStruct( - const ULongStruct& x); + const ULongStruct& x) + { + m_my_uint32 = x.m_my_uint32; + + } /*! * @brief Move constructor. * @param x Reference to the object ULongStruct that will be copied. */ eProsima_user_DllExport ULongStruct( - ULongStruct&& x) noexcept; + ULongStruct&& x) noexcept + { + m_my_uint32 = x.m_my_uint32; + } /*! * @brief Copy assignment. * @param x Reference to the object ULongStruct that will be copied. */ eProsima_user_DllExport ULongStruct& operator =( - const ULongStruct& x); + const ULongStruct& x) + { + + m_my_uint32 = x.m_my_uint32; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ULongStruct that will be copied. */ eProsima_user_DllExport ULongStruct& operator =( - ULongStruct&& x) noexcept; + ULongStruct&& x) noexcept + { + + m_my_uint32 = x.m_my_uint32; + return *this; + } /*! * @brief Comparison operator. * @param x ULongStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ULongStruct& x) const; + const ULongStruct& x) const + { + return (m_my_uint32 == x.m_my_uint32); + } /*! * @brief Comparison operator. * @param x ULongStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ULongStruct& x) const; + const ULongStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_uint32 * @param _my_uint32 New value for member my_uint32 */ eProsima_user_DllExport void my_uint32( - uint32_t _my_uint32); + uint32_t _my_uint32) + { + m_my_uint32 = _my_uint32; + } /*! * @brief This function returns the value of member my_uint32 * @return Value of member my_uint32 */ - eProsima_user_DllExport uint32_t my_uint32() const; + eProsima_user_DllExport uint32_t my_uint32() const + { + return m_my_uint32; + } /*! * @brief This function returns a reference to member my_uint32 * @return Reference to member my_uint32 */ - eProsima_user_DllExport uint32_t& my_uint32(); + eProsima_user_DllExport uint32_t& my_uint32() + { + return m_my_uint32; + } + + private: @@ -960,73 +1359,114 @@ class ULongLongStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ULongLongStruct(); + eProsima_user_DllExport ULongLongStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ULongLongStruct(); + eProsima_user_DllExport ~ULongLongStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ULongLongStruct that will be copied. */ eProsima_user_DllExport ULongLongStruct( - const ULongLongStruct& x); + const ULongLongStruct& x) + { + m_my_uint64 = x.m_my_uint64; + + } /*! * @brief Move constructor. * @param x Reference to the object ULongLongStruct that will be copied. */ eProsima_user_DllExport ULongLongStruct( - ULongLongStruct&& x) noexcept; + ULongLongStruct&& x) noexcept + { + m_my_uint64 = x.m_my_uint64; + } /*! * @brief Copy assignment. * @param x Reference to the object ULongLongStruct that will be copied. */ eProsima_user_DllExport ULongLongStruct& operator =( - const ULongLongStruct& x); + const ULongLongStruct& x) + { + + m_my_uint64 = x.m_my_uint64; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ULongLongStruct that will be copied. */ eProsima_user_DllExport ULongLongStruct& operator =( - ULongLongStruct&& x) noexcept; + ULongLongStruct&& x) noexcept + { + + m_my_uint64 = x.m_my_uint64; + return *this; + } /*! * @brief Comparison operator. * @param x ULongLongStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ULongLongStruct& x) const; + const ULongLongStruct& x) const + { + return (m_my_uint64 == x.m_my_uint64); + } /*! * @brief Comparison operator. * @param x ULongLongStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ULongLongStruct& x) const; + const ULongLongStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_uint64 * @param _my_uint64 New value for member my_uint64 */ eProsima_user_DllExport void my_uint64( - uint64_t _my_uint64); + uint64_t _my_uint64) + { + m_my_uint64 = _my_uint64; + } /*! * @brief This function returns the value of member my_uint64 * @return Value of member my_uint64 */ - eProsima_user_DllExport uint64_t my_uint64() const; + eProsima_user_DllExport uint64_t my_uint64() const + { + return m_my_uint64; + } /*! * @brief This function returns a reference to member my_uint64 * @return Reference to member my_uint64 */ - eProsima_user_DllExport uint64_t& my_uint64(); + eProsima_user_DllExport uint64_t& my_uint64() + { + return m_my_uint64; + } + + private: @@ -1046,73 +1486,114 @@ class FloatStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport FloatStruct(); + eProsima_user_DllExport FloatStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~FloatStruct(); + eProsima_user_DllExport ~FloatStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object FloatStruct that will be copied. */ eProsima_user_DllExport FloatStruct( - const FloatStruct& x); + const FloatStruct& x) + { + m_my_float32 = x.m_my_float32; + + } /*! * @brief Move constructor. * @param x Reference to the object FloatStruct that will be copied. */ eProsima_user_DllExport FloatStruct( - FloatStruct&& x) noexcept; + FloatStruct&& x) noexcept + { + m_my_float32 = x.m_my_float32; + } /*! * @brief Copy assignment. * @param x Reference to the object FloatStruct that will be copied. */ eProsima_user_DllExport FloatStruct& operator =( - const FloatStruct& x); + const FloatStruct& x) + { + + m_my_float32 = x.m_my_float32; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object FloatStruct that will be copied. */ eProsima_user_DllExport FloatStruct& operator =( - FloatStruct&& x) noexcept; + FloatStruct&& x) noexcept + { + + m_my_float32 = x.m_my_float32; + return *this; + } /*! * @brief Comparison operator. * @param x FloatStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const FloatStruct& x) const; + const FloatStruct& x) const + { + return (m_my_float32 == x.m_my_float32); + } /*! * @brief Comparison operator. * @param x FloatStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const FloatStruct& x) const; + const FloatStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_float32 * @param _my_float32 New value for member my_float32 */ eProsima_user_DllExport void my_float32( - float _my_float32); + float _my_float32) + { + m_my_float32 = _my_float32; + } /*! * @brief This function returns the value of member my_float32 * @return Value of member my_float32 */ - eProsima_user_DllExport float my_float32() const; + eProsima_user_DllExport float my_float32() const + { + return m_my_float32; + } /*! * @brief This function returns a reference to member my_float32 * @return Reference to member my_float32 */ - eProsima_user_DllExport float& my_float32(); + eProsima_user_DllExport float& my_float32() + { + return m_my_float32; + } + + private: @@ -1132,73 +1613,114 @@ class DoubleStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport DoubleStruct(); + eProsima_user_DllExport DoubleStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~DoubleStruct(); + eProsima_user_DllExport ~DoubleStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object DoubleStruct that will be copied. */ eProsima_user_DllExport DoubleStruct( - const DoubleStruct& x); + const DoubleStruct& x) + { + m_my_float64 = x.m_my_float64; + + } /*! * @brief Move constructor. * @param x Reference to the object DoubleStruct that will be copied. */ eProsima_user_DllExport DoubleStruct( - DoubleStruct&& x) noexcept; + DoubleStruct&& x) noexcept + { + m_my_float64 = x.m_my_float64; + } /*! * @brief Copy assignment. * @param x Reference to the object DoubleStruct that will be copied. */ eProsima_user_DllExport DoubleStruct& operator =( - const DoubleStruct& x); + const DoubleStruct& x) + { + + m_my_float64 = x.m_my_float64; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object DoubleStruct that will be copied. */ eProsima_user_DllExport DoubleStruct& operator =( - DoubleStruct&& x) noexcept; + DoubleStruct&& x) noexcept + { + + m_my_float64 = x.m_my_float64; + return *this; + } /*! * @brief Comparison operator. * @param x DoubleStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const DoubleStruct& x) const; + const DoubleStruct& x) const + { + return (m_my_float64 == x.m_my_float64); + } /*! * @brief Comparison operator. * @param x DoubleStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const DoubleStruct& x) const; + const DoubleStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_float64 * @param _my_float64 New value for member my_float64 */ eProsima_user_DllExport void my_float64( - double _my_float64); + double _my_float64) + { + m_my_float64 = _my_float64; + } /*! * @brief This function returns the value of member my_float64 * @return Value of member my_float64 */ - eProsima_user_DllExport double my_float64() const; + eProsima_user_DllExport double my_float64() const + { + return m_my_float64; + } /*! * @brief This function returns a reference to member my_float64 * @return Reference to member my_float64 */ - eProsima_user_DllExport double& my_float64(); + eProsima_user_DllExport double& my_float64() + { + return m_my_float64; + } + + private: @@ -1218,73 +1740,114 @@ class LongDoubleStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport LongDoubleStruct(); + eProsima_user_DllExport LongDoubleStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~LongDoubleStruct(); + eProsima_user_DllExport ~LongDoubleStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object LongDoubleStruct that will be copied. */ eProsima_user_DllExport LongDoubleStruct( - const LongDoubleStruct& x); + const LongDoubleStruct& x) + { + m_my_float128 = x.m_my_float128; + + } /*! * @brief Move constructor. * @param x Reference to the object LongDoubleStruct that will be copied. */ eProsima_user_DllExport LongDoubleStruct( - LongDoubleStruct&& x) noexcept; + LongDoubleStruct&& x) noexcept + { + m_my_float128 = x.m_my_float128; + } /*! * @brief Copy assignment. * @param x Reference to the object LongDoubleStruct that will be copied. */ eProsima_user_DllExport LongDoubleStruct& operator =( - const LongDoubleStruct& x); + const LongDoubleStruct& x) + { + + m_my_float128 = x.m_my_float128; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object LongDoubleStruct that will be copied. */ eProsima_user_DllExport LongDoubleStruct& operator =( - LongDoubleStruct&& x) noexcept; + LongDoubleStruct&& x) noexcept + { + + m_my_float128 = x.m_my_float128; + return *this; + } /*! * @brief Comparison operator. * @param x LongDoubleStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const LongDoubleStruct& x) const; + const LongDoubleStruct& x) const + { + return (m_my_float128 == x.m_my_float128); + } /*! * @brief Comparison operator. * @param x LongDoubleStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const LongDoubleStruct& x) const; + const LongDoubleStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_float128 * @param _my_float128 New value for member my_float128 */ eProsima_user_DllExport void my_float128( - long double _my_float128); + long double _my_float128) + { + m_my_float128 = _my_float128; + } /*! * @brief This function returns the value of member my_float128 * @return Value of member my_float128 */ - eProsima_user_DllExport long double my_float128() const; + eProsima_user_DllExport long double my_float128() const + { + return m_my_float128; + } /*! * @brief This function returns a reference to member my_float128 * @return Reference to member my_float128 */ - eProsima_user_DllExport long double& my_float128(); + eProsima_user_DllExport long double& my_float128() + { + return m_my_float128; + } + + private: @@ -1304,73 +1867,114 @@ class CharStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport CharStruct(); + eProsima_user_DllExport CharStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~CharStruct(); + eProsima_user_DllExport ~CharStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object CharStruct that will be copied. */ eProsima_user_DllExport CharStruct( - const CharStruct& x); + const CharStruct& x) + { + m_my_char = x.m_my_char; + + } /*! * @brief Move constructor. * @param x Reference to the object CharStruct that will be copied. */ eProsima_user_DllExport CharStruct( - CharStruct&& x) noexcept; + CharStruct&& x) noexcept + { + m_my_char = x.m_my_char; + } /*! * @brief Copy assignment. * @param x Reference to the object CharStruct that will be copied. */ eProsima_user_DllExport CharStruct& operator =( - const CharStruct& x); + const CharStruct& x) + { + + m_my_char = x.m_my_char; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object CharStruct that will be copied. */ eProsima_user_DllExport CharStruct& operator =( - CharStruct&& x) noexcept; + CharStruct&& x) noexcept + { + + m_my_char = x.m_my_char; + return *this; + } /*! * @brief Comparison operator. * @param x CharStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const CharStruct& x) const; + const CharStruct& x) const + { + return (m_my_char == x.m_my_char); + } /*! * @brief Comparison operator. * @param x CharStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const CharStruct& x) const; + const CharStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_char * @param _my_char New value for member my_char */ eProsima_user_DllExport void my_char( - char _my_char); + char _my_char) + { + m_my_char = _my_char; + } /*! * @brief This function returns the value of member my_char * @return Value of member my_char */ - eProsima_user_DllExport char my_char() const; + eProsima_user_DllExport char my_char() const + { + return m_my_char; + } /*! * @brief This function returns a reference to member my_char * @return Reference to member my_char */ - eProsima_user_DllExport char& my_char(); + eProsima_user_DllExport char& my_char() + { + return m_my_char; + } + + private: @@ -1390,73 +1994,114 @@ class WCharStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport WCharStruct(); + eProsima_user_DllExport WCharStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~WCharStruct(); + eProsima_user_DllExport ~WCharStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object WCharStruct that will be copied. */ eProsima_user_DllExport WCharStruct( - const WCharStruct& x); + const WCharStruct& x) + { + m_my_wchar = x.m_my_wchar; + + } /*! * @brief Move constructor. * @param x Reference to the object WCharStruct that will be copied. */ eProsima_user_DllExport WCharStruct( - WCharStruct&& x) noexcept; + WCharStruct&& x) noexcept + { + m_my_wchar = x.m_my_wchar; + } /*! * @brief Copy assignment. * @param x Reference to the object WCharStruct that will be copied. */ eProsima_user_DllExport WCharStruct& operator =( - const WCharStruct& x); + const WCharStruct& x) + { + + m_my_wchar = x.m_my_wchar; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object WCharStruct that will be copied. */ eProsima_user_DllExport WCharStruct& operator =( - WCharStruct&& x) noexcept; + WCharStruct&& x) noexcept + { + + m_my_wchar = x.m_my_wchar; + return *this; + } /*! * @brief Comparison operator. * @param x WCharStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const WCharStruct& x) const; + const WCharStruct& x) const + { + return (m_my_wchar == x.m_my_wchar); + } /*! * @brief Comparison operator. * @param x WCharStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const WCharStruct& x) const; + const WCharStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_wchar * @param _my_wchar New value for member my_wchar */ eProsima_user_DllExport void my_wchar( - wchar_t _my_wchar); + wchar_t _my_wchar) + { + m_my_wchar = _my_wchar; + } /*! * @brief This function returns the value of member my_wchar * @return Value of member my_wchar */ - eProsima_user_DllExport wchar_t my_wchar() const; + eProsima_user_DllExport wchar_t my_wchar() const + { + return m_my_wchar; + } /*! * @brief This function returns a reference to member my_wchar * @return Reference to member my_wchar */ - eProsima_user_DllExport wchar_t& my_wchar(); + eProsima_user_DllExport wchar_t& my_wchar() + { + return m_my_wchar; + } + + private: @@ -1476,80 +2121,124 @@ class StringStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport StringStruct(); + eProsima_user_DllExport StringStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~StringStruct(); + eProsima_user_DllExport ~StringStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object StringStruct that will be copied. */ eProsima_user_DllExport StringStruct( - const StringStruct& x); + const StringStruct& x) + { + m_my_string = x.m_my_string; + + } /*! * @brief Move constructor. * @param x Reference to the object StringStruct that will be copied. */ eProsima_user_DllExport StringStruct( - StringStruct&& x) noexcept; + StringStruct&& x) noexcept + { + m_my_string = std::move(x.m_my_string); + } /*! * @brief Copy assignment. * @param x Reference to the object StringStruct that will be copied. */ eProsima_user_DllExport StringStruct& operator =( - const StringStruct& x); + const StringStruct& x) + { + + m_my_string = x.m_my_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object StringStruct that will be copied. */ eProsima_user_DllExport StringStruct& operator =( - StringStruct&& x) noexcept; + StringStruct&& x) noexcept + { + + m_my_string = std::move(x.m_my_string); + return *this; + } /*! * @brief Comparison operator. * @param x StringStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const StringStruct& x) const; + const StringStruct& x) const + { + return (m_my_string == x.m_my_string); + } /*! * @brief Comparison operator. * @param x StringStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const StringStruct& x) const; + const StringStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_string * @param _my_string New value to be copied in member my_string */ eProsima_user_DllExport void my_string( - const std::string& _my_string); + const std::string& _my_string) + { + m_my_string = _my_string; + } /*! * @brief This function moves the value in member my_string * @param _my_string New value to be moved in member my_string */ eProsima_user_DllExport void my_string( - std::string&& _my_string); + std::string&& _my_string) + { + m_my_string = std::move(_my_string); + } /*! * @brief This function returns a constant reference to member my_string * @return Constant reference to member my_string */ - eProsima_user_DllExport const std::string& my_string() const; + eProsima_user_DllExport const std::string& my_string() const + { + return m_my_string; + } /*! * @brief This function returns a reference to member my_string * @return Reference to member my_string */ - eProsima_user_DllExport std::string& my_string(); + eProsima_user_DllExport std::string& my_string() + { + return m_my_string; + } + + private: @@ -1569,80 +2258,124 @@ class WStringStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport WStringStruct(); + eProsima_user_DllExport WStringStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~WStringStruct(); + eProsima_user_DllExport ~WStringStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object WStringStruct that will be copied. */ eProsima_user_DllExport WStringStruct( - const WStringStruct& x); + const WStringStruct& x) + { + m_my_wstring = x.m_my_wstring; + + } /*! * @brief Move constructor. * @param x Reference to the object WStringStruct that will be copied. */ eProsima_user_DllExport WStringStruct( - WStringStruct&& x) noexcept; + WStringStruct&& x) noexcept + { + m_my_wstring = std::move(x.m_my_wstring); + } /*! * @brief Copy assignment. * @param x Reference to the object WStringStruct that will be copied. */ eProsima_user_DllExport WStringStruct& operator =( - const WStringStruct& x); + const WStringStruct& x) + { + + m_my_wstring = x.m_my_wstring; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object WStringStruct that will be copied. */ eProsima_user_DllExport WStringStruct& operator =( - WStringStruct&& x) noexcept; + WStringStruct&& x) noexcept + { + + m_my_wstring = std::move(x.m_my_wstring); + return *this; + } /*! * @brief Comparison operator. * @param x WStringStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const WStringStruct& x) const; + const WStringStruct& x) const + { + return (m_my_wstring == x.m_my_wstring); + } /*! * @brief Comparison operator. * @param x WStringStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const WStringStruct& x) const; + const WStringStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_wstring * @param _my_wstring New value to be copied in member my_wstring */ eProsima_user_DllExport void my_wstring( - const std::wstring& _my_wstring); + const std::wstring& _my_wstring) + { + m_my_wstring = _my_wstring; + } /*! * @brief This function moves the value in member my_wstring * @param _my_wstring New value to be moved in member my_wstring */ eProsima_user_DllExport void my_wstring( - std::wstring&& _my_wstring); + std::wstring&& _my_wstring) + { + m_my_wstring = std::move(_my_wstring); + } /*! * @brief This function returns a constant reference to member my_wstring * @return Constant reference to member my_wstring */ - eProsima_user_DllExport const std::wstring& my_wstring() const; + eProsima_user_DllExport const std::wstring& my_wstring() const + { + return m_my_wstring; + } /*! * @brief This function returns a reference to member my_wstring * @return Reference to member my_wstring */ - eProsima_user_DllExport std::wstring& my_wstring(); + eProsima_user_DllExport std::wstring& my_wstring() + { + return m_my_wstring; + } + + private: @@ -1662,80 +2395,124 @@ class LargeStringStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport LargeStringStruct(); + eProsima_user_DllExport LargeStringStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~LargeStringStruct(); + eProsima_user_DllExport ~LargeStringStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object LargeStringStruct that will be copied. */ eProsima_user_DllExport LargeStringStruct( - const LargeStringStruct& x); + const LargeStringStruct& x) + { + m_my_large_string = x.m_my_large_string; + + } /*! * @brief Move constructor. * @param x Reference to the object LargeStringStruct that will be copied. */ eProsima_user_DllExport LargeStringStruct( - LargeStringStruct&& x) noexcept; + LargeStringStruct&& x) noexcept + { + m_my_large_string = std::move(x.m_my_large_string); + } /*! * @brief Copy assignment. * @param x Reference to the object LargeStringStruct that will be copied. */ eProsima_user_DllExport LargeStringStruct& operator =( - const LargeStringStruct& x); + const LargeStringStruct& x) + { + + m_my_large_string = x.m_my_large_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object LargeStringStruct that will be copied. */ eProsima_user_DllExport LargeStringStruct& operator =( - LargeStringStruct&& x) noexcept; + LargeStringStruct&& x) noexcept + { + + m_my_large_string = std::move(x.m_my_large_string); + return *this; + } /*! * @brief Comparison operator. * @param x LargeStringStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const LargeStringStruct& x) const; + const LargeStringStruct& x) const + { + return (m_my_large_string == x.m_my_large_string); + } /*! * @brief Comparison operator. * @param x LargeStringStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const LargeStringStruct& x) const; + const LargeStringStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_large_string * @param _my_large_string New value to be copied in member my_large_string */ eProsima_user_DllExport void my_large_string( - const eprosima::fastcdr::fixed_string<41925>& _my_large_string); + const eprosima::fastcdr::fixed_string<41925>& _my_large_string) + { + m_my_large_string = _my_large_string; + } /*! * @brief This function moves the value in member my_large_string * @param _my_large_string New value to be moved in member my_large_string */ eProsima_user_DllExport void my_large_string( - eprosima::fastcdr::fixed_string<41925>&& _my_large_string); + eprosima::fastcdr::fixed_string<41925>&& _my_large_string) + { + m_my_large_string = std::move(_my_large_string); + } /*! * @brief This function returns a constant reference to member my_large_string * @return Constant reference to member my_large_string */ - eProsima_user_DllExport const eprosima::fastcdr::fixed_string<41925>& my_large_string() const; + eProsima_user_DllExport const eprosima::fastcdr::fixed_string<41925>& my_large_string() const + { + return m_my_large_string; + } /*! * @brief This function returns a reference to member my_large_string * @return Reference to member my_large_string */ - eProsima_user_DllExport eprosima::fastcdr::fixed_string<41925>& my_large_string(); + eProsima_user_DllExport eprosima::fastcdr::fixed_string<41925>& my_large_string() + { + return m_my_large_string; + } + + private: @@ -1755,80 +2532,124 @@ class LargeWStringStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport LargeWStringStruct(); + eProsima_user_DllExport LargeWStringStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~LargeWStringStruct(); + eProsima_user_DllExport ~LargeWStringStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object LargeWStringStruct that will be copied. */ eProsima_user_DllExport LargeWStringStruct( - const LargeWStringStruct& x); + const LargeWStringStruct& x) + { + m_my_large_wstring = x.m_my_large_wstring; + + } /*! * @brief Move constructor. * @param x Reference to the object LargeWStringStruct that will be copied. */ eProsima_user_DllExport LargeWStringStruct( - LargeWStringStruct&& x) noexcept; + LargeWStringStruct&& x) noexcept + { + m_my_large_wstring = std::move(x.m_my_large_wstring); + } /*! * @brief Copy assignment. * @param x Reference to the object LargeWStringStruct that will be copied. */ eProsima_user_DllExport LargeWStringStruct& operator =( - const LargeWStringStruct& x); + const LargeWStringStruct& x) + { + + m_my_large_wstring = x.m_my_large_wstring; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object LargeWStringStruct that will be copied. */ eProsima_user_DllExport LargeWStringStruct& operator =( - LargeWStringStruct&& x) noexcept; + LargeWStringStruct&& x) noexcept + { + + m_my_large_wstring = std::move(x.m_my_large_wstring); + return *this; + } /*! * @brief Comparison operator. * @param x LargeWStringStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const LargeWStringStruct& x) const; + const LargeWStringStruct& x) const + { + return (m_my_large_wstring == x.m_my_large_wstring); + } /*! * @brief Comparison operator. * @param x LargeWStringStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const LargeWStringStruct& x) const; + const LargeWStringStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_large_wstring * @param _my_large_wstring New value to be copied in member my_large_wstring */ eProsima_user_DllExport void my_large_wstring( - const std::wstring& _my_large_wstring); + const std::wstring& _my_large_wstring) + { + m_my_large_wstring = _my_large_wstring; + } /*! * @brief This function moves the value in member my_large_wstring * @param _my_large_wstring New value to be moved in member my_large_wstring */ eProsima_user_DllExport void my_large_wstring( - std::wstring&& _my_large_wstring); + std::wstring&& _my_large_wstring) + { + m_my_large_wstring = std::move(_my_large_wstring); + } /*! * @brief This function returns a constant reference to member my_large_wstring * @return Constant reference to member my_large_wstring */ - eProsima_user_DllExport const std::wstring& my_large_wstring() const; + eProsima_user_DllExport const std::wstring& my_large_wstring() const + { + return m_my_large_wstring; + } /*! * @brief This function returns a reference to member my_large_wstring * @return Reference to member my_large_wstring */ - eProsima_user_DllExport std::wstring& my_large_wstring(); + eProsima_user_DllExport std::wstring& my_large_wstring() + { + return m_my_large_wstring; + } + + private: @@ -1848,80 +2669,124 @@ class ArraytStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ArraytStruct(); + eProsima_user_DllExport ArraytStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ArraytStruct(); + eProsima_user_DllExport ~ArraytStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ArraytStruct that will be copied. */ eProsima_user_DllExport ArraytStruct( - const ArraytStruct& x); + const ArraytStruct& x) + { + m_my_array = x.m_my_array; + + } /*! * @brief Move constructor. * @param x Reference to the object ArraytStruct that will be copied. */ eProsima_user_DllExport ArraytStruct( - ArraytStruct&& x) noexcept; + ArraytStruct&& x) noexcept + { + m_my_array = std::move(x.m_my_array); + } /*! * @brief Copy assignment. * @param x Reference to the object ArraytStruct that will be copied. */ eProsima_user_DllExport ArraytStruct& operator =( - const ArraytStruct& x); + const ArraytStruct& x) + { + + m_my_array = x.m_my_array; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ArraytStruct that will be copied. */ eProsima_user_DllExport ArraytStruct& operator =( - ArraytStruct&& x) noexcept; + ArraytStruct&& x) noexcept + { + + m_my_array = std::move(x.m_my_array); + return *this; + } /*! * @brief Comparison operator. * @param x ArraytStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ArraytStruct& x) const; + const ArraytStruct& x) const + { + return (m_my_array == x.m_my_array); + } /*! * @brief Comparison operator. * @param x ArraytStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ArraytStruct& x) const; + const ArraytStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_array * @param _my_array New value to be copied in member my_array */ eProsima_user_DllExport void my_array( - const std::array, 2>, 2>& _my_array); + const std::array, 2>, 2>& _my_array) + { + m_my_array = _my_array; + } /*! * @brief This function moves the value in member my_array * @param _my_array New value to be moved in member my_array */ eProsima_user_DllExport void my_array( - std::array, 2>, 2>&& _my_array); + std::array, 2>, 2>&& _my_array) + { + m_my_array = std::move(_my_array); + } /*! * @brief This function returns a constant reference to member my_array * @return Constant reference to member my_array */ - eProsima_user_DllExport const std::array, 2>, 2>& my_array() const; + eProsima_user_DllExport const std::array, 2>, 2>& my_array() const + { + return m_my_array; + } /*! * @brief This function returns a reference to member my_array * @return Reference to member my_array */ - eProsima_user_DllExport std::array, 2>, 2>& my_array(); + eProsima_user_DllExport std::array, 2>, 2>& my_array() + { + return m_my_array; + } + + private: @@ -1943,80 +2808,124 @@ class ArrayArrayStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ArrayArrayStruct(); + eProsima_user_DllExport ArrayArrayStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ArrayArrayStruct(); + eProsima_user_DllExport ~ArrayArrayStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ArrayArrayStruct that will be copied. */ eProsima_user_DllExport ArrayArrayStruct( - const ArrayArrayStruct& x); + const ArrayArrayStruct& x) + { + m_my_array_array = x.m_my_array_array; + + } /*! * @brief Move constructor. * @param x Reference to the object ArrayArrayStruct that will be copied. */ eProsima_user_DllExport ArrayArrayStruct( - ArrayArrayStruct&& x) noexcept; + ArrayArrayStruct&& x) noexcept + { + m_my_array_array = std::move(x.m_my_array_array); + } /*! * @brief Copy assignment. * @param x Reference to the object ArrayArrayStruct that will be copied. */ eProsima_user_DllExport ArrayArrayStruct& operator =( - const ArrayArrayStruct& x); + const ArrayArrayStruct& x) + { + + m_my_array_array = x.m_my_array_array; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ArrayArrayStruct that will be copied. */ eProsima_user_DllExport ArrayArrayStruct& operator =( - ArrayArrayStruct&& x) noexcept; + ArrayArrayStruct&& x) noexcept + { + + m_my_array_array = std::move(x.m_my_array_array); + return *this; + } /*! * @brief Comparison operator. * @param x ArrayArrayStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ArrayArrayStruct& x) const; + const ArrayArrayStruct& x) const + { + return (m_my_array_array == x.m_my_array_array); + } /*! * @brief Comparison operator. * @param x ArrayArrayStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ArrayArrayStruct& x) const; + const ArrayArrayStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_array_array * @param _my_array_array New value to be copied in member my_array_array */ eProsima_user_DllExport void my_array_array( - const std::array, 2>& _my_array_array); + const std::array, 2>& _my_array_array) + { + m_my_array_array = _my_array_array; + } /*! * @brief This function moves the value in member my_array_array * @param _my_array_array New value to be moved in member my_array_array */ eProsima_user_DllExport void my_array_array( - std::array, 2>&& _my_array_array); + std::array, 2>&& _my_array_array) + { + m_my_array_array = std::move(_my_array_array); + } /*! * @brief This function returns a constant reference to member my_array_array * @return Constant reference to member my_array_array */ - eProsima_user_DllExport const std::array, 2>& my_array_array() const; + eProsima_user_DllExport const std::array, 2>& my_array_array() const + { + return m_my_array_array; + } /*! * @brief This function returns a reference to member my_array_array * @return Reference to member my_array_array */ - eProsima_user_DllExport std::array, 2>& my_array_array(); + eProsima_user_DllExport std::array, 2>& my_array_array() + { + return m_my_array_array; + } + + private: @@ -2025,8 +2934,6 @@ class ArrayArrayStruct }; - - /*! * @brief This class represents the structure SequenceStruct defined by the user in the IDL file. * @ingroup Basic @@ -2038,80 +2945,124 @@ class SequenceStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceStruct(); + eProsima_user_DllExport SequenceStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceStruct(); + eProsima_user_DllExport ~SequenceStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceStruct that will be copied. */ eProsima_user_DllExport SequenceStruct( - const SequenceStruct& x); + const SequenceStruct& x) + { + m_my_sequence = x.m_my_sequence; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceStruct that will be copied. */ eProsima_user_DllExport SequenceStruct( - SequenceStruct&& x) noexcept; + SequenceStruct&& x) noexcept + { + m_my_sequence = std::move(x.m_my_sequence); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceStruct that will be copied. */ eProsima_user_DllExport SequenceStruct& operator =( - const SequenceStruct& x); + const SequenceStruct& x) + { + + m_my_sequence = x.m_my_sequence; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceStruct that will be copied. */ eProsima_user_DllExport SequenceStruct& operator =( - SequenceStruct&& x) noexcept; + SequenceStruct&& x) noexcept + { + + m_my_sequence = std::move(x.m_my_sequence); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceStruct& x) const; + const SequenceStruct& x) const + { + return (m_my_sequence == x.m_my_sequence); + } /*! * @brief Comparison operator. * @param x SequenceStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceStruct& x) const; + const SequenceStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence * @param _my_sequence New value to be copied in member my_sequence */ eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); + const std::vector& _my_sequence) + { + m_my_sequence = _my_sequence; + } /*! * @brief This function moves the value in member my_sequence * @param _my_sequence New value to be moved in member my_sequence */ eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); + std::vector&& _my_sequence) + { + m_my_sequence = std::move(_my_sequence); + } /*! * @brief This function returns a constant reference to member my_sequence * @return Constant reference to member my_sequence */ - eProsima_user_DllExport const std::vector& my_sequence() const; + eProsima_user_DllExport const std::vector& my_sequence() const + { + return m_my_sequence; + } /*! * @brief This function returns a reference to member my_sequence * @return Reference to member my_sequence */ - eProsima_user_DllExport std::vector& my_sequence(); + eProsima_user_DllExport std::vector& my_sequence() + { + return m_my_sequence; + } + + private: @@ -2120,10 +3071,6 @@ class SequenceStruct }; - - - - /*! * @brief This class represents the structure SequenceSequenceStruct defined by the user in the IDL file. * @ingroup Basic @@ -2135,80 +3082,124 @@ class SequenceSequenceStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceSequenceStruct(); + eProsima_user_DllExport SequenceSequenceStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceSequenceStruct(); + eProsima_user_DllExport ~SequenceSequenceStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceSequenceStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceStruct( - const SequenceSequenceStruct& x); + const SequenceSequenceStruct& x) + { + m_my_sequence_sequence = x.m_my_sequence_sequence; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceSequenceStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceStruct( - SequenceSequenceStruct&& x) noexcept; + SequenceSequenceStruct&& x) noexcept + { + m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceSequenceStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceStruct& operator =( - const SequenceSequenceStruct& x); + const SequenceSequenceStruct& x) + { + + m_my_sequence_sequence = x.m_my_sequence_sequence; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceSequenceStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceStruct& operator =( - SequenceSequenceStruct&& x) noexcept; + SequenceSequenceStruct&& x) noexcept + { + + m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceSequenceStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceSequenceStruct& x) const; + const SequenceSequenceStruct& x) const + { + return (m_my_sequence_sequence == x.m_my_sequence_sequence); + } /*! * @brief Comparison operator. * @param x SequenceSequenceStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceSequenceStruct& x) const; + const SequenceSequenceStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence_sequence * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence */ eProsima_user_DllExport void my_sequence_sequence( - const std::vector>& _my_sequence_sequence); + const std::vector>& _my_sequence_sequence) + { + m_my_sequence_sequence = _my_sequence_sequence; + } /*! * @brief This function moves the value in member my_sequence_sequence * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence */ eProsima_user_DllExport void my_sequence_sequence( - std::vector>&& _my_sequence_sequence); + std::vector>&& _my_sequence_sequence) + { + m_my_sequence_sequence = std::move(_my_sequence_sequence); + } /*! * @brief This function returns a constant reference to member my_sequence_sequence * @return Constant reference to member my_sequence_sequence */ - eProsima_user_DllExport const std::vector>& my_sequence_sequence() const; + eProsima_user_DllExport const std::vector>& my_sequence_sequence() const + { + return m_my_sequence_sequence; + } /*! * @brief This function returns a reference to member my_sequence_sequence * @return Reference to member my_sequence_sequence */ - eProsima_user_DllExport std::vector>& my_sequence_sequence(); + eProsima_user_DllExport std::vector>& my_sequence_sequence() + { + return m_my_sequence_sequence; + } + + private: @@ -2230,80 +3221,124 @@ class MapStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapStruct(); + eProsima_user_DllExport MapStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapStruct(); + eProsima_user_DllExport ~MapStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapStruct that will be copied. */ eProsima_user_DllExport MapStruct( - const MapStruct& x); + const MapStruct& x) + { + m_my_map = x.m_my_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapStruct that will be copied. */ eProsima_user_DllExport MapStruct( - MapStruct&& x) noexcept; + MapStruct&& x) noexcept + { + m_my_map = std::move(x.m_my_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapStruct that will be copied. */ eProsima_user_DllExport MapStruct& operator =( - const MapStruct& x); + const MapStruct& x) + { + + m_my_map = x.m_my_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapStruct that will be copied. */ eProsima_user_DllExport MapStruct& operator =( - MapStruct&& x) noexcept; + MapStruct&& x) noexcept + { + + m_my_map = std::move(x.m_my_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapStruct& x) const; + const MapStruct& x) const + { + return (m_my_map == x.m_my_map); + } /*! * @brief Comparison operator. * @param x MapStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapStruct& x) const; + const MapStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map * @param _my_map New value to be copied in member my_map */ eProsima_user_DllExport void my_map( - const std::map& _my_map); + const std::map& _my_map) + { + m_my_map = _my_map; + } /*! * @brief This function moves the value in member my_map * @param _my_map New value to be moved in member my_map */ eProsima_user_DllExport void my_map( - std::map&& _my_map); + std::map&& _my_map) + { + m_my_map = std::move(_my_map); + } /*! * @brief This function returns a constant reference to member my_map * @return Constant reference to member my_map */ - eProsima_user_DllExport const std::map& my_map() const; + eProsima_user_DllExport const std::map& my_map() const + { + return m_my_map; + } /*! * @brief This function returns a reference to member my_map * @return Reference to member my_map */ - eProsima_user_DllExport std::map& my_map(); + eProsima_user_DllExport std::map& my_map() + { + return m_my_map; + } + + private: @@ -2315,7 +3350,6 @@ class MapStruct - /*! * @brief This class represents the structure MapMapStruct defined by the user in the IDL file. * @ingroup Basic @@ -2327,80 +3361,124 @@ class MapMapStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapMapStruct(); + eProsima_user_DllExport MapMapStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapMapStruct(); + eProsima_user_DllExport ~MapMapStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapMapStruct that will be copied. */ eProsima_user_DllExport MapMapStruct( - const MapMapStruct& x); + const MapMapStruct& x) + { + m_my_map_map = x.m_my_map_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapMapStruct that will be copied. */ eProsima_user_DllExport MapMapStruct( - MapMapStruct&& x) noexcept; + MapMapStruct&& x) noexcept + { + m_my_map_map = std::move(x.m_my_map_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapMapStruct that will be copied. */ eProsima_user_DllExport MapMapStruct& operator =( - const MapMapStruct& x); + const MapMapStruct& x) + { + + m_my_map_map = x.m_my_map_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapMapStruct that will be copied. */ eProsima_user_DllExport MapMapStruct& operator =( - MapMapStruct&& x) noexcept; + MapMapStruct&& x) noexcept + { + + m_my_map_map = std::move(x.m_my_map_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapMapStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapMapStruct& x) const; + const MapMapStruct& x) const + { + return (m_my_map_map == x.m_my_map_map); + } /*! * @brief Comparison operator. * @param x MapMapStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapMapStruct& x) const; + const MapMapStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map_map * @param _my_map_map New value to be copied in member my_map_map */ eProsima_user_DllExport void my_map_map( - const std::map>& _my_map_map); + const std::map>& _my_map_map) + { + m_my_map_map = _my_map_map; + } /*! * @brief This function moves the value in member my_map_map * @param _my_map_map New value to be moved in member my_map_map */ eProsima_user_DllExport void my_map_map( - std::map>&& _my_map_map); + std::map>&& _my_map_map) + { + m_my_map_map = std::move(_my_map_map); + } /*! * @brief This function returns a constant reference to member my_map_map * @return Constant reference to member my_map_map */ - eProsima_user_DllExport const std::map>& my_map_map() const; + eProsima_user_DllExport const std::map>& my_map_map() const + { + return m_my_map_map; + } /*! * @brief This function returns a reference to member my_map_map * @return Reference to member my_map_map */ - eProsima_user_DllExport std::map>& my_map_map(); + eProsima_user_DllExport std::map>& my_map_map() + { + return m_my_map_map; + } + + private: @@ -2418,67 +3496,119 @@ class MyBitset /*! * @brief Default constructor. */ - eProsima_user_DllExport MyBitset(); + eProsima_user_DllExport MyBitset() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MyBitset(); + eProsima_user_DllExport ~MyBitset() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MyBitset that will be copied. */ eProsima_user_DllExport MyBitset( - const MyBitset& x); + const MyBitset& x) + { + m_bitset = x.m_bitset; + } /*! * @brief Move constructor. * @param x Reference to the object MyBitset that will be copied. */ eProsima_user_DllExport MyBitset( - MyBitset&& x) noexcept; + MyBitset&& x) noexcept + { + m_bitset = x.m_bitset; + } /*! * @brief Copy assignment. * @param x Reference to the object MyBitset that will be copied. */ eProsima_user_DllExport MyBitset& operator =( - const MyBitset& x); + const MyBitset& x) + { + + m_bitset = x.m_bitset; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MyBitset that will be copied. */ eProsima_user_DllExport MyBitset& operator =( - MyBitset&& x) noexcept; + MyBitset&& x) noexcept + { + + m_bitset = x.m_bitset; + + return *this; + } /*! * @brief Comparison operator. * @param x MyBitset object to compare. */ eProsima_user_DllExport bool operator ==( - const MyBitset& x) const; + const MyBitset& x) const + { + + return m_bitset == x.m_bitset; + } /*! * @brief Comparison operator. * @param x MyBitset object to compare. */ eProsima_user_DllExport bool operator !=( - const MyBitset& x) const; + const MyBitset& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member a * @param _a New value for member a */ eProsima_user_DllExport void a( - char _a); + char _a) + { + int base = 0; + int size = 2; + for (int i = base; i < base + size; ++i) + { + m_bitset.set(i, !!(_a & 0x01)); + _a = _a >> 1; + } + + } /*! * @brief This function returns the value of member a * @return Value of member a */ - eProsima_user_DllExport char a() const; + eProsima_user_DllExport char a() const + { + int base = 0; + int size = 2; + std::bitset<2> aux; + for (int i = 0; i < size; ++i) + { + aux.set(i, m_bitset.test(i + base)); + } + return static_cast(aux.to_ullong()); + + } @@ -2487,20 +3617,55 @@ class MyBitset * @param _b New value for member b */ eProsima_user_DllExport void b( - uint32_t _b); + uint32_t _b) + { + int base = 10; + int size = 20; + for (int i = base; i < base + size; ++i) + { + m_bitset.set(i, !!(_b & 0x01)); + _b = _b >> 1; + } + + } /*! * @brief This function returns the value of member b * @return Value of member b */ - eProsima_user_DllExport uint32_t b() const; + eProsima_user_DllExport uint32_t b() const + { + int base = 10; + int size = 20; + std::bitset<20> aux; + for (int i = 0; i < size; ++i) + { + aux.set(i, m_bitset.test(i + base)); + } + return static_cast(aux.to_ullong()); + + } + + eProsima_user_DllExport std::bitset<30> bitset() const + { + std::string str_value; - eProsima_user_DllExport std::bitset<30> bitset() const; + str_value = m_bitset.to_string() + str_value; + + return std::bitset<30>(str_value); + } eProsima_user_DllExport void bitset( - const std::bitset<30>&); + const std::bitset<30>& bitset) + { + std::string str_value {bitset.to_string()}; + size_t base_diff {0}; + size_t last_post {std::string::npos}; + base_diff += 30; + m_bitset = std::bitset<30>(str_value.substr(str_value.length() - base_diff, last_post)); + } private: @@ -2520,80 +3685,124 @@ class BitsetStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BitsetStruct(); + eProsima_user_DllExport BitsetStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BitsetStruct(); + eProsima_user_DllExport ~BitsetStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BitsetStruct that will be copied. */ eProsima_user_DllExport BitsetStruct( - const BitsetStruct& x); + const BitsetStruct& x) + { + m_a = x.m_a; + + } /*! * @brief Move constructor. * @param x Reference to the object BitsetStruct that will be copied. */ eProsima_user_DllExport BitsetStruct( - BitsetStruct&& x) noexcept; + BitsetStruct&& x) noexcept + { + m_a = std::move(x.m_a); + } /*! * @brief Copy assignment. * @param x Reference to the object BitsetStruct that will be copied. */ eProsima_user_DllExport BitsetStruct& operator =( - const BitsetStruct& x); + const BitsetStruct& x) + { + + m_a = x.m_a; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BitsetStruct that will be copied. */ eProsima_user_DllExport BitsetStruct& operator =( - BitsetStruct&& x) noexcept; + BitsetStruct&& x) noexcept + { + + m_a = std::move(x.m_a); + return *this; + } /*! * @brief Comparison operator. * @param x BitsetStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BitsetStruct& x) const; + const BitsetStruct& x) const + { + return (m_a == x.m_a); + } /*! * @brief Comparison operator. * @param x BitsetStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BitsetStruct& x) const; + const BitsetStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member a * @param _a New value to be copied in member a */ eProsima_user_DllExport void a( - const MyBitset& _a); + const MyBitset& _a) + { + m_a = _a; + } /*! * @brief This function moves the value in member a * @param _a New value to be moved in member a */ eProsima_user_DllExport void a( - MyBitset&& _a); + MyBitset&& _a) + { + m_a = std::move(_a); + } /*! * @brief This function returns a constant reference to member a * @return Constant reference to member a */ - eProsima_user_DllExport const MyBitset& a() const; + eProsima_user_DllExport const MyBitset& a() const + { + return m_a; + } /*! * @brief This function returns a reference to member a * @return Reference to member a */ - eProsima_user_DllExport MyBitset& a(); + eProsima_user_DllExport MyBitset& a() + { + return m_a; + } + + private: @@ -2613,73 +3822,119 @@ class StructStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport StructStruct(); + eProsima_user_DllExport StructStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~StructStruct(); + eProsima_user_DllExport ~StructStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object StructStruct that will be copied. */ eProsima_user_DllExport StructStruct( - const StructStruct& x); + const StructStruct& x) + { + m_a = x.m_a; + + m_b = x.m_b; + + } /*! * @brief Move constructor. * @param x Reference to the object StructStruct that will be copied. */ eProsima_user_DllExport StructStruct( - StructStruct&& x) noexcept; + StructStruct&& x) noexcept + { + m_a = x.m_a; + m_b = x.m_b; + } /*! * @brief Copy assignment. * @param x Reference to the object StructStruct that will be copied. */ eProsima_user_DllExport StructStruct& operator =( - const StructStruct& x); + const StructStruct& x) + { + + m_a = x.m_a; + + m_b = x.m_b; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object StructStruct that will be copied. */ eProsima_user_DllExport StructStruct& operator =( - StructStruct&& x) noexcept; + StructStruct&& x) noexcept + { + + m_a = x.m_a; + m_b = x.m_b; + return *this; + } /*! * @brief Comparison operator. * @param x StructStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const StructStruct& x) const; + const StructStruct& x) const + { + return (m_a == x.m_a && + m_b == x.m_b); + } /*! * @brief Comparison operator. * @param x StructStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const StructStruct& x) const; + const StructStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member a * @param _a New value for member a */ eProsima_user_DllExport void a( - int32_t _a); + int32_t _a) + { + m_a = _a; + } /*! * @brief This function returns the value of member a * @return Value of member a */ - eProsima_user_DllExport int32_t a() const; + eProsima_user_DllExport int32_t a() const + { + return m_a; + } /*! * @brief This function returns a reference to member a * @return Reference to member a */ - eProsima_user_DllExport int32_t& a(); + eProsima_user_DllExport int32_t& a() + { + return m_a; + } /*! @@ -2687,19 +3942,30 @@ class StructStruct * @param _b New value for member b */ eProsima_user_DllExport void b( - int64_t _b); + int64_t _b) + { + m_b = _b; + } /*! * @brief This function returns the value of member b * @return Value of member b */ - eProsima_user_DllExport int64_t b() const; + eProsima_user_DllExport int64_t b() const + { + return m_b; + } /*! * @brief This function returns a reference to member b * @return Reference to member b */ - eProsima_user_DllExport int64_t& b(); + eProsima_user_DllExport int64_t& b() + { + return m_b; + } + + private: @@ -2720,80 +3986,129 @@ class StructStructStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport StructStructStruct(); + eProsima_user_DllExport StructStructStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~StructStructStruct(); + eProsima_user_DllExport ~StructStructStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object StructStructStruct that will be copied. */ eProsima_user_DllExport StructStructStruct( - const StructStructStruct& x); + const StructStructStruct& x) + { + m_child_struct = x.m_child_struct; + + m_child_int64 = x.m_child_int64; + + } /*! * @brief Move constructor. * @param x Reference to the object StructStructStruct that will be copied. */ eProsima_user_DllExport StructStructStruct( - StructStructStruct&& x) noexcept; + StructStructStruct&& x) noexcept + { + m_child_struct = std::move(x.m_child_struct); + m_child_int64 = x.m_child_int64; + } /*! * @brief Copy assignment. * @param x Reference to the object StructStructStruct that will be copied. */ eProsima_user_DllExport StructStructStruct& operator =( - const StructStructStruct& x); + const StructStructStruct& x) + { + + m_child_struct = x.m_child_struct; + + m_child_int64 = x.m_child_int64; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object StructStructStruct that will be copied. */ eProsima_user_DllExport StructStructStruct& operator =( - StructStructStruct&& x) noexcept; + StructStructStruct&& x) noexcept + { + + m_child_struct = std::move(x.m_child_struct); + m_child_int64 = x.m_child_int64; + return *this; + } /*! * @brief Comparison operator. * @param x StructStructStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const StructStructStruct& x) const; + const StructStructStruct& x) const + { + return (m_child_struct == x.m_child_struct && + m_child_int64 == x.m_child_int64); + } /*! * @brief Comparison operator. * @param x StructStructStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const StructStructStruct& x) const; + const StructStructStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member child_struct * @param _child_struct New value to be copied in member child_struct */ eProsima_user_DllExport void child_struct( - const StructStruct& _child_struct); + const StructStruct& _child_struct) + { + m_child_struct = _child_struct; + } /*! * @brief This function moves the value in member child_struct * @param _child_struct New value to be moved in member child_struct */ eProsima_user_DllExport void child_struct( - StructStruct&& _child_struct); + StructStruct&& _child_struct) + { + m_child_struct = std::move(_child_struct); + } /*! * @brief This function returns a constant reference to member child_struct * @return Constant reference to member child_struct */ - eProsima_user_DllExport const StructStruct& child_struct() const; + eProsima_user_DllExport const StructStruct& child_struct() const + { + return m_child_struct; + } /*! * @brief This function returns a reference to member child_struct * @return Reference to member child_struct */ - eProsima_user_DllExport StructStruct& child_struct(); + eProsima_user_DllExport StructStruct& child_struct() + { + return m_child_struct; + } /*! @@ -2801,19 +4116,30 @@ class StructStructStruct * @param _child_int64 New value for member child_int64 */ eProsima_user_DllExport void child_int64( - int64_t _child_int64); + int64_t _child_int64) + { + m_child_int64 = _child_int64; + } /*! * @brief This function returns the value of member child_int64 * @return Value of member child_int64 */ - eProsima_user_DllExport int64_t child_int64() const; + eProsima_user_DllExport int64_t child_int64() const + { + return m_child_int64; + } /*! * @brief This function returns a reference to member child_int64 * @return Reference to member child_int64 */ - eProsima_user_DllExport int64_t& child_int64(); + eProsima_user_DllExport int64_t& child_int64() + { + return m_child_int64; + } + + private: @@ -2834,95 +4160,289 @@ class SimpleUnion /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleUnion(); + eProsima_user_DllExport SimpleUnion() + { + m__d = A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleUnion(); + eProsima_user_DllExport ~SimpleUnion() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleUnion that will be copied. */ eProsima_user_DllExport SimpleUnion( - const SimpleUnion& x); + const SimpleUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object SimpleUnion that will be copied. */ eProsima_user_DllExport SimpleUnion( - SimpleUnion&& x) noexcept; + SimpleUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleUnion that will be copied. */ eProsima_user_DllExport SimpleUnion& operator =( - const SimpleUnion& x); + const SimpleUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleUnion that will be copied. */ eProsima_user_DllExport SimpleUnion& operator =( - SimpleUnion&& x) noexcept; + SimpleUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x SimpleUnion object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleUnion& x) const; + const SimpleUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_first == x.m_first); + break; + + + case B: + return (m_second == x.m_second); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x SimpleUnion object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleUnion& x) const; + const SimpleUnion& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - int32_t __d); + int32_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case B: + switch (__d) + { + case B: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport int32_t _d() const; + eProsima_user_DllExport int32_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport int32_t& _d(); + eProsima_user_DllExport int32_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first * @param _first New value for member first */ eProsima_user_DllExport void first( - int32_t _first); + int32_t _first) + { + m_first = _first; + m__d = A; + + } /*! * @brief This function returns the value of member first * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t first() const; + eProsima_user_DllExport int32_t first() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! * @brief This function returns a reference to member first * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& first(); + eProsima_user_DllExport int32_t& first() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! @@ -2930,21 +4450,66 @@ class SimpleUnion * @param _second New value for member second */ eProsima_user_DllExport void second( - int64_t _second); + int64_t _second) + { + m_second = _second; + m__d = B; + + } /*! * @brief This function returns the value of member second * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t second() const; + eProsima_user_DllExport int64_t second() const + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } /*! * @brief This function returns a reference to member second * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t& second(); + eProsima_user_DllExport int64_t& second() + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + private: @@ -2966,95 +4531,291 @@ class UnionUnion /*! * @brief Default constructor. */ - eProsima_user_DllExport UnionUnion(); + eProsima_user_DllExport UnionUnion() + { + m__d = A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~UnionUnion(); + eProsima_user_DllExport ~UnionUnion() + { + } /*! * @brief Copy constructor. * @param x Reference to the object UnionUnion that will be copied. */ eProsima_user_DllExport UnionUnion( - const UnionUnion& x); + const UnionUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object UnionUnion that will be copied. */ eProsima_user_DllExport UnionUnion( - UnionUnion&& x) noexcept; + UnionUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = std::move(x.m_second); + + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object UnionUnion that will be copied. */ eProsima_user_DllExport UnionUnion& operator =( - const UnionUnion& x); + const UnionUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object UnionUnion that will be copied. */ eProsima_user_DllExport UnionUnion& operator =( - UnionUnion&& x) noexcept; + UnionUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = std::move(x.m_second); + + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x UnionUnion object to compare. */ eProsima_user_DllExport bool operator ==( - const UnionUnion& x) const; + const UnionUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_first == x.m_first); + break; + + + case B: + return (m_second == x.m_second); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x UnionUnion object to compare. */ eProsima_user_DllExport bool operator !=( - const UnionUnion& x) const; + const UnionUnion& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - int32_t __d); + int32_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case B: + switch (__d) + { + case B: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport int32_t _d() const; + eProsima_user_DllExport int32_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport int32_t& _d(); + eProsima_user_DllExport int32_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first * @param _first New value for member first */ eProsima_user_DllExport void first( - int32_t _first); + int32_t _first) + { + m_first = _first; + m__d = A; + + } /*! * @brief This function returns the value of member first * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t first() const; + eProsima_user_DllExport int32_t first() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! * @brief This function returns a reference to member first * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& first(); + eProsima_user_DllExport int32_t& first() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! @@ -3062,28 +4823,78 @@ class UnionUnion * @param _second New value to be copied in member second */ eProsima_user_DllExport void second( - const SimpleUnion& _second); + const SimpleUnion& _second) + { + m_second = _second; + m__d = B; + + } /*! * @brief This function moves the value in member second * @param _second New value to be moved in member second */ eProsima_user_DllExport void second( - SimpleUnion&& _second); + SimpleUnion&& _second) + { + m_second = std::move(_second); + m__d = B; + + } /*! * @brief This function returns a constant reference to member second * @return Constant reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport const SimpleUnion& second() const; + eProsima_user_DllExport const SimpleUnion& second() const + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } /*! * @brief This function returns a reference to member second * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport SimpleUnion& second(); + eProsima_user_DllExport SimpleUnion& second() + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + private: @@ -3105,95 +4916,289 @@ class WCharUnion /*! * @brief Default constructor. */ - eProsima_user_DllExport WCharUnion(); + eProsima_user_DllExport WCharUnion() + { + m__d = A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~WCharUnion(); + eProsima_user_DllExport ~WCharUnion() + { + } /*! * @brief Copy constructor. * @param x Reference to the object WCharUnion that will be copied. */ eProsima_user_DllExport WCharUnion( - const WCharUnion& x); + const WCharUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object WCharUnion that will be copied. */ eProsima_user_DllExport WCharUnion( - WCharUnion&& x) noexcept; + WCharUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object WCharUnion that will be copied. */ eProsima_user_DllExport WCharUnion& operator =( - const WCharUnion& x); + const WCharUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object WCharUnion that will be copied. */ eProsima_user_DllExport WCharUnion& operator =( - WCharUnion&& x) noexcept; + WCharUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x WCharUnion object to compare. */ eProsima_user_DllExport bool operator ==( - const WCharUnion& x) const; + const WCharUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_first == x.m_first); + break; + + + case B: + return (m_second == x.m_second); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x WCharUnion object to compare. */ eProsima_user_DllExport bool operator !=( - const WCharUnion& x) const; + const WCharUnion& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - wchar_t __d); + wchar_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case B: + switch (__d) + { + case B: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport wchar_t _d() const; + eProsima_user_DllExport wchar_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport wchar_t& _d(); + eProsima_user_DllExport wchar_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first * @param _first New value for member first */ eProsima_user_DllExport void first( - int32_t _first); + int32_t _first) + { + m_first = _first; + m__d = A; + + } /*! * @brief This function returns the value of member first * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t first() const; + eProsima_user_DllExport int32_t first() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! * @brief This function returns a reference to member first * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& first(); + eProsima_user_DllExport int32_t& first() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! @@ -3201,21 +5206,66 @@ class WCharUnion * @param _second New value for member second */ eProsima_user_DllExport void second( - int64_t _second); + int64_t _second) + { + m_second = _second; + m__d = B; + + } /*! * @brief This function returns the value of member second * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t second() const; + eProsima_user_DllExport int64_t second() const + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } /*! * @brief This function returns a reference to member second * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t& second(); + eProsima_user_DllExport int64_t& second() + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + private: @@ -3237,80 +5287,124 @@ class SimpleUnionStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleUnionStruct(); + eProsima_user_DllExport SimpleUnionStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleUnionStruct(); + eProsima_user_DllExport ~SimpleUnionStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleUnionStruct that will be copied. */ eProsima_user_DllExport SimpleUnionStruct( - const SimpleUnionStruct& x); + const SimpleUnionStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object SimpleUnionStruct that will be copied. */ eProsima_user_DllExport SimpleUnionStruct( - SimpleUnionStruct&& x) noexcept; + SimpleUnionStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleUnionStruct that will be copied. */ eProsima_user_DllExport SimpleUnionStruct& operator =( - const SimpleUnionStruct& x); + const SimpleUnionStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleUnionStruct that will be copied. */ eProsima_user_DllExport SimpleUnionStruct& operator =( - SimpleUnionStruct&& x) noexcept; + SimpleUnionStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x SimpleUnionStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleUnionStruct& x) const; + const SimpleUnionStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x SimpleUnionStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleUnionStruct& x) const; + const SimpleUnionStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const SimpleUnion& _my_union); + const SimpleUnion& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - SimpleUnion&& _my_union); + SimpleUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const SimpleUnion& my_union() const; + eProsima_user_DllExport const SimpleUnion& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport SimpleUnion& my_union(); + eProsima_user_DllExport SimpleUnion& my_union() + { + return m_my_union; + } + + private: @@ -3330,80 +5424,124 @@ class UnionUnionUnionStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport UnionUnionUnionStruct(); + eProsima_user_DllExport UnionUnionUnionStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~UnionUnionUnionStruct(); + eProsima_user_DllExport ~UnionUnionUnionStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object UnionUnionUnionStruct that will be copied. */ eProsima_user_DllExport UnionUnionUnionStruct( - const UnionUnionUnionStruct& x); + const UnionUnionUnionStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object UnionUnionUnionStruct that will be copied. */ eProsima_user_DllExport UnionUnionUnionStruct( - UnionUnionUnionStruct&& x) noexcept; + UnionUnionUnionStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object UnionUnionUnionStruct that will be copied. */ eProsima_user_DllExport UnionUnionUnionStruct& operator =( - const UnionUnionUnionStruct& x); + const UnionUnionUnionStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object UnionUnionUnionStruct that will be copied. */ eProsima_user_DllExport UnionUnionUnionStruct& operator =( - UnionUnionUnionStruct&& x) noexcept; + UnionUnionUnionStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x UnionUnionUnionStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const UnionUnionUnionStruct& x) const; + const UnionUnionUnionStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x UnionUnionUnionStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const UnionUnionUnionStruct& x) const; + const UnionUnionUnionStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const UnionUnion& _my_union); + const UnionUnion& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - UnionUnion&& _my_union); + UnionUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const UnionUnion& my_union() const; + eProsima_user_DllExport const UnionUnion& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport UnionUnion& my_union(); + eProsima_user_DllExport UnionUnion& my_union() + { + return m_my_union; + } + + private: @@ -3423,80 +5561,124 @@ class WCharUnionStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport WCharUnionStruct(); + eProsima_user_DllExport WCharUnionStruct() + { + // Just to register all known types + registerBasicTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~WCharUnionStruct(); + eProsima_user_DllExport ~WCharUnionStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object WCharUnionStruct that will be copied. */ eProsima_user_DllExport WCharUnionStruct( - const WCharUnionStruct& x); + const WCharUnionStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object WCharUnionStruct that will be copied. */ eProsima_user_DllExport WCharUnionStruct( - WCharUnionStruct&& x) noexcept; + WCharUnionStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object WCharUnionStruct that will be copied. */ eProsima_user_DllExport WCharUnionStruct& operator =( - const WCharUnionStruct& x); + const WCharUnionStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object WCharUnionStruct that will be copied. */ eProsima_user_DllExport WCharUnionStruct& operator =( - WCharUnionStruct&& x) noexcept; + WCharUnionStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x WCharUnionStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const WCharUnionStruct& x) const; + const WCharUnionStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x WCharUnionStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const WCharUnionStruct& x) const; + const WCharUnionStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const WCharUnion& _my_union); + const WCharUnion& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - WCharUnion&& _my_union); + WCharUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const WCharUnion& my_union() const; + eProsima_user_DllExport const WCharUnion& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport WCharUnion& my_union(); + eProsima_user_DllExport WCharUnion& my_union() + { + return m_my_union; + } + + private: @@ -3504,8 +5686,6 @@ class WCharUnionStruct }; -#endif // _FAST_DDS_GENERATED_BASIC_H_ - +#endif // _FAST_DDS_GENERATED_BASIC_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/unittest/dynamic_types/idl/BasicCdrAux.hpp b/test/unittest/dynamic_types/idl/BasicCdrAux.hpp index ddb7d2cc3b4..652791b97bf 100644 --- a/test/unittest/dynamic_types/idl/BasicCdrAux.hpp +++ b/test/unittest/dynamic_types/idl/BasicCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_BASICCDRAUX_HPP_ #define _FAST_DDS_GENERATED_BASICCDRAUX_HPP_ -#include "Basic.h" +#include "Basic.hpp" constexpr uint32_t ArraytStruct_max_cdr_typesize {36UL}; constexpr uint32_t ArraytStruct_max_key_cdr_typesize {0UL}; @@ -275,18 +275,12 @@ eProsima_user_DllExport void serialize_key( - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceStruct& data); - - - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceSequenceStruct& data); @@ -304,7 +298,6 @@ eProsima_user_DllExport void serialize_key( - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const MapMapStruct& data); @@ -336,12 +329,6 @@ eProsima_user_DllExport void serialize_key( - - - - - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SimpleUnionStruct& data); diff --git a/test/unittest/dynamic_types/idl/BasicCdrAux.ipp b/test/unittest/dynamic_types/idl/BasicCdrAux.ipp index 99cd2571ef3..32f7eff5c4b 100644 --- a/test/unittest/dynamic_types/idl/BasicCdrAux.ipp +++ b/test/unittest/dynamic_types/idl/BasicCdrAux.ipp @@ -1758,8 +1758,6 @@ void serialize_key( - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1838,10 +1836,6 @@ void serialize_key( - - - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -2003,7 +1997,6 @@ void serialize_key( - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, diff --git a/test/unittest/dynamic_types/idl/BasicPubSubTypes.cxx b/test/unittest/dynamic_types/idl/BasicPubSubTypes.cxx index efe25ce72f8..a479954a231 100644 --- a/test/unittest/dynamic_types/idl/BasicPubSubTypes.cxx +++ b/test/unittest/dynamic_types/idl/BasicPubSubTypes.cxx @@ -4217,8 +4217,6 @@ bool ArrayArrayStructPubSubType::getKey( - - SequenceStructPubSubType::SequenceStructPubSubType() { setName("SequenceStruct"); @@ -4409,10 +4407,6 @@ bool SequenceStructPubSubType::getKey( - - - - SequenceSequenceStructPubSubType::SequenceSequenceStructPubSubType() { setName("SequenceSequenceStruct"); @@ -4798,7 +4792,6 @@ bool MapStructPubSubType::getKey( - MapMapStructPubSubType::MapMapStructPubSubType() { setName("MapMapStruct"); @@ -5566,12 +5559,6 @@ bool StructStructStructPubSubType::getKey( - - - - - - SimpleUnionStructPubSubType::SimpleUnionStructPubSubType() { setName("SimpleUnionStruct"); @@ -6140,3 +6127,6 @@ bool WCharUnionStructPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "BasicCdrAux.ipp" diff --git a/test/unittest/dynamic_types/idl/BasicPubSubTypes.h b/test/unittest/dynamic_types/idl/BasicPubSubTypes.h index 467e624b19b..ff643851298 100644 --- a/test/unittest/dynamic_types/idl/BasicPubSubTypes.h +++ b/test/unittest/dynamic_types/idl/BasicPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "Basic.h" +#include "Basic.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -2023,8 +2023,6 @@ class ArrayArrayStructPubSubType : public eprosima::fastdds::dds::TopicDataType - - /*! * @brief This class represents the TopicDataType of the type SequenceStruct defined by the user in the IDL file. * @ingroup Basic @@ -2115,10 +2113,6 @@ class SequenceStructPubSubType : public eprosima::fastdds::dds::TopicDataType - - - - /*! * @brief This class represents the TopicDataType of the type SequenceSequenceStruct defined by the user in the IDL file. * @ingroup Basic @@ -2304,7 +2298,6 @@ class MapStructPubSubType : public eprosima::fastdds::dds::TopicDataType - /*! * @brief This class represents the TopicDataType of the type MapMapStruct defined by the user in the IDL file. * @ingroup Basic @@ -2672,12 +2665,6 @@ class StructStructStructPubSubType : public eprosima::fastdds::dds::TopicDataTyp - - - - - - /*! * @brief This class represents the TopicDataType of the type SimpleUnionStruct defined by the user in the IDL file. * @ingroup Basic diff --git a/test/unittest/dynamic_types/idl/BasicTypeObject.cxx b/test/unittest/dynamic_types/idl/BasicTypeObject.cxx index 282c8898fe4..ca3d9b1670b 100644 --- a/test/unittest/dynamic_types/idl/BasicTypeObject.cxx +++ b/test/unittest/dynamic_types/idl/BasicTypeObject.cxx @@ -24,7 +24,7 @@ namespace { char dummy; } #endif -#include "Basic.h" +#include "Basic.hpp" #include "BasicTypeObject.h" #include #include @@ -4985,8 +4985,6 @@ const TypeObject* GetCompleteArrayArrayStructObject() - - const TypeIdentifier* GetSequenceStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceStruct", complete); @@ -5162,10 +5160,6 @@ const TypeObject* GetCompleteSequenceStructObject() - - - - const TypeIdentifier* GetSequenceSequenceStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceSequenceStruct", complete); @@ -5521,7 +5515,6 @@ const TypeObject* GetCompleteMapStructObject() - const TypeIdentifier* GetMapMapStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("MapMapStruct", complete); diff --git a/test/unittest/dynamic_types/idl/BasicTypeObject.h b/test/unittest/dynamic_types/idl/BasicTypeObject.h index e114b7d10d0..e95cb47c2d7 100644 --- a/test/unittest/dynamic_types/idl/BasicTypeObject.h +++ b/test/unittest/dynamic_types/idl/BasicTypeObject.h @@ -230,8 +230,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteArrayArrayStructObject(); - - eProsima_user_DllExport const TypeIdentifier* GetSequenceStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceStructObject(); @@ -239,10 +237,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteSequenceStructObject(); - - - - eProsima_user_DllExport const TypeIdentifier* GetSequenceSequenceStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceSequenceStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceSequenceStructObject(); @@ -262,7 +256,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteMapStructObject(); - eProsima_user_DllExport const TypeIdentifier* GetMapMapStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetMapMapStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalMapMapStructObject(); diff --git a/test/unittest/dynamic_types/idl/Basicv1.cxx b/test/unittest/dynamic_types/idl/Basicv1.cxx deleted file mode 100644 index b8fca04e00d..00000000000 --- a/test/unittest/dynamic_types/idl/Basicv1.cxx +++ /dev/null @@ -1,6119 +0,0 @@ -// 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 Basic.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Basic.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include "BasicTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define ArraytStruct_max_cdr_typesize 36ULL; -#define SimpleUnionStruct_max_cdr_typesize 24ULL; - -#define WCharUnionStruct_max_cdr_typesize 24ULL; -#define OctetStruct_max_cdr_typesize 5ULL; -#define LongStruct_max_cdr_typesize 8ULL; -#define EnumStruct_max_cdr_typesize 8ULL; -#define BitsetStruct_max_cdr_typesize 8ULL; - - -#define DoubleStruct_max_cdr_typesize 16ULL; -#define LargeWStringStruct_max_cdr_typesize 167708ULL; -#define WCharStruct_max_cdr_typesize 8ULL; - -#define WStringStruct_max_cdr_typesize 1028ULL; -#define SequenceStruct_max_cdr_typesize 16ULL; - -#define ULongStruct_max_cdr_typesize 8ULL; -#define SequenceSequenceStruct_max_cdr_typesize 48ULL; -#define FloatStruct_max_cdr_typesize 8ULL; -#define LongDoubleStruct_max_cdr_typesize 24ULL; -#define StructStructStruct_max_cdr_typesize 32ULL; -#define UnionUnionUnionStruct_max_cdr_typesize 32ULL; -#define BoolStruct_max_cdr_typesize 5ULL; -#define MapMapStruct_max_cdr_typesize 60ULL; -#define AliasAliasStruct_max_cdr_typesize 8ULL; -#define ArrayArrayStruct_max_cdr_typesize 72ULL; -#define ShortStruct_max_cdr_typesize 6ULL; -#define MapStruct_max_cdr_typesize 24ULL; -#define UShortStruct_max_cdr_typesize 6ULL; - - -#define ULongLongStruct_max_cdr_typesize 16ULL; -#define AliasStruct_max_cdr_typesize 8ULL; -#define LargeStringStruct_max_cdr_typesize 41934ULL; -#define CharStruct_max_cdr_typesize 5ULL; -#define LongLongStruct_max_cdr_typesize 16ULL; -#define StringStruct_max_cdr_typesize 264ULL; -#define StructStruct_max_cdr_typesize 16ULL; - - - - - -EnumStruct::EnumStruct() -{ - // MyEnum m_my_enum - m_my_enum = ::A; - - // Just to register all known types - registerBasicTypes(); -} - -EnumStruct::~EnumStruct() -{ -} - -EnumStruct::EnumStruct( - const EnumStruct& x) -{ - m_my_enum = x.m_my_enum; - -} - -EnumStruct::EnumStruct( - EnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - -} - -EnumStruct& EnumStruct::operator =( - const EnumStruct& x) -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -EnumStruct& EnumStruct::operator =( - EnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -bool EnumStruct::operator ==( - const EnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool EnumStruct::operator !=( - const EnumStruct& x) const -{ - return !(*this == x); -} - -size_t EnumStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return EnumStruct_max_cdr_typesize; -} - -size_t EnumStruct::getCdrSerializedSize( - const EnumStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void EnumStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m_my_enum; - -} - -void EnumStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_my_enum = (MyEnum)enum_value; - } - - -} - - -bool EnumStruct::isKeyDefined() -{ - return false; -} - -void EnumStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void EnumStruct::my_enum( - MyEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyEnum EnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyEnum& EnumStruct::my_enum() -{ - return m_my_enum; -} - - - - - -AliasStruct::AliasStruct() -{ - // MyAliasEnum m_my_alias - m_my_alias = ::A; - - // Just to register all known types - registerBasicTypes(); -} - -AliasStruct::~AliasStruct() -{ -} - -AliasStruct::AliasStruct( - const AliasStruct& x) -{ - m_my_alias = x.m_my_alias; - -} - -AliasStruct::AliasStruct( - AliasStruct&& x) noexcept -{ - m_my_alias = x.m_my_alias; - -} - -AliasStruct& AliasStruct::operator =( - const AliasStruct& x) -{ - m_my_alias = x.m_my_alias; - - return *this; -} - -AliasStruct& AliasStruct::operator =( - AliasStruct&& x) noexcept -{ - m_my_alias = x.m_my_alias; - - return *this; -} - -bool AliasStruct::operator ==( - const AliasStruct& x) const -{ - return (m_my_alias == x.m_my_alias); -} - -bool AliasStruct::operator !=( - const AliasStruct& x) const -{ - return !(*this == x); -} - -size_t AliasStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return AliasStruct_max_cdr_typesize; -} - -size_t AliasStruct::getCdrSerializedSize( - const AliasStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void AliasStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m_my_alias; - -} - -void AliasStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_my_alias = (MyAliasEnum)enum_value; - } - - -} - - -bool AliasStruct::isKeyDefined() -{ - return false; -} - -void AliasStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_alias - * @param _my_alias New value for member my_alias - */ -void AliasStruct::my_alias( - MyAliasEnum _my_alias) -{ - m_my_alias = _my_alias; -} - -/*! - * @brief This function returns the value of member my_alias - * @return Value of member my_alias - */ -MyAliasEnum AliasStruct::my_alias() const -{ - return m_my_alias; -} - -/*! - * @brief This function returns a reference to member my_alias - * @return Reference to member my_alias - */ -MyAliasEnum& AliasStruct::my_alias() -{ - return m_my_alias; -} - - - - - -AliasAliasStruct::AliasAliasStruct() -{ - // MyAliasAliasEnum m_my_alias_alias - m_my_alias_alias = ::A; - - // Just to register all known types - registerBasicTypes(); -} - -AliasAliasStruct::~AliasAliasStruct() -{ -} - -AliasAliasStruct::AliasAliasStruct( - const AliasAliasStruct& x) -{ - m_my_alias_alias = x.m_my_alias_alias; - -} - -AliasAliasStruct::AliasAliasStruct( - AliasAliasStruct&& x) noexcept -{ - m_my_alias_alias = x.m_my_alias_alias; - -} - -AliasAliasStruct& AliasAliasStruct::operator =( - const AliasAliasStruct& x) -{ - m_my_alias_alias = x.m_my_alias_alias; - - return *this; -} - -AliasAliasStruct& AliasAliasStruct::operator =( - AliasAliasStruct&& x) noexcept -{ - m_my_alias_alias = x.m_my_alias_alias; - - return *this; -} - -bool AliasAliasStruct::operator ==( - const AliasAliasStruct& x) const -{ - return (m_my_alias_alias == x.m_my_alias_alias); -} - -bool AliasAliasStruct::operator !=( - const AliasAliasStruct& x) const -{ - return !(*this == x); -} - -size_t AliasAliasStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return AliasAliasStruct_max_cdr_typesize; -} - -size_t AliasAliasStruct::getCdrSerializedSize( - const AliasAliasStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void AliasAliasStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m_my_alias_alias; - -} - -void AliasAliasStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_my_alias_alias = (MyAliasAliasEnum)enum_value; - } - - -} - - -bool AliasAliasStruct::isKeyDefined() -{ - return false; -} - -void AliasAliasStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_alias_alias - * @param _my_alias_alias New value for member my_alias_alias - */ -void AliasAliasStruct::my_alias_alias( - MyAliasAliasEnum _my_alias_alias) -{ - m_my_alias_alias = _my_alias_alias; -} - -/*! - * @brief This function returns the value of member my_alias_alias - * @return Value of member my_alias_alias - */ -MyAliasAliasEnum AliasAliasStruct::my_alias_alias() const -{ - return m_my_alias_alias; -} - -/*! - * @brief This function returns a reference to member my_alias_alias - * @return Reference to member my_alias_alias - */ -MyAliasAliasEnum& AliasAliasStruct::my_alias_alias() -{ - return m_my_alias_alias; -} - - - - - -BoolStruct::BoolStruct() -{ - // boolean m_my_bool - m_my_bool = false; - - // Just to register all known types - registerBasicTypes(); -} - -BoolStruct::~BoolStruct() -{ -} - -BoolStruct::BoolStruct( - const BoolStruct& x) -{ - m_my_bool = x.m_my_bool; - -} - -BoolStruct::BoolStruct( - BoolStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - -} - -BoolStruct& BoolStruct::operator =( - const BoolStruct& x) -{ - m_my_bool = x.m_my_bool; - - return *this; -} - -BoolStruct& BoolStruct::operator =( - BoolStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - return *this; -} - -bool BoolStruct::operator ==( - const BoolStruct& x) const -{ - return (m_my_bool == x.m_my_bool); -} - -bool BoolStruct::operator !=( - const BoolStruct& x) const -{ - return !(*this == x); -} - -size_t BoolStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BoolStruct_max_cdr_typesize; -} - -size_t BoolStruct::getCdrSerializedSize( - const BoolStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - return current_alignment - initial_alignment; -} - - -void BoolStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_bool; - -} - -void BoolStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_bool; - - -} - - -bool BoolStruct::isKeyDefined() -{ - return false; -} - -void BoolStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BoolStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BoolStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BoolStruct::my_bool() -{ - return m_my_bool; -} - - - - - -OctetStruct::OctetStruct() -{ - // octet m_my_octet - m_my_octet = 0; - - // Just to register all known types - registerBasicTypes(); -} - -OctetStruct::~OctetStruct() -{ -} - -OctetStruct::OctetStruct( - const OctetStruct& x) -{ - m_my_octet = x.m_my_octet; - -} - -OctetStruct::OctetStruct( - OctetStruct&& x) noexcept -{ - m_my_octet = x.m_my_octet; - -} - -OctetStruct& OctetStruct::operator =( - const OctetStruct& x) -{ - m_my_octet = x.m_my_octet; - - return *this; -} - -OctetStruct& OctetStruct::operator =( - OctetStruct&& x) noexcept -{ - m_my_octet = x.m_my_octet; - - return *this; -} - -bool OctetStruct::operator ==( - const OctetStruct& x) const -{ - return (m_my_octet == x.m_my_octet); -} - -bool OctetStruct::operator !=( - const OctetStruct& x) const -{ - return !(*this == x); -} - -size_t OctetStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return OctetStruct_max_cdr_typesize; -} - -size_t OctetStruct::getCdrSerializedSize( - const OctetStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - return current_alignment - initial_alignment; -} - - -void OctetStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_octet; - -} - -void OctetStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_octet; - - -} - - -bool OctetStruct::isKeyDefined() -{ - return false; -} - -void OctetStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_octet - * @param _my_octet New value for member my_octet - */ -void OctetStruct::my_octet( - uint8_t _my_octet) -{ - m_my_octet = _my_octet; -} - -/*! - * @brief This function returns the value of member my_octet - * @return Value of member my_octet - */ -uint8_t OctetStruct::my_octet() const -{ - return m_my_octet; -} - -/*! - * @brief This function returns a reference to member my_octet - * @return Reference to member my_octet - */ -uint8_t& OctetStruct::my_octet() -{ - return m_my_octet; -} - - - - - -ShortStruct::ShortStruct() -{ - // short m_my_int16 - m_my_int16 = 0; - - // Just to register all known types - registerBasicTypes(); -} - -ShortStruct::~ShortStruct() -{ -} - -ShortStruct::ShortStruct( - const ShortStruct& x) -{ - m_my_int16 = x.m_my_int16; - -} - -ShortStruct::ShortStruct( - ShortStruct&& x) noexcept -{ - m_my_int16 = x.m_my_int16; - -} - -ShortStruct& ShortStruct::operator =( - const ShortStruct& x) -{ - m_my_int16 = x.m_my_int16; - - return *this; -} - -ShortStruct& ShortStruct::operator =( - ShortStruct&& x) noexcept -{ - m_my_int16 = x.m_my_int16; - - return *this; -} - -bool ShortStruct::operator ==( - const ShortStruct& x) const -{ - return (m_my_int16 == x.m_my_int16); -} - -bool ShortStruct::operator !=( - const ShortStruct& x) const -{ - return !(*this == x); -} - -size_t ShortStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ShortStruct_max_cdr_typesize; -} - -size_t ShortStruct::getCdrSerializedSize( - const ShortStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - return current_alignment - initial_alignment; -} - - -void ShortStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_int16; - -} - -void ShortStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_int16; - - -} - - -bool ShortStruct::isKeyDefined() -{ - return false; -} - -void ShortStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_int16 - * @param _my_int16 New value for member my_int16 - */ -void ShortStruct::my_int16( - int16_t _my_int16) -{ - m_my_int16 = _my_int16; -} - -/*! - * @brief This function returns the value of member my_int16 - * @return Value of member my_int16 - */ -int16_t ShortStruct::my_int16() const -{ - return m_my_int16; -} - -/*! - * @brief This function returns a reference to member my_int16 - * @return Reference to member my_int16 - */ -int16_t& ShortStruct::my_int16() -{ - return m_my_int16; -} - - - - - -LongStruct::LongStruct() -{ - // long m_my_int32 - m_my_int32 = 0; - - // Just to register all known types - registerBasicTypes(); -} - -LongStruct::~LongStruct() -{ -} - -LongStruct::LongStruct( - const LongStruct& x) -{ - m_my_int32 = x.m_my_int32; - -} - -LongStruct::LongStruct( - LongStruct&& x) noexcept -{ - m_my_int32 = x.m_my_int32; - -} - -LongStruct& LongStruct::operator =( - const LongStruct& x) -{ - m_my_int32 = x.m_my_int32; - - return *this; -} - -LongStruct& LongStruct::operator =( - LongStruct&& x) noexcept -{ - m_my_int32 = x.m_my_int32; - - return *this; -} - -bool LongStruct::operator ==( - const LongStruct& x) const -{ - return (m_my_int32 == x.m_my_int32); -} - -bool LongStruct::operator !=( - const LongStruct& x) const -{ - return !(*this == x); -} - -size_t LongStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return LongStruct_max_cdr_typesize; -} - -size_t LongStruct::getCdrSerializedSize( - const LongStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void LongStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_int32; - -} - -void LongStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_int32; - - -} - - -bool LongStruct::isKeyDefined() -{ - return false; -} - -void LongStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void LongStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t LongStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& LongStruct::my_int32() -{ - return m_my_int32; -} - - - - - -LongLongStruct::LongLongStruct() -{ - // long long m_my_int64 - m_my_int64 = 0; - - // Just to register all known types - registerBasicTypes(); -} - -LongLongStruct::~LongLongStruct() -{ -} - -LongLongStruct::LongLongStruct( - const LongLongStruct& x) -{ - m_my_int64 = x.m_my_int64; - -} - -LongLongStruct::LongLongStruct( - LongLongStruct&& x) noexcept -{ - m_my_int64 = x.m_my_int64; - -} - -LongLongStruct& LongLongStruct::operator =( - const LongLongStruct& x) -{ - m_my_int64 = x.m_my_int64; - - return *this; -} - -LongLongStruct& LongLongStruct::operator =( - LongLongStruct&& x) noexcept -{ - m_my_int64 = x.m_my_int64; - - return *this; -} - -bool LongLongStruct::operator ==( - const LongLongStruct& x) const -{ - return (m_my_int64 == x.m_my_int64); -} - -bool LongLongStruct::operator !=( - const LongLongStruct& x) const -{ - return !(*this == x); -} - -size_t LongLongStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return LongLongStruct_max_cdr_typesize; -} - -size_t LongLongStruct::getCdrSerializedSize( - const LongLongStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - return current_alignment - initial_alignment; -} - - -void LongLongStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_int64; - -} - -void LongLongStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_int64; - - -} - - -bool LongLongStruct::isKeyDefined() -{ - return false; -} - -void LongLongStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_int64 - * @param _my_int64 New value for member my_int64 - */ -void LongLongStruct::my_int64( - int64_t _my_int64) -{ - m_my_int64 = _my_int64; -} - -/*! - * @brief This function returns the value of member my_int64 - * @return Value of member my_int64 - */ -int64_t LongLongStruct::my_int64() const -{ - return m_my_int64; -} - -/*! - * @brief This function returns a reference to member my_int64 - * @return Reference to member my_int64 - */ -int64_t& LongLongStruct::my_int64() -{ - return m_my_int64; -} - - - - - -UShortStruct::UShortStruct() -{ - // unsigned short m_my_uint16 - m_my_uint16 = 0; - - // Just to register all known types - registerBasicTypes(); -} - -UShortStruct::~UShortStruct() -{ -} - -UShortStruct::UShortStruct( - const UShortStruct& x) -{ - m_my_uint16 = x.m_my_uint16; - -} - -UShortStruct::UShortStruct( - UShortStruct&& x) noexcept -{ - m_my_uint16 = x.m_my_uint16; - -} - -UShortStruct& UShortStruct::operator =( - const UShortStruct& x) -{ - m_my_uint16 = x.m_my_uint16; - - return *this; -} - -UShortStruct& UShortStruct::operator =( - UShortStruct&& x) noexcept -{ - m_my_uint16 = x.m_my_uint16; - - return *this; -} - -bool UShortStruct::operator ==( - const UShortStruct& x) const -{ - return (m_my_uint16 == x.m_my_uint16); -} - -bool UShortStruct::operator !=( - const UShortStruct& x) const -{ - return !(*this == x); -} - -size_t UShortStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return UShortStruct_max_cdr_typesize; -} - -size_t UShortStruct::getCdrSerializedSize( - const UShortStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - return current_alignment - initial_alignment; -} - - -void UShortStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_uint16; - -} - -void UShortStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_uint16; - - -} - - -bool UShortStruct::isKeyDefined() -{ - return false; -} - -void UShortStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_uint16 - * @param _my_uint16 New value for member my_uint16 - */ -void UShortStruct::my_uint16( - uint16_t _my_uint16) -{ - m_my_uint16 = _my_uint16; -} - -/*! - * @brief This function returns the value of member my_uint16 - * @return Value of member my_uint16 - */ -uint16_t UShortStruct::my_uint16() const -{ - return m_my_uint16; -} - -/*! - * @brief This function returns a reference to member my_uint16 - * @return Reference to member my_uint16 - */ -uint16_t& UShortStruct::my_uint16() -{ - return m_my_uint16; -} - - - - - -ULongStruct::ULongStruct() -{ - // unsigned long m_my_uint32 - m_my_uint32 = 0; - - // Just to register all known types - registerBasicTypes(); -} - -ULongStruct::~ULongStruct() -{ -} - -ULongStruct::ULongStruct( - const ULongStruct& x) -{ - m_my_uint32 = x.m_my_uint32; - -} - -ULongStruct::ULongStruct( - ULongStruct&& x) noexcept -{ - m_my_uint32 = x.m_my_uint32; - -} - -ULongStruct& ULongStruct::operator =( - const ULongStruct& x) -{ - m_my_uint32 = x.m_my_uint32; - - return *this; -} - -ULongStruct& ULongStruct::operator =( - ULongStruct&& x) noexcept -{ - m_my_uint32 = x.m_my_uint32; - - return *this; -} - -bool ULongStruct::operator ==( - const ULongStruct& x) const -{ - return (m_my_uint32 == x.m_my_uint32); -} - -bool ULongStruct::operator !=( - const ULongStruct& x) const -{ - return !(*this == x); -} - -size_t ULongStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ULongStruct_max_cdr_typesize; -} - -size_t ULongStruct::getCdrSerializedSize( - const ULongStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void ULongStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_uint32; - -} - -void ULongStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_uint32; - - -} - - -bool ULongStruct::isKeyDefined() -{ - return false; -} - -void ULongStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_uint32 - * @param _my_uint32 New value for member my_uint32 - */ -void ULongStruct::my_uint32( - uint32_t _my_uint32) -{ - m_my_uint32 = _my_uint32; -} - -/*! - * @brief This function returns the value of member my_uint32 - * @return Value of member my_uint32 - */ -uint32_t ULongStruct::my_uint32() const -{ - return m_my_uint32; -} - -/*! - * @brief This function returns a reference to member my_uint32 - * @return Reference to member my_uint32 - */ -uint32_t& ULongStruct::my_uint32() -{ - return m_my_uint32; -} - - - - - -ULongLongStruct::ULongLongStruct() -{ - // unsigned long long m_my_uint64 - m_my_uint64 = 0; - - // Just to register all known types - registerBasicTypes(); -} - -ULongLongStruct::~ULongLongStruct() -{ -} - -ULongLongStruct::ULongLongStruct( - const ULongLongStruct& x) -{ - m_my_uint64 = x.m_my_uint64; - -} - -ULongLongStruct::ULongLongStruct( - ULongLongStruct&& x) noexcept -{ - m_my_uint64 = x.m_my_uint64; - -} - -ULongLongStruct& ULongLongStruct::operator =( - const ULongLongStruct& x) -{ - m_my_uint64 = x.m_my_uint64; - - return *this; -} - -ULongLongStruct& ULongLongStruct::operator =( - ULongLongStruct&& x) noexcept -{ - m_my_uint64 = x.m_my_uint64; - - return *this; -} - -bool ULongLongStruct::operator ==( - const ULongLongStruct& x) const -{ - return (m_my_uint64 == x.m_my_uint64); -} - -bool ULongLongStruct::operator !=( - const ULongLongStruct& x) const -{ - return !(*this == x); -} - -size_t ULongLongStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ULongLongStruct_max_cdr_typesize; -} - -size_t ULongLongStruct::getCdrSerializedSize( - const ULongLongStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - return current_alignment - initial_alignment; -} - - -void ULongLongStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_uint64; - -} - -void ULongLongStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_uint64; - - -} - - -bool ULongLongStruct::isKeyDefined() -{ - return false; -} - -void ULongLongStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_uint64 - * @param _my_uint64 New value for member my_uint64 - */ -void ULongLongStruct::my_uint64( - uint64_t _my_uint64) -{ - m_my_uint64 = _my_uint64; -} - -/*! - * @brief This function returns the value of member my_uint64 - * @return Value of member my_uint64 - */ -uint64_t ULongLongStruct::my_uint64() const -{ - return m_my_uint64; -} - -/*! - * @brief This function returns a reference to member my_uint64 - * @return Reference to member my_uint64 - */ -uint64_t& ULongLongStruct::my_uint64() -{ - return m_my_uint64; -} - - - - - -FloatStruct::FloatStruct() -{ - // float m_my_float32 - m_my_float32 = 0.0; - - // Just to register all known types - registerBasicTypes(); -} - -FloatStruct::~FloatStruct() -{ -} - -FloatStruct::FloatStruct( - const FloatStruct& x) -{ - m_my_float32 = x.m_my_float32; - -} - -FloatStruct::FloatStruct( - FloatStruct&& x) noexcept -{ - m_my_float32 = x.m_my_float32; - -} - -FloatStruct& FloatStruct::operator =( - const FloatStruct& x) -{ - m_my_float32 = x.m_my_float32; - - return *this; -} - -FloatStruct& FloatStruct::operator =( - FloatStruct&& x) noexcept -{ - m_my_float32 = x.m_my_float32; - - return *this; -} - -bool FloatStruct::operator ==( - const FloatStruct& x) const -{ - return (m_my_float32 == x.m_my_float32); -} - -bool FloatStruct::operator !=( - const FloatStruct& x) const -{ - return !(*this == x); -} - -size_t FloatStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return FloatStruct_max_cdr_typesize; -} - -size_t FloatStruct::getCdrSerializedSize( - const FloatStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void FloatStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_float32; - -} - -void FloatStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_float32; - - -} - - -bool FloatStruct::isKeyDefined() -{ - return false; -} - -void FloatStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_float32 - * @param _my_float32 New value for member my_float32 - */ -void FloatStruct::my_float32( - float _my_float32) -{ - m_my_float32 = _my_float32; -} - -/*! - * @brief This function returns the value of member my_float32 - * @return Value of member my_float32 - */ -float FloatStruct::my_float32() const -{ - return m_my_float32; -} - -/*! - * @brief This function returns a reference to member my_float32 - * @return Reference to member my_float32 - */ -float& FloatStruct::my_float32() -{ - return m_my_float32; -} - - - - - -DoubleStruct::DoubleStruct() -{ - // double m_my_float64 - m_my_float64 = 0.0; - - // Just to register all known types - registerBasicTypes(); -} - -DoubleStruct::~DoubleStruct() -{ -} - -DoubleStruct::DoubleStruct( - const DoubleStruct& x) -{ - m_my_float64 = x.m_my_float64; - -} - -DoubleStruct::DoubleStruct( - DoubleStruct&& x) noexcept -{ - m_my_float64 = x.m_my_float64; - -} - -DoubleStruct& DoubleStruct::operator =( - const DoubleStruct& x) -{ - m_my_float64 = x.m_my_float64; - - return *this; -} - -DoubleStruct& DoubleStruct::operator =( - DoubleStruct&& x) noexcept -{ - m_my_float64 = x.m_my_float64; - - return *this; -} - -bool DoubleStruct::operator ==( - const DoubleStruct& x) const -{ - return (m_my_float64 == x.m_my_float64); -} - -bool DoubleStruct::operator !=( - const DoubleStruct& x) const -{ - return !(*this == x); -} - -size_t DoubleStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return DoubleStruct_max_cdr_typesize; -} - -size_t DoubleStruct::getCdrSerializedSize( - const DoubleStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - return current_alignment - initial_alignment; -} - - -void DoubleStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_float64; - -} - -void DoubleStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_float64; - - -} - - -bool DoubleStruct::isKeyDefined() -{ - return false; -} - -void DoubleStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_float64 - * @param _my_float64 New value for member my_float64 - */ -void DoubleStruct::my_float64( - double _my_float64) -{ - m_my_float64 = _my_float64; -} - -/*! - * @brief This function returns the value of member my_float64 - * @return Value of member my_float64 - */ -double DoubleStruct::my_float64() const -{ - return m_my_float64; -} - -/*! - * @brief This function returns a reference to member my_float64 - * @return Reference to member my_float64 - */ -double& DoubleStruct::my_float64() -{ - return m_my_float64; -} - - - - - -LongDoubleStruct::LongDoubleStruct() -{ - // long double m_my_float128 - m_my_float128 = 0.0; - - // Just to register all known types - registerBasicTypes(); -} - -LongDoubleStruct::~LongDoubleStruct() -{ -} - -LongDoubleStruct::LongDoubleStruct( - const LongDoubleStruct& x) -{ - m_my_float128 = x.m_my_float128; - -} - -LongDoubleStruct::LongDoubleStruct( - LongDoubleStruct&& x) noexcept -{ - m_my_float128 = x.m_my_float128; - -} - -LongDoubleStruct& LongDoubleStruct::operator =( - const LongDoubleStruct& x) -{ - m_my_float128 = x.m_my_float128; - - return *this; -} - -LongDoubleStruct& LongDoubleStruct::operator =( - LongDoubleStruct&& x) noexcept -{ - m_my_float128 = x.m_my_float128; - - return *this; -} - -bool LongDoubleStruct::operator ==( - const LongDoubleStruct& x) const -{ - return (m_my_float128 == x.m_my_float128); -} - -bool LongDoubleStruct::operator !=( - const LongDoubleStruct& x) const -{ - return !(*this == x); -} - -size_t LongDoubleStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return LongDoubleStruct_max_cdr_typesize; -} - -size_t LongDoubleStruct::getCdrSerializedSize( - const LongDoubleStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 16 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); // 128 bits, but aligned as 64 - - - return current_alignment - initial_alignment; -} - - -void LongDoubleStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_float128; - -} - -void LongDoubleStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_float128; - - -} - - -bool LongDoubleStruct::isKeyDefined() -{ - return false; -} - -void LongDoubleStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_float128 - * @param _my_float128 New value for member my_float128 - */ -void LongDoubleStruct::my_float128( - long double _my_float128) -{ - m_my_float128 = _my_float128; -} - -/*! - * @brief This function returns the value of member my_float128 - * @return Value of member my_float128 - */ -long double LongDoubleStruct::my_float128() const -{ - return m_my_float128; -} - -/*! - * @brief This function returns a reference to member my_float128 - * @return Reference to member my_float128 - */ -long double& LongDoubleStruct::my_float128() -{ - return m_my_float128; -} - - - - - -CharStruct::CharStruct() -{ - // char m_my_char - m_my_char = 0; - - // Just to register all known types - registerBasicTypes(); -} - -CharStruct::~CharStruct() -{ -} - -CharStruct::CharStruct( - const CharStruct& x) -{ - m_my_char = x.m_my_char; - -} - -CharStruct::CharStruct( - CharStruct&& x) noexcept -{ - m_my_char = x.m_my_char; - -} - -CharStruct& CharStruct::operator =( - const CharStruct& x) -{ - m_my_char = x.m_my_char; - - return *this; -} - -CharStruct& CharStruct::operator =( - CharStruct&& x) noexcept -{ - m_my_char = x.m_my_char; - - return *this; -} - -bool CharStruct::operator ==( - const CharStruct& x) const -{ - return (m_my_char == x.m_my_char); -} - -bool CharStruct::operator !=( - const CharStruct& x) const -{ - return !(*this == x); -} - -size_t CharStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return CharStruct_max_cdr_typesize; -} - -size_t CharStruct::getCdrSerializedSize( - const CharStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - return current_alignment - initial_alignment; -} - - -void CharStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_char; - -} - -void CharStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_char; - - -} - - -bool CharStruct::isKeyDefined() -{ - return false; -} - -void CharStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_char - * @param _my_char New value for member my_char - */ -void CharStruct::my_char( - char _my_char) -{ - m_my_char = _my_char; -} - -/*! - * @brief This function returns the value of member my_char - * @return Value of member my_char - */ -char CharStruct::my_char() const -{ - return m_my_char; -} - -/*! - * @brief This function returns a reference to member my_char - * @return Reference to member my_char - */ -char& CharStruct::my_char() -{ - return m_my_char; -} - - - - - -WCharStruct::WCharStruct() -{ - // wchar m_my_wchar - m_my_wchar = 0; - - // Just to register all known types - registerBasicTypes(); -} - -WCharStruct::~WCharStruct() -{ -} - -WCharStruct::WCharStruct( - const WCharStruct& x) -{ - m_my_wchar = x.m_my_wchar; - -} - -WCharStruct::WCharStruct( - WCharStruct&& x) noexcept -{ - m_my_wchar = x.m_my_wchar; - -} - -WCharStruct& WCharStruct::operator =( - const WCharStruct& x) -{ - m_my_wchar = x.m_my_wchar; - - return *this; -} - -WCharStruct& WCharStruct::operator =( - WCharStruct&& x) noexcept -{ - m_my_wchar = x.m_my_wchar; - - return *this; -} - -bool WCharStruct::operator ==( - const WCharStruct& x) const -{ - return (m_my_wchar == x.m_my_wchar); -} - -bool WCharStruct::operator !=( - const WCharStruct& x) const -{ - return !(*this == x); -} - -size_t WCharStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return WCharStruct_max_cdr_typesize; -} - -size_t WCharStruct::getCdrSerializedSize( - const WCharStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void WCharStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_wchar; - -} - -void WCharStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_wchar; - - -} - - -bool WCharStruct::isKeyDefined() -{ - return false; -} - -void WCharStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_wchar - * @param _my_wchar New value for member my_wchar - */ -void WCharStruct::my_wchar( - wchar_t _my_wchar) -{ - m_my_wchar = _my_wchar; -} - -/*! - * @brief This function returns the value of member my_wchar - * @return Value of member my_wchar - */ -wchar_t WCharStruct::my_wchar() const -{ - return m_my_wchar; -} - -/*! - * @brief This function returns a reference to member my_wchar - * @return Reference to member my_wchar - */ -wchar_t& WCharStruct::my_wchar() -{ - return m_my_wchar; -} - - - - - -StringStruct::StringStruct() -{ - // /type_d() m_my_string - - - // Just to register all known types - registerBasicTypes(); -} - -StringStruct::~StringStruct() -{ -} - -StringStruct::StringStruct( - const StringStruct& x) -{ - m_my_string = x.m_my_string; - -} - -StringStruct::StringStruct( - StringStruct&& x) noexcept -{ - m_my_string = std::move(x.m_my_string); - -} - -StringStruct& StringStruct::operator =( - const StringStruct& x) -{ - m_my_string = x.m_my_string; - - return *this; -} - -StringStruct& StringStruct::operator =( - StringStruct&& x) noexcept -{ - m_my_string = std::move(x.m_my_string); - - return *this; -} - -bool StringStruct::operator ==( - const StringStruct& x) const -{ - return (m_my_string == x.m_my_string); -} - -bool StringStruct::operator !=( - const StringStruct& x) const -{ - return !(*this == x); -} - -size_t StringStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return StringStruct_max_cdr_typesize; -} - -size_t StringStruct::getCdrSerializedSize( - const StringStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void StringStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_string.c_str(); - -} - -void StringStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_string; - - -} - - -bool StringStruct::isKeyDefined() -{ - return false; -} - -void StringStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void StringStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void StringStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& StringStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& StringStruct::my_string() -{ - return m_my_string; -} - - - - - -WStringStruct::WStringStruct() -{ - // /type_15() m_my_wstring - - - // Just to register all known types - registerBasicTypes(); -} - -WStringStruct::~WStringStruct() -{ -} - -WStringStruct::WStringStruct( - const WStringStruct& x) -{ - m_my_wstring = x.m_my_wstring; - -} - -WStringStruct::WStringStruct( - WStringStruct&& x) noexcept -{ - m_my_wstring = std::move(x.m_my_wstring); - -} - -WStringStruct& WStringStruct::operator =( - const WStringStruct& x) -{ - m_my_wstring = x.m_my_wstring; - - return *this; -} - -WStringStruct& WStringStruct::operator =( - WStringStruct&& x) noexcept -{ - m_my_wstring = std::move(x.m_my_wstring); - - return *this; -} - -bool WStringStruct::operator ==( - const WStringStruct& x) const -{ - return (m_my_wstring == x.m_my_wstring); -} - -bool WStringStruct::operator !=( - const WStringStruct& x) const -{ - return !(*this == x); -} - -size_t WStringStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return WStringStruct_max_cdr_typesize; -} - -size_t WStringStruct::getCdrSerializedSize( - const WStringStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + (data.my_wstring().size()) * 4; // 32 bits - - - return current_alignment - initial_alignment; -} - - -void WStringStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_wstring; - -} - -void WStringStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_wstring; - - -} - - -bool WStringStruct::isKeyDefined() -{ - return false; -} - -void WStringStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_wstring - * @param _my_wstring New value to be copied in member my_wstring - */ -void WStringStruct::my_wstring( - const std::wstring& _my_wstring) -{ - m_my_wstring = _my_wstring; -} - -/*! - * @brief This function moves the value in member my_wstring - * @param _my_wstring New value to be moved in member my_wstring - */ -void WStringStruct::my_wstring( - std::wstring&& _my_wstring) -{ - m_my_wstring = std::move(_my_wstring); -} - -/*! - * @brief This function returns a constant reference to member my_wstring - * @return Constant reference to member my_wstring - */ -const std::wstring& WStringStruct::my_wstring() const -{ - return m_my_wstring; -} - -/*! - * @brief This function returns a reference to member my_wstring - * @return Reference to member my_wstring - */ -std::wstring& WStringStruct::my_wstring() -{ - return m_my_wstring; -} - - - - - -LargeStringStruct::LargeStringStruct() -{ - // /type_d() m_my_large_string - - - // Just to register all known types - registerBasicTypes(); -} - -LargeStringStruct::~LargeStringStruct() -{ -} - -LargeStringStruct::LargeStringStruct( - const LargeStringStruct& x) -{ - m_my_large_string = x.m_my_large_string; - -} - -LargeStringStruct::LargeStringStruct( - LargeStringStruct&& x) noexcept -{ - m_my_large_string = std::move(x.m_my_large_string); - -} - -LargeStringStruct& LargeStringStruct::operator =( - const LargeStringStruct& x) -{ - m_my_large_string = x.m_my_large_string; - - return *this; -} - -LargeStringStruct& LargeStringStruct::operator =( - LargeStringStruct&& x) noexcept -{ - m_my_large_string = std::move(x.m_my_large_string); - - return *this; -} - -bool LargeStringStruct::operator ==( - const LargeStringStruct& x) const -{ - return (m_my_large_string == x.m_my_large_string); -} - -bool LargeStringStruct::operator !=( - const LargeStringStruct& x) const -{ - return !(*this == x); -} - -size_t LargeStringStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return LargeStringStruct_max_cdr_typesize; -} - -size_t LargeStringStruct::getCdrSerializedSize( - const LargeStringStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_large_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void LargeStringStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_large_string.c_str(); - -} - -void LargeStringStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - std::string aux; - dcdr >> aux; - m_my_large_string = aux.c_str(); - } - - -} - - -bool LargeStringStruct::isKeyDefined() -{ - return false; -} - -void LargeStringStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_large_string - * @param _my_large_string New value to be copied in member my_large_string - */ -void LargeStringStruct::my_large_string( - const eprosima::fastrtps::fixed_string<41925>& _my_large_string) -{ - m_my_large_string = _my_large_string; -} - -/*! - * @brief This function moves the value in member my_large_string - * @param _my_large_string New value to be moved in member my_large_string - */ -void LargeStringStruct::my_large_string( - eprosima::fastrtps::fixed_string<41925>&& _my_large_string) -{ - m_my_large_string = std::move(_my_large_string); -} - -/*! - * @brief This function returns a constant reference to member my_large_string - * @return Constant reference to member my_large_string - */ -const eprosima::fastrtps::fixed_string<41925>& LargeStringStruct::my_large_string() const -{ - return m_my_large_string; -} - -/*! - * @brief This function returns a reference to member my_large_string - * @return Reference to member my_large_string - */ -eprosima::fastrtps::fixed_string<41925>& LargeStringStruct::my_large_string() -{ - return m_my_large_string; -} - - - - - -LargeWStringStruct::LargeWStringStruct() -{ - // /type_15() m_my_large_wstring - - - // Just to register all known types - registerBasicTypes(); -} - -LargeWStringStruct::~LargeWStringStruct() -{ -} - -LargeWStringStruct::LargeWStringStruct( - const LargeWStringStruct& x) -{ - m_my_large_wstring = x.m_my_large_wstring; - -} - -LargeWStringStruct::LargeWStringStruct( - LargeWStringStruct&& x) noexcept -{ - m_my_large_wstring = std::move(x.m_my_large_wstring); - -} - -LargeWStringStruct& LargeWStringStruct::operator =( - const LargeWStringStruct& x) -{ - m_my_large_wstring = x.m_my_large_wstring; - - return *this; -} - -LargeWStringStruct& LargeWStringStruct::operator =( - LargeWStringStruct&& x) noexcept -{ - m_my_large_wstring = std::move(x.m_my_large_wstring); - - return *this; -} - -bool LargeWStringStruct::operator ==( - const LargeWStringStruct& x) const -{ - return (m_my_large_wstring == x.m_my_large_wstring); -} - -bool LargeWStringStruct::operator !=( - const LargeWStringStruct& x) const -{ - return !(*this == x); -} - -size_t LargeWStringStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return LargeWStringStruct_max_cdr_typesize; -} - -size_t LargeWStringStruct::getCdrSerializedSize( - const LargeWStringStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + (data.my_large_wstring().size()) * 4; // 32 bits - - - return current_alignment - initial_alignment; -} - - -void LargeWStringStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_large_wstring; - -} - -void LargeWStringStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_large_wstring; - - -} - - -bool LargeWStringStruct::isKeyDefined() -{ - return false; -} - -void LargeWStringStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_large_wstring - * @param _my_large_wstring New value to be copied in member my_large_wstring - */ -void LargeWStringStruct::my_large_wstring( - const std::wstring& _my_large_wstring) -{ - m_my_large_wstring = _my_large_wstring; -} - -/*! - * @brief This function moves the value in member my_large_wstring - * @param _my_large_wstring New value to be moved in member my_large_wstring - */ -void LargeWStringStruct::my_large_wstring( - std::wstring&& _my_large_wstring) -{ - m_my_large_wstring = std::move(_my_large_wstring); -} - -/*! - * @brief This function returns a constant reference to member my_large_wstring - * @return Constant reference to member my_large_wstring - */ -const std::wstring& LargeWStringStruct::my_large_wstring() const -{ - return m_my_large_wstring; -} - -/*! - * @brief This function returns a reference to member my_large_wstring - * @return Reference to member my_large_wstring - */ -std::wstring& LargeWStringStruct::my_large_wstring() -{ - return m_my_large_wstring; -} - - - - - -ArraytStruct::ArraytStruct() -{ - // long m_my_array - memset(&m_my_array, 0, ((2) * (2) * (2)) * 4); - - // Just to register all known types - registerBasicTypes(); -} - -ArraytStruct::~ArraytStruct() -{ -} - -ArraytStruct::ArraytStruct( - const ArraytStruct& x) -{ - m_my_array = x.m_my_array; - -} - -ArraytStruct::ArraytStruct( - ArraytStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - -} - -ArraytStruct& ArraytStruct::operator =( - const ArraytStruct& x) -{ - m_my_array = x.m_my_array; - - return *this; -} - -ArraytStruct& ArraytStruct::operator =( - ArraytStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - - return *this; -} - -bool ArraytStruct::operator ==( - const ArraytStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArraytStruct::operator !=( - const ArraytStruct& x) const -{ - return !(*this == x); -} - -size_t ArraytStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ArraytStruct_max_cdr_typesize; -} - -size_t ArraytStruct::getCdrSerializedSize( - const ArraytStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((2) * (2) * (2)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - return current_alignment - initial_alignment; -} - - -void ArraytStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - for (uint32_t b = 0; b < m_my_array.size(); ++b) - { - for (uint32_t c = 0; c < m_my_array[b].size(); ++c) - { - scdr << m_my_array[b][c]; - - } - - } - - - -} - -void ArraytStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - for (uint32_t e = 0; e < m_my_array.size(); ++e) - { - for (uint32_t f = 0; f < m_my_array[e].size(); ++f) - { - dcdr >> m_my_array[e][f]; - - } - - } - - - -} - - -bool ArraytStruct::isKeyDefined() -{ - return false; -} - -void ArraytStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArraytStruct::my_array( - const std::array, 2>, 2>& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArraytStruct::my_array( - std::array, 2>, 2>&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array, 2>, 2>& ArraytStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array, 2>, 2>& ArraytStruct::my_array() -{ - return m_my_array; -} - - - - - - -ArrayArrayStruct::ArrayArrayStruct() -{ - // MyArray m_my_array_array - - - // Just to register all known types - registerBasicTypes(); -} - -ArrayArrayStruct::~ArrayArrayStruct() -{ -} - -ArrayArrayStruct::ArrayArrayStruct( - const ArrayArrayStruct& x) -{ - m_my_array_array = x.m_my_array_array; - -} - -ArrayArrayStruct::ArrayArrayStruct( - ArrayArrayStruct&& x) noexcept -{ - m_my_array_array = std::move(x.m_my_array_array); - -} - -ArrayArrayStruct& ArrayArrayStruct::operator =( - const ArrayArrayStruct& x) -{ - m_my_array_array = x.m_my_array_array; - - return *this; -} - -ArrayArrayStruct& ArrayArrayStruct::operator =( - ArrayArrayStruct&& x) noexcept -{ - m_my_array_array = std::move(x.m_my_array_array); - - return *this; -} - -bool ArrayArrayStruct::operator ==( - const ArrayArrayStruct& x) const -{ - return (m_my_array_array == x.m_my_array_array); -} - -bool ArrayArrayStruct::operator !=( - const ArrayArrayStruct& x) const -{ - return !(*this == x); -} - -size_t ArrayArrayStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ArrayArrayStruct_max_cdr_typesize; -} - -size_t ArrayArrayStruct::getCdrSerializedSize( - const ArrayArrayStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - - for(size_t a = 0; a < data.my_array_array().size(); ++a) - { - - for(size_t b = 0; b < data.my_array_array().at(a).size(); ++b) - { - current_alignment += (((2) * (2)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - } - - } - - - - return current_alignment - initial_alignment; -} - - -void ArrayArrayStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - for (uint32_t d = 0; d < m_my_array_array.size(); ++d) - { - scdr << m_my_array_array[d]; - - } - - - -} - -void ArrayArrayStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - for (uint32_t f = 0; f < m_my_array_array.size(); ++f) - { - dcdr >> m_my_array_array[f]; - - } - - - -} - - -bool ArrayArrayStruct::isKeyDefined() -{ - return false; -} - -void ArrayArrayStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_array_array - * @param _my_array_array New value to be copied in member my_array_array - */ -void ArrayArrayStruct::my_array_array( - const std::array, 2>& _my_array_array) -{ - m_my_array_array = _my_array_array; -} - -/*! - * @brief This function moves the value in member my_array_array - * @param _my_array_array New value to be moved in member my_array_array - */ -void ArrayArrayStruct::my_array_array( - std::array, 2>&& _my_array_array) -{ - m_my_array_array = std::move(_my_array_array); -} - -/*! - * @brief This function returns a constant reference to member my_array_array - * @return Constant reference to member my_array_array - */ -const std::array, 2>& ArrayArrayStruct::my_array_array() const -{ - return m_my_array_array; -} - -/*! - * @brief This function returns a reference to member my_array_array - * @return Reference to member my_array_array - */ -std::array, 2>& ArrayArrayStruct::my_array_array() -{ - return m_my_array_array; -} - - - - - - - -SequenceStruct::SequenceStruct() -{ - // sequence m_my_sequence - - - // Just to register all known types - registerBasicTypes(); -} - -SequenceStruct::~SequenceStruct() -{ -} - -SequenceStruct::SequenceStruct( - const SequenceStruct& x) -{ - m_my_sequence = x.m_my_sequence; - -} - -SequenceStruct::SequenceStruct( - SequenceStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - -} - -SequenceStruct& SequenceStruct::operator =( - const SequenceStruct& x) -{ - m_my_sequence = x.m_my_sequence; - - return *this; -} - -SequenceStruct& SequenceStruct::operator =( - SequenceStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - - return *this; -} - -bool SequenceStruct::operator ==( - const SequenceStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceStruct::operator !=( - const SequenceStruct& x) const -{ - return !(*this == x); -} - -size_t SequenceStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceStruct_max_cdr_typesize; -} - -size_t SequenceStruct::getCdrSerializedSize( - const SequenceStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence().size() > 0) - { - current_alignment += (data.my_sequence().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - - return current_alignment - initial_alignment; -} - - -void SequenceStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence; - - -} - -void SequenceStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence; - - -} - - -bool SequenceStruct::isKeyDefined() -{ - return false; -} - -void SequenceStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - - - - -SequenceSequenceStruct::SequenceSequenceStruct() -{ - // sequence, 3> m_my_sequence_sequence - - - // Just to register all known types - registerBasicTypes(); -} - -SequenceSequenceStruct::~SequenceSequenceStruct() -{ -} - -SequenceSequenceStruct::SequenceSequenceStruct( - const SequenceSequenceStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; - -} - -SequenceSequenceStruct::SequenceSequenceStruct( - SequenceSequenceStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - -} - -SequenceSequenceStruct& SequenceSequenceStruct::operator =( - const SequenceSequenceStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; - - return *this; -} - -SequenceSequenceStruct& SequenceSequenceStruct::operator =( - SequenceSequenceStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - - return *this; -} - -bool SequenceSequenceStruct::operator ==( - const SequenceSequenceStruct& x) const -{ - return (m_my_sequence_sequence == x.m_my_sequence_sequence); -} - -bool SequenceSequenceStruct::operator !=( - const SequenceSequenceStruct& x) const -{ - return !(*this == x); -} - -size_t SequenceSequenceStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceSequenceStruct_max_cdr_typesize; -} - -size_t SequenceSequenceStruct::getCdrSerializedSize( - const SequenceSequenceStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.my_sequence_sequence().size(); ++a) - { - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence_sequence().at(a).size() > 0) - { - current_alignment += (data.my_sequence_sequence().at(a).size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - } - - - - return current_alignment - initial_alignment; -} - - -void SequenceSequenceStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence_sequence; - - -} - -void SequenceSequenceStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence_sequence; - - -} - - -bool SequenceSequenceStruct::isKeyDefined() -{ - return false; -} - -void SequenceSequenceStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ -void SequenceSequenceStruct::my_sequence_sequence( - const std::vector>& _my_sequence_sequence) -{ - m_my_sequence_sequence = _my_sequence_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ -void SequenceSequenceStruct::my_sequence_sequence( - std::vector>&& _my_sequence_sequence) -{ - m_my_sequence_sequence = std::move(_my_sequence_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ -const std::vector>& SequenceSequenceStruct::my_sequence_sequence() const -{ - return m_my_sequence_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ -std::vector>& SequenceSequenceStruct::my_sequence_sequence() -{ - return m_my_sequence_sequence; -} - - - - - - - -MapStruct::MapStruct() -{ - // map m_my_map - - - // Just to register all known types - registerBasicTypes(); -} - -MapStruct::~MapStruct() -{ -} - -MapStruct::MapStruct( - const MapStruct& x) -{ - m_my_map = x.m_my_map; - -} - -MapStruct::MapStruct( - MapStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - -} - -MapStruct& MapStruct::operator =( - const MapStruct& x) -{ - m_my_map = x.m_my_map; - - return *this; -} - -MapStruct& MapStruct::operator =( - MapStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - - return *this; -} - -bool MapStruct::operator ==( - const MapStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapStruct::operator !=( - const MapStruct& x) const -{ - return !(*this == x); -} - -size_t MapStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapStruct_max_cdr_typesize; -} - -size_t MapStruct::getCdrSerializedSize( - const MapStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map()) - { - (void)a; - - 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 MapStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map.size()); - for (const auto& pair : m_my_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map; - - -} - - -bool MapStruct::isKeyDefined() -{ - return false; -} - -void MapStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapStruct::my_map() -{ - return m_my_map; -} - - - - - - - - - -MapMapStruct::MapMapStruct() -{ - // map> m_my_map_map - - - // Just to register all known types - registerBasicTypes(); -} - -MapMapStruct::~MapMapStruct() -{ -} - -MapMapStruct::MapMapStruct( - const MapMapStruct& x) -{ - m_my_map_map = x.m_my_map_map; - -} - -MapMapStruct::MapMapStruct( - MapMapStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); - -} - -MapMapStruct& MapMapStruct::operator =( - const MapMapStruct& x) -{ - m_my_map_map = x.m_my_map_map; - - return *this; -} - -MapMapStruct& MapMapStruct::operator =( - MapMapStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); - - return *this; -} - -bool MapMapStruct::operator ==( - const MapMapStruct& x) const -{ - return (m_my_map_map == x.m_my_map_map); -} - -bool MapMapStruct::operator !=( - const MapMapStruct& x) const -{ - return !(*this == x); -} - -size_t MapMapStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapMapStruct_max_cdr_typesize; -} - -size_t MapMapStruct::getCdrSerializedSize( - const MapMapStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map_map()) - { - (void)a; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto b : a.second) - { - (void)b; - - 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 MapMapStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map_map.size()); - for (const auto& pair : m_my_map_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapMapStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map_map; - - -} - - -bool MapMapStruct::isKeyDefined() -{ - return false; -} - -void MapMapStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ -void MapMapStruct::my_map_map( - const std::map>& _my_map_map) -{ - m_my_map_map = _my_map_map; -} - -/*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ -void MapMapStruct::my_map_map( - std::map>&& _my_map_map) -{ - m_my_map_map = std::move(_my_map_map); -} - -/*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ -const std::map>& MapMapStruct::my_map_map() const -{ - return m_my_map_map; -} - -/*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ -std::map>& MapMapStruct::my_map_map() -{ - return m_my_map_map; -} - - - -MyBitset::MyBitset() -{ - // Just to register all known types - registerBasicTypes(); -} - -MyBitset::~MyBitset() -{ -} - -MyBitset::MyBitset( - const MyBitset& x) -{ - m_bitset = x.m_bitset; -} - -MyBitset::MyBitset( - MyBitset&& x) noexcept -{ - m_bitset = x.m_bitset; -} - -MyBitset& MyBitset::operator =( - const MyBitset& x) -{ - m_bitset = x.m_bitset; - - return *this; -} - -MyBitset& MyBitset::operator =( - MyBitset&& x) noexcept -{ - m_bitset = x.m_bitset; - - return *this; -} - -bool MyBitset::operator ==( - const MyBitset& x) const -{ - return m_bitset == x.m_bitset; -} - -bool MyBitset::operator !=( - const MyBitset& x) const -{ - return !(*this == x); -} - -size_t MyBitset::getCdrSerializedSize( - const MyBitset&, - size_t current_alignment) -{ - size_t initial_alignment = current_alignment; - - current_alignment += sizeof(helper::FindType<30>::type) + - eprosima::fastcdr::Cdr::alignment(current_alignment, sizeof(helper::FindType<30>::type)); - - return current_alignment - initial_alignment; -} - - -void MyBitset::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - helper::FindType<30>::type bits = static_cast::type>(bitset().to_ullong()); - scdr << bits; -} - -void MyBitset::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - helper::FindType<30>::type bits; - dcdr >> bits; - bitset(std::bitset<30>(bits)); -} - - - -void MyBitset::a( - char _a) -{ - int base = 0; - int size = 2; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_a & 0x01)); - _a = _a >> 1; - } - -} - -char MyBitset::a() const -{ - int base = 0; - int size = 2; - std::bitset<2> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - - -void MyBitset::b( - uint32_t _b) -{ - int base = 10; - int size = 20; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_b & 0x01)); - _b = _b >> 1; - } - -} - -uint32_t MyBitset::b() const -{ - int base = 10; - int size = 20; - std::bitset<20> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -std::bitset<30> MyBitset::bitset() const -{ - std::string str_value; - - str_value = m_bitset.to_string() + str_value; - - return std::bitset<30>(str_value); -} - -void MyBitset::bitset( - const std::bitset<30>& bitset) -{ - std::string str_value {bitset.to_string()}; - size_t base_diff {0}; - size_t last_post {std::string::npos}; - - base_diff += 30; - m_bitset = std::bitset<30>(str_value.substr(str_value.length() - base_diff, last_post)); -} - - - -BitsetStruct::BitsetStruct() -{ - // MyBitset m_a - - - // Just to register all known types - registerBasicTypes(); -} - -BitsetStruct::~BitsetStruct() -{ -} - -BitsetStruct::BitsetStruct( - const BitsetStruct& x) -{ - m_a = x.m_a; - -} - -BitsetStruct::BitsetStruct( - BitsetStruct&& x) noexcept -{ - m_a = std::move(x.m_a); - -} - -BitsetStruct& BitsetStruct::operator =( - const BitsetStruct& x) -{ - m_a = x.m_a; - - return *this; -} - -BitsetStruct& BitsetStruct::operator =( - BitsetStruct&& x) noexcept -{ - m_a = std::move(x.m_a); - - return *this; -} - -bool BitsetStruct::operator ==( - const BitsetStruct& x) const -{ - return (m_a == x.m_a); -} - -bool BitsetStruct::operator !=( - const BitsetStruct& x) const -{ - return !(*this == x); -} - -size_t BitsetStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BitsetStruct_max_cdr_typesize; -} - -size_t BitsetStruct::getCdrSerializedSize( - const BitsetStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += MyBitset::getCdrSerializedSize(data.a(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void BitsetStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_a; - -} - -void BitsetStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_a; - - -} - - -bool BitsetStruct::isKeyDefined() -{ - return false; -} - -void BitsetStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member a - * @param _a New value to be copied in member a - */ -void BitsetStruct::a( - const MyBitset& _a) -{ - m_a = _a; -} - -/*! - * @brief This function moves the value in member a - * @param _a New value to be moved in member a - */ -void BitsetStruct::a( - MyBitset&& _a) -{ - m_a = std::move(_a); -} - -/*! - * @brief This function returns a constant reference to member a - * @return Constant reference to member a - */ -const MyBitset& BitsetStruct::a() const -{ - return m_a; -} - -/*! - * @brief This function returns a reference to member a - * @return Reference to member a - */ -MyBitset& BitsetStruct::a() -{ - return m_a; -} - - - - - -StructStruct::StructStruct() -{ - // long m_a - m_a = 0; - // long long m_b - m_b = 0; - - // Just to register all known types - registerBasicTypes(); -} - -StructStruct::~StructStruct() -{ -} - -StructStruct::StructStruct( - const StructStruct& x) -{ - m_a = x.m_a; - - - m_b = x.m_b; - -} - -StructStruct::StructStruct( - StructStruct&& x) noexcept -{ - m_a = x.m_a; - - - m_b = x.m_b; - -} - -StructStruct& StructStruct::operator =( - const StructStruct& x) -{ - m_a = x.m_a; - - - m_b = x.m_b; - - return *this; -} - -StructStruct& StructStruct::operator =( - StructStruct&& x) noexcept -{ - m_a = x.m_a; - - - m_b = x.m_b; - - return *this; -} - -bool StructStruct::operator ==( - const StructStruct& x) const -{ - return (m_a == x.m_a && - m_b == x.m_b); -} - -bool StructStruct::operator !=( - const StructStruct& x) const -{ - return !(*this == x); -} - -size_t StructStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return StructStruct_max_cdr_typesize; -} - -size_t StructStruct::getCdrSerializedSize( - const StructStruct& 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 += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - return current_alignment - initial_alignment; -} - - -void StructStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_a; - - scdr << m_b; - -} - -void StructStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_a; - - - - dcdr >> m_b; - - -} - - -bool StructStruct::isKeyDefined() -{ - return false; -} - -void StructStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member a - * @param _a New value for member a - */ -void StructStruct::a( - int32_t _a) -{ - m_a = _a; -} - -/*! - * @brief This function returns the value of member a - * @return Value of member a - */ -int32_t StructStruct::a() const -{ - return m_a; -} - -/*! - * @brief This function returns a reference to member a - * @return Reference to member a - */ -int32_t& StructStruct::a() -{ - return m_a; -} - - -/*! - * @brief This function sets a value in member b - * @param _b New value for member b - */ -void StructStruct::b( - int64_t _b) -{ - m_b = _b; -} - -/*! - * @brief This function returns the value of member b - * @return Value of member b - */ -int64_t StructStruct::b() const -{ - return m_b; -} - -/*! - * @brief This function returns a reference to member b - * @return Reference to member b - */ -int64_t& StructStruct::b() -{ - return m_b; -} - - - - - -StructStructStruct::StructStructStruct() -{ - // StructStruct m_child_struct - - // long long m_child_int64 - m_child_int64 = 0; - - // Just to register all known types - registerBasicTypes(); -} - -StructStructStruct::~StructStructStruct() -{ -} - -StructStructStruct::StructStructStruct( - const StructStructStruct& x) -{ - m_child_struct = x.m_child_struct; - - - m_child_int64 = x.m_child_int64; - -} - -StructStructStruct::StructStructStruct( - StructStructStruct&& x) noexcept -{ - m_child_struct = std::move(x.m_child_struct); - - - m_child_int64 = x.m_child_int64; - -} - -StructStructStruct& StructStructStruct::operator =( - const StructStructStruct& x) -{ - m_child_struct = x.m_child_struct; - - - m_child_int64 = x.m_child_int64; - - return *this; -} - -StructStructStruct& StructStructStruct::operator =( - StructStructStruct&& x) noexcept -{ - m_child_struct = std::move(x.m_child_struct); - - - m_child_int64 = x.m_child_int64; - - return *this; -} - -bool StructStructStruct::operator ==( - const StructStructStruct& x) const -{ - return (m_child_struct == x.m_child_struct && - m_child_int64 == x.m_child_int64); -} - -bool StructStructStruct::operator !=( - const StructStructStruct& x) const -{ - return !(*this == x); -} - -size_t StructStructStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return StructStructStruct_max_cdr_typesize; -} - -size_t StructStructStruct::getCdrSerializedSize( - const StructStructStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += StructStruct::getCdrSerializedSize(data.child_struct(), current_alignment); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - return current_alignment - initial_alignment; -} - - -void StructStructStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_child_struct; - - scdr << m_child_int64; - -} - -void StructStructStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_child_struct; - - - - dcdr >> m_child_int64; - - -} - - -bool StructStructStruct::isKeyDefined() -{ - return false; -} - -void StructStructStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member child_struct - * @param _child_struct New value to be copied in member child_struct - */ -void StructStructStruct::child_struct( - const StructStruct& _child_struct) -{ - m_child_struct = _child_struct; -} - -/*! - * @brief This function moves the value in member child_struct - * @param _child_struct New value to be moved in member child_struct - */ -void StructStructStruct::child_struct( - StructStruct&& _child_struct) -{ - m_child_struct = std::move(_child_struct); -} - -/*! - * @brief This function returns a constant reference to member child_struct - * @return Constant reference to member child_struct - */ -const StructStruct& StructStructStruct::child_struct() const -{ - return m_child_struct; -} - -/*! - * @brief This function returns a reference to member child_struct - * @return Reference to member child_struct - */ -StructStruct& StructStructStruct::child_struct() -{ - return m_child_struct; -} - - -/*! - * @brief This function sets a value in member child_int64 - * @param _child_int64 New value for member child_int64 - */ -void StructStructStruct::child_int64( - int64_t _child_int64) -{ - m_child_int64 = _child_int64; -} - -/*! - * @brief This function returns the value of member child_int64 - * @return Value of member child_int64 - */ -int64_t StructStructStruct::child_int64() const -{ - return m_child_int64; -} - -/*! - * @brief This function returns a reference to member child_int64 - * @return Reference to member child_int64 - */ -int64_t& StructStructStruct::child_int64() -{ - return m_child_int64; -} - - - - - -SimpleUnion::SimpleUnion() -{ - m__d = A; - // long m_first - m_first = 0; - // long long m_second - m_second = 0; -} - -SimpleUnion::~SimpleUnion() -{ -} - -SimpleUnion::SimpleUnion( - const SimpleUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleUnion::SimpleUnion( - SimpleUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleUnion& SimpleUnion::operator =( - const SimpleUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleUnion& SimpleUnion::operator =( - SimpleUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleUnion::operator ==( - const SimpleUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleUnion::operator !=( - const SimpleUnion& x) const -{ - return !(*this == x); -} - -void SimpleUnion::_d( - int32_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch(__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleUnion::_d() -{ - return m__d; -} - -void SimpleUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t SimpleUnion::first() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleUnion::first() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t SimpleUnion::second() const -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleUnion::second() -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -// TODO(Ricardo) Review -size_t SimpleUnion::getCdrSerializedSize( - const SimpleUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case A: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case B: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void SimpleUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_first; - - break; - - - case B: - scdr << m_second; - - break; - - default: - break; - } -} - -void SimpleUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_first; - - - break; - - - case B: - dcdr >> m_second; - - - break; - - default: - break; - } -} - - - - - -UnionUnion::UnionUnion() -{ - m__d = A; - // long m_first - m_first = 0; - // SimpleUnion m_second - -} - -UnionUnion::~UnionUnion() -{ -} - -UnionUnion::UnionUnion( - const UnionUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -UnionUnion::UnionUnion( - UnionUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = std::move(x.m_second); - - break; - - default: - break; - } -} - -UnionUnion& UnionUnion::operator =( - const UnionUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -UnionUnion& UnionUnion::operator =( - UnionUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = std::move(x.m_second); - - break; - - default: - break; - } - - return *this; -} - -bool UnionUnion::operator ==( - const UnionUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool UnionUnion::operator !=( - const UnionUnion& x) const -{ - return !(*this == x); -} - -void UnionUnion::_d( - int32_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch(__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t UnionUnion::_d() const -{ - return m__d; -} - -int32_t& UnionUnion::_d() -{ - return m__d; -} - -void UnionUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t UnionUnion::first() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& UnionUnion::first() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void UnionUnion::second( - const SimpleUnion& _second) -{ - m_second = _second; - m__d = B; - -} - -void UnionUnion::second( - SimpleUnion&& _second) -{ - m_second = std::move(_second); - m__d = B; - -} - -const SimpleUnion& UnionUnion::second() const -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -SimpleUnion& UnionUnion::second() -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -// TODO(Ricardo) Review -size_t UnionUnion::getCdrSerializedSize( - const UnionUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case A: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case B: - current_alignment += SimpleUnion::getCdrSerializedSize(data.second(), current_alignment); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void UnionUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_first; - - break; - - - case B: - scdr << m_second; - - break; - - default: - break; - } -} - -void UnionUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_first; - - - break; - - - case B: - dcdr >> m_second; - - - break; - - default: - break; - } -} - - - - - -WCharUnion::WCharUnion() -{ - m__d = A; - // long m_first - m_first = 0; - // long long m_second - m_second = 0; -} - -WCharUnion::~WCharUnion() -{ -} - -WCharUnion::WCharUnion( - const WCharUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -WCharUnion::WCharUnion( - WCharUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -WCharUnion& WCharUnion::operator =( - const WCharUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -WCharUnion& WCharUnion::operator =( - WCharUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool WCharUnion::operator ==( - const WCharUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool WCharUnion::operator !=( - const WCharUnion& x) const -{ - return !(*this == x); -} - -void WCharUnion::_d( - wchar_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch(__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -wchar_t WCharUnion::_d() const -{ - return m__d; -} - -wchar_t& WCharUnion::_d() -{ - return m__d; -} - -void WCharUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t WCharUnion::first() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& WCharUnion::first() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void WCharUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t WCharUnion::second() const -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& WCharUnion::second() -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -// TODO(Ricardo) Review -size_t WCharUnion::getCdrSerializedSize( - const WCharUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case A: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case B: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void WCharUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_first; - - break; - - - case B: - scdr << m_second; - - break; - - default: - break; - } -} - -void WCharUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_first; - - - break; - - - case B: - dcdr >> m_second; - - - break; - - default: - break; - } -} - - - - - -SimpleUnionStruct::SimpleUnionStruct() -{ - // SimpleUnion m_my_union - - - // Just to register all known types - registerBasicTypes(); -} - -SimpleUnionStruct::~SimpleUnionStruct() -{ -} - -SimpleUnionStruct::SimpleUnionStruct( - const SimpleUnionStruct& x) -{ - m_my_union = x.m_my_union; - -} - -SimpleUnionStruct::SimpleUnionStruct( - SimpleUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -SimpleUnionStruct& SimpleUnionStruct::operator =( - const SimpleUnionStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -SimpleUnionStruct& SimpleUnionStruct::operator =( - SimpleUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool SimpleUnionStruct::operator ==( - const SimpleUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleUnionStruct::operator !=( - const SimpleUnionStruct& x) const -{ - return !(*this == x); -} - -size_t SimpleUnionStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimpleUnionStruct_max_cdr_typesize; -} - -size_t SimpleUnionStruct::getCdrSerializedSize( - const SimpleUnionStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimpleUnionStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void SimpleUnionStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool SimpleUnionStruct::isKeyDefined() -{ - return false; -} - -void SimpleUnionStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleUnionStruct::my_union( - const SimpleUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleUnionStruct::my_union( - SimpleUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleUnion& SimpleUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleUnion& SimpleUnionStruct::my_union() -{ - return m_my_union; -} - - - - - -UnionUnionUnionStruct::UnionUnionUnionStruct() -{ - // UnionUnion m_my_union - - - // Just to register all known types - registerBasicTypes(); -} - -UnionUnionUnionStruct::~UnionUnionUnionStruct() -{ -} - -UnionUnionUnionStruct::UnionUnionUnionStruct( - const UnionUnionUnionStruct& x) -{ - m_my_union = x.m_my_union; - -} - -UnionUnionUnionStruct::UnionUnionUnionStruct( - UnionUnionUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -UnionUnionUnionStruct& UnionUnionUnionStruct::operator =( - const UnionUnionUnionStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -UnionUnionUnionStruct& UnionUnionUnionStruct::operator =( - UnionUnionUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool UnionUnionUnionStruct::operator ==( - const UnionUnionUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool UnionUnionUnionStruct::operator !=( - const UnionUnionUnionStruct& x) const -{ - return !(*this == x); -} - -size_t UnionUnionUnionStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return UnionUnionUnionStruct_max_cdr_typesize; -} - -size_t UnionUnionUnionStruct::getCdrSerializedSize( - const UnionUnionUnionStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += UnionUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void UnionUnionUnionStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void UnionUnionUnionStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool UnionUnionUnionStruct::isKeyDefined() -{ - return false; -} - -void UnionUnionUnionStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void UnionUnionUnionStruct::my_union( - const UnionUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void UnionUnionUnionStruct::my_union( - UnionUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const UnionUnion& UnionUnionUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -UnionUnion& UnionUnionUnionStruct::my_union() -{ - return m_my_union; -} - - - - - -WCharUnionStruct::WCharUnionStruct() -{ - // WCharUnion m_my_union - - - // Just to register all known types - registerBasicTypes(); -} - -WCharUnionStruct::~WCharUnionStruct() -{ -} - -WCharUnionStruct::WCharUnionStruct( - const WCharUnionStruct& x) -{ - m_my_union = x.m_my_union; - -} - -WCharUnionStruct::WCharUnionStruct( - WCharUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -WCharUnionStruct& WCharUnionStruct::operator =( - const WCharUnionStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -WCharUnionStruct& WCharUnionStruct::operator =( - WCharUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool WCharUnionStruct::operator ==( - const WCharUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool WCharUnionStruct::operator !=( - const WCharUnionStruct& x) const -{ - return !(*this == x); -} - -size_t WCharUnionStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return WCharUnionStruct_max_cdr_typesize; -} - -size_t WCharUnionStruct::getCdrSerializedSize( - const WCharUnionStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += WCharUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void WCharUnionStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void WCharUnionStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool WCharUnionStruct::isKeyDefined() -{ - return false; -} - -void WCharUnionStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void WCharUnionStruct::my_union( - const WCharUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void WCharUnionStruct::my_union( - WCharUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const WCharUnion& WCharUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -WCharUnion& WCharUnionStruct::my_union() -{ - return m_my_union; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/unittest/dynamic_types/idl/Basicv1.h b/test/unittest/dynamic_types/idl/Basicv1.h deleted file mode 100644 index b8b27164562..00000000000 --- a/test/unittest/dynamic_types/idl/Basicv1.h +++ /dev/null @@ -1,5326 +0,0 @@ -// 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 Basic.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_BASIC_H_ -#define _FAST_DDS_GENERATED_BASIC_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(BASIC_SOURCE) -#define BASIC_DllAPI __declspec( dllexport ) -#else -#define BASIC_DllAPI __declspec( dllimport ) -#endif // BASIC_SOURCE -#else -#define BASIC_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define BASIC_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - -/*! - * @brief This class represents the enumeration MyEnum defined by the user in the IDL file. - * @ingroup Basic - */ -enum MyEnum : uint32_t -{ - A, - B, - C -}; -typedef MyEnum MyAliasEnum; - -typedef MyAliasEnum MyAliasAliasEnum; - - - -/*! - * @brief This class represents the structure EnumStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class EnumStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport EnumStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~EnumStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object EnumStruct that will be copied. - */ - eProsima_user_DllExport EnumStruct( - const EnumStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object EnumStruct that will be copied. - */ - eProsima_user_DllExport EnumStruct( - EnumStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object EnumStruct that will be copied. - */ - eProsima_user_DllExport EnumStruct& operator =( - const EnumStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object EnumStruct that will be copied. - */ - eProsima_user_DllExport EnumStruct& operator =( - EnumStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x EnumStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const EnumStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x EnumStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const EnumStruct& x) const; - - /*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ - eProsima_user_DllExport void my_enum( - MyEnum _my_enum); - - /*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ - eProsima_user_DllExport MyEnum my_enum() const; - - /*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ - eProsima_user_DllExport MyEnum& my_enum(); - - - /*! - * @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 EnumStruct& 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 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: - - MyEnum m_my_enum; - -}; - - - -/*! - * @brief This class represents the structure AliasStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class AliasStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport AliasStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~AliasStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object AliasStruct that will be copied. - */ - eProsima_user_DllExport AliasStruct( - const AliasStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object AliasStruct that will be copied. - */ - eProsima_user_DllExport AliasStruct( - AliasStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object AliasStruct that will be copied. - */ - eProsima_user_DllExport AliasStruct& operator =( - const AliasStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object AliasStruct that will be copied. - */ - eProsima_user_DllExport AliasStruct& operator =( - AliasStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x AliasStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const AliasStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x AliasStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const AliasStruct& x) const; - - /*! - * @brief This function sets a value in member my_alias - * @param _my_alias New value for member my_alias - */ - eProsima_user_DllExport void my_alias( - MyAliasEnum _my_alias); - - /*! - * @brief This function returns the value of member my_alias - * @return Value of member my_alias - */ - eProsima_user_DllExport MyAliasEnum my_alias() const; - - /*! - * @brief This function returns a reference to member my_alias - * @return Reference to member my_alias - */ - eProsima_user_DllExport MyAliasEnum& my_alias(); - - - /*! - * @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 AliasStruct& 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 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: - - MyAliasEnum m_my_alias; - -}; - - - -/*! - * @brief This class represents the structure AliasAliasStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class AliasAliasStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport AliasAliasStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~AliasAliasStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object AliasAliasStruct that will be copied. - */ - eProsima_user_DllExport AliasAliasStruct( - const AliasAliasStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object AliasAliasStruct that will be copied. - */ - eProsima_user_DllExport AliasAliasStruct( - AliasAliasStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object AliasAliasStruct that will be copied. - */ - eProsima_user_DllExport AliasAliasStruct& operator =( - const AliasAliasStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object AliasAliasStruct that will be copied. - */ - eProsima_user_DllExport AliasAliasStruct& operator =( - AliasAliasStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x AliasAliasStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const AliasAliasStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x AliasAliasStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const AliasAliasStruct& x) const; - - /*! - * @brief This function sets a value in member my_alias_alias - * @param _my_alias_alias New value for member my_alias_alias - */ - eProsima_user_DllExport void my_alias_alias( - MyAliasAliasEnum _my_alias_alias); - - /*! - * @brief This function returns the value of member my_alias_alias - * @return Value of member my_alias_alias - */ - eProsima_user_DllExport MyAliasAliasEnum my_alias_alias() const; - - /*! - * @brief This function returns a reference to member my_alias_alias - * @return Reference to member my_alias_alias - */ - eProsima_user_DllExport MyAliasAliasEnum& my_alias_alias(); - - - /*! - * @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 AliasAliasStruct& 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 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: - - MyAliasAliasEnum m_my_alias_alias; - -}; - - - -/*! - * @brief This class represents the structure BoolStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class BoolStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BoolStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BoolStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BoolStruct that will be copied. - */ - eProsima_user_DllExport BoolStruct( - const BoolStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BoolStruct that will be copied. - */ - eProsima_user_DllExport BoolStruct( - BoolStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BoolStruct that will be copied. - */ - eProsima_user_DllExport BoolStruct& operator =( - const BoolStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BoolStruct that will be copied. - */ - eProsima_user_DllExport BoolStruct& operator =( - BoolStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BoolStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BoolStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BoolStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BoolStruct& x) const; - - /*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ - eProsima_user_DllExport void my_bool( - bool _my_bool); - - /*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ - eProsima_user_DllExport bool my_bool() const; - - /*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ - eProsima_user_DllExport bool& my_bool(); - - - /*! - * @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 BoolStruct& 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 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: - - bool m_my_bool; - -}; - - - -/*! - * @brief This class represents the structure OctetStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class OctetStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport OctetStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~OctetStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object OctetStruct that will be copied. - */ - eProsima_user_DllExport OctetStruct( - const OctetStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object OctetStruct that will be copied. - */ - eProsima_user_DllExport OctetStruct( - OctetStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object OctetStruct that will be copied. - */ - eProsima_user_DllExport OctetStruct& operator =( - const OctetStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object OctetStruct that will be copied. - */ - eProsima_user_DllExport OctetStruct& operator =( - OctetStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x OctetStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const OctetStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x OctetStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const OctetStruct& x) const; - - /*! - * @brief This function sets a value in member my_octet - * @param _my_octet New value for member my_octet - */ - eProsima_user_DllExport void my_octet( - uint8_t _my_octet); - - /*! - * @brief This function returns the value of member my_octet - * @return Value of member my_octet - */ - eProsima_user_DllExport uint8_t my_octet() const; - - /*! - * @brief This function returns a reference to member my_octet - * @return Reference to member my_octet - */ - eProsima_user_DllExport uint8_t& my_octet(); - - - /*! - * @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 OctetStruct& 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 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: - - uint8_t m_my_octet; - -}; - - - -/*! - * @brief This class represents the structure ShortStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class ShortStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ShortStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ShortStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ShortStruct that will be copied. - */ - eProsima_user_DllExport ShortStruct( - const ShortStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ShortStruct that will be copied. - */ - eProsima_user_DllExport ShortStruct( - ShortStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ShortStruct that will be copied. - */ - eProsima_user_DllExport ShortStruct& operator =( - const ShortStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ShortStruct that will be copied. - */ - eProsima_user_DllExport ShortStruct& operator =( - ShortStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ShortStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ShortStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ShortStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ShortStruct& x) const; - - /*! - * @brief This function sets a value in member my_int16 - * @param _my_int16 New value for member my_int16 - */ - eProsima_user_DllExport void my_int16( - int16_t _my_int16); - - /*! - * @brief This function returns the value of member my_int16 - * @return Value of member my_int16 - */ - eProsima_user_DllExport int16_t my_int16() const; - - /*! - * @brief This function returns a reference to member my_int16 - * @return Reference to member my_int16 - */ - eProsima_user_DllExport int16_t& my_int16(); - - - /*! - * @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 ShortStruct& 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 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: - - int16_t m_my_int16; - -}; - - - -/*! - * @brief This class represents the structure LongStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class LongStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport LongStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~LongStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object LongStruct that will be copied. - */ - eProsima_user_DllExport LongStruct( - const LongStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object LongStruct that will be copied. - */ - eProsima_user_DllExport LongStruct( - LongStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object LongStruct that will be copied. - */ - eProsima_user_DllExport LongStruct& operator =( - const LongStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object LongStruct that will be copied. - */ - eProsima_user_DllExport LongStruct& operator =( - LongStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x LongStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const LongStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x LongStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const LongStruct& x) const; - - /*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ - eProsima_user_DllExport void my_int32( - int32_t _my_int32); - - /*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ - eProsima_user_DllExport int32_t my_int32() const; - - /*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ - eProsima_user_DllExport int32_t& my_int32(); - - - /*! - * @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 LongStruct& 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 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_my_int32; - -}; - - - -/*! - * @brief This class represents the structure LongLongStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class LongLongStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport LongLongStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~LongLongStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object LongLongStruct that will be copied. - */ - eProsima_user_DllExport LongLongStruct( - const LongLongStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object LongLongStruct that will be copied. - */ - eProsima_user_DllExport LongLongStruct( - LongLongStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object LongLongStruct that will be copied. - */ - eProsima_user_DllExport LongLongStruct& operator =( - const LongLongStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object LongLongStruct that will be copied. - */ - eProsima_user_DllExport LongLongStruct& operator =( - LongLongStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x LongLongStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const LongLongStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x LongLongStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const LongLongStruct& x) const; - - /*! - * @brief This function sets a value in member my_int64 - * @param _my_int64 New value for member my_int64 - */ - eProsima_user_DllExport void my_int64( - int64_t _my_int64); - - /*! - * @brief This function returns the value of member my_int64 - * @return Value of member my_int64 - */ - eProsima_user_DllExport int64_t my_int64() const; - - /*! - * @brief This function returns a reference to member my_int64 - * @return Reference to member my_int64 - */ - eProsima_user_DllExport int64_t& my_int64(); - - - /*! - * @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 LongLongStruct& 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 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: - - int64_t m_my_int64; - -}; - - - -/*! - * @brief This class represents the structure UShortStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class UShortStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport UShortStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~UShortStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object UShortStruct that will be copied. - */ - eProsima_user_DllExport UShortStruct( - const UShortStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object UShortStruct that will be copied. - */ - eProsima_user_DllExport UShortStruct( - UShortStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object UShortStruct that will be copied. - */ - eProsima_user_DllExport UShortStruct& operator =( - const UShortStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object UShortStruct that will be copied. - */ - eProsima_user_DllExport UShortStruct& operator =( - UShortStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x UShortStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const UShortStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x UShortStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const UShortStruct& x) const; - - /*! - * @brief This function sets a value in member my_uint16 - * @param _my_uint16 New value for member my_uint16 - */ - eProsima_user_DllExport void my_uint16( - uint16_t _my_uint16); - - /*! - * @brief This function returns the value of member my_uint16 - * @return Value of member my_uint16 - */ - eProsima_user_DllExport uint16_t my_uint16() const; - - /*! - * @brief This function returns a reference to member my_uint16 - * @return Reference to member my_uint16 - */ - eProsima_user_DllExport uint16_t& my_uint16(); - - - /*! - * @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 UShortStruct& 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 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: - - uint16_t m_my_uint16; - -}; - - - -/*! - * @brief This class represents the structure ULongStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class ULongStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ULongStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ULongStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ULongStruct that will be copied. - */ - eProsima_user_DllExport ULongStruct( - const ULongStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ULongStruct that will be copied. - */ - eProsima_user_DllExport ULongStruct( - ULongStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ULongStruct that will be copied. - */ - eProsima_user_DllExport ULongStruct& operator =( - const ULongStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ULongStruct that will be copied. - */ - eProsima_user_DllExport ULongStruct& operator =( - ULongStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ULongStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ULongStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ULongStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ULongStruct& x) const; - - /*! - * @brief This function sets a value in member my_uint32 - * @param _my_uint32 New value for member my_uint32 - */ - eProsima_user_DllExport void my_uint32( - uint32_t _my_uint32); - - /*! - * @brief This function returns the value of member my_uint32 - * @return Value of member my_uint32 - */ - eProsima_user_DllExport uint32_t my_uint32() const; - - /*! - * @brief This function returns a reference to member my_uint32 - * @return Reference to member my_uint32 - */ - eProsima_user_DllExport uint32_t& my_uint32(); - - - /*! - * @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 ULongStruct& 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 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: - - uint32_t m_my_uint32; - -}; - - - -/*! - * @brief This class represents the structure ULongLongStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class ULongLongStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ULongLongStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ULongLongStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ULongLongStruct that will be copied. - */ - eProsima_user_DllExport ULongLongStruct( - const ULongLongStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ULongLongStruct that will be copied. - */ - eProsima_user_DllExport ULongLongStruct( - ULongLongStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ULongLongStruct that will be copied. - */ - eProsima_user_DllExport ULongLongStruct& operator =( - const ULongLongStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ULongLongStruct that will be copied. - */ - eProsima_user_DllExport ULongLongStruct& operator =( - ULongLongStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ULongLongStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ULongLongStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ULongLongStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ULongLongStruct& x) const; - - /*! - * @brief This function sets a value in member my_uint64 - * @param _my_uint64 New value for member my_uint64 - */ - eProsima_user_DllExport void my_uint64( - uint64_t _my_uint64); - - /*! - * @brief This function returns the value of member my_uint64 - * @return Value of member my_uint64 - */ - eProsima_user_DllExport uint64_t my_uint64() const; - - /*! - * @brief This function returns a reference to member my_uint64 - * @return Reference to member my_uint64 - */ - eProsima_user_DllExport uint64_t& my_uint64(); - - - /*! - * @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 ULongLongStruct& 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 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: - - uint64_t m_my_uint64; - -}; - - - -/*! - * @brief This class represents the structure FloatStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class FloatStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport FloatStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~FloatStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object FloatStruct that will be copied. - */ - eProsima_user_DllExport FloatStruct( - const FloatStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object FloatStruct that will be copied. - */ - eProsima_user_DllExport FloatStruct( - FloatStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object FloatStruct that will be copied. - */ - eProsima_user_DllExport FloatStruct& operator =( - const FloatStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object FloatStruct that will be copied. - */ - eProsima_user_DllExport FloatStruct& operator =( - FloatStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x FloatStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const FloatStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x FloatStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const FloatStruct& x) const; - - /*! - * @brief This function sets a value in member my_float32 - * @param _my_float32 New value for member my_float32 - */ - eProsima_user_DllExport void my_float32( - float _my_float32); - - /*! - * @brief This function returns the value of member my_float32 - * @return Value of member my_float32 - */ - eProsima_user_DllExport float my_float32() const; - - /*! - * @brief This function returns a reference to member my_float32 - * @return Reference to member my_float32 - */ - eProsima_user_DllExport float& my_float32(); - - - /*! - * @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 FloatStruct& 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 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: - - float m_my_float32; - -}; - - - -/*! - * @brief This class represents the structure DoubleStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class DoubleStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport DoubleStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~DoubleStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object DoubleStruct that will be copied. - */ - eProsima_user_DllExport DoubleStruct( - const DoubleStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object DoubleStruct that will be copied. - */ - eProsima_user_DllExport DoubleStruct( - DoubleStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object DoubleStruct that will be copied. - */ - eProsima_user_DllExport DoubleStruct& operator =( - const DoubleStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object DoubleStruct that will be copied. - */ - eProsima_user_DllExport DoubleStruct& operator =( - DoubleStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x DoubleStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const DoubleStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x DoubleStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const DoubleStruct& x) const; - - /*! - * @brief This function sets a value in member my_float64 - * @param _my_float64 New value for member my_float64 - */ - eProsima_user_DllExport void my_float64( - double _my_float64); - - /*! - * @brief This function returns the value of member my_float64 - * @return Value of member my_float64 - */ - eProsima_user_DllExport double my_float64() const; - - /*! - * @brief This function returns a reference to member my_float64 - * @return Reference to member my_float64 - */ - eProsima_user_DllExport double& my_float64(); - - - /*! - * @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 DoubleStruct& 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 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: - - double m_my_float64; - -}; - - - -/*! - * @brief This class represents the structure LongDoubleStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class LongDoubleStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport LongDoubleStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~LongDoubleStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object LongDoubleStruct that will be copied. - */ - eProsima_user_DllExport LongDoubleStruct( - const LongDoubleStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object LongDoubleStruct that will be copied. - */ - eProsima_user_DllExport LongDoubleStruct( - LongDoubleStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object LongDoubleStruct that will be copied. - */ - eProsima_user_DllExport LongDoubleStruct& operator =( - const LongDoubleStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object LongDoubleStruct that will be copied. - */ - eProsima_user_DllExport LongDoubleStruct& operator =( - LongDoubleStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x LongDoubleStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const LongDoubleStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x LongDoubleStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const LongDoubleStruct& x) const; - - /*! - * @brief This function sets a value in member my_float128 - * @param _my_float128 New value for member my_float128 - */ - eProsima_user_DllExport void my_float128( - long double _my_float128); - - /*! - * @brief This function returns the value of member my_float128 - * @return Value of member my_float128 - */ - eProsima_user_DllExport long double my_float128() const; - - /*! - * @brief This function returns a reference to member my_float128 - * @return Reference to member my_float128 - */ - eProsima_user_DllExport long double& my_float128(); - - - /*! - * @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 LongDoubleStruct& 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 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: - - long double m_my_float128; - -}; - - - -/*! - * @brief This class represents the structure CharStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class CharStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport CharStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~CharStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object CharStruct that will be copied. - */ - eProsima_user_DllExport CharStruct( - const CharStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object CharStruct that will be copied. - */ - eProsima_user_DllExport CharStruct( - CharStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object CharStruct that will be copied. - */ - eProsima_user_DllExport CharStruct& operator =( - const CharStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object CharStruct that will be copied. - */ - eProsima_user_DllExport CharStruct& operator =( - CharStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x CharStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const CharStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x CharStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const CharStruct& x) const; - - /*! - * @brief This function sets a value in member my_char - * @param _my_char New value for member my_char - */ - eProsima_user_DllExport void my_char( - char _my_char); - - /*! - * @brief This function returns the value of member my_char - * @return Value of member my_char - */ - eProsima_user_DllExport char my_char() const; - - /*! - * @brief This function returns a reference to member my_char - * @return Reference to member my_char - */ - eProsima_user_DllExport char& my_char(); - - - /*! - * @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 CharStruct& 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 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_my_char; - -}; - - - -/*! - * @brief This class represents the structure WCharStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class WCharStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport WCharStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~WCharStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object WCharStruct that will be copied. - */ - eProsima_user_DllExport WCharStruct( - const WCharStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object WCharStruct that will be copied. - */ - eProsima_user_DllExport WCharStruct( - WCharStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object WCharStruct that will be copied. - */ - eProsima_user_DllExport WCharStruct& operator =( - const WCharStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object WCharStruct that will be copied. - */ - eProsima_user_DllExport WCharStruct& operator =( - WCharStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x WCharStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const WCharStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x WCharStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const WCharStruct& x) const; - - /*! - * @brief This function sets a value in member my_wchar - * @param _my_wchar New value for member my_wchar - */ - eProsima_user_DllExport void my_wchar( - wchar_t _my_wchar); - - /*! - * @brief This function returns the value of member my_wchar - * @return Value of member my_wchar - */ - eProsima_user_DllExport wchar_t my_wchar() const; - - /*! - * @brief This function returns a reference to member my_wchar - * @return Reference to member my_wchar - */ - eProsima_user_DllExport wchar_t& my_wchar(); - - - /*! - * @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 WCharStruct& 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 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: - - wchar_t m_my_wchar; - -}; - - - -/*! - * @brief This class represents the structure StringStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class StringStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport StringStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~StringStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object StringStruct that will be copied. - */ - eProsima_user_DllExport StringStruct( - const StringStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object StringStruct that will be copied. - */ - eProsima_user_DllExport StringStruct( - StringStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object StringStruct that will be copied. - */ - eProsima_user_DllExport StringStruct& operator =( - const StringStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object StringStruct that will be copied. - */ - eProsima_user_DllExport StringStruct& operator =( - StringStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x StringStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const StringStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x StringStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const StringStruct& x) const; - - /*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ - eProsima_user_DllExport void my_string( - const std::string& _my_string); - - /*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ - eProsima_user_DllExport void my_string( - std::string&& _my_string); - - /*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ - eProsima_user_DllExport const std::string& my_string() const; - - /*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ - eProsima_user_DllExport std::string& my_string(); - - - /*! - * @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 StringStruct& 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 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: - - std::string m_my_string; - -}; - - - -/*! - * @brief This class represents the structure WStringStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class WStringStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport WStringStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~WStringStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object WStringStruct that will be copied. - */ - eProsima_user_DllExport WStringStruct( - const WStringStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object WStringStruct that will be copied. - */ - eProsima_user_DllExport WStringStruct( - WStringStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object WStringStruct that will be copied. - */ - eProsima_user_DllExport WStringStruct& operator =( - const WStringStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object WStringStruct that will be copied. - */ - eProsima_user_DllExport WStringStruct& operator =( - WStringStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x WStringStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const WStringStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x WStringStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const WStringStruct& x) const; - - /*! - * @brief This function copies the value in member my_wstring - * @param _my_wstring New value to be copied in member my_wstring - */ - eProsima_user_DllExport void my_wstring( - const std::wstring& _my_wstring); - - /*! - * @brief This function moves the value in member my_wstring - * @param _my_wstring New value to be moved in member my_wstring - */ - eProsima_user_DllExport void my_wstring( - std::wstring&& _my_wstring); - - /*! - * @brief This function returns a constant reference to member my_wstring - * @return Constant reference to member my_wstring - */ - eProsima_user_DllExport const std::wstring& my_wstring() const; - - /*! - * @brief This function returns a reference to member my_wstring - * @return Reference to member my_wstring - */ - eProsima_user_DllExport std::wstring& my_wstring(); - - - /*! - * @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 WStringStruct& 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 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: - - std::wstring m_my_wstring; - -}; - - - -/*! - * @brief This class represents the structure LargeStringStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class LargeStringStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport LargeStringStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~LargeStringStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object LargeStringStruct that will be copied. - */ - eProsima_user_DllExport LargeStringStruct( - const LargeStringStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object LargeStringStruct that will be copied. - */ - eProsima_user_DllExport LargeStringStruct( - LargeStringStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object LargeStringStruct that will be copied. - */ - eProsima_user_DllExport LargeStringStruct& operator =( - const LargeStringStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object LargeStringStruct that will be copied. - */ - eProsima_user_DllExport LargeStringStruct& operator =( - LargeStringStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x LargeStringStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const LargeStringStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x LargeStringStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const LargeStringStruct& x) const; - - /*! - * @brief This function copies the value in member my_large_string - * @param _my_large_string New value to be copied in member my_large_string - */ - eProsima_user_DllExport void my_large_string( - const eprosima::fastrtps::fixed_string<41925>& _my_large_string); - - /*! - * @brief This function moves the value in member my_large_string - * @param _my_large_string New value to be moved in member my_large_string - */ - eProsima_user_DllExport void my_large_string( - eprosima::fastrtps::fixed_string<41925>&& _my_large_string); - - /*! - * @brief This function returns a constant reference to member my_large_string - * @return Constant reference to member my_large_string - */ - eProsima_user_DllExport const eprosima::fastrtps::fixed_string<41925>& my_large_string() const; - - /*! - * @brief This function returns a reference to member my_large_string - * @return Reference to member my_large_string - */ - eProsima_user_DllExport eprosima::fastrtps::fixed_string<41925>& my_large_string(); - - - /*! - * @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 LargeStringStruct& 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 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: - - eprosima::fastrtps::fixed_string<41925> m_my_large_string; - -}; - - - -/*! - * @brief This class represents the structure LargeWStringStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class LargeWStringStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport LargeWStringStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~LargeWStringStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object LargeWStringStruct that will be copied. - */ - eProsima_user_DllExport LargeWStringStruct( - const LargeWStringStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object LargeWStringStruct that will be copied. - */ - eProsima_user_DllExport LargeWStringStruct( - LargeWStringStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object LargeWStringStruct that will be copied. - */ - eProsima_user_DllExport LargeWStringStruct& operator =( - const LargeWStringStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object LargeWStringStruct that will be copied. - */ - eProsima_user_DllExport LargeWStringStruct& operator =( - LargeWStringStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x LargeWStringStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const LargeWStringStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x LargeWStringStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const LargeWStringStruct& x) const; - - /*! - * @brief This function copies the value in member my_large_wstring - * @param _my_large_wstring New value to be copied in member my_large_wstring - */ - eProsima_user_DllExport void my_large_wstring( - const std::wstring& _my_large_wstring); - - /*! - * @brief This function moves the value in member my_large_wstring - * @param _my_large_wstring New value to be moved in member my_large_wstring - */ - eProsima_user_DllExport void my_large_wstring( - std::wstring&& _my_large_wstring); - - /*! - * @brief This function returns a constant reference to member my_large_wstring - * @return Constant reference to member my_large_wstring - */ - eProsima_user_DllExport const std::wstring& my_large_wstring() const; - - /*! - * @brief This function returns a reference to member my_large_wstring - * @return Reference to member my_large_wstring - */ - eProsima_user_DllExport std::wstring& my_large_wstring(); - - - /*! - * @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 LargeWStringStruct& 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 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: - - std::wstring m_my_large_wstring; - -}; - - - -/*! - * @brief This class represents the structure ArraytStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class ArraytStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ArraytStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ArraytStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ArraytStruct that will be copied. - */ - eProsima_user_DllExport ArraytStruct( - const ArraytStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ArraytStruct that will be copied. - */ - eProsima_user_DllExport ArraytStruct( - ArraytStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ArraytStruct that will be copied. - */ - eProsima_user_DllExport ArraytStruct& operator =( - const ArraytStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ArraytStruct that will be copied. - */ - eProsima_user_DllExport ArraytStruct& operator =( - ArraytStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ArraytStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ArraytStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ArraytStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ArraytStruct& x) const; - - /*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ - eProsima_user_DllExport void my_array( - const std::array, 2>, 2>& _my_array); - - /*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ - eProsima_user_DllExport void my_array( - std::array, 2>, 2>&& _my_array); - - /*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ - eProsima_user_DllExport const std::array, 2>, 2>& my_array() const; - - /*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ - eProsima_user_DllExport std::array, 2>, 2>& my_array(); - - - /*! - * @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 ArraytStruct& 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 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: - - std::array, 2>, 2> m_my_array; - -}; - -typedef std::array, 2> MyArray; - - - -/*! - * @brief This class represents the structure ArrayArrayStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class ArrayArrayStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ArrayArrayStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ArrayArrayStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ArrayArrayStruct that will be copied. - */ - eProsima_user_DllExport ArrayArrayStruct( - const ArrayArrayStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ArrayArrayStruct that will be copied. - */ - eProsima_user_DllExport ArrayArrayStruct( - ArrayArrayStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ArrayArrayStruct that will be copied. - */ - eProsima_user_DllExport ArrayArrayStruct& operator =( - const ArrayArrayStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ArrayArrayStruct that will be copied. - */ - eProsima_user_DllExport ArrayArrayStruct& operator =( - ArrayArrayStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ArrayArrayStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ArrayArrayStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ArrayArrayStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ArrayArrayStruct& x) const; - - /*! - * @brief This function copies the value in member my_array_array - * @param _my_array_array New value to be copied in member my_array_array - */ - eProsima_user_DllExport void my_array_array( - const std::array, 2>& _my_array_array); - - /*! - * @brief This function moves the value in member my_array_array - * @param _my_array_array New value to be moved in member my_array_array - */ - eProsima_user_DllExport void my_array_array( - std::array, 2>&& _my_array_array); - - /*! - * @brief This function returns a constant reference to member my_array_array - * @return Constant reference to member my_array_array - */ - eProsima_user_DllExport const std::array, 2>& my_array_array() const; - - /*! - * @brief This function returns a reference to member my_array_array - * @return Reference to member my_array_array - */ - eProsima_user_DllExport std::array, 2>& my_array_array(); - - - /*! - * @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 ArrayArrayStruct& 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 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: - - std::array, 2> m_my_array_array; - -}; - - - - - -/*! - * @brief This class represents the structure SequenceStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class SequenceStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceStruct( - const SequenceStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceStruct( - SequenceStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceStruct& operator =( - const SequenceStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceStruct& operator =( - SequenceStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceStruct& x) const; - - /*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); - - /*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); - - /*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ - eProsima_user_DllExport const std::vector& my_sequence() const; - - /*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ - eProsima_user_DllExport std::vector& my_sequence(); - - - /*! - * @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 SequenceStruct& 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 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: - - std::vector m_my_sequence; - -}; - - - - - - - -/*! - * @brief This class represents the structure SequenceSequenceStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class SequenceSequenceStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceSequenceStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceSequenceStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceSequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceStruct( - const SequenceSequenceStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceSequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceStruct( - SequenceSequenceStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceSequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceStruct& operator =( - const SequenceSequenceStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceSequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceStruct& operator =( - SequenceSequenceStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceSequenceStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceSequenceStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceSequenceStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceSequenceStruct& x) const; - - /*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ - eProsima_user_DllExport void my_sequence_sequence( - const std::vector>& _my_sequence_sequence); - - /*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ - eProsima_user_DllExport void my_sequence_sequence( - std::vector>&& _my_sequence_sequence); - - /*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ - eProsima_user_DllExport const std::vector>& my_sequence_sequence() const; - - /*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ - eProsima_user_DllExport std::vector>& my_sequence_sequence(); - - - /*! - * @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 SequenceSequenceStruct& 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 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: - - std::vector> m_my_sequence_sequence; - -}; - - - - - -/*! - * @brief This class represents the structure MapStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class MapStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapStruct that will be copied. - */ - eProsima_user_DllExport MapStruct( - const MapStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapStruct that will be copied. - */ - eProsima_user_DllExport MapStruct( - MapStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapStruct that will be copied. - */ - eProsima_user_DllExport MapStruct& operator =( - const MapStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapStruct that will be copied. - */ - eProsima_user_DllExport MapStruct& operator =( - MapStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapStruct& x) const; - - /*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ - eProsima_user_DllExport void my_map( - const std::map& _my_map); - - /*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ - eProsima_user_DllExport void my_map( - std::map&& _my_map); - - /*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ - eProsima_user_DllExport const std::map& my_map() const; - - /*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ - eProsima_user_DllExport std::map& my_map(); - - - /*! - * @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 MapStruct& 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 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: - - std::map m_my_map; - -}; - - - - - - - -/*! - * @brief This class represents the structure MapMapStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class MapMapStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapMapStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapMapStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapMapStruct that will be copied. - */ - eProsima_user_DllExport MapMapStruct( - const MapMapStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapMapStruct that will be copied. - */ - eProsima_user_DllExport MapMapStruct( - MapMapStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapMapStruct that will be copied. - */ - eProsima_user_DllExport MapMapStruct& operator =( - const MapMapStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapMapStruct that will be copied. - */ - eProsima_user_DllExport MapMapStruct& operator =( - MapMapStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapMapStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapMapStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapMapStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapMapStruct& x) const; - - /*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ - eProsima_user_DllExport void my_map_map( - const std::map>& _my_map_map); - - /*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ - eProsima_user_DllExport void my_map_map( - std::map>&& _my_map_map); - - /*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ - eProsima_user_DllExport const std::map>& my_map_map() const; - - /*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ - eProsima_user_DllExport std::map>& my_map_map(); - - - /*! - * @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 MapMapStruct& 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 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: - - std::map> m_my_map_map; - -}; - -/*! - * @brief This class represents the structure MyBitset defined by the user in the IDL file. - * @ingroup Basic - */ -class MyBitset -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyBitset(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyBitset(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MyBitset that will be copied. - */ - eProsima_user_DllExport MyBitset( - const MyBitset& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MyBitset that will be copied. - */ - eProsima_user_DllExport MyBitset( - MyBitset&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MyBitset that will be copied. - */ - eProsima_user_DllExport MyBitset& operator =( - const MyBitset& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MyBitset that will be copied. - */ - eProsima_user_DllExport MyBitset& operator =( - MyBitset&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MyBitset object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyBitset& x) const; - - /*! - * @brief Comparison operator. - * @param x MyBitset object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyBitset& x) const; - - /*! - * @brief This function sets a value in member a - * @param _a New value for member a - */ - eProsima_user_DllExport void a( - char _a); - - /*! - * @brief This function returns the value of member a - * @return Value of member a - */ - eProsima_user_DllExport char a() const; - - - - /*! - * @brief This function sets a value in member b - * @param _b New value for member b - */ - eProsima_user_DllExport void b( - uint32_t _b); - - /*! - * @brief This function returns the value of member b - * @return Value of member b - */ - eProsima_user_DllExport uint32_t b() const; - - - eProsima_user_DllExport std::bitset<30> bitset() const; - - eProsima_user_DllExport void bitset( - const std::bitset<30>&); - - /*! - * @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 MyBitset& 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); - - - - - -private: - - std::bitset<30> m_bitset; -}; - - -/*! - * @brief This class represents the structure BitsetStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class BitsetStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BitsetStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BitsetStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BitsetStruct that will be copied. - */ - eProsima_user_DllExport BitsetStruct( - const BitsetStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BitsetStruct that will be copied. - */ - eProsima_user_DllExport BitsetStruct( - BitsetStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BitsetStruct that will be copied. - */ - eProsima_user_DllExport BitsetStruct& operator =( - const BitsetStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BitsetStruct that will be copied. - */ - eProsima_user_DllExport BitsetStruct& operator =( - BitsetStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BitsetStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BitsetStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BitsetStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BitsetStruct& x) const; - - /*! - * @brief This function copies the value in member a - * @param _a New value to be copied in member a - */ - eProsima_user_DllExport void a( - const MyBitset& _a); - - /*! - * @brief This function moves the value in member a - * @param _a New value to be moved in member a - */ - eProsima_user_DllExport void a( - MyBitset&& _a); - - /*! - * @brief This function returns a constant reference to member a - * @return Constant reference to member a - */ - eProsima_user_DllExport const MyBitset& a() const; - - /*! - * @brief This function returns a reference to member a - * @return Reference to member a - */ - eProsima_user_DllExport MyBitset& a(); - - - /*! - * @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 BitsetStruct& 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 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: - - MyBitset m_a; - -}; - - - -/*! - * @brief This class represents the structure StructStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class StructStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport StructStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~StructStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object StructStruct that will be copied. - */ - eProsima_user_DllExport StructStruct( - const StructStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object StructStruct that will be copied. - */ - eProsima_user_DllExport StructStruct( - StructStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object StructStruct that will be copied. - */ - eProsima_user_DllExport StructStruct& operator =( - const StructStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object StructStruct that will be copied. - */ - eProsima_user_DllExport StructStruct& operator =( - StructStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x StructStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const StructStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x StructStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const StructStruct& x) const; - - /*! - * @brief This function sets a value in member a - * @param _a New value for member a - */ - eProsima_user_DllExport void a( - int32_t _a); - - /*! - * @brief This function returns the value of member a - * @return Value of member a - */ - eProsima_user_DllExport int32_t a() const; - - /*! - * @brief This function returns a reference to member a - * @return Reference to member a - */ - eProsima_user_DllExport int32_t& a(); - - - /*! - * @brief This function sets a value in member b - * @param _b New value for member b - */ - eProsima_user_DllExport void b( - int64_t _b); - - /*! - * @brief This function returns the value of member b - * @return Value of member b - */ - eProsima_user_DllExport int64_t b() const; - - /*! - * @brief This function returns a reference to member b - * @return Reference to member b - */ - eProsima_user_DllExport int64_t& b(); - - - /*! - * @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 StructStruct& 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 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_a; - int64_t m_b; - -}; - - - -/*! - * @brief This class represents the structure StructStructStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class StructStructStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport StructStructStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~StructStructStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object StructStructStruct that will be copied. - */ - eProsima_user_DllExport StructStructStruct( - const StructStructStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object StructStructStruct that will be copied. - */ - eProsima_user_DllExport StructStructStruct( - StructStructStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object StructStructStruct that will be copied. - */ - eProsima_user_DllExport StructStructStruct& operator =( - const StructStructStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object StructStructStruct that will be copied. - */ - eProsima_user_DllExport StructStructStruct& operator =( - StructStructStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x StructStructStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const StructStructStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x StructStructStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const StructStructStruct& x) const; - - /*! - * @brief This function copies the value in member child_struct - * @param _child_struct New value to be copied in member child_struct - */ - eProsima_user_DllExport void child_struct( - const StructStruct& _child_struct); - - /*! - * @brief This function moves the value in member child_struct - * @param _child_struct New value to be moved in member child_struct - */ - eProsima_user_DllExport void child_struct( - StructStruct&& _child_struct); - - /*! - * @brief This function returns a constant reference to member child_struct - * @return Constant reference to member child_struct - */ - eProsima_user_DllExport const StructStruct& child_struct() const; - - /*! - * @brief This function returns a reference to member child_struct - * @return Reference to member child_struct - */ - eProsima_user_DllExport StructStruct& child_struct(); - - - /*! - * @brief This function sets a value in member child_int64 - * @param _child_int64 New value for member child_int64 - */ - eProsima_user_DllExport void child_int64( - int64_t _child_int64); - - /*! - * @brief This function returns the value of member child_int64 - * @return Value of member child_int64 - */ - eProsima_user_DllExport int64_t child_int64() const; - - /*! - * @brief This function returns a reference to member child_int64 - * @return Reference to member child_int64 - */ - eProsima_user_DllExport int64_t& child_int64(); - - - /*! - * @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 StructStructStruct& 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 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: - - StructStruct m_child_struct; - int64_t m_child_int64; - -}; - - - -/*! - * @brief This class represents the union SimpleUnion defined by the user in the IDL file. - * @ingroup Basic - */ -class SimpleUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleUnion that will be copied. - */ - eProsima_user_DllExport SimpleUnion( - const SimpleUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleUnion that will be copied. - */ - eProsima_user_DllExport SimpleUnion( - SimpleUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleUnion that will be copied. - */ - eProsima_user_DllExport SimpleUnion& operator =( - const SimpleUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleUnion that will be copied. - */ - eProsima_user_DllExport SimpleUnion& operator =( - SimpleUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int32_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int32_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int32_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - int32_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first(); - - - /*! - * @brief This function sets a value in member second - * @param _second New value for member second - */ - eProsima_user_DllExport void second( - int64_t _second); - - /*! - * @brief This function returns the value of member second - * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second(); - - - /*! - * @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 SimpleUnion& 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); - - - - - -private: - - int32_t m__d; - - int32_t m_first; - int64_t m_second; -}; - - - -/*! - * @brief This class represents the union UnionUnion defined by the user in the IDL file. - * @ingroup Basic - */ -class UnionUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport UnionUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~UnionUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object UnionUnion that will be copied. - */ - eProsima_user_DllExport UnionUnion( - const UnionUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object UnionUnion that will be copied. - */ - eProsima_user_DllExport UnionUnion( - UnionUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object UnionUnion that will be copied. - */ - eProsima_user_DllExport UnionUnion& operator =( - const UnionUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object UnionUnion that will be copied. - */ - eProsima_user_DllExport UnionUnion& operator =( - UnionUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x UnionUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const UnionUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x UnionUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const UnionUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int32_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int32_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int32_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - int32_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first(); - - - /*! - * @brief This function copies the value in member second - * @param _second New value to be copied in member second - */ - eProsima_user_DllExport void second( - const SimpleUnion& _second); - - /*! - * @brief This function moves the value in member second - * @param _second New value to be moved in member second - */ - eProsima_user_DllExport void second( - SimpleUnion&& _second); - - /*! - * @brief This function returns a constant reference to member second - * @return Constant reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const SimpleUnion& second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport SimpleUnion& second(); - - - /*! - * @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 UnionUnion& 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); - - - - - -private: - - int32_t m__d; - - int32_t m_first; - SimpleUnion m_second; -}; - - - -/*! - * @brief This class represents the union WCharUnion defined by the user in the IDL file. - * @ingroup Basic - */ -class WCharUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport WCharUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~WCharUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object WCharUnion that will be copied. - */ - eProsima_user_DllExport WCharUnion( - const WCharUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object WCharUnion that will be copied. - */ - eProsima_user_DllExport WCharUnion( - WCharUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object WCharUnion that will be copied. - */ - eProsima_user_DllExport WCharUnion& operator =( - const WCharUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object WCharUnion that will be copied. - */ - eProsima_user_DllExport WCharUnion& operator =( - WCharUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x WCharUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const WCharUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x WCharUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const WCharUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - wchar_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport wchar_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport wchar_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - int32_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first(); - - - /*! - * @brief This function sets a value in member second - * @param _second New value for member second - */ - eProsima_user_DllExport void second( - int64_t _second); - - /*! - * @brief This function returns the value of member second - * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second(); - - - /*! - * @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 WCharUnion& 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); - - - - - -private: - - wchar_t m__d; - - int32_t m_first; - int64_t m_second; -}; - - - -/*! - * @brief This class represents the structure SimpleUnionStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class SimpleUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionStruct( - const SimpleUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionStruct( - SimpleUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionStruct& operator =( - const SimpleUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionStruct& operator =( - SimpleUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleUnion& my_union(); - - - /*! - * @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 SimpleUnionStruct& 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 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: - - SimpleUnion m_my_union; - -}; - - - -/*! - * @brief This class represents the structure UnionUnionUnionStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class UnionUnionUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport UnionUnionUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~UnionUnionUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object UnionUnionUnionStruct that will be copied. - */ - eProsima_user_DllExport UnionUnionUnionStruct( - const UnionUnionUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object UnionUnionUnionStruct that will be copied. - */ - eProsima_user_DllExport UnionUnionUnionStruct( - UnionUnionUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object UnionUnionUnionStruct that will be copied. - */ - eProsima_user_DllExport UnionUnionUnionStruct& operator =( - const UnionUnionUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object UnionUnionUnionStruct that will be copied. - */ - eProsima_user_DllExport UnionUnionUnionStruct& operator =( - UnionUnionUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x UnionUnionUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const UnionUnionUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x UnionUnionUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const UnionUnionUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const UnionUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - UnionUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const UnionUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport UnionUnion& my_union(); - - - /*! - * @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 UnionUnionUnionStruct& 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 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: - - UnionUnion m_my_union; - -}; - - - -/*! - * @brief This class represents the structure WCharUnionStruct defined by the user in the IDL file. - * @ingroup Basic - */ -class WCharUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport WCharUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~WCharUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object WCharUnionStruct that will be copied. - */ - eProsima_user_DllExport WCharUnionStruct( - const WCharUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object WCharUnionStruct that will be copied. - */ - eProsima_user_DllExport WCharUnionStruct( - WCharUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object WCharUnionStruct that will be copied. - */ - eProsima_user_DllExport WCharUnionStruct& operator =( - const WCharUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object WCharUnionStruct that will be copied. - */ - eProsima_user_DllExport WCharUnionStruct& operator =( - WCharUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x WCharUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const WCharUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x WCharUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const WCharUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const WCharUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - WCharUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const WCharUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport WCharUnion& my_union(); - - - /*! - * @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 WCharUnionStruct& 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 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: - - WCharUnion m_my_union; - -}; - - -#endif // _FAST_DDS_GENERATED_BASIC_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/unittest/dynamic_types/idl/Test.cxx b/test/unittest/dynamic_types/idl/Test.cxx deleted file mode 100644 index 423925e0980..00000000000 --- a/test/unittest/dynamic_types/idl/Test.cxx +++ /dev/null @@ -1,2405 +0,0 @@ -// 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.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Test.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include "TestTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -BasicStruct::BasicStruct() -{ - // Just to register all known types - registerTestTypes(); -} - -BasicStruct::~BasicStruct() -{ -} - -BasicStruct::BasicStruct( - const BasicStruct& x) -{ - m_my_bool = x.m_my_bool; - m_my_octet = x.m_my_octet; - m_my_int16 = x.m_my_int16; - m_my_int32 = x.m_my_int32; - m_my_int64 = x.m_my_int64; - m_my_uint16 = x.m_my_uint16; - m_my_uint32 = x.m_my_uint32; - m_my_uint64 = x.m_my_uint64; - m_my_float32 = x.m_my_float32; - m_my_float64 = x.m_my_float64; - m_my_float128 = x.m_my_float128; - m_my_char = x.m_my_char; - m_my_string = x.m_my_string; -} - -BasicStruct::BasicStruct( - BasicStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - m_my_octet = x.m_my_octet; - m_my_int16 = x.m_my_int16; - m_my_int32 = x.m_my_int32; - m_my_int64 = x.m_my_int64; - m_my_uint16 = x.m_my_uint16; - m_my_uint32 = x.m_my_uint32; - m_my_uint64 = x.m_my_uint64; - m_my_float32 = x.m_my_float32; - m_my_float64 = x.m_my_float64; - m_my_float128 = x.m_my_float128; - m_my_char = x.m_my_char; - m_my_string = std::move(x.m_my_string); -} - -BasicStruct& BasicStruct::operator =( - const BasicStruct& x) -{ - - m_my_bool = x.m_my_bool; - m_my_octet = x.m_my_octet; - m_my_int16 = x.m_my_int16; - m_my_int32 = x.m_my_int32; - m_my_int64 = x.m_my_int64; - m_my_uint16 = x.m_my_uint16; - m_my_uint32 = x.m_my_uint32; - m_my_uint64 = x.m_my_uint64; - m_my_float32 = x.m_my_float32; - m_my_float64 = x.m_my_float64; - m_my_float128 = x.m_my_float128; - m_my_char = x.m_my_char; - m_my_string = x.m_my_string; - return *this; -} - -BasicStruct& BasicStruct::operator =( - BasicStruct&& x) noexcept -{ - - m_my_bool = x.m_my_bool; - m_my_octet = x.m_my_octet; - m_my_int16 = x.m_my_int16; - m_my_int32 = x.m_my_int32; - m_my_int64 = x.m_my_int64; - m_my_uint16 = x.m_my_uint16; - m_my_uint32 = x.m_my_uint32; - m_my_uint64 = x.m_my_uint64; - m_my_float32 = x.m_my_float32; - m_my_float64 = x.m_my_float64; - m_my_float128 = x.m_my_float128; - m_my_char = x.m_my_char; - m_my_string = std::move(x.m_my_string); - return *this; -} - -bool BasicStruct::operator ==( - const BasicStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_octet == x.m_my_octet && - m_my_int16 == x.m_my_int16 && - m_my_int32 == x.m_my_int32 && - m_my_int64 == x.m_my_int64 && - m_my_uint16 == x.m_my_uint16 && - m_my_uint32 == x.m_my_uint32 && - m_my_uint64 == x.m_my_uint64 && - m_my_float32 == x.m_my_float32 && - m_my_float64 == x.m_my_float64 && - m_my_float128 == x.m_my_float128 && - m_my_char == x.m_my_char && - m_my_string == x.m_my_string); -} - -bool BasicStruct::operator !=( - const BasicStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BasicStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BasicStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_octet - * @param _my_octet New value for member my_octet - */ -void BasicStruct::my_octet( - uint8_t _my_octet) -{ - m_my_octet = _my_octet; -} - -/*! - * @brief This function returns the value of member my_octet - * @return Value of member my_octet - */ -uint8_t BasicStruct::my_octet() const -{ - return m_my_octet; -} - -/*! - * @brief This function returns a reference to member my_octet - * @return Reference to member my_octet - */ -uint8_t& BasicStruct::my_octet() -{ - return m_my_octet; -} - - -/*! - * @brief This function sets a value in member my_int16 - * @param _my_int16 New value for member my_int16 - */ -void BasicStruct::my_int16( - int16_t _my_int16) -{ - m_my_int16 = _my_int16; -} - -/*! - * @brief This function returns the value of member my_int16 - * @return Value of member my_int16 - */ -int16_t BasicStruct::my_int16() const -{ - return m_my_int16; -} - -/*! - * @brief This function returns a reference to member my_int16 - * @return Reference to member my_int16 - */ -int16_t& BasicStruct::my_int16() -{ - return m_my_int16; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function sets a value in member my_int64 - * @param _my_int64 New value for member my_int64 - */ -void BasicStruct::my_int64( - int64_t _my_int64) -{ - m_my_int64 = _my_int64; -} - -/*! - * @brief This function returns the value of member my_int64 - * @return Value of member my_int64 - */ -int64_t BasicStruct::my_int64() const -{ - return m_my_int64; -} - -/*! - * @brief This function returns a reference to member my_int64 - * @return Reference to member my_int64 - */ -int64_t& BasicStruct::my_int64() -{ - return m_my_int64; -} - - -/*! - * @brief This function sets a value in member my_uint16 - * @param _my_uint16 New value for member my_uint16 - */ -void BasicStruct::my_uint16( - uint16_t _my_uint16) -{ - m_my_uint16 = _my_uint16; -} - -/*! - * @brief This function returns the value of member my_uint16 - * @return Value of member my_uint16 - */ -uint16_t BasicStruct::my_uint16() const -{ - return m_my_uint16; -} - -/*! - * @brief This function returns a reference to member my_uint16 - * @return Reference to member my_uint16 - */ -uint16_t& BasicStruct::my_uint16() -{ - return m_my_uint16; -} - - -/*! - * @brief This function sets a value in member my_uint32 - * @param _my_uint32 New value for member my_uint32 - */ -void BasicStruct::my_uint32( - uint32_t _my_uint32) -{ - m_my_uint32 = _my_uint32; -} - -/*! - * @brief This function returns the value of member my_uint32 - * @return Value of member my_uint32 - */ -uint32_t BasicStruct::my_uint32() const -{ - return m_my_uint32; -} - -/*! - * @brief This function returns a reference to member my_uint32 - * @return Reference to member my_uint32 - */ -uint32_t& BasicStruct::my_uint32() -{ - return m_my_uint32; -} - - -/*! - * @brief This function sets a value in member my_uint64 - * @param _my_uint64 New value for member my_uint64 - */ -void BasicStruct::my_uint64( - uint64_t _my_uint64) -{ - m_my_uint64 = _my_uint64; -} - -/*! - * @brief This function returns the value of member my_uint64 - * @return Value of member my_uint64 - */ -uint64_t BasicStruct::my_uint64() const -{ - return m_my_uint64; -} - -/*! - * @brief This function returns a reference to member my_uint64 - * @return Reference to member my_uint64 - */ -uint64_t& BasicStruct::my_uint64() -{ - return m_my_uint64; -} - - -/*! - * @brief This function sets a value in member my_float32 - * @param _my_float32 New value for member my_float32 - */ -void BasicStruct::my_float32( - float _my_float32) -{ - m_my_float32 = _my_float32; -} - -/*! - * @brief This function returns the value of member my_float32 - * @return Value of member my_float32 - */ -float BasicStruct::my_float32() const -{ - return m_my_float32; -} - -/*! - * @brief This function returns a reference to member my_float32 - * @return Reference to member my_float32 - */ -float& BasicStruct::my_float32() -{ - return m_my_float32; -} - - -/*! - * @brief This function sets a value in member my_float64 - * @param _my_float64 New value for member my_float64 - */ -void BasicStruct::my_float64( - double _my_float64) -{ - m_my_float64 = _my_float64; -} - -/*! - * @brief This function returns the value of member my_float64 - * @return Value of member my_float64 - */ -double BasicStruct::my_float64() const -{ - return m_my_float64; -} - -/*! - * @brief This function returns a reference to member my_float64 - * @return Reference to member my_float64 - */ -double& BasicStruct::my_float64() -{ - return m_my_float64; -} - - -/*! - * @brief This function sets a value in member my_float128 - * @param _my_float128 New value for member my_float128 - */ -void BasicStruct::my_float128( - long double _my_float128) -{ - m_my_float128 = _my_float128; -} - -/*! - * @brief This function returns the value of member my_float128 - * @return Value of member my_float128 - */ -long double BasicStruct::my_float128() const -{ - return m_my_float128; -} - -/*! - * @brief This function returns a reference to member my_float128 - * @return Reference to member my_float128 - */ -long double& BasicStruct::my_float128() -{ - return m_my_float128; -} - - -/*! - * @brief This function sets a value in member my_char - * @param _my_char New value for member my_char - */ -void BasicStruct::my_char( - char _my_char) -{ - m_my_char = _my_char; -} - -/*! - * @brief This function returns the value of member my_char - * @return Value of member my_char - */ -char BasicStruct::my_char() const -{ - return m_my_char; -} - -/*! - * @brief This function returns a reference to member my_char - * @return Reference to member my_char - */ -char& BasicStruct::my_char() -{ - return m_my_char; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicStruct::my_string() -{ - return m_my_string; -} - - - - - - - - - - - -ComplexStruct::ComplexStruct() -{ - // Just to register all known types - registerTestTypes(); -} - -ComplexStruct::~ComplexStruct() -{ -} - -ComplexStruct::ComplexStruct( - const ComplexStruct& x) -{ - m_my_octet = x.m_my_octet; - m_my_basic_struct = x.m_my_basic_struct; - m_my_alias_enum = x.m_my_alias_enum; - m_my_enum = x.m_my_enum; - m_my_sequence_octet = x.m_my_sequence_octet; - m_my_sequence_struct = x.m_my_sequence_struct; - m_my_array_octet = x.m_my_array_octet; - m_my_octet_array_500 = x.m_my_octet_array_500; - m_my_array_struct = x.m_my_array_struct; - m_my_map_octet_short = x.m_my_map_octet_short; - m_my_map_long_struct = x.m_my_map_long_struct; - m_my_map_long_seq_octet = x.m_my_map_long_seq_octet; - m_my_map_long_octet_array_500 = x.m_my_map_long_octet_array_500; - m_my_map_long_lol_type = x.m_my_map_long_lol_type; - m_my_small_string_8 = x.m_my_small_string_8; - m_my_large_string_8 = x.m_my_large_string_8; - m_my_array_string = x.m_my_array_string; - m_multi_alias_array_42 = x.m_multi_alias_array_42; - m_my_array_arrays = x.m_my_array_arrays; - m_my_sequences_array = x.m_my_sequences_array; -} - -ComplexStruct::ComplexStruct( - ComplexStruct&& x) noexcept -{ - m_my_octet = x.m_my_octet; - m_my_basic_struct = std::move(x.m_my_basic_struct); - m_my_alias_enum = x.m_my_alias_enum; - m_my_enum = x.m_my_enum; - m_my_sequence_octet = std::move(x.m_my_sequence_octet); - m_my_sequence_struct = std::move(x.m_my_sequence_struct); - m_my_array_octet = std::move(x.m_my_array_octet); - m_my_octet_array_500 = std::move(x.m_my_octet_array_500); - m_my_array_struct = std::move(x.m_my_array_struct); - m_my_map_octet_short = std::move(x.m_my_map_octet_short); - m_my_map_long_struct = std::move(x.m_my_map_long_struct); - m_my_map_long_seq_octet = std::move(x.m_my_map_long_seq_octet); - m_my_map_long_octet_array_500 = std::move(x.m_my_map_long_octet_array_500); - m_my_map_long_lol_type = std::move(x.m_my_map_long_lol_type); - m_my_small_string_8 = std::move(x.m_my_small_string_8); - m_my_large_string_8 = std::move(x.m_my_large_string_8); - m_my_array_string = std::move(x.m_my_array_string); - m_multi_alias_array_42 = std::move(x.m_multi_alias_array_42); - m_my_array_arrays = std::move(x.m_my_array_arrays); - m_my_sequences_array = std::move(x.m_my_sequences_array); -} - -ComplexStruct& ComplexStruct::operator =( - const ComplexStruct& x) -{ - - m_my_octet = x.m_my_octet; - m_my_basic_struct = x.m_my_basic_struct; - m_my_alias_enum = x.m_my_alias_enum; - m_my_enum = x.m_my_enum; - m_my_sequence_octet = x.m_my_sequence_octet; - m_my_sequence_struct = x.m_my_sequence_struct; - m_my_array_octet = x.m_my_array_octet; - m_my_octet_array_500 = x.m_my_octet_array_500; - m_my_array_struct = x.m_my_array_struct; - m_my_map_octet_short = x.m_my_map_octet_short; - m_my_map_long_struct = x.m_my_map_long_struct; - m_my_map_long_seq_octet = x.m_my_map_long_seq_octet; - m_my_map_long_octet_array_500 = x.m_my_map_long_octet_array_500; - m_my_map_long_lol_type = x.m_my_map_long_lol_type; - m_my_small_string_8 = x.m_my_small_string_8; - m_my_large_string_8 = x.m_my_large_string_8; - m_my_array_string = x.m_my_array_string; - m_multi_alias_array_42 = x.m_multi_alias_array_42; - m_my_array_arrays = x.m_my_array_arrays; - m_my_sequences_array = x.m_my_sequences_array; - return *this; -} - -ComplexStruct& ComplexStruct::operator =( - ComplexStruct&& x) noexcept -{ - - m_my_octet = x.m_my_octet; - m_my_basic_struct = std::move(x.m_my_basic_struct); - m_my_alias_enum = x.m_my_alias_enum; - m_my_enum = x.m_my_enum; - m_my_sequence_octet = std::move(x.m_my_sequence_octet); - m_my_sequence_struct = std::move(x.m_my_sequence_struct); - m_my_array_octet = std::move(x.m_my_array_octet); - m_my_octet_array_500 = std::move(x.m_my_octet_array_500); - m_my_array_struct = std::move(x.m_my_array_struct); - m_my_map_octet_short = std::move(x.m_my_map_octet_short); - m_my_map_long_struct = std::move(x.m_my_map_long_struct); - m_my_map_long_seq_octet = std::move(x.m_my_map_long_seq_octet); - m_my_map_long_octet_array_500 = std::move(x.m_my_map_long_octet_array_500); - m_my_map_long_lol_type = std::move(x.m_my_map_long_lol_type); - m_my_small_string_8 = std::move(x.m_my_small_string_8); - m_my_large_string_8 = std::move(x.m_my_large_string_8); - m_my_array_string = std::move(x.m_my_array_string); - m_multi_alias_array_42 = std::move(x.m_multi_alias_array_42); - m_my_array_arrays = std::move(x.m_my_array_arrays); - m_my_sequences_array = std::move(x.m_my_sequences_array); - return *this; -} - -bool ComplexStruct::operator ==( - const ComplexStruct& x) const -{ - return (m_my_octet == x.m_my_octet && - m_my_basic_struct == x.m_my_basic_struct && - m_my_alias_enum == x.m_my_alias_enum && - m_my_enum == x.m_my_enum && - m_my_sequence_octet == x.m_my_sequence_octet && - m_my_sequence_struct == x.m_my_sequence_struct && - m_my_array_octet == x.m_my_array_octet && - m_my_octet_array_500 == x.m_my_octet_array_500 && - m_my_array_struct == x.m_my_array_struct && - m_my_map_octet_short == x.m_my_map_octet_short && - m_my_map_long_struct == x.m_my_map_long_struct && - m_my_map_long_seq_octet == x.m_my_map_long_seq_octet && - m_my_map_long_octet_array_500 == x.m_my_map_long_octet_array_500 && - m_my_map_long_lol_type == x.m_my_map_long_lol_type && - m_my_small_string_8 == x.m_my_small_string_8 && - m_my_large_string_8 == x.m_my_large_string_8 && - m_my_array_string == x.m_my_array_string && - m_multi_alias_array_42 == x.m_multi_alias_array_42 && - m_my_array_arrays == x.m_my_array_arrays && - m_my_sequences_array == x.m_my_sequences_array); -} - -bool ComplexStruct::operator !=( - const ComplexStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_octet - * @param _my_octet New value for member my_octet - */ -void ComplexStruct::my_octet( - uint8_t _my_octet) -{ - m_my_octet = _my_octet; -} - -/*! - * @brief This function returns the value of member my_octet - * @return Value of member my_octet - */ -uint8_t ComplexStruct::my_octet() const -{ - return m_my_octet; -} - -/*! - * @brief This function returns a reference to member my_octet - * @return Reference to member my_octet - */ -uint8_t& ComplexStruct::my_octet() -{ - return m_my_octet; -} - - -/*! - * @brief This function copies the value in member my_basic_struct - * @param _my_basic_struct New value to be copied in member my_basic_struct - */ -void ComplexStruct::my_basic_struct( - const BasicStruct& _my_basic_struct) -{ - m_my_basic_struct = _my_basic_struct; -} - -/*! - * @brief This function moves the value in member my_basic_struct - * @param _my_basic_struct New value to be moved in member my_basic_struct - */ -void ComplexStruct::my_basic_struct( - BasicStruct&& _my_basic_struct) -{ - m_my_basic_struct = std::move(_my_basic_struct); -} - -/*! - * @brief This function returns a constant reference to member my_basic_struct - * @return Constant reference to member my_basic_struct - */ -const BasicStruct& ComplexStruct::my_basic_struct() const -{ - return m_my_basic_struct; -} - -/*! - * @brief This function returns a reference to member my_basic_struct - * @return Reference to member my_basic_struct - */ -BasicStruct& ComplexStruct::my_basic_struct() -{ - return m_my_basic_struct; -} - - -/*! - * @brief This function sets a value in member my_alias_enum - * @param _my_alias_enum New value for member my_alias_enum - */ -void ComplexStruct::my_alias_enum( - MyAliasEnum _my_alias_enum) -{ - m_my_alias_enum = _my_alias_enum; -} - -/*! - * @brief This function returns the value of member my_alias_enum - * @return Value of member my_alias_enum - */ -MyAliasEnum ComplexStruct::my_alias_enum() const -{ - return m_my_alias_enum; -} - -/*! - * @brief This function returns a reference to member my_alias_enum - * @return Reference to member my_alias_enum - */ -MyAliasEnum& ComplexStruct::my_alias_enum() -{ - return m_my_alias_enum; -} - - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void ComplexStruct::my_enum( - MyEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyEnum ComplexStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyEnum& ComplexStruct::my_enum() -{ - return m_my_enum; -} - - -/*! - * @brief This function copies the value in member my_sequence_octet - * @param _my_sequence_octet New value to be copied in member my_sequence_octet - */ -void ComplexStruct::my_sequence_octet( - const std::vector& _my_sequence_octet) -{ - m_my_sequence_octet = _my_sequence_octet; -} - -/*! - * @brief This function moves the value in member my_sequence_octet - * @param _my_sequence_octet New value to be moved in member my_sequence_octet - */ -void ComplexStruct::my_sequence_octet( - std::vector&& _my_sequence_octet) -{ - m_my_sequence_octet = std::move(_my_sequence_octet); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_octet - * @return Constant reference to member my_sequence_octet - */ -const std::vector& ComplexStruct::my_sequence_octet() const -{ - return m_my_sequence_octet; -} - -/*! - * @brief This function returns a reference to member my_sequence_octet - * @return Reference to member my_sequence_octet - */ -std::vector& ComplexStruct::my_sequence_octet() -{ - return m_my_sequence_octet; -} - - -/*! - * @brief This function copies the value in member my_sequence_struct - * @param _my_sequence_struct New value to be copied in member my_sequence_struct - */ -void ComplexStruct::my_sequence_struct( - const std::vector& _my_sequence_struct) -{ - m_my_sequence_struct = _my_sequence_struct; -} - -/*! - * @brief This function moves the value in member my_sequence_struct - * @param _my_sequence_struct New value to be moved in member my_sequence_struct - */ -void ComplexStruct::my_sequence_struct( - std::vector&& _my_sequence_struct) -{ - m_my_sequence_struct = std::move(_my_sequence_struct); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_struct - * @return Constant reference to member my_sequence_struct - */ -const std::vector& ComplexStruct::my_sequence_struct() const -{ - return m_my_sequence_struct; -} - -/*! - * @brief This function returns a reference to member my_sequence_struct - * @return Reference to member my_sequence_struct - */ -std::vector& ComplexStruct::my_sequence_struct() -{ - return m_my_sequence_struct; -} - - -/*! - * @brief This function copies the value in member my_array_octet - * @param _my_array_octet New value to be copied in member my_array_octet - */ -void ComplexStruct::my_array_octet( - const std::array, 5>, 500>& _my_array_octet) -{ - m_my_array_octet = _my_array_octet; -} - -/*! - * @brief This function moves the value in member my_array_octet - * @param _my_array_octet New value to be moved in member my_array_octet - */ -void ComplexStruct::my_array_octet( - std::array, 5>, 500>&& _my_array_octet) -{ - m_my_array_octet = std::move(_my_array_octet); -} - -/*! - * @brief This function returns a constant reference to member my_array_octet - * @return Constant reference to member my_array_octet - */ -const std::array, 5>, 500>& ComplexStruct::my_array_octet() const -{ - return m_my_array_octet; -} - -/*! - * @brief This function returns a reference to member my_array_octet - * @return Reference to member my_array_octet - */ -std::array, 5>, 500>& ComplexStruct::my_array_octet() -{ - return m_my_array_octet; -} - - -/*! - * @brief This function copies the value in member my_octet_array_500 - * @param _my_octet_array_500 New value to be copied in member my_octet_array_500 - */ -void ComplexStruct::my_octet_array_500( - const MyOctetArray500& _my_octet_array_500) -{ - m_my_octet_array_500 = _my_octet_array_500; -} - -/*! - * @brief This function moves the value in member my_octet_array_500 - * @param _my_octet_array_500 New value to be moved in member my_octet_array_500 - */ -void ComplexStruct::my_octet_array_500( - MyOctetArray500&& _my_octet_array_500) -{ - m_my_octet_array_500 = std::move(_my_octet_array_500); -} - -/*! - * @brief This function returns a constant reference to member my_octet_array_500 - * @return Constant reference to member my_octet_array_500 - */ -const MyOctetArray500& ComplexStruct::my_octet_array_500() const -{ - return m_my_octet_array_500; -} - -/*! - * @brief This function returns a reference to member my_octet_array_500 - * @return Reference to member my_octet_array_500 - */ -MyOctetArray500& ComplexStruct::my_octet_array_500() -{ - return m_my_octet_array_500; -} - - -/*! - * @brief This function copies the value in member my_array_struct - * @param _my_array_struct New value to be copied in member my_array_struct - */ -void ComplexStruct::my_array_struct( - const std::array& _my_array_struct) -{ - m_my_array_struct = _my_array_struct; -} - -/*! - * @brief This function moves the value in member my_array_struct - * @param _my_array_struct New value to be moved in member my_array_struct - */ -void ComplexStruct::my_array_struct( - std::array&& _my_array_struct) -{ - m_my_array_struct = std::move(_my_array_struct); -} - -/*! - * @brief This function returns a constant reference to member my_array_struct - * @return Constant reference to member my_array_struct - */ -const std::array& ComplexStruct::my_array_struct() const -{ - return m_my_array_struct; -} - -/*! - * @brief This function returns a reference to member my_array_struct - * @return Reference to member my_array_struct - */ -std::array& ComplexStruct::my_array_struct() -{ - return m_my_array_struct; -} - - -/*! - * @brief This function copies the value in member my_map_octet_short - * @param _my_map_octet_short New value to be copied in member my_map_octet_short - */ -void ComplexStruct::my_map_octet_short( - const std::map& _my_map_octet_short) -{ - m_my_map_octet_short = _my_map_octet_short; -} - -/*! - * @brief This function moves the value in member my_map_octet_short - * @param _my_map_octet_short New value to be moved in member my_map_octet_short - */ -void ComplexStruct::my_map_octet_short( - std::map&& _my_map_octet_short) -{ - m_my_map_octet_short = std::move(_my_map_octet_short); -} - -/*! - * @brief This function returns a constant reference to member my_map_octet_short - * @return Constant reference to member my_map_octet_short - */ -const std::map& ComplexStruct::my_map_octet_short() const -{ - return m_my_map_octet_short; -} - -/*! - * @brief This function returns a reference to member my_map_octet_short - * @return Reference to member my_map_octet_short - */ -std::map& ComplexStruct::my_map_octet_short() -{ - return m_my_map_octet_short; -} - - -/*! - * @brief This function copies the value in member my_map_long_struct - * @param _my_map_long_struct New value to be copied in member my_map_long_struct - */ -void ComplexStruct::my_map_long_struct( - const std::map& _my_map_long_struct) -{ - m_my_map_long_struct = _my_map_long_struct; -} - -/*! - * @brief This function moves the value in member my_map_long_struct - * @param _my_map_long_struct New value to be moved in member my_map_long_struct - */ -void ComplexStruct::my_map_long_struct( - std::map&& _my_map_long_struct) -{ - m_my_map_long_struct = std::move(_my_map_long_struct); -} - -/*! - * @brief This function returns a constant reference to member my_map_long_struct - * @return Constant reference to member my_map_long_struct - */ -const std::map& ComplexStruct::my_map_long_struct() const -{ - return m_my_map_long_struct; -} - -/*! - * @brief This function returns a reference to member my_map_long_struct - * @return Reference to member my_map_long_struct - */ -std::map& ComplexStruct::my_map_long_struct() -{ - return m_my_map_long_struct; -} - - -/*! - * @brief This function copies the value in member my_map_long_seq_octet - * @param _my_map_long_seq_octet New value to be copied in member my_map_long_seq_octet - */ -void ComplexStruct::my_map_long_seq_octet( - const std::map>>& _my_map_long_seq_octet) -{ - m_my_map_long_seq_octet = _my_map_long_seq_octet; -} - -/*! - * @brief This function moves the value in member my_map_long_seq_octet - * @param _my_map_long_seq_octet New value to be moved in member my_map_long_seq_octet - */ -void ComplexStruct::my_map_long_seq_octet( - std::map>>&& _my_map_long_seq_octet) -{ - m_my_map_long_seq_octet = std::move(_my_map_long_seq_octet); -} - -/*! - * @brief This function returns a constant reference to member my_map_long_seq_octet - * @return Constant reference to member my_map_long_seq_octet - */ -const std::map>>& ComplexStruct::my_map_long_seq_octet() const -{ - return m_my_map_long_seq_octet; -} - -/*! - * @brief This function returns a reference to member my_map_long_seq_octet - * @return Reference to member my_map_long_seq_octet - */ -std::map>>& ComplexStruct::my_map_long_seq_octet() -{ - return m_my_map_long_seq_octet; -} - - -/*! - * @brief This function copies the value in member my_map_long_octet_array_500 - * @param _my_map_long_octet_array_500 New value to be copied in member my_map_long_octet_array_500 - */ -void ComplexStruct::my_map_long_octet_array_500( - const std::map& _my_map_long_octet_array_500) -{ - m_my_map_long_octet_array_500 = _my_map_long_octet_array_500; -} - -/*! - * @brief This function moves the value in member my_map_long_octet_array_500 - * @param _my_map_long_octet_array_500 New value to be moved in member my_map_long_octet_array_500 - */ -void ComplexStruct::my_map_long_octet_array_500( - std::map&& _my_map_long_octet_array_500) -{ - m_my_map_long_octet_array_500 = std::move(_my_map_long_octet_array_500); -} - -/*! - * @brief This function returns a constant reference to member my_map_long_octet_array_500 - * @return Constant reference to member my_map_long_octet_array_500 - */ -const std::map& ComplexStruct::my_map_long_octet_array_500() const -{ - return m_my_map_long_octet_array_500; -} - -/*! - * @brief This function returns a reference to member my_map_long_octet_array_500 - * @return Reference to member my_map_long_octet_array_500 - */ -std::map& ComplexStruct::my_map_long_octet_array_500() -{ - return m_my_map_long_octet_array_500; -} - - -/*! - * @brief This function copies the value in member my_map_long_lol_type - * @param _my_map_long_lol_type New value to be copied in member my_map_long_lol_type - */ -void ComplexStruct::my_map_long_lol_type( - const std::map>& _my_map_long_lol_type) -{ - m_my_map_long_lol_type = _my_map_long_lol_type; -} - -/*! - * @brief This function moves the value in member my_map_long_lol_type - * @param _my_map_long_lol_type New value to be moved in member my_map_long_lol_type - */ -void ComplexStruct::my_map_long_lol_type( - std::map>&& _my_map_long_lol_type) -{ - m_my_map_long_lol_type = std::move(_my_map_long_lol_type); -} - -/*! - * @brief This function returns a constant reference to member my_map_long_lol_type - * @return Constant reference to member my_map_long_lol_type - */ -const std::map>& ComplexStruct::my_map_long_lol_type() const -{ - return m_my_map_long_lol_type; -} - -/*! - * @brief This function returns a reference to member my_map_long_lol_type - * @return Reference to member my_map_long_lol_type - */ -std::map>& ComplexStruct::my_map_long_lol_type() -{ - return m_my_map_long_lol_type; -} - - -/*! - * @brief This function copies the value in member my_small_string_8 - * @param _my_small_string_8 New value to be copied in member my_small_string_8 - */ -void ComplexStruct::my_small_string_8( - const eprosima::fastcdr::fixed_string<128>& _my_small_string_8) -{ - m_my_small_string_8 = _my_small_string_8; -} - -/*! - * @brief This function moves the value in member my_small_string_8 - * @param _my_small_string_8 New value to be moved in member my_small_string_8 - */ -void ComplexStruct::my_small_string_8( - eprosima::fastcdr::fixed_string<128>&& _my_small_string_8) -{ - m_my_small_string_8 = std::move(_my_small_string_8); -} - -/*! - * @brief This function returns a constant reference to member my_small_string_8 - * @return Constant reference to member my_small_string_8 - */ -const eprosima::fastcdr::fixed_string<128>& ComplexStruct::my_small_string_8() const -{ - return m_my_small_string_8; -} - -/*! - * @brief This function returns a reference to member my_small_string_8 - * @return Reference to member my_small_string_8 - */ -eprosima::fastcdr::fixed_string<128>& ComplexStruct::my_small_string_8() -{ - return m_my_small_string_8; -} - - -/*! - * @brief This function copies the value in member my_large_string_8 - * @param _my_large_string_8 New value to be copied in member my_large_string_8 - */ -void ComplexStruct::my_large_string_8( - const eprosima::fastcdr::fixed_string<500>& _my_large_string_8) -{ - m_my_large_string_8 = _my_large_string_8; -} - -/*! - * @brief This function moves the value in member my_large_string_8 - * @param _my_large_string_8 New value to be moved in member my_large_string_8 - */ -void ComplexStruct::my_large_string_8( - eprosima::fastcdr::fixed_string<500>&& _my_large_string_8) -{ - m_my_large_string_8 = std::move(_my_large_string_8); -} - -/*! - * @brief This function returns a constant reference to member my_large_string_8 - * @return Constant reference to member my_large_string_8 - */ -const eprosima::fastcdr::fixed_string<500>& ComplexStruct::my_large_string_8() const -{ - return m_my_large_string_8; -} - -/*! - * @brief This function returns a reference to member my_large_string_8 - * @return Reference to member my_large_string_8 - */ -eprosima::fastcdr::fixed_string<500>& ComplexStruct::my_large_string_8() -{ - return m_my_large_string_8; -} - - -/*! - * @brief This function copies the value in member my_array_string - * @param _my_array_string New value to be copied in member my_array_string - */ -void ComplexStruct::my_array_string( - const std::array, 5>, 5>& _my_array_string) -{ - m_my_array_string = _my_array_string; -} - -/*! - * @brief This function moves the value in member my_array_string - * @param _my_array_string New value to be moved in member my_array_string - */ -void ComplexStruct::my_array_string( - std::array, 5>, 5>&& _my_array_string) -{ - m_my_array_string = std::move(_my_array_string); -} - -/*! - * @brief This function returns a constant reference to member my_array_string - * @return Constant reference to member my_array_string - */ -const std::array, 5>, 5>& ComplexStruct::my_array_string() const -{ - return m_my_array_string; -} - -/*! - * @brief This function returns a reference to member my_array_string - * @return Reference to member my_array_string - */ -std::array, 5>, 5>& ComplexStruct::my_array_string() -{ - return m_my_array_string; -} - - -/*! - * @brief This function copies the value in member multi_alias_array_42 - * @param _multi_alias_array_42 New value to be copied in member multi_alias_array_42 - */ -void ComplexStruct::multi_alias_array_42( - const MA3& _multi_alias_array_42) -{ - m_multi_alias_array_42 = _multi_alias_array_42; -} - -/*! - * @brief This function moves the value in member multi_alias_array_42 - * @param _multi_alias_array_42 New value to be moved in member multi_alias_array_42 - */ -void ComplexStruct::multi_alias_array_42( - MA3&& _multi_alias_array_42) -{ - m_multi_alias_array_42 = std::move(_multi_alias_array_42); -} - -/*! - * @brief This function returns a constant reference to member multi_alias_array_42 - * @return Constant reference to member multi_alias_array_42 - */ -const MA3& ComplexStruct::multi_alias_array_42() const -{ - return m_multi_alias_array_42; -} - -/*! - * @brief This function returns a reference to member multi_alias_array_42 - * @return Reference to member multi_alias_array_42 - */ -MA3& ComplexStruct::multi_alias_array_42() -{ - return m_multi_alias_array_42; -} - - -/*! - * @brief This function copies the value in member my_array_arrays - * @param _my_array_arrays New value to be copied in member my_array_arrays - */ -void ComplexStruct::my_array_arrays( - const std::array& _my_array_arrays) -{ - m_my_array_arrays = _my_array_arrays; -} - -/*! - * @brief This function moves the value in member my_array_arrays - * @param _my_array_arrays New value to be moved in member my_array_arrays - */ -void ComplexStruct::my_array_arrays( - std::array&& _my_array_arrays) -{ - m_my_array_arrays = std::move(_my_array_arrays); -} - -/*! - * @brief This function returns a constant reference to member my_array_arrays - * @return Constant reference to member my_array_arrays - */ -const std::array& ComplexStruct::my_array_arrays() const -{ - return m_my_array_arrays; -} - -/*! - * @brief This function returns a reference to member my_array_arrays - * @return Reference to member my_array_arrays - */ -std::array& ComplexStruct::my_array_arrays() -{ - return m_my_array_arrays; -} - - -/*! - * @brief This function copies the value in member my_sequences_array - * @param _my_sequences_array New value to be copied in member my_sequences_array - */ -void ComplexStruct::my_sequences_array( - const std::array& _my_sequences_array) -{ - m_my_sequences_array = _my_sequences_array; -} - -/*! - * @brief This function moves the value in member my_sequences_array - * @param _my_sequences_array New value to be moved in member my_sequences_array - */ -void ComplexStruct::my_sequences_array( - std::array&& _my_sequences_array) -{ - m_my_sequences_array = std::move(_my_sequences_array); -} - -/*! - * @brief This function returns a constant reference to member my_sequences_array - * @return Constant reference to member my_sequences_array - */ -const std::array& ComplexStruct::my_sequences_array() const -{ - return m_my_sequences_array; -} - -/*! - * @brief This function returns a reference to member my_sequences_array - * @return Reference to member my_sequences_array - */ -std::array& ComplexStruct::my_sequences_array() -{ - return m_my_sequences_array; -} - - - - -MyUnion::MyUnion() -{ - m__d = ::A; -} - -MyUnion::~MyUnion() -{ -} - -MyUnion::MyUnion( - const MyUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case ::A: - m_basic = x.m_basic; - break; - - - case ::B: - case ::C: - m_complex = x.m_complex; - break; - - default: - break; - } -} - -MyUnion::MyUnion( - MyUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case ::A: - m_basic = std::move(x.m_basic); - - break; - - - case ::B: - case ::C: - m_complex = std::move(x.m_complex); - - break; - - default: - break; - } -} - -MyUnion& MyUnion::operator =( - const MyUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case ::A: - m_basic = x.m_basic; - break; - - - case ::B: - case ::C: - m_complex = x.m_complex; - break; - - default: - break; - } - - return *this; -} - -MyUnion& MyUnion::operator =( - MyUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case ::A: - m_basic = std::move(x.m_basic); - - break; - - - case ::B: - case ::C: - m_complex = std::move(x.m_complex); - - break; - - default: - break; - } - - return *this; -} - -bool MyUnion::operator ==( - const MyUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case ::A: - return (m_basic == x.m_basic); - break; - - - case ::B: - case ::C: - return (m_complex == x.m_complex); - break; - - default: - break; - } - return false; -} - -bool MyUnion::operator !=( - const MyUnion& x) const -{ - return !(*this == x); -} - -void MyUnion::_d( - MyEnum __d) -{ - bool b = false; - - switch (m__d) - { - case ::A: - switch (__d) - { - case ::A: - b = true; - break; - default: - break; - } - break; - - - case ::B: - case ::C: - switch (__d) - { - case ::B: - case ::C: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -MyEnum MyUnion::_d() const -{ - return m__d; -} - -MyEnum& MyUnion::_d() -{ - return m__d; -} - -void MyUnion::basic( - const BasicStruct& _basic) -{ - m_basic = _basic; - m__d = ::A; - -} - -void MyUnion::basic( - BasicStruct&& _basic) -{ - m_basic = std::move(_basic); - m__d = ::A; - -} - -const BasicStruct& MyUnion::basic() const -{ - bool b = false; - - switch (m__d) - { - case ::A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_basic; -} - -BasicStruct& MyUnion::basic() -{ - bool b = false; - - switch (m__d) - { - case ::A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_basic; -} - - -void MyUnion::complex( - const ComplexStruct& _complex) -{ - m_complex = _complex; - m__d = ::B; - -} - -void MyUnion::complex( - ComplexStruct&& _complex) -{ - m_complex = std::move(_complex); - m__d = ::B; - -} - -const ComplexStruct& MyUnion::complex() const -{ - bool b = false; - - switch (m__d) - { - case ::B: - case ::C: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_complex; -} - -ComplexStruct& MyUnion::complex() -{ - bool b = false; - - switch (m__d) - { - case ::B: - case ::C: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_complex; -} - - - - -MyUnion2::MyUnion2() -{ - m__d = A; -} - -MyUnion2::~MyUnion2() -{ -} - -MyUnion2::MyUnion2( - const MyUnion2& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_uno = x.m_uno; - break; - - - case B: - m_imString = x.m_imString; - break; - - - case C: - m_tres = x.m_tres; - break; - - default: - break; - } -} - -MyUnion2::MyUnion2( - MyUnion2&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_uno = x.m_uno; - break; - - - case B: - m_imString = std::move(x.m_imString); - - break; - - - case C: - m_tres = x.m_tres; - break; - - default: - break; - } -} - -MyUnion2& MyUnion2::operator =( - const MyUnion2& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_uno = x.m_uno; - break; - - - case B: - m_imString = x.m_imString; - break; - - - case C: - m_tres = x.m_tres; - break; - - default: - break; - } - - return *this; -} - -MyUnion2& MyUnion2::operator =( - MyUnion2&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_uno = x.m_uno; - break; - - - case B: - m_imString = std::move(x.m_imString); - - break; - - - case C: - m_tres = x.m_tres; - break; - - default: - break; - } - - return *this; -} - -bool MyUnion2::operator ==( - const MyUnion2& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_uno == x.m_uno); - break; - - - case B: - return (m_imString == x.m_imString); - break; - - - case C: - return (m_tres == x.m_tres); - break; - - default: - break; - } - return false; -} - -bool MyUnion2::operator !=( - const MyUnion2& x) const -{ - return !(*this == x); -} - -void MyUnion2::_d( - uint8_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch (__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - - case C: - switch (__d) - { - case C: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -uint8_t MyUnion2::_d() const -{ - return m__d; -} - -uint8_t& MyUnion2::_d() -{ - return m__d; -} - -void MyUnion2::uno( - int32_t _uno) -{ - m_uno = _uno; - m__d = A; - -} - -int32_t MyUnion2::uno() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_uno; -} - -int32_t& MyUnion2::uno() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_uno; -} - - -void MyUnion2::imString( - const std::string& _imString) -{ - m_imString = _imString; - m__d = B; - -} - -void MyUnion2::imString( - std::string&& _imString) -{ - m_imString = std::move(_imString); - m__d = B; - -} - -const std::string& MyUnion2::imString() const -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_imString; -} - -std::string& MyUnion2::imString() -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_imString; -} - - -void MyUnion2::tres( - int32_t _tres) -{ - m_tres = _tres; - m__d = C; - -} - -int32_t MyUnion2::tres() const -{ - bool b = false; - - switch (m__d) - { - case C: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_tres; -} - -int32_t& MyUnion2::tres() -{ - bool b = false; - - switch (m__d) - { - case C: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_tres; -} - - - - -CompleteStruct::CompleteStruct() -{ - // Just to register all known types - registerTestTypes(); -} - -CompleteStruct::~CompleteStruct() -{ -} - -CompleteStruct::CompleteStruct( - const CompleteStruct& x) -{ - m_my_union = x.m_my_union; - m_my_union_2 = x.m_my_union_2; -} - -CompleteStruct::CompleteStruct( - CompleteStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - m_my_union_2 = std::move(x.m_my_union_2); -} - -CompleteStruct& CompleteStruct::operator =( - const CompleteStruct& x) -{ - - m_my_union = x.m_my_union; - m_my_union_2 = x.m_my_union_2; - return *this; -} - -CompleteStruct& CompleteStruct::operator =( - CompleteStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - m_my_union_2 = std::move(x.m_my_union_2); - return *this; -} - -bool CompleteStruct::operator ==( - const CompleteStruct& x) const -{ - return (m_my_union == x.m_my_union && - m_my_union_2 == x.m_my_union_2); -} - -bool CompleteStruct::operator !=( - const CompleteStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void CompleteStruct::my_union( - const MyUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void CompleteStruct::my_union( - MyUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const MyUnion& CompleteStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -MyUnion& CompleteStruct::my_union() -{ - return m_my_union; -} - - -/*! - * @brief This function copies the value in member my_union_2 - * @param _my_union_2 New value to be copied in member my_union_2 - */ -void CompleteStruct::my_union_2( - const MyUnion2& _my_union_2) -{ - m_my_union_2 = _my_union_2; -} - -/*! - * @brief This function moves the value in member my_union_2 - * @param _my_union_2 New value to be moved in member my_union_2 - */ -void CompleteStruct::my_union_2( - MyUnion2&& _my_union_2) -{ - m_my_union_2 = std::move(_my_union_2); -} - -/*! - * @brief This function returns a constant reference to member my_union_2 - * @return Constant reference to member my_union_2 - */ -const MyUnion2& CompleteStruct::my_union_2() const -{ - return m_my_union_2; -} - -/*! - * @brief This function returns a reference to member my_union_2 - * @return Reference to member my_union_2 - */ -MyUnion2& CompleteStruct::my_union_2() -{ - return m_my_union_2; -} - - - - -KeyedStruct::KeyedStruct() -{ - // Just to register all known types - registerTestTypes(); -} - -KeyedStruct::~KeyedStruct() -{ -} - -KeyedStruct::KeyedStruct( - const KeyedStruct& x) -{ - m_key = x.m_key; - m_basic = x.m_basic; -} - -KeyedStruct::KeyedStruct( - KeyedStruct&& x) noexcept -{ - m_key = x.m_key; - m_basic = std::move(x.m_basic); -} - -KeyedStruct& KeyedStruct::operator =( - const KeyedStruct& x) -{ - - m_key = x.m_key; - m_basic = x.m_basic; - return *this; -} - -KeyedStruct& KeyedStruct::operator =( - KeyedStruct&& x) noexcept -{ - - m_key = x.m_key; - m_basic = std::move(x.m_basic); - return *this; -} - -bool KeyedStruct::operator ==( - const KeyedStruct& x) const -{ - return (m_key == x.m_key && - m_basic == x.m_basic); -} - -bool KeyedStruct::operator !=( - const KeyedStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member key - * @param _key New value for member key - */ -void KeyedStruct::key( - uint8_t _key) -{ - m_key = _key; -} - -/*! - * @brief This function returns the value of member key - * @return Value of member key - */ -uint8_t KeyedStruct::key() const -{ - return m_key; -} - -/*! - * @brief This function returns a reference to member key - * @return Reference to member key - */ -uint8_t& KeyedStruct::key() -{ - return m_key; -} - - -/*! - * @brief This function copies the value in member basic - * @param _basic New value to be copied in member basic - */ -void KeyedStruct::basic( - const BasicStruct& _basic) -{ - m_basic = _basic; -} - -/*! - * @brief This function moves the value in member basic - * @param _basic New value to be moved in member basic - */ -void KeyedStruct::basic( - BasicStruct&& _basic) -{ - m_basic = std::move(_basic); -} - -/*! - * @brief This function returns a constant reference to member basic - * @return Constant reference to member basic - */ -const BasicStruct& KeyedStruct::basic() const -{ - return m_basic; -} - -/*! - * @brief This function returns a reference to member basic - * @return Reference to member basic - */ -BasicStruct& KeyedStruct::basic() -{ - return m_basic; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "TestCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/unittest/dynamic_types/idl/Test.h b/test/unittest/dynamic_types/idl/Test.hpp similarity index 52% rename from test/unittest/dynamic_types/idl/Test.h rename to test/unittest/dynamic_types/idl/Test.hpp index a67ced7e1c2..d1aecf1ab7a 100644 --- a/test/unittest/dynamic_types/idl/Test.h +++ b/test/unittest/dynamic_types/idl/Test.hpp @@ -13,32 +13,30 @@ // limitations under the License. /*! - * @file Test.h + * @file Test.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "Testv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_TEST_H_ -#define _FAST_DDS_GENERATED_TEST_H_ +#ifndef _FAST_DDS_GENERATED_TEST_HPP_ +#define _FAST_DDS_GENERATED_TEST_HPP_ #include #include #include #include #include +#include #include #include #include #include +#include +#include "TestTypeObject.h" #if defined(_WIN32) #if defined(EPROSIMA_USER_DLL_EXPORT) @@ -64,15 +62,6 @@ #define TEST_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! * @brief This class represents the enumeration MyEnum defined by the user in the IDL file. * @ingroup Test @@ -102,73 +91,196 @@ class BasicStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BasicStruct(); + eProsima_user_DllExport BasicStruct() + { + // Just to register all known types + registerTestTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BasicStruct(); + eProsima_user_DllExport ~BasicStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BasicStruct that will be copied. */ eProsima_user_DllExport BasicStruct( - const BasicStruct& x); + const BasicStruct& x) + { + m_my_bool = x.m_my_bool; + + m_my_octet = x.m_my_octet; + + m_my_int16 = x.m_my_int16; + + m_my_int32 = x.m_my_int32; + + m_my_int64 = x.m_my_int64; + + m_my_uint16 = x.m_my_uint16; + + m_my_uint32 = x.m_my_uint32; + + m_my_uint64 = x.m_my_uint64; + + m_my_float32 = x.m_my_float32; + + m_my_float64 = x.m_my_float64; + + m_my_float128 = x.m_my_float128; + + m_my_char = x.m_my_char; + + m_my_string = x.m_my_string; + + } /*! * @brief Move constructor. * @param x Reference to the object BasicStruct that will be copied. */ eProsima_user_DllExport BasicStruct( - BasicStruct&& x) noexcept; + BasicStruct&& x) noexcept + { + m_my_bool = x.m_my_bool; + m_my_octet = x.m_my_octet; + m_my_int16 = x.m_my_int16; + m_my_int32 = x.m_my_int32; + m_my_int64 = x.m_my_int64; + m_my_uint16 = x.m_my_uint16; + m_my_uint32 = x.m_my_uint32; + m_my_uint64 = x.m_my_uint64; + m_my_float32 = x.m_my_float32; + m_my_float64 = x.m_my_float64; + m_my_float128 = x.m_my_float128; + m_my_char = x.m_my_char; + m_my_string = std::move(x.m_my_string); + } /*! * @brief Copy assignment. * @param x Reference to the object BasicStruct that will be copied. */ eProsima_user_DllExport BasicStruct& operator =( - const BasicStruct& x); + const BasicStruct& x) + { + + m_my_bool = x.m_my_bool; + + m_my_octet = x.m_my_octet; + + m_my_int16 = x.m_my_int16; + + m_my_int32 = x.m_my_int32; + + m_my_int64 = x.m_my_int64; + + m_my_uint16 = x.m_my_uint16; + + m_my_uint32 = x.m_my_uint32; + + m_my_uint64 = x.m_my_uint64; + + m_my_float32 = x.m_my_float32; + + m_my_float64 = x.m_my_float64; + + m_my_float128 = x.m_my_float128; + + m_my_char = x.m_my_char; + + m_my_string = x.m_my_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BasicStruct that will be copied. */ eProsima_user_DllExport BasicStruct& operator =( - BasicStruct&& x) noexcept; + BasicStruct&& x) noexcept + { + + m_my_bool = x.m_my_bool; + m_my_octet = x.m_my_octet; + m_my_int16 = x.m_my_int16; + m_my_int32 = x.m_my_int32; + m_my_int64 = x.m_my_int64; + m_my_uint16 = x.m_my_uint16; + m_my_uint32 = x.m_my_uint32; + m_my_uint64 = x.m_my_uint64; + m_my_float32 = x.m_my_float32; + m_my_float64 = x.m_my_float64; + m_my_float128 = x.m_my_float128; + m_my_char = x.m_my_char; + m_my_string = std::move(x.m_my_string); + return *this; + } /*! * @brief Comparison operator. * @param x BasicStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BasicStruct& x) const; + const BasicStruct& x) const + { + return (m_my_bool == x.m_my_bool && + m_my_octet == x.m_my_octet && + m_my_int16 == x.m_my_int16 && + m_my_int32 == x.m_my_int32 && + m_my_int64 == x.m_my_int64 && + m_my_uint16 == x.m_my_uint16 && + m_my_uint32 == x.m_my_uint32 && + m_my_uint64 == x.m_my_uint64 && + m_my_float32 == x.m_my_float32 && + m_my_float64 == x.m_my_float64 && + m_my_float128 == x.m_my_float128 && + m_my_char == x.m_my_char && + m_my_string == x.m_my_string); + } /*! * @brief Comparison operator. * @param x BasicStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BasicStruct& x) const; + const BasicStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_bool * @param _my_bool New value for member my_bool */ eProsima_user_DllExport void my_bool( - bool _my_bool); + bool _my_bool) + { + m_my_bool = _my_bool; + } /*! * @brief This function returns the value of member my_bool * @return Value of member my_bool */ - eProsima_user_DllExport bool my_bool() const; + eProsima_user_DllExport bool my_bool() const + { + return m_my_bool; + } /*! * @brief This function returns a reference to member my_bool * @return Reference to member my_bool */ - eProsima_user_DllExport bool& my_bool(); + eProsima_user_DllExport bool& my_bool() + { + return m_my_bool; + } /*! @@ -176,19 +288,28 @@ class BasicStruct * @param _my_octet New value for member my_octet */ eProsima_user_DllExport void my_octet( - uint8_t _my_octet); + uint8_t _my_octet) + { + m_my_octet = _my_octet; + } /*! * @brief This function returns the value of member my_octet * @return Value of member my_octet */ - eProsima_user_DllExport uint8_t my_octet() const; + eProsima_user_DllExport uint8_t my_octet() const + { + return m_my_octet; + } /*! * @brief This function returns a reference to member my_octet * @return Reference to member my_octet */ - eProsima_user_DllExport uint8_t& my_octet(); + eProsima_user_DllExport uint8_t& my_octet() + { + return m_my_octet; + } /*! @@ -196,19 +317,28 @@ class BasicStruct * @param _my_int16 New value for member my_int16 */ eProsima_user_DllExport void my_int16( - int16_t _my_int16); + int16_t _my_int16) + { + m_my_int16 = _my_int16; + } /*! * @brief This function returns the value of member my_int16 * @return Value of member my_int16 */ - eProsima_user_DllExport int16_t my_int16() const; + eProsima_user_DllExport int16_t my_int16() const + { + return m_my_int16; + } /*! * @brief This function returns a reference to member my_int16 * @return Reference to member my_int16 */ - eProsima_user_DllExport int16_t& my_int16(); + eProsima_user_DllExport int16_t& my_int16() + { + return m_my_int16; + } /*! @@ -216,19 +346,28 @@ class BasicStruct * @param _my_int32 New value for member my_int32 */ eProsima_user_DllExport void my_int32( - int32_t _my_int32); + int32_t _my_int32) + { + m_my_int32 = _my_int32; + } /*! * @brief This function returns the value of member my_int32 * @return Value of member my_int32 */ - eProsima_user_DllExport int32_t my_int32() const; + eProsima_user_DllExport int32_t my_int32() const + { + return m_my_int32; + } /*! * @brief This function returns a reference to member my_int32 * @return Reference to member my_int32 */ - eProsima_user_DllExport int32_t& my_int32(); + eProsima_user_DllExport int32_t& my_int32() + { + return m_my_int32; + } /*! @@ -236,19 +375,28 @@ class BasicStruct * @param _my_int64 New value for member my_int64 */ eProsima_user_DllExport void my_int64( - int64_t _my_int64); + int64_t _my_int64) + { + m_my_int64 = _my_int64; + } /*! * @brief This function returns the value of member my_int64 * @return Value of member my_int64 */ - eProsima_user_DllExport int64_t my_int64() const; + eProsima_user_DllExport int64_t my_int64() const + { + return m_my_int64; + } /*! * @brief This function returns a reference to member my_int64 * @return Reference to member my_int64 */ - eProsima_user_DllExport int64_t& my_int64(); + eProsima_user_DllExport int64_t& my_int64() + { + return m_my_int64; + } /*! @@ -256,19 +404,28 @@ class BasicStruct * @param _my_uint16 New value for member my_uint16 */ eProsima_user_DllExport void my_uint16( - uint16_t _my_uint16); + uint16_t _my_uint16) + { + m_my_uint16 = _my_uint16; + } /*! * @brief This function returns the value of member my_uint16 * @return Value of member my_uint16 */ - eProsima_user_DllExport uint16_t my_uint16() const; + eProsima_user_DllExport uint16_t my_uint16() const + { + return m_my_uint16; + } /*! * @brief This function returns a reference to member my_uint16 * @return Reference to member my_uint16 */ - eProsima_user_DllExport uint16_t& my_uint16(); + eProsima_user_DllExport uint16_t& my_uint16() + { + return m_my_uint16; + } /*! @@ -276,19 +433,28 @@ class BasicStruct * @param _my_uint32 New value for member my_uint32 */ eProsima_user_DllExport void my_uint32( - uint32_t _my_uint32); + uint32_t _my_uint32) + { + m_my_uint32 = _my_uint32; + } /*! * @brief This function returns the value of member my_uint32 * @return Value of member my_uint32 */ - eProsima_user_DllExport uint32_t my_uint32() const; + eProsima_user_DllExport uint32_t my_uint32() const + { + return m_my_uint32; + } /*! * @brief This function returns a reference to member my_uint32 * @return Reference to member my_uint32 */ - eProsima_user_DllExport uint32_t& my_uint32(); + eProsima_user_DllExport uint32_t& my_uint32() + { + return m_my_uint32; + } /*! @@ -296,19 +462,28 @@ class BasicStruct * @param _my_uint64 New value for member my_uint64 */ eProsima_user_DllExport void my_uint64( - uint64_t _my_uint64); + uint64_t _my_uint64) + { + m_my_uint64 = _my_uint64; + } /*! * @brief This function returns the value of member my_uint64 * @return Value of member my_uint64 */ - eProsima_user_DllExport uint64_t my_uint64() const; + eProsima_user_DllExport uint64_t my_uint64() const + { + return m_my_uint64; + } /*! * @brief This function returns a reference to member my_uint64 * @return Reference to member my_uint64 */ - eProsima_user_DllExport uint64_t& my_uint64(); + eProsima_user_DllExport uint64_t& my_uint64() + { + return m_my_uint64; + } /*! @@ -316,19 +491,28 @@ class BasicStruct * @param _my_float32 New value for member my_float32 */ eProsima_user_DllExport void my_float32( - float _my_float32); + float _my_float32) + { + m_my_float32 = _my_float32; + } /*! * @brief This function returns the value of member my_float32 * @return Value of member my_float32 */ - eProsima_user_DllExport float my_float32() const; + eProsima_user_DllExport float my_float32() const + { + return m_my_float32; + } /*! * @brief This function returns a reference to member my_float32 * @return Reference to member my_float32 */ - eProsima_user_DllExport float& my_float32(); + eProsima_user_DllExport float& my_float32() + { + return m_my_float32; + } /*! @@ -336,19 +520,28 @@ class BasicStruct * @param _my_float64 New value for member my_float64 */ eProsima_user_DllExport void my_float64( - double _my_float64); + double _my_float64) + { + m_my_float64 = _my_float64; + } /*! * @brief This function returns the value of member my_float64 * @return Value of member my_float64 */ - eProsima_user_DllExport double my_float64() const; + eProsima_user_DllExport double my_float64() const + { + return m_my_float64; + } /*! * @brief This function returns a reference to member my_float64 * @return Reference to member my_float64 */ - eProsima_user_DllExport double& my_float64(); + eProsima_user_DllExport double& my_float64() + { + return m_my_float64; + } /*! @@ -356,19 +549,28 @@ class BasicStruct * @param _my_float128 New value for member my_float128 */ eProsima_user_DllExport void my_float128( - long double _my_float128); + long double _my_float128) + { + m_my_float128 = _my_float128; + } /*! * @brief This function returns the value of member my_float128 * @return Value of member my_float128 */ - eProsima_user_DllExport long double my_float128() const; + eProsima_user_DllExport long double my_float128() const + { + return m_my_float128; + } /*! * @brief This function returns a reference to member my_float128 * @return Reference to member my_float128 */ - eProsima_user_DllExport long double& my_float128(); + eProsima_user_DllExport long double& my_float128() + { + return m_my_float128; + } /*! @@ -376,19 +578,28 @@ class BasicStruct * @param _my_char New value for member my_char */ eProsima_user_DllExport void my_char( - char _my_char); + char _my_char) + { + m_my_char = _my_char; + } /*! * @brief This function returns the value of member my_char * @return Value of member my_char */ - eProsima_user_DllExport char my_char() const; + eProsima_user_DllExport char my_char() const + { + return m_my_char; + } /*! * @brief This function returns a reference to member my_char * @return Reference to member my_char */ - eProsima_user_DllExport char& my_char(); + eProsima_user_DllExport char& my_char() + { + return m_my_char; + } /*! @@ -396,26 +607,40 @@ class BasicStruct * @param _my_string New value to be copied in member my_string */ eProsima_user_DllExport void my_string( - const std::string& _my_string); + const std::string& _my_string) + { + m_my_string = _my_string; + } /*! * @brief This function moves the value in member my_string * @param _my_string New value to be moved in member my_string */ eProsima_user_DllExport void my_string( - std::string&& _my_string); + std::string&& _my_string) + { + m_my_string = std::move(_my_string); + } /*! * @brief This function returns a constant reference to member my_string * @return Constant reference to member my_string */ - eProsima_user_DllExport const std::string& my_string() const; + eProsima_user_DllExport const std::string& my_string() const + { + return m_my_string; + } /*! * @brief This function returns a reference to member my_string * @return Reference to member my_string */ - eProsima_user_DllExport std::string& my_string(); + eProsima_user_DllExport std::string& my_string() + { + return m_my_string; + } + + private: @@ -442,8 +667,6 @@ typedef std::array MA3; typedef std::array MyMiniArray; - - typedef std::vector MySequenceLong; @@ -459,73 +682,245 @@ class ComplexStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ComplexStruct(); + eProsima_user_DllExport ComplexStruct() + { + // Just to register all known types + registerTestTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ComplexStruct(); + eProsima_user_DllExport ~ComplexStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ComplexStruct that will be copied. */ eProsima_user_DllExport ComplexStruct( - const ComplexStruct& x); + const ComplexStruct& x) + { + m_my_octet = x.m_my_octet; + + m_my_basic_struct = x.m_my_basic_struct; + + m_my_alias_enum = x.m_my_alias_enum; + + m_my_enum = x.m_my_enum; + + m_my_sequence_octet = x.m_my_sequence_octet; + + m_my_sequence_struct = x.m_my_sequence_struct; + + m_my_array_octet = x.m_my_array_octet; + + m_my_octet_array_500 = x.m_my_octet_array_500; + + m_my_array_struct = x.m_my_array_struct; + + m_my_map_octet_short = x.m_my_map_octet_short; + + m_my_map_long_struct = x.m_my_map_long_struct; + + m_my_map_long_seq_octet = x.m_my_map_long_seq_octet; + + m_my_map_long_octet_array_500 = x.m_my_map_long_octet_array_500; + + m_my_map_long_lol_type = x.m_my_map_long_lol_type; + + m_my_small_string_8 = x.m_my_small_string_8; + + m_my_large_string_8 = x.m_my_large_string_8; + + m_my_array_string = x.m_my_array_string; + + m_multi_alias_array_42 = x.m_multi_alias_array_42; + + m_my_array_arrays = x.m_my_array_arrays; + + m_my_sequences_array = x.m_my_sequences_array; + + } /*! * @brief Move constructor. * @param x Reference to the object ComplexStruct that will be copied. */ eProsima_user_DllExport ComplexStruct( - ComplexStruct&& x) noexcept; + ComplexStruct&& x) noexcept + { + m_my_octet = x.m_my_octet; + m_my_basic_struct = std::move(x.m_my_basic_struct); + m_my_alias_enum = x.m_my_alias_enum; + m_my_enum = x.m_my_enum; + m_my_sequence_octet = std::move(x.m_my_sequence_octet); + m_my_sequence_struct = std::move(x.m_my_sequence_struct); + m_my_array_octet = std::move(x.m_my_array_octet); + m_my_octet_array_500 = std::move(x.m_my_octet_array_500); + m_my_array_struct = std::move(x.m_my_array_struct); + m_my_map_octet_short = std::move(x.m_my_map_octet_short); + m_my_map_long_struct = std::move(x.m_my_map_long_struct); + m_my_map_long_seq_octet = std::move(x.m_my_map_long_seq_octet); + m_my_map_long_octet_array_500 = std::move(x.m_my_map_long_octet_array_500); + m_my_map_long_lol_type = std::move(x.m_my_map_long_lol_type); + m_my_small_string_8 = std::move(x.m_my_small_string_8); + m_my_large_string_8 = std::move(x.m_my_large_string_8); + m_my_array_string = std::move(x.m_my_array_string); + m_multi_alias_array_42 = std::move(x.m_multi_alias_array_42); + m_my_array_arrays = std::move(x.m_my_array_arrays); + m_my_sequences_array = std::move(x.m_my_sequences_array); + } /*! * @brief Copy assignment. * @param x Reference to the object ComplexStruct that will be copied. */ eProsima_user_DllExport ComplexStruct& operator =( - const ComplexStruct& x); + const ComplexStruct& x) + { + + m_my_octet = x.m_my_octet; + + m_my_basic_struct = x.m_my_basic_struct; + + m_my_alias_enum = x.m_my_alias_enum; + + m_my_enum = x.m_my_enum; + + m_my_sequence_octet = x.m_my_sequence_octet; + + m_my_sequence_struct = x.m_my_sequence_struct; + + m_my_array_octet = x.m_my_array_octet; + + m_my_octet_array_500 = x.m_my_octet_array_500; + + m_my_array_struct = x.m_my_array_struct; + + m_my_map_octet_short = x.m_my_map_octet_short; + + m_my_map_long_struct = x.m_my_map_long_struct; + + m_my_map_long_seq_octet = x.m_my_map_long_seq_octet; + + m_my_map_long_octet_array_500 = x.m_my_map_long_octet_array_500; + + m_my_map_long_lol_type = x.m_my_map_long_lol_type; + + m_my_small_string_8 = x.m_my_small_string_8; + + m_my_large_string_8 = x.m_my_large_string_8; + + m_my_array_string = x.m_my_array_string; + + m_multi_alias_array_42 = x.m_multi_alias_array_42; + + m_my_array_arrays = x.m_my_array_arrays; + + m_my_sequences_array = x.m_my_sequences_array; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ComplexStruct that will be copied. */ eProsima_user_DllExport ComplexStruct& operator =( - ComplexStruct&& x) noexcept; + ComplexStruct&& x) noexcept + { + + m_my_octet = x.m_my_octet; + m_my_basic_struct = std::move(x.m_my_basic_struct); + m_my_alias_enum = x.m_my_alias_enum; + m_my_enum = x.m_my_enum; + m_my_sequence_octet = std::move(x.m_my_sequence_octet); + m_my_sequence_struct = std::move(x.m_my_sequence_struct); + m_my_array_octet = std::move(x.m_my_array_octet); + m_my_octet_array_500 = std::move(x.m_my_octet_array_500); + m_my_array_struct = std::move(x.m_my_array_struct); + m_my_map_octet_short = std::move(x.m_my_map_octet_short); + m_my_map_long_struct = std::move(x.m_my_map_long_struct); + m_my_map_long_seq_octet = std::move(x.m_my_map_long_seq_octet); + m_my_map_long_octet_array_500 = std::move(x.m_my_map_long_octet_array_500); + m_my_map_long_lol_type = std::move(x.m_my_map_long_lol_type); + m_my_small_string_8 = std::move(x.m_my_small_string_8); + m_my_large_string_8 = std::move(x.m_my_large_string_8); + m_my_array_string = std::move(x.m_my_array_string); + m_multi_alias_array_42 = std::move(x.m_multi_alias_array_42); + m_my_array_arrays = std::move(x.m_my_array_arrays); + m_my_sequences_array = std::move(x.m_my_sequences_array); + return *this; + } /*! * @brief Comparison operator. * @param x ComplexStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ComplexStruct& x) const; + const ComplexStruct& x) const + { + return (m_my_octet == x.m_my_octet && + m_my_basic_struct == x.m_my_basic_struct && + m_my_alias_enum == x.m_my_alias_enum && + m_my_enum == x.m_my_enum && + m_my_sequence_octet == x.m_my_sequence_octet && + m_my_sequence_struct == x.m_my_sequence_struct && + m_my_array_octet == x.m_my_array_octet && + m_my_octet_array_500 == x.m_my_octet_array_500 && + m_my_array_struct == x.m_my_array_struct && + m_my_map_octet_short == x.m_my_map_octet_short && + m_my_map_long_struct == x.m_my_map_long_struct && + m_my_map_long_seq_octet == x.m_my_map_long_seq_octet && + m_my_map_long_octet_array_500 == x.m_my_map_long_octet_array_500 && + m_my_map_long_lol_type == x.m_my_map_long_lol_type && + m_my_small_string_8 == x.m_my_small_string_8 && + m_my_large_string_8 == x.m_my_large_string_8 && + m_my_array_string == x.m_my_array_string && + m_multi_alias_array_42 == x.m_multi_alias_array_42 && + m_my_array_arrays == x.m_my_array_arrays && + m_my_sequences_array == x.m_my_sequences_array); + } /*! * @brief Comparison operator. * @param x ComplexStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ComplexStruct& x) const; + const ComplexStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_octet * @param _my_octet New value for member my_octet */ eProsima_user_DllExport void my_octet( - uint8_t _my_octet); + uint8_t _my_octet) + { + m_my_octet = _my_octet; + } /*! * @brief This function returns the value of member my_octet * @return Value of member my_octet */ - eProsima_user_DllExport uint8_t my_octet() const; + eProsima_user_DllExport uint8_t my_octet() const + { + return m_my_octet; + } /*! * @brief This function returns a reference to member my_octet * @return Reference to member my_octet */ - eProsima_user_DllExport uint8_t& my_octet(); + eProsima_user_DllExport uint8_t& my_octet() + { + return m_my_octet; + } /*! @@ -533,26 +928,38 @@ class ComplexStruct * @param _my_basic_struct New value to be copied in member my_basic_struct */ eProsima_user_DllExport void my_basic_struct( - const BasicStruct& _my_basic_struct); + const BasicStruct& _my_basic_struct) + { + m_my_basic_struct = _my_basic_struct; + } /*! * @brief This function moves the value in member my_basic_struct * @param _my_basic_struct New value to be moved in member my_basic_struct */ eProsima_user_DllExport void my_basic_struct( - BasicStruct&& _my_basic_struct); + BasicStruct&& _my_basic_struct) + { + m_my_basic_struct = std::move(_my_basic_struct); + } /*! * @brief This function returns a constant reference to member my_basic_struct * @return Constant reference to member my_basic_struct */ - eProsima_user_DllExport const BasicStruct& my_basic_struct() const; + eProsima_user_DllExport const BasicStruct& my_basic_struct() const + { + return m_my_basic_struct; + } /*! * @brief This function returns a reference to member my_basic_struct * @return Reference to member my_basic_struct */ - eProsima_user_DllExport BasicStruct& my_basic_struct(); + eProsima_user_DllExport BasicStruct& my_basic_struct() + { + return m_my_basic_struct; + } /*! @@ -560,19 +967,28 @@ class ComplexStruct * @param _my_alias_enum New value for member my_alias_enum */ eProsima_user_DllExport void my_alias_enum( - MyAliasEnum _my_alias_enum); + MyAliasEnum _my_alias_enum) + { + m_my_alias_enum = _my_alias_enum; + } /*! * @brief This function returns the value of member my_alias_enum * @return Value of member my_alias_enum */ - eProsima_user_DllExport MyAliasEnum my_alias_enum() const; + eProsima_user_DllExport MyAliasEnum my_alias_enum() const + { + return m_my_alias_enum; + } /*! * @brief This function returns a reference to member my_alias_enum * @return Reference to member my_alias_enum */ - eProsima_user_DllExport MyAliasEnum& my_alias_enum(); + eProsima_user_DllExport MyAliasEnum& my_alias_enum() + { + return m_my_alias_enum; + } /*! @@ -580,19 +996,28 @@ class ComplexStruct * @param _my_enum New value for member my_enum */ eProsima_user_DllExport void my_enum( - MyEnum _my_enum); + MyEnum _my_enum) + { + m_my_enum = _my_enum; + } /*! * @brief This function returns the value of member my_enum * @return Value of member my_enum */ - eProsima_user_DllExport MyEnum my_enum() const; + eProsima_user_DllExport MyEnum my_enum() const + { + return m_my_enum; + } /*! * @brief This function returns a reference to member my_enum * @return Reference to member my_enum */ - eProsima_user_DllExport MyEnum& my_enum(); + eProsima_user_DllExport MyEnum& my_enum() + { + return m_my_enum; + } /*! @@ -600,26 +1025,38 @@ class ComplexStruct * @param _my_sequence_octet New value to be copied in member my_sequence_octet */ eProsima_user_DllExport void my_sequence_octet( - const std::vector& _my_sequence_octet); + const std::vector& _my_sequence_octet) + { + m_my_sequence_octet = _my_sequence_octet; + } /*! * @brief This function moves the value in member my_sequence_octet * @param _my_sequence_octet New value to be moved in member my_sequence_octet */ eProsima_user_DllExport void my_sequence_octet( - std::vector&& _my_sequence_octet); + std::vector&& _my_sequence_octet) + { + m_my_sequence_octet = std::move(_my_sequence_octet); + } /*! * @brief This function returns a constant reference to member my_sequence_octet * @return Constant reference to member my_sequence_octet */ - eProsima_user_DllExport const std::vector& my_sequence_octet() const; + eProsima_user_DllExport const std::vector& my_sequence_octet() const + { + return m_my_sequence_octet; + } /*! * @brief This function returns a reference to member my_sequence_octet * @return Reference to member my_sequence_octet */ - eProsima_user_DllExport std::vector& my_sequence_octet(); + eProsima_user_DllExport std::vector& my_sequence_octet() + { + return m_my_sequence_octet; + } /*! @@ -627,26 +1064,38 @@ class ComplexStruct * @param _my_sequence_struct New value to be copied in member my_sequence_struct */ eProsima_user_DllExport void my_sequence_struct( - const std::vector& _my_sequence_struct); + const std::vector& _my_sequence_struct) + { + m_my_sequence_struct = _my_sequence_struct; + } /*! * @brief This function moves the value in member my_sequence_struct * @param _my_sequence_struct New value to be moved in member my_sequence_struct */ eProsima_user_DllExport void my_sequence_struct( - std::vector&& _my_sequence_struct); + std::vector&& _my_sequence_struct) + { + m_my_sequence_struct = std::move(_my_sequence_struct); + } /*! * @brief This function returns a constant reference to member my_sequence_struct * @return Constant reference to member my_sequence_struct */ - eProsima_user_DllExport const std::vector& my_sequence_struct() const; + eProsima_user_DllExport const std::vector& my_sequence_struct() const + { + return m_my_sequence_struct; + } /*! * @brief This function returns a reference to member my_sequence_struct * @return Reference to member my_sequence_struct */ - eProsima_user_DllExport std::vector& my_sequence_struct(); + eProsima_user_DllExport std::vector& my_sequence_struct() + { + return m_my_sequence_struct; + } /*! @@ -654,26 +1103,38 @@ class ComplexStruct * @param _my_array_octet New value to be copied in member my_array_octet */ eProsima_user_DllExport void my_array_octet( - const std::array, 5>, 500>& _my_array_octet); + const std::array, 5>, 500>& _my_array_octet) + { + m_my_array_octet = _my_array_octet; + } /*! * @brief This function moves the value in member my_array_octet * @param _my_array_octet New value to be moved in member my_array_octet */ eProsima_user_DllExport void my_array_octet( - std::array, 5>, 500>&& _my_array_octet); + std::array, 5>, 500>&& _my_array_octet) + { + m_my_array_octet = std::move(_my_array_octet); + } /*! * @brief This function returns a constant reference to member my_array_octet * @return Constant reference to member my_array_octet */ - eProsima_user_DllExport const std::array, 5>, 500>& my_array_octet() const; + eProsima_user_DllExport const std::array, 5>, 500>& my_array_octet() const + { + return m_my_array_octet; + } /*! * @brief This function returns a reference to member my_array_octet * @return Reference to member my_array_octet */ - eProsima_user_DllExport std::array, 5>, 500>& my_array_octet(); + eProsima_user_DllExport std::array, 5>, 500>& my_array_octet() + { + return m_my_array_octet; + } /*! @@ -681,26 +1142,38 @@ class ComplexStruct * @param _my_octet_array_500 New value to be copied in member my_octet_array_500 */ eProsima_user_DllExport void my_octet_array_500( - const MyOctetArray500& _my_octet_array_500); + const MyOctetArray500& _my_octet_array_500) + { + m_my_octet_array_500 = _my_octet_array_500; + } /*! * @brief This function moves the value in member my_octet_array_500 * @param _my_octet_array_500 New value to be moved in member my_octet_array_500 */ eProsima_user_DllExport void my_octet_array_500( - MyOctetArray500&& _my_octet_array_500); + MyOctetArray500&& _my_octet_array_500) + { + m_my_octet_array_500 = std::move(_my_octet_array_500); + } /*! * @brief This function returns a constant reference to member my_octet_array_500 * @return Constant reference to member my_octet_array_500 */ - eProsima_user_DllExport const MyOctetArray500& my_octet_array_500() const; + eProsima_user_DllExport const MyOctetArray500& my_octet_array_500() const + { + return m_my_octet_array_500; + } /*! * @brief This function returns a reference to member my_octet_array_500 * @return Reference to member my_octet_array_500 */ - eProsima_user_DllExport MyOctetArray500& my_octet_array_500(); + eProsima_user_DllExport MyOctetArray500& my_octet_array_500() + { + return m_my_octet_array_500; + } /*! @@ -708,26 +1181,38 @@ class ComplexStruct * @param _my_array_struct New value to be copied in member my_array_struct */ eProsima_user_DllExport void my_array_struct( - const std::array& _my_array_struct); + const std::array& _my_array_struct) + { + m_my_array_struct = _my_array_struct; + } /*! * @brief This function moves the value in member my_array_struct * @param _my_array_struct New value to be moved in member my_array_struct */ eProsima_user_DllExport void my_array_struct( - std::array&& _my_array_struct); + std::array&& _my_array_struct) + { + m_my_array_struct = std::move(_my_array_struct); + } /*! * @brief This function returns a constant reference to member my_array_struct * @return Constant reference to member my_array_struct */ - eProsima_user_DllExport const std::array& my_array_struct() const; + eProsima_user_DllExport const std::array& my_array_struct() const + { + return m_my_array_struct; + } /*! * @brief This function returns a reference to member my_array_struct * @return Reference to member my_array_struct */ - eProsima_user_DllExport std::array& my_array_struct(); + eProsima_user_DllExport std::array& my_array_struct() + { + return m_my_array_struct; + } /*! @@ -735,26 +1220,38 @@ class ComplexStruct * @param _my_map_octet_short New value to be copied in member my_map_octet_short */ eProsima_user_DllExport void my_map_octet_short( - const std::map& _my_map_octet_short); + const std::map& _my_map_octet_short) + { + m_my_map_octet_short = _my_map_octet_short; + } /*! * @brief This function moves the value in member my_map_octet_short * @param _my_map_octet_short New value to be moved in member my_map_octet_short */ eProsima_user_DllExport void my_map_octet_short( - std::map&& _my_map_octet_short); + std::map&& _my_map_octet_short) + { + m_my_map_octet_short = std::move(_my_map_octet_short); + } /*! * @brief This function returns a constant reference to member my_map_octet_short * @return Constant reference to member my_map_octet_short */ - eProsima_user_DllExport const std::map& my_map_octet_short() const; + eProsima_user_DllExport const std::map& my_map_octet_short() const + { + return m_my_map_octet_short; + } /*! * @brief This function returns a reference to member my_map_octet_short * @return Reference to member my_map_octet_short */ - eProsima_user_DllExport std::map& my_map_octet_short(); + eProsima_user_DllExport std::map& my_map_octet_short() + { + return m_my_map_octet_short; + } /*! @@ -762,26 +1259,38 @@ class ComplexStruct * @param _my_map_long_struct New value to be copied in member my_map_long_struct */ eProsima_user_DllExport void my_map_long_struct( - const std::map& _my_map_long_struct); + const std::map& _my_map_long_struct) + { + m_my_map_long_struct = _my_map_long_struct; + } /*! * @brief This function moves the value in member my_map_long_struct * @param _my_map_long_struct New value to be moved in member my_map_long_struct */ eProsima_user_DllExport void my_map_long_struct( - std::map&& _my_map_long_struct); + std::map&& _my_map_long_struct) + { + m_my_map_long_struct = std::move(_my_map_long_struct); + } /*! * @brief This function returns a constant reference to member my_map_long_struct * @return Constant reference to member my_map_long_struct */ - eProsima_user_DllExport const std::map& my_map_long_struct() const; + eProsima_user_DllExport const std::map& my_map_long_struct() const + { + return m_my_map_long_struct; + } /*! * @brief This function returns a reference to member my_map_long_struct * @return Reference to member my_map_long_struct */ - eProsima_user_DllExport std::map& my_map_long_struct(); + eProsima_user_DllExport std::map& my_map_long_struct() + { + return m_my_map_long_struct; + } /*! @@ -789,26 +1298,38 @@ class ComplexStruct * @param _my_map_long_seq_octet New value to be copied in member my_map_long_seq_octet */ eProsima_user_DllExport void my_map_long_seq_octet( - const std::map>>& _my_map_long_seq_octet); + const std::map>>& _my_map_long_seq_octet) + { + m_my_map_long_seq_octet = _my_map_long_seq_octet; + } /*! * @brief This function moves the value in member my_map_long_seq_octet * @param _my_map_long_seq_octet New value to be moved in member my_map_long_seq_octet */ eProsima_user_DllExport void my_map_long_seq_octet( - std::map>>&& _my_map_long_seq_octet); + std::map>>&& _my_map_long_seq_octet) + { + m_my_map_long_seq_octet = std::move(_my_map_long_seq_octet); + } /*! * @brief This function returns a constant reference to member my_map_long_seq_octet * @return Constant reference to member my_map_long_seq_octet */ - eProsima_user_DllExport const std::map>>& my_map_long_seq_octet() const; + eProsima_user_DllExport const std::map>>& my_map_long_seq_octet() const + { + return m_my_map_long_seq_octet; + } /*! * @brief This function returns a reference to member my_map_long_seq_octet * @return Reference to member my_map_long_seq_octet */ - eProsima_user_DllExport std::map>>& my_map_long_seq_octet(); + eProsima_user_DllExport std::map>>& my_map_long_seq_octet() + { + return m_my_map_long_seq_octet; + } /*! @@ -816,26 +1337,38 @@ class ComplexStruct * @param _my_map_long_octet_array_500 New value to be copied in member my_map_long_octet_array_500 */ eProsima_user_DllExport void my_map_long_octet_array_500( - const std::map& _my_map_long_octet_array_500); + const std::map& _my_map_long_octet_array_500) + { + m_my_map_long_octet_array_500 = _my_map_long_octet_array_500; + } /*! * @brief This function moves the value in member my_map_long_octet_array_500 * @param _my_map_long_octet_array_500 New value to be moved in member my_map_long_octet_array_500 */ eProsima_user_DllExport void my_map_long_octet_array_500( - std::map&& _my_map_long_octet_array_500); + std::map&& _my_map_long_octet_array_500) + { + m_my_map_long_octet_array_500 = std::move(_my_map_long_octet_array_500); + } /*! * @brief This function returns a constant reference to member my_map_long_octet_array_500 * @return Constant reference to member my_map_long_octet_array_500 */ - eProsima_user_DllExport const std::map& my_map_long_octet_array_500() const; + eProsima_user_DllExport const std::map& my_map_long_octet_array_500() const + { + return m_my_map_long_octet_array_500; + } /*! * @brief This function returns a reference to member my_map_long_octet_array_500 * @return Reference to member my_map_long_octet_array_500 */ - eProsima_user_DllExport std::map& my_map_long_octet_array_500(); + eProsima_user_DllExport std::map& my_map_long_octet_array_500() + { + return m_my_map_long_octet_array_500; + } /*! @@ -843,26 +1376,38 @@ class ComplexStruct * @param _my_map_long_lol_type New value to be copied in member my_map_long_lol_type */ eProsima_user_DllExport void my_map_long_lol_type( - const std::map>& _my_map_long_lol_type); + const std::map>& _my_map_long_lol_type) + { + m_my_map_long_lol_type = _my_map_long_lol_type; + } /*! * @brief This function moves the value in member my_map_long_lol_type * @param _my_map_long_lol_type New value to be moved in member my_map_long_lol_type */ eProsima_user_DllExport void my_map_long_lol_type( - std::map>&& _my_map_long_lol_type); + std::map>&& _my_map_long_lol_type) + { + m_my_map_long_lol_type = std::move(_my_map_long_lol_type); + } /*! * @brief This function returns a constant reference to member my_map_long_lol_type * @return Constant reference to member my_map_long_lol_type */ - eProsima_user_DllExport const std::map>& my_map_long_lol_type() const; + eProsima_user_DllExport const std::map>& my_map_long_lol_type() const + { + return m_my_map_long_lol_type; + } /*! * @brief This function returns a reference to member my_map_long_lol_type * @return Reference to member my_map_long_lol_type */ - eProsima_user_DllExport std::map>& my_map_long_lol_type(); + eProsima_user_DllExport std::map>& my_map_long_lol_type() + { + return m_my_map_long_lol_type; + } /*! @@ -870,26 +1415,38 @@ class ComplexStruct * @param _my_small_string_8 New value to be copied in member my_small_string_8 */ eProsima_user_DllExport void my_small_string_8( - const eprosima::fastcdr::fixed_string<128>& _my_small_string_8); + const eprosima::fastcdr::fixed_string<128>& _my_small_string_8) + { + m_my_small_string_8 = _my_small_string_8; + } /*! * @brief This function moves the value in member my_small_string_8 * @param _my_small_string_8 New value to be moved in member my_small_string_8 */ eProsima_user_DllExport void my_small_string_8( - eprosima::fastcdr::fixed_string<128>&& _my_small_string_8); + eprosima::fastcdr::fixed_string<128>&& _my_small_string_8) + { + m_my_small_string_8 = std::move(_my_small_string_8); + } /*! * @brief This function returns a constant reference to member my_small_string_8 * @return Constant reference to member my_small_string_8 */ - eProsima_user_DllExport const eprosima::fastcdr::fixed_string<128>& my_small_string_8() const; + eProsima_user_DllExport const eprosima::fastcdr::fixed_string<128>& my_small_string_8() const + { + return m_my_small_string_8; + } /*! * @brief This function returns a reference to member my_small_string_8 * @return Reference to member my_small_string_8 */ - eProsima_user_DllExport eprosima::fastcdr::fixed_string<128>& my_small_string_8(); + eProsima_user_DllExport eprosima::fastcdr::fixed_string<128>& my_small_string_8() + { + return m_my_small_string_8; + } /*! @@ -897,26 +1454,38 @@ class ComplexStruct * @param _my_large_string_8 New value to be copied in member my_large_string_8 */ eProsima_user_DllExport void my_large_string_8( - const eprosima::fastcdr::fixed_string<500>& _my_large_string_8); + const eprosima::fastcdr::fixed_string<500>& _my_large_string_8) + { + m_my_large_string_8 = _my_large_string_8; + } /*! * @brief This function moves the value in member my_large_string_8 * @param _my_large_string_8 New value to be moved in member my_large_string_8 */ eProsima_user_DllExport void my_large_string_8( - eprosima::fastcdr::fixed_string<500>&& _my_large_string_8); + eprosima::fastcdr::fixed_string<500>&& _my_large_string_8) + { + m_my_large_string_8 = std::move(_my_large_string_8); + } /*! * @brief This function returns a constant reference to member my_large_string_8 * @return Constant reference to member my_large_string_8 */ - eProsima_user_DllExport const eprosima::fastcdr::fixed_string<500>& my_large_string_8() const; + eProsima_user_DllExport const eprosima::fastcdr::fixed_string<500>& my_large_string_8() const + { + return m_my_large_string_8; + } /*! * @brief This function returns a reference to member my_large_string_8 * @return Reference to member my_large_string_8 */ - eProsima_user_DllExport eprosima::fastcdr::fixed_string<500>& my_large_string_8(); + eProsima_user_DllExport eprosima::fastcdr::fixed_string<500>& my_large_string_8() + { + return m_my_large_string_8; + } /*! @@ -924,26 +1493,38 @@ class ComplexStruct * @param _my_array_string New value to be copied in member my_array_string */ eProsima_user_DllExport void my_array_string( - const std::array, 5>, 5>& _my_array_string); + const std::array, 5>, 5>& _my_array_string) + { + m_my_array_string = _my_array_string; + } /*! * @brief This function moves the value in member my_array_string * @param _my_array_string New value to be moved in member my_array_string */ eProsima_user_DllExport void my_array_string( - std::array, 5>, 5>&& _my_array_string); + std::array, 5>, 5>&& _my_array_string) + { + m_my_array_string = std::move(_my_array_string); + } /*! * @brief This function returns a constant reference to member my_array_string * @return Constant reference to member my_array_string */ - eProsima_user_DllExport const std::array, 5>, 5>& my_array_string() const; + eProsima_user_DllExport const std::array, 5>, 5>& my_array_string() const + { + return m_my_array_string; + } /*! * @brief This function returns a reference to member my_array_string * @return Reference to member my_array_string */ - eProsima_user_DllExport std::array, 5>, 5>& my_array_string(); + eProsima_user_DllExport std::array, 5>, 5>& my_array_string() + { + return m_my_array_string; + } /*! @@ -951,26 +1532,38 @@ class ComplexStruct * @param _multi_alias_array_42 New value to be copied in member multi_alias_array_42 */ eProsima_user_DllExport void multi_alias_array_42( - const MA3& _multi_alias_array_42); + const MA3& _multi_alias_array_42) + { + m_multi_alias_array_42 = _multi_alias_array_42; + } /*! * @brief This function moves the value in member multi_alias_array_42 * @param _multi_alias_array_42 New value to be moved in member multi_alias_array_42 */ eProsima_user_DllExport void multi_alias_array_42( - MA3&& _multi_alias_array_42); + MA3&& _multi_alias_array_42) + { + m_multi_alias_array_42 = std::move(_multi_alias_array_42); + } /*! * @brief This function returns a constant reference to member multi_alias_array_42 * @return Constant reference to member multi_alias_array_42 */ - eProsima_user_DllExport const MA3& multi_alias_array_42() const; + eProsima_user_DllExport const MA3& multi_alias_array_42() const + { + return m_multi_alias_array_42; + } /*! * @brief This function returns a reference to member multi_alias_array_42 * @return Reference to member multi_alias_array_42 */ - eProsima_user_DllExport MA3& multi_alias_array_42(); + eProsima_user_DllExport MA3& multi_alias_array_42() + { + return m_multi_alias_array_42; + } /*! @@ -978,26 +1571,38 @@ class ComplexStruct * @param _my_array_arrays New value to be copied in member my_array_arrays */ eProsima_user_DllExport void my_array_arrays( - const std::array& _my_array_arrays); + const std::array& _my_array_arrays) + { + m_my_array_arrays = _my_array_arrays; + } /*! * @brief This function moves the value in member my_array_arrays * @param _my_array_arrays New value to be moved in member my_array_arrays */ eProsima_user_DllExport void my_array_arrays( - std::array&& _my_array_arrays); + std::array&& _my_array_arrays) + { + m_my_array_arrays = std::move(_my_array_arrays); + } /*! * @brief This function returns a constant reference to member my_array_arrays * @return Constant reference to member my_array_arrays */ - eProsima_user_DllExport const std::array& my_array_arrays() const; + eProsima_user_DllExport const std::array& my_array_arrays() const + { + return m_my_array_arrays; + } /*! * @brief This function returns a reference to member my_array_arrays * @return Reference to member my_array_arrays */ - eProsima_user_DllExport std::array& my_array_arrays(); + eProsima_user_DllExport std::array& my_array_arrays() + { + return m_my_array_arrays; + } /*! @@ -1005,26 +1610,40 @@ class ComplexStruct * @param _my_sequences_array New value to be copied in member my_sequences_array */ eProsima_user_DllExport void my_sequences_array( - const std::array& _my_sequences_array); + const std::array& _my_sequences_array) + { + m_my_sequences_array = _my_sequences_array; + } /*! * @brief This function moves the value in member my_sequences_array * @param _my_sequences_array New value to be moved in member my_sequences_array */ eProsima_user_DllExport void my_sequences_array( - std::array&& _my_sequences_array); + std::array&& _my_sequences_array) + { + m_my_sequences_array = std::move(_my_sequences_array); + } /*! * @brief This function returns a constant reference to member my_sequences_array * @return Constant reference to member my_sequences_array */ - eProsima_user_DllExport const std::array& my_sequences_array() const; + eProsima_user_DllExport const std::array& my_sequences_array() const + { + return m_my_sequences_array; + } /*! * @brief This function returns a reference to member my_sequences_array * @return Reference to member my_sequences_array */ - eProsima_user_DllExport std::array& my_sequences_array(); + eProsima_user_DllExport std::array& my_sequences_array() + { + return m_my_sequences_array; + } + + private: @@ -1063,102 +1682,312 @@ class MyUnion /*! * @brief Default constructor. */ - eProsima_user_DllExport MyUnion(); + eProsima_user_DllExport MyUnion() + { + m__d = ::A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MyUnion(); + eProsima_user_DllExport ~MyUnion() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MyUnion that will be copied. */ eProsima_user_DllExport MyUnion( - const MyUnion& x); + const MyUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case ::A: + m_basic = x.m_basic; + break; + + + case ::B: + case ::C: + m_complex = x.m_complex; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object MyUnion that will be copied. */ eProsima_user_DllExport MyUnion( - MyUnion&& x) noexcept; + MyUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case ::A: + m_basic = std::move(x.m_basic); + + break; + + + case ::B: + case ::C: + m_complex = std::move(x.m_complex); + + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object MyUnion that will be copied. */ eProsima_user_DllExport MyUnion& operator =( - const MyUnion& x); + const MyUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case ::A: + m_basic = x.m_basic; + break; + + + case ::B: + case ::C: + m_complex = x.m_complex; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MyUnion that will be copied. */ eProsima_user_DllExport MyUnion& operator =( - MyUnion&& x) noexcept; + MyUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case ::A: + m_basic = std::move(x.m_basic); + + break; + + + case ::B: + case ::C: + m_complex = std::move(x.m_complex); + + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x MyUnion object to compare. */ eProsima_user_DllExport bool operator ==( - const MyUnion& x) const; + const MyUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case ::A: + return (m_basic == x.m_basic); + break; + + + case ::B: + case ::C: + return (m_complex == x.m_complex); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x MyUnion object to compare. */ eProsima_user_DllExport bool operator !=( - const MyUnion& x) const; + const MyUnion& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - MyEnum __d); + MyEnum __d) + { + bool b = false; + + switch (m__d) + { + case ::A: + switch (__d) + { + case ::A: + b = true; + break; + default: + break; + } + break; + + + case ::B: + case ::C: + switch (__d) + { + case ::B: + case ::C: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport MyEnum _d() const; + eProsima_user_DllExport MyEnum _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport MyEnum& _d(); + eProsima_user_DllExport MyEnum& _d() + { + return m__d; + } /*! * @brief This function copies the value in member basic * @param _basic New value to be copied in member basic */ eProsima_user_DllExport void basic( - const BasicStruct& _basic); + const BasicStruct& _basic) + { + m_basic = _basic; + m__d = ::A; + + } /*! * @brief This function moves the value in member basic * @param _basic New value to be moved in member basic */ eProsima_user_DllExport void basic( - BasicStruct&& _basic); + BasicStruct&& _basic) + { + m_basic = std::move(_basic); + m__d = ::A; + + } /*! * @brief This function returns a constant reference to member basic * @return Constant reference to member basic - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport const BasicStruct& basic() const; + eProsima_user_DllExport const BasicStruct& basic() const + { + bool b = false; + + switch (m__d) + { + case ::A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_basic; + } /*! * @brief This function returns a reference to member basic * @return Reference to member basic - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport BasicStruct& basic(); + eProsima_user_DllExport BasicStruct& basic() + { + bool b = false; + + switch (m__d) + { + case ::A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_basic; + } /*! @@ -1166,28 +1995,80 @@ class MyUnion * @param _complex New value to be copied in member complex */ eProsima_user_DllExport void complex( - const ComplexStruct& _complex); + const ComplexStruct& _complex) + { + m_complex = _complex; + m__d = ::B; + + } /*! * @brief This function moves the value in member complex * @param _complex New value to be moved in member complex */ eProsima_user_DllExport void complex( - ComplexStruct&& _complex); + ComplexStruct&& _complex) + { + m_complex = std::move(_complex); + m__d = ::B; + + } /*! * @brief This function returns a constant reference to member complex * @return Constant reference to member complex - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport const ComplexStruct& complex() const; + eProsima_user_DllExport const ComplexStruct& complex() const + { + bool b = false; + + switch (m__d) + { + case ::B: + case ::C: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_complex; + } /*! * @brief This function returns a reference to member complex * @return Reference to member complex - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport ComplexStruct& complex(); + eProsima_user_DllExport ComplexStruct& complex() + { + bool b = false; + + switch (m__d) + { + case ::B: + case ::C: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_complex; + } + + private: @@ -1209,95 +2090,328 @@ class MyUnion2 /*! * @brief Default constructor. */ - eProsima_user_DllExport MyUnion2(); + eProsima_user_DllExport MyUnion2() + { + m__d = A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MyUnion2(); + eProsima_user_DllExport ~MyUnion2() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MyUnion2 that will be copied. */ eProsima_user_DllExport MyUnion2( - const MyUnion2& x); + const MyUnion2& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_uno = x.m_uno; + break; + + + case B: + m_imString = x.m_imString; + break; + + + case C: + m_tres = x.m_tres; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object MyUnion2 that will be copied. */ eProsima_user_DllExport MyUnion2( - MyUnion2&& x) noexcept; + MyUnion2&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_uno = x.m_uno; + break; + + + case B: + m_imString = std::move(x.m_imString); + + break; + + + case C: + m_tres = x.m_tres; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object MyUnion2 that will be copied. */ eProsima_user_DllExport MyUnion2& operator =( - const MyUnion2& x); + const MyUnion2& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_uno = x.m_uno; + break; + + + case B: + m_imString = x.m_imString; + break; + + + case C: + m_tres = x.m_tres; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MyUnion2 that will be copied. */ eProsima_user_DllExport MyUnion2& operator =( - MyUnion2&& x) noexcept; + MyUnion2&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_uno = x.m_uno; + break; + + + case B: + m_imString = std::move(x.m_imString); + + break; + + + case C: + m_tres = x.m_tres; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x MyUnion2 object to compare. */ eProsima_user_DllExport bool operator ==( - const MyUnion2& x) const; + const MyUnion2& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_uno == x.m_uno); + break; + + + case B: + return (m_imString == x.m_imString); + break; + + + case C: + return (m_tres == x.m_tres); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x MyUnion2 object to compare. */ eProsima_user_DllExport bool operator !=( - const MyUnion2& x) const; + const MyUnion2& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - uint8_t __d); + uint8_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case B: + switch (__d) + { + case B: + b = true; + break; + default: + break; + } + break; + + + case C: + switch (__d) + { + case C: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport uint8_t _d() const; + eProsima_user_DllExport uint8_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport uint8_t& _d(); + eProsima_user_DllExport uint8_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member uno * @param _uno New value for member uno */ eProsima_user_DllExport void uno( - int32_t _uno); + int32_t _uno) + { + m_uno = _uno; + m__d = A; + + } /*! * @brief This function returns the value of member uno * @return Value of member uno - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t uno() const; + eProsima_user_DllExport int32_t uno() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_uno; + } /*! * @brief This function returns a reference to member uno * @return Reference to member uno - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& uno(); + eProsima_user_DllExport int32_t& uno() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_uno; + } /*! @@ -1305,28 +2419,76 @@ class MyUnion2 * @param _imString New value to be copied in member imString */ eProsima_user_DllExport void imString( - const std::string& _imString); + const std::string& _imString) + { + m_imString = _imString; + m__d = B; + + } /*! * @brief This function moves the value in member imString * @param _imString New value to be moved in member imString */ eProsima_user_DllExport void imString( - std::string&& _imString); + std::string&& _imString) + { + m_imString = std::move(_imString); + m__d = B; + + } /*! * @brief This function returns a constant reference to member imString * @return Constant reference to member imString - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport const std::string& imString() const; + eProsima_user_DllExport const std::string& imString() const + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_imString; + } /*! * @brief This function returns a reference to member imString * @return Reference to member imString - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport std::string& imString(); + eProsima_user_DllExport std::string& imString() + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_imString; + } /*! @@ -1334,21 +2496,66 @@ class MyUnion2 * @param _tres New value for member tres */ eProsima_user_DllExport void tres( - int32_t _tres); + int32_t _tres) + { + m_tres = _tres; + m__d = C; + + } /*! * @brief This function returns the value of member tres * @return Value of member tres - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t tres() const; + eProsima_user_DllExport int32_t tres() const + { + bool b = false; + + switch (m__d) + { + case C: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_tres; + } /*! * @brief This function returns a reference to member tres * @return Reference to member tres - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& tres(); + eProsima_user_DllExport int32_t& tres() + { + bool b = false; + + switch (m__d) + { + case C: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_tres; + } + + private: @@ -1371,80 +2578,129 @@ class CompleteStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport CompleteStruct(); + eProsima_user_DllExport CompleteStruct() + { + // Just to register all known types + registerTestTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~CompleteStruct(); + eProsima_user_DllExport ~CompleteStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object CompleteStruct that will be copied. */ eProsima_user_DllExport CompleteStruct( - const CompleteStruct& x); + const CompleteStruct& x) + { + m_my_union = x.m_my_union; + + m_my_union_2 = x.m_my_union_2; + + } /*! * @brief Move constructor. * @param x Reference to the object CompleteStruct that will be copied. */ eProsima_user_DllExport CompleteStruct( - CompleteStruct&& x) noexcept; + CompleteStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + m_my_union_2 = std::move(x.m_my_union_2); + } /*! * @brief Copy assignment. * @param x Reference to the object CompleteStruct that will be copied. */ eProsima_user_DllExport CompleteStruct& operator =( - const CompleteStruct& x); + const CompleteStruct& x) + { + + m_my_union = x.m_my_union; + + m_my_union_2 = x.m_my_union_2; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object CompleteStruct that will be copied. */ eProsima_user_DllExport CompleteStruct& operator =( - CompleteStruct&& x) noexcept; + CompleteStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + m_my_union_2 = std::move(x.m_my_union_2); + return *this; + } /*! * @brief Comparison operator. * @param x CompleteStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const CompleteStruct& x) const; + const CompleteStruct& x) const + { + return (m_my_union == x.m_my_union && + m_my_union_2 == x.m_my_union_2); + } /*! * @brief Comparison operator. * @param x CompleteStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const CompleteStruct& x) const; + const CompleteStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const MyUnion& _my_union); + const MyUnion& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - MyUnion&& _my_union); + MyUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const MyUnion& my_union() const; + eProsima_user_DllExport const MyUnion& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport MyUnion& my_union(); + eProsima_user_DllExport MyUnion& my_union() + { + return m_my_union; + } /*! @@ -1452,26 +2708,40 @@ class CompleteStruct * @param _my_union_2 New value to be copied in member my_union_2 */ eProsima_user_DllExport void my_union_2( - const MyUnion2& _my_union_2); + const MyUnion2& _my_union_2) + { + m_my_union_2 = _my_union_2; + } /*! * @brief This function moves the value in member my_union_2 * @param _my_union_2 New value to be moved in member my_union_2 */ eProsima_user_DllExport void my_union_2( - MyUnion2&& _my_union_2); + MyUnion2&& _my_union_2) + { + m_my_union_2 = std::move(_my_union_2); + } /*! * @brief This function returns a constant reference to member my_union_2 * @return Constant reference to member my_union_2 */ - eProsima_user_DllExport const MyUnion2& my_union_2() const; + eProsima_user_DllExport const MyUnion2& my_union_2() const + { + return m_my_union_2; + } /*! * @brief This function returns a reference to member my_union_2 * @return Reference to member my_union_2 */ - eProsima_user_DllExport MyUnion2& my_union_2(); + eProsima_user_DllExport MyUnion2& my_union_2() + { + return m_my_union_2; + } + + private: @@ -1492,73 +2762,119 @@ class KeyedStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport KeyedStruct(); + eProsima_user_DllExport KeyedStruct() + { + // Just to register all known types + registerTestTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~KeyedStruct(); + eProsima_user_DllExport ~KeyedStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object KeyedStruct that will be copied. */ eProsima_user_DllExport KeyedStruct( - const KeyedStruct& x); + const KeyedStruct& x) + { + m_key = x.m_key; + + m_basic = x.m_basic; + + } /*! * @brief Move constructor. * @param x Reference to the object KeyedStruct that will be copied. */ eProsima_user_DllExport KeyedStruct( - KeyedStruct&& x) noexcept; + KeyedStruct&& x) noexcept + { + m_key = x.m_key; + m_basic = std::move(x.m_basic); + } /*! * @brief Copy assignment. * @param x Reference to the object KeyedStruct that will be copied. */ eProsima_user_DllExport KeyedStruct& operator =( - const KeyedStruct& x); + const KeyedStruct& x) + { + + m_key = x.m_key; + + m_basic = x.m_basic; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object KeyedStruct that will be copied. */ eProsima_user_DllExport KeyedStruct& operator =( - KeyedStruct&& x) noexcept; + KeyedStruct&& x) noexcept + { + + m_key = x.m_key; + m_basic = std::move(x.m_basic); + return *this; + } /*! * @brief Comparison operator. * @param x KeyedStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const KeyedStruct& x) const; + const KeyedStruct& x) const + { + return (m_key == x.m_key && + m_basic == x.m_basic); + } /*! * @brief Comparison operator. * @param x KeyedStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const KeyedStruct& x) const; + const KeyedStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member key * @param _key New value for member key */ eProsima_user_DllExport void key( - uint8_t _key); + uint8_t _key) + { + m_key = _key; + } /*! * @brief This function returns the value of member key * @return Value of member key */ - eProsima_user_DllExport uint8_t key() const; + eProsima_user_DllExport uint8_t key() const + { + return m_key; + } /*! * @brief This function returns a reference to member key * @return Reference to member key */ - eProsima_user_DllExport uint8_t& key(); + eProsima_user_DllExport uint8_t& key() + { + return m_key; + } /*! @@ -1566,26 +2882,40 @@ class KeyedStruct * @param _basic New value to be copied in member basic */ eProsima_user_DllExport void basic( - const BasicStruct& _basic); + const BasicStruct& _basic) + { + m_basic = _basic; + } /*! * @brief This function moves the value in member basic * @param _basic New value to be moved in member basic */ eProsima_user_DllExport void basic( - BasicStruct&& _basic); + BasicStruct&& _basic) + { + m_basic = std::move(_basic); + } /*! * @brief This function returns a constant reference to member basic * @return Constant reference to member basic */ - eProsima_user_DllExport const BasicStruct& basic() const; + eProsima_user_DllExport const BasicStruct& basic() const + { + return m_basic; + } /*! * @brief This function returns a reference to member basic * @return Reference to member basic */ - eProsima_user_DllExport BasicStruct& basic(); + eProsima_user_DllExport BasicStruct& basic() + { + return m_basic; + } + + private: @@ -1594,8 +2924,6 @@ class KeyedStruct }; -#endif // _FAST_DDS_GENERATED_TEST_H_ - +#endif // _FAST_DDS_GENERATED_TEST_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/unittest/dynamic_types/idl/TestCdrAux.hpp b/test/unittest/dynamic_types/idl/TestCdrAux.hpp index 785beb525b0..4918649597f 100644 --- a/test/unittest/dynamic_types/idl/TestCdrAux.hpp +++ b/test/unittest/dynamic_types/idl/TestCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_TESTCDRAUX_HPP_ #define _FAST_DDS_GENERATED_TESTCDRAUX_HPP_ -#include "Test.h" +#include "Test.hpp" constexpr uint32_t KeyedStruct_max_cdr_typesize {344UL}; constexpr uint32_t KeyedStruct_max_key_cdr_typesize {1UL}; @@ -78,8 +78,6 @@ eProsima_user_DllExport void serialize_key( - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const ComplexStruct& data); @@ -90,10 +88,6 @@ eProsima_user_DllExport void serialize_key( - - - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const CompleteStruct& data); diff --git a/test/unittest/dynamic_types/idl/TestCdrAux.ipp b/test/unittest/dynamic_types/idl/TestCdrAux.ipp index 8832623f78e..0bfea0ff448 100644 --- a/test/unittest/dynamic_types/idl/TestCdrAux.ipp +++ b/test/unittest/dynamic_types/idl/TestCdrAux.ipp @@ -226,8 +226,6 @@ void serialize_key( - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, diff --git a/test/unittest/dynamic_types/idl/TestPubSubTypes.cxx b/test/unittest/dynamic_types/idl/TestPubSubTypes.cxx index d450d6de064..e5bc653caf1 100644 --- a/test/unittest/dynamic_types/idl/TestPubSubTypes.cxx +++ b/test/unittest/dynamic_types/idl/TestPubSubTypes.cxx @@ -237,8 +237,6 @@ bool BasicStructPubSubType::getKey( - - ComplexStructPubSubType::ComplexStructPubSubType() { setName("ComplexStruct"); @@ -433,10 +431,6 @@ bool ComplexStructPubSubType::getKey( - - - - CompleteStructPubSubType::CompleteStructPubSubType() { setName("CompleteStruct"); @@ -815,3 +809,6 @@ bool KeyedStructPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "TestCdrAux.ipp" diff --git a/test/unittest/dynamic_types/idl/TestPubSubTypes.h b/test/unittest/dynamic_types/idl/TestPubSubTypes.h index d74f7ae2664..b67fb307b6a 100644 --- a/test/unittest/dynamic_types/idl/TestPubSubTypes.h +++ b/test/unittest/dynamic_types/idl/TestPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "Test.h" +#include "Test.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -134,8 +134,6 @@ typedef std::array MyOctetArray500; typedef std::array BSAlias5; typedef std::array MA3; typedef std::array MyMiniArray; - - typedef std::vector MySequenceLong; @@ -234,10 +232,6 @@ class ComplexStructPubSubType : public eprosima::fastdds::dds::TopicDataType - - - - /*! * @brief This class represents the TopicDataType of the type CompleteStruct defined by the user in the IDL file. * @ingroup Test diff --git a/test/unittest/dynamic_types/idl/TestTypeObject.cxx b/test/unittest/dynamic_types/idl/TestTypeObject.cxx index 60d8dba0b18..96dd3ea2af2 100644 --- a/test/unittest/dynamic_types/idl/TestTypeObject.cxx +++ b/test/unittest/dynamic_types/idl/TestTypeObject.cxx @@ -24,7 +24,7 @@ namespace { char dummy; } #endif -#include "Test.h" +#include "Test.hpp" #include "TestTypeObject.h" #include #include @@ -2344,8 +2344,6 @@ const TypeObject* GetCompleteMyMiniArrayObject() return TypeObjectFactory::get_instance()->get_type_object("MyMiniArray", true); } - - const TypeIdentifier* GetMySequenceLongIdentifier(bool complete) { const TypeIdentifier* c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("MySequenceLong", complete); diff --git a/test/unittest/dynamic_types/idl/TestTypeObject.h b/test/unittest/dynamic_types/idl/TestTypeObject.h index 9d4dc990651..d36f93e351c 100644 --- a/test/unittest/dynamic_types/idl/TestTypeObject.h +++ b/test/unittest/dynamic_types/idl/TestTypeObject.h @@ -101,8 +101,6 @@ eProsima_user_DllExport const TypeObject* GetMyMiniArrayObject(bool complete = f eProsima_user_DllExport const TypeObject* GetMinimalMyMiniArrayObject(); eProsima_user_DllExport const TypeObject* GetCompleteMyMiniArrayObject(); - - eProsima_user_DllExport const TypeIdentifier* GetMySequenceLongIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetMySequenceLongObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalMySequenceLongObject(); diff --git a/test/unittest/dynamic_types/idl/Testv1.cxx b/test/unittest/dynamic_types/idl/Testv1.cxx deleted file mode 100644 index d5f720de3dd..00000000000 --- a/test/unittest/dynamic_types/idl/Testv1.cxx +++ /dev/null @@ -1,3744 +0,0 @@ -// 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.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Test.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include "TestTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define KeyedStruct_max_cdr_typesize 344ULL; - - - -#define BasicStruct_max_cdr_typesize 336ULL; - -#define ComplexStruct_max_cdr_typesize 18064796ULL; - - -#define CompleteStruct_max_cdr_typesize 18065072ULL; - - - - - - - - - -BasicStruct::BasicStruct() -{ - // boolean m_my_bool - m_my_bool = false; - // octet m_my_octet - m_my_octet = 0; - // short m_my_int16 - m_my_int16 = 0; - // long m_my_int32 - m_my_int32 = 0; - // long long m_my_int64 - m_my_int64 = 0; - // unsigned short m_my_uint16 - m_my_uint16 = 0; - // unsigned long m_my_uint32 - m_my_uint32 = 0; - // unsigned long long m_my_uint64 - m_my_uint64 = 0; - // float m_my_float32 - m_my_float32 = 0.0; - // double m_my_float64 - m_my_float64 = 0.0; - // long double m_my_float128 - m_my_float128 = 0.0; - // char m_my_char - m_my_char = 0; - // /type_d() m_my_string - - - // Just to register all known types - registerTestTypes(); -} - -BasicStruct::~BasicStruct() -{ -} - -BasicStruct::BasicStruct( - const BasicStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_octet = x.m_my_octet; - - - m_my_int16 = x.m_my_int16; - - - m_my_int32 = x.m_my_int32; - - - m_my_int64 = x.m_my_int64; - - - m_my_uint16 = x.m_my_uint16; - - - m_my_uint32 = x.m_my_uint32; - - - m_my_uint64 = x.m_my_uint64; - - - m_my_float32 = x.m_my_float32; - - - m_my_float64 = x.m_my_float64; - - - m_my_float128 = x.m_my_float128; - - - m_my_char = x.m_my_char; - - - m_my_string = x.m_my_string; - -} - -BasicStruct::BasicStruct( - BasicStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_octet = x.m_my_octet; - - - m_my_int16 = x.m_my_int16; - - - m_my_int32 = x.m_my_int32; - - - m_my_int64 = x.m_my_int64; - - - m_my_uint16 = x.m_my_uint16; - - - m_my_uint32 = x.m_my_uint32; - - - m_my_uint64 = x.m_my_uint64; - - - m_my_float32 = x.m_my_float32; - - - m_my_float64 = x.m_my_float64; - - - m_my_float128 = x.m_my_float128; - - - m_my_char = x.m_my_char; - - - m_my_string = std::move(x.m_my_string); - -} - -BasicStruct& BasicStruct::operator =( - const BasicStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_octet = x.m_my_octet; - - - m_my_int16 = x.m_my_int16; - - - m_my_int32 = x.m_my_int32; - - - m_my_int64 = x.m_my_int64; - - - m_my_uint16 = x.m_my_uint16; - - - m_my_uint32 = x.m_my_uint32; - - - m_my_uint64 = x.m_my_uint64; - - - m_my_float32 = x.m_my_float32; - - - m_my_float64 = x.m_my_float64; - - - m_my_float128 = x.m_my_float128; - - - m_my_char = x.m_my_char; - - - m_my_string = x.m_my_string; - - return *this; -} - -BasicStruct& BasicStruct::operator =( - BasicStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_octet = x.m_my_octet; - - - m_my_int16 = x.m_my_int16; - - - m_my_int32 = x.m_my_int32; - - - m_my_int64 = x.m_my_int64; - - - m_my_uint16 = x.m_my_uint16; - - - m_my_uint32 = x.m_my_uint32; - - - m_my_uint64 = x.m_my_uint64; - - - m_my_float32 = x.m_my_float32; - - - m_my_float64 = x.m_my_float64; - - - m_my_float128 = x.m_my_float128; - - - m_my_char = x.m_my_char; - - - m_my_string = std::move(x.m_my_string); - - return *this; -} - -bool BasicStruct::operator ==( - const BasicStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_octet == x.m_my_octet && - m_my_int16 == x.m_my_int16 && - m_my_int32 == x.m_my_int32 && - m_my_int64 == x.m_my_int64 && - m_my_uint16 == x.m_my_uint16 && - m_my_uint32 == x.m_my_uint32 && - m_my_uint64 == x.m_my_uint64 && - m_my_float32 == x.m_my_float32 && - m_my_float64 == x.m_my_float64 && - m_my_float128 == x.m_my_float128 && - m_my_char == x.m_my_char && - m_my_string == x.m_my_string); -} - -bool BasicStruct::operator !=( - const BasicStruct& x) const -{ - return !(*this == x); -} - -size_t BasicStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BasicStruct_max_cdr_typesize; -} - -size_t BasicStruct::getCdrSerializedSize( - const BasicStruct& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - 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 += 16 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); // 128 bits, but aligned as 64 - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void BasicStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_bool; - - scdr << m_my_octet; - - scdr << m_my_int16; - - scdr << m_my_int32; - - scdr << m_my_int64; - - scdr << m_my_uint16; - - scdr << m_my_uint32; - - scdr << m_my_uint64; - - scdr << m_my_float32; - - scdr << m_my_float64; - - scdr << m_my_float128; - - scdr << m_my_char; - - scdr << m_my_string.c_str(); - -} - -void BasicStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_bool; - - - - dcdr >> m_my_octet; - - - - dcdr >> m_my_int16; - - - - dcdr >> m_my_int32; - - - - dcdr >> m_my_int64; - - - - dcdr >> m_my_uint16; - - - - dcdr >> m_my_uint32; - - - - dcdr >> m_my_uint64; - - - - dcdr >> m_my_float32; - - - - dcdr >> m_my_float64; - - - - dcdr >> m_my_float128; - - - - dcdr >> m_my_char; - - - - dcdr >> m_my_string; - - -} - - -bool BasicStruct::isKeyDefined() -{ - return false; -} - -void BasicStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BasicStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BasicStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_octet - * @param _my_octet New value for member my_octet - */ -void BasicStruct::my_octet( - uint8_t _my_octet) -{ - m_my_octet = _my_octet; -} - -/*! - * @brief This function returns the value of member my_octet - * @return Value of member my_octet - */ -uint8_t BasicStruct::my_octet() const -{ - return m_my_octet; -} - -/*! - * @brief This function returns a reference to member my_octet - * @return Reference to member my_octet - */ -uint8_t& BasicStruct::my_octet() -{ - return m_my_octet; -} - - -/*! - * @brief This function sets a value in member my_int16 - * @param _my_int16 New value for member my_int16 - */ -void BasicStruct::my_int16( - int16_t _my_int16) -{ - m_my_int16 = _my_int16; -} - -/*! - * @brief This function returns the value of member my_int16 - * @return Value of member my_int16 - */ -int16_t BasicStruct::my_int16() const -{ - return m_my_int16; -} - -/*! - * @brief This function returns a reference to member my_int16 - * @return Reference to member my_int16 - */ -int16_t& BasicStruct::my_int16() -{ - return m_my_int16; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function sets a value in member my_int64 - * @param _my_int64 New value for member my_int64 - */ -void BasicStruct::my_int64( - int64_t _my_int64) -{ - m_my_int64 = _my_int64; -} - -/*! - * @brief This function returns the value of member my_int64 - * @return Value of member my_int64 - */ -int64_t BasicStruct::my_int64() const -{ - return m_my_int64; -} - -/*! - * @brief This function returns a reference to member my_int64 - * @return Reference to member my_int64 - */ -int64_t& BasicStruct::my_int64() -{ - return m_my_int64; -} - - -/*! - * @brief This function sets a value in member my_uint16 - * @param _my_uint16 New value for member my_uint16 - */ -void BasicStruct::my_uint16( - uint16_t _my_uint16) -{ - m_my_uint16 = _my_uint16; -} - -/*! - * @brief This function returns the value of member my_uint16 - * @return Value of member my_uint16 - */ -uint16_t BasicStruct::my_uint16() const -{ - return m_my_uint16; -} - -/*! - * @brief This function returns a reference to member my_uint16 - * @return Reference to member my_uint16 - */ -uint16_t& BasicStruct::my_uint16() -{ - return m_my_uint16; -} - - -/*! - * @brief This function sets a value in member my_uint32 - * @param _my_uint32 New value for member my_uint32 - */ -void BasicStruct::my_uint32( - uint32_t _my_uint32) -{ - m_my_uint32 = _my_uint32; -} - -/*! - * @brief This function returns the value of member my_uint32 - * @return Value of member my_uint32 - */ -uint32_t BasicStruct::my_uint32() const -{ - return m_my_uint32; -} - -/*! - * @brief This function returns a reference to member my_uint32 - * @return Reference to member my_uint32 - */ -uint32_t& BasicStruct::my_uint32() -{ - return m_my_uint32; -} - - -/*! - * @brief This function sets a value in member my_uint64 - * @param _my_uint64 New value for member my_uint64 - */ -void BasicStruct::my_uint64( - uint64_t _my_uint64) -{ - m_my_uint64 = _my_uint64; -} - -/*! - * @brief This function returns the value of member my_uint64 - * @return Value of member my_uint64 - */ -uint64_t BasicStruct::my_uint64() const -{ - return m_my_uint64; -} - -/*! - * @brief This function returns a reference to member my_uint64 - * @return Reference to member my_uint64 - */ -uint64_t& BasicStruct::my_uint64() -{ - return m_my_uint64; -} - - -/*! - * @brief This function sets a value in member my_float32 - * @param _my_float32 New value for member my_float32 - */ -void BasicStruct::my_float32( - float _my_float32) -{ - m_my_float32 = _my_float32; -} - -/*! - * @brief This function returns the value of member my_float32 - * @return Value of member my_float32 - */ -float BasicStruct::my_float32() const -{ - return m_my_float32; -} - -/*! - * @brief This function returns a reference to member my_float32 - * @return Reference to member my_float32 - */ -float& BasicStruct::my_float32() -{ - return m_my_float32; -} - - -/*! - * @brief This function sets a value in member my_float64 - * @param _my_float64 New value for member my_float64 - */ -void BasicStruct::my_float64( - double _my_float64) -{ - m_my_float64 = _my_float64; -} - -/*! - * @brief This function returns the value of member my_float64 - * @return Value of member my_float64 - */ -double BasicStruct::my_float64() const -{ - return m_my_float64; -} - -/*! - * @brief This function returns a reference to member my_float64 - * @return Reference to member my_float64 - */ -double& BasicStruct::my_float64() -{ - return m_my_float64; -} - - -/*! - * @brief This function sets a value in member my_float128 - * @param _my_float128 New value for member my_float128 - */ -void BasicStruct::my_float128( - long double _my_float128) -{ - m_my_float128 = _my_float128; -} - -/*! - * @brief This function returns the value of member my_float128 - * @return Value of member my_float128 - */ -long double BasicStruct::my_float128() const -{ - return m_my_float128; -} - -/*! - * @brief This function returns a reference to member my_float128 - * @return Reference to member my_float128 - */ -long double& BasicStruct::my_float128() -{ - return m_my_float128; -} - - -/*! - * @brief This function sets a value in member my_char - * @param _my_char New value for member my_char - */ -void BasicStruct::my_char( - char _my_char) -{ - m_my_char = _my_char; -} - -/*! - * @brief This function returns the value of member my_char - * @return Value of member my_char - */ -char BasicStruct::my_char() const -{ - return m_my_char; -} - -/*! - * @brief This function returns a reference to member my_char - * @return Reference to member my_char - */ -char& BasicStruct::my_char() -{ - return m_my_char; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicStruct::my_string() -{ - return m_my_string; -} - - - - - - - - - - - - -ComplexStruct::ComplexStruct() -{ - // octet m_my_octet - m_my_octet = 0; - // BasicStruct m_my_basic_struct - - // MyAliasEnum m_my_alias_enum - m_my_alias_enum = ::A; - // MyEnum m_my_enum - m_my_enum = ::A; - // sequence m_my_sequence_octet - - // sequence m_my_sequence_struct - - // char m_my_array_octet - memset(&m_my_array_octet, 0, ((500) * (5) * (4)) * 1); - // MyOctetArray500 m_my_octet_array_500 - memset(&m_my_octet_array_500, 0, ((500)) * 1); - // BasicStruct m_my_array_struct - - // map m_my_map_octet_short - - // map m_my_map_long_struct - - // map>> m_my_map_long_seq_octet - - // map m_my_map_long_octet_array_500 - - // map> m_my_map_long_lol_type - - // /type_d() m_my_small_string_8 - - // /type_d() m_my_large_string_8 - - // /type_d() m_my_array_string - - // MA3 m_multi_alias_array_42 - memset(&m_multi_alias_array_42, 0, ((42)) * 4); - // MyMiniArray m_my_array_arrays - - // MySequenceLong m_my_sequences_array - - - // Just to register all known types - registerTestTypes(); -} - -ComplexStruct::~ComplexStruct() -{ -} - -ComplexStruct::ComplexStruct( - const ComplexStruct& x) -{ - m_my_octet = x.m_my_octet; - - - m_my_basic_struct = x.m_my_basic_struct; - - - m_my_alias_enum = x.m_my_alias_enum; - - - m_my_enum = x.m_my_enum; - - - m_my_sequence_octet = x.m_my_sequence_octet; - - - m_my_sequence_struct = x.m_my_sequence_struct; - - - m_my_array_octet = x.m_my_array_octet; - - - m_my_octet_array_500 = x.m_my_octet_array_500; - - - m_my_array_struct = x.m_my_array_struct; - - - m_my_map_octet_short = x.m_my_map_octet_short; - - - m_my_map_long_struct = x.m_my_map_long_struct; - - - m_my_map_long_seq_octet = x.m_my_map_long_seq_octet; - - - m_my_map_long_octet_array_500 = x.m_my_map_long_octet_array_500; - - - m_my_map_long_lol_type = x.m_my_map_long_lol_type; - - - m_my_small_string_8 = x.m_my_small_string_8; - - - m_my_large_string_8 = x.m_my_large_string_8; - - - m_my_array_string = x.m_my_array_string; - - - m_multi_alias_array_42 = x.m_multi_alias_array_42; - - - m_my_array_arrays = x.m_my_array_arrays; - - - m_my_sequences_array = x.m_my_sequences_array; - -} - -ComplexStruct::ComplexStruct( - ComplexStruct&& x) noexcept -{ - m_my_octet = x.m_my_octet; - - - m_my_basic_struct = std::move(x.m_my_basic_struct); - - - m_my_alias_enum = x.m_my_alias_enum; - - - m_my_enum = x.m_my_enum; - - - m_my_sequence_octet = std::move(x.m_my_sequence_octet); - - - m_my_sequence_struct = std::move(x.m_my_sequence_struct); - - - m_my_array_octet = std::move(x.m_my_array_octet); - - - m_my_octet_array_500 = std::move(x.m_my_octet_array_500); - - - m_my_array_struct = std::move(x.m_my_array_struct); - - - m_my_map_octet_short = std::move(x.m_my_map_octet_short); - - - m_my_map_long_struct = std::move(x.m_my_map_long_struct); - - - m_my_map_long_seq_octet = std::move(x.m_my_map_long_seq_octet); - - - m_my_map_long_octet_array_500 = std::move(x.m_my_map_long_octet_array_500); - - - m_my_map_long_lol_type = std::move(x.m_my_map_long_lol_type); - - - m_my_small_string_8 = std::move(x.m_my_small_string_8); - - - m_my_large_string_8 = std::move(x.m_my_large_string_8); - - - m_my_array_string = std::move(x.m_my_array_string); - - - m_multi_alias_array_42 = std::move(x.m_multi_alias_array_42); - - - m_my_array_arrays = std::move(x.m_my_array_arrays); - - - m_my_sequences_array = std::move(x.m_my_sequences_array); - -} - -ComplexStruct& ComplexStruct::operator =( - const ComplexStruct& x) -{ - m_my_octet = x.m_my_octet; - - - m_my_basic_struct = x.m_my_basic_struct; - - - m_my_alias_enum = x.m_my_alias_enum; - - - m_my_enum = x.m_my_enum; - - - m_my_sequence_octet = x.m_my_sequence_octet; - - - m_my_sequence_struct = x.m_my_sequence_struct; - - - m_my_array_octet = x.m_my_array_octet; - - - m_my_octet_array_500 = x.m_my_octet_array_500; - - - m_my_array_struct = x.m_my_array_struct; - - - m_my_map_octet_short = x.m_my_map_octet_short; - - - m_my_map_long_struct = x.m_my_map_long_struct; - - - m_my_map_long_seq_octet = x.m_my_map_long_seq_octet; - - - m_my_map_long_octet_array_500 = x.m_my_map_long_octet_array_500; - - - m_my_map_long_lol_type = x.m_my_map_long_lol_type; - - - m_my_small_string_8 = x.m_my_small_string_8; - - - m_my_large_string_8 = x.m_my_large_string_8; - - - m_my_array_string = x.m_my_array_string; - - - m_multi_alias_array_42 = x.m_multi_alias_array_42; - - - m_my_array_arrays = x.m_my_array_arrays; - - - m_my_sequences_array = x.m_my_sequences_array; - - return *this; -} - -ComplexStruct& ComplexStruct::operator =( - ComplexStruct&& x) noexcept -{ - m_my_octet = x.m_my_octet; - - - m_my_basic_struct = std::move(x.m_my_basic_struct); - - - m_my_alias_enum = x.m_my_alias_enum; - - - m_my_enum = x.m_my_enum; - - - m_my_sequence_octet = std::move(x.m_my_sequence_octet); - - - m_my_sequence_struct = std::move(x.m_my_sequence_struct); - - - m_my_array_octet = std::move(x.m_my_array_octet); - - - m_my_octet_array_500 = std::move(x.m_my_octet_array_500); - - - m_my_array_struct = std::move(x.m_my_array_struct); - - - m_my_map_octet_short = std::move(x.m_my_map_octet_short); - - - m_my_map_long_struct = std::move(x.m_my_map_long_struct); - - - m_my_map_long_seq_octet = std::move(x.m_my_map_long_seq_octet); - - - m_my_map_long_octet_array_500 = std::move(x.m_my_map_long_octet_array_500); - - - m_my_map_long_lol_type = std::move(x.m_my_map_long_lol_type); - - - m_my_small_string_8 = std::move(x.m_my_small_string_8); - - - m_my_large_string_8 = std::move(x.m_my_large_string_8); - - - m_my_array_string = std::move(x.m_my_array_string); - - - m_multi_alias_array_42 = std::move(x.m_multi_alias_array_42); - - - m_my_array_arrays = std::move(x.m_my_array_arrays); - - - m_my_sequences_array = std::move(x.m_my_sequences_array); - - return *this; -} - -bool ComplexStruct::operator ==( - const ComplexStruct& x) const -{ - return (m_my_octet == x.m_my_octet && - m_my_basic_struct == x.m_my_basic_struct && - m_my_alias_enum == x.m_my_alias_enum && - m_my_enum == x.m_my_enum && - m_my_sequence_octet == x.m_my_sequence_octet && - m_my_sequence_struct == x.m_my_sequence_struct && - m_my_array_octet == x.m_my_array_octet && - m_my_octet_array_500 == x.m_my_octet_array_500 && - m_my_array_struct == x.m_my_array_struct && - m_my_map_octet_short == x.m_my_map_octet_short && - m_my_map_long_struct == x.m_my_map_long_struct && - m_my_map_long_seq_octet == x.m_my_map_long_seq_octet && - m_my_map_long_octet_array_500 == x.m_my_map_long_octet_array_500 && - m_my_map_long_lol_type == x.m_my_map_long_lol_type && - m_my_small_string_8 == x.m_my_small_string_8 && - m_my_large_string_8 == x.m_my_large_string_8 && - m_my_array_string == x.m_my_array_string && - m_multi_alias_array_42 == x.m_multi_alias_array_42 && - m_my_array_arrays == x.m_my_array_arrays && - m_my_sequences_array == x.m_my_sequences_array); -} - -bool ComplexStruct::operator !=( - const ComplexStruct& x) const -{ - return !(*this == x); -} - -size_t ComplexStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ComplexStruct_max_cdr_typesize; -} - -size_t ComplexStruct::getCdrSerializedSize( - const ComplexStruct& 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 += BasicStruct::getCdrSerializedSize(data.my_basic_struct(), current_alignment); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence_octet().size() > 0) - { - current_alignment += (data.my_sequence_octet().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.my_sequence_struct().size(); ++a) - { - current_alignment += BasicStruct::getCdrSerializedSize(data.my_sequence_struct().at(a), current_alignment); - } - - - - current_alignment += (((500) * (5) * (4)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - current_alignment += (((500)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - - for(size_t a = 0; a < data.my_array_struct().size(); ++a) - { - current_alignment += BasicStruct::getCdrSerializedSize(data.my_array_struct().at(a), current_alignment); - - } - - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map_octet_short()) - { - (void)a; - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += 2 + eprosima::fastcdr::Cdr::alignment(current_alignment, 2); - - } - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map_long_struct()) - { - (void)a; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += BasicStruct::getCdrSerializedSize(a.second, current_alignment); - - } - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map_long_seq_octet()) - { - (void)a; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t b = 0; b < a.second.size(); ++b) - { - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (a.second.at(b).size() > 0) - { - current_alignment += (a.second.at(b).size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - } - - - } - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map_long_octet_array_500()) - { - (void)a; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += (((500)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - } - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map_long_lol_type()) - { - (void)a; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto b : a.second) - { - (void)b; - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - for(size_t c = 0; c < b.second.size(); ++c) - { - current_alignment += BasicStruct::getCdrSerializedSize(b.second.at(c), current_alignment); - - } - - - } - - } - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_small_string_8().size() + 1; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_large_string_8().size() + 1; - - - - for(size_t a = 0; a < data.my_array_string().size(); ++a) - { - - for(size_t b = 0; b < data.my_array_string().at(a).size(); ++b) - { - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_array_string().at(a).at(b).size() + 1; - - } - - } - - - - current_alignment += (((42)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - - for(size_t a = 0; a < data.my_array_arrays().size(); ++a) - { - current_alignment += (((2)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - } - - - - - for(size_t a = 0; a < data.my_sequences_array().size(); ++a) - { - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequences_array().at(a).size() > 0) - { - current_alignment += (data.my_sequences_array().at(a).size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - } - - - - return current_alignment - initial_alignment; -} - - -void ComplexStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_octet; - - scdr << m_my_basic_struct; - - scdr << (uint32_t)m_my_alias_enum; - - scdr << (uint32_t)m_my_enum; - - scdr << m_my_sequence_octet; - - - scdr << m_my_sequence_struct; - - - for (uint32_t d = 0; d < m_my_array_octet.size(); ++d) - { - for (uint32_t e = 0; e < m_my_array_octet[d].size(); ++e) - { - scdr << m_my_array_octet[d][e]; - - } - - } - - - - scdr << m_my_octet_array_500; - - - scdr << m_my_array_struct; - - - scdr << static_cast(m_my_map_octet_short.size()); - for (const auto& pair : m_my_map_octet_short) - { - scdr << pair.first; - scdr << pair.second; - } - - scdr << static_cast(m_my_map_long_struct.size()); - for (const auto& pair : m_my_map_long_struct) - { - scdr << pair.first; - scdr << pair.second; - } - - scdr << static_cast(m_my_map_long_seq_octet.size()); - for (const auto& pair : m_my_map_long_seq_octet) - { - scdr << pair.first; - scdr << pair.second; - } - - scdr << static_cast(m_my_map_long_octet_array_500.size()); - for (const auto& pair : m_my_map_long_octet_array_500) - { - scdr << pair.first; - scdr << pair.second; - } - - scdr << static_cast(m_my_map_long_lol_type.size()); - for (const auto& pair : m_my_map_long_lol_type) - { - scdr << pair.first; - scdr << pair.second; - } - - scdr << m_my_small_string_8.c_str(); - - scdr << m_my_large_string_8.c_str(); - - for (uint32_t g = 0; g < m_my_array_string.size(); ++g) - { - for (const auto& str : m_my_array_string[g]) - { - scdr << str.c_str(); - } - - - } - - - - - scdr.serializeArray(reinterpret_cast(m_multi_alias_array_42.data()), m_multi_alias_array_42.size()); - - - scdr << m_my_array_arrays; - - - scdr << m_my_sequences_array; - - -} - -void ComplexStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_octet; - - - - dcdr >> m_my_basic_struct; - - - - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_my_alias_enum = (MyAliasEnum)enum_value; - } - - - - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_my_enum = (MyEnum)enum_value; - } - - - - dcdr >> m_my_sequence_octet; - - - - dcdr >> m_my_sequence_struct; - - - - for (uint32_t i = 0; i < m_my_array_octet.size(); ++i) - { - for (uint32_t j = 0; j < m_my_array_octet[i].size(); ++j) - { - dcdr >> m_my_array_octet[i][j]; - - } - - } - - - - - dcdr >> m_my_octet_array_500; - - - - dcdr >> m_my_array_struct; - - - - - dcdr >> m_my_map_octet_short; - - - - - dcdr >> m_my_map_long_struct; - - - - - dcdr >> m_my_map_long_seq_octet; - - - - - dcdr >> m_my_map_long_octet_array_500; - - - - - dcdr >> m_my_map_long_lol_type; - - - - { - std::string aux; - dcdr >> aux; - m_my_small_string_8 = aux.c_str(); - } - - - - { - std::string aux; - dcdr >> aux; - m_my_large_string_8 = aux.c_str(); - } - - - - for (uint32_t l = 0; l < m_my_array_string.size(); ++l) - { - for (auto& str : m_my_array_string[l]) - { - { - std::string aux_str; - dcdr >> aux_str; - str = aux_str.c_str(); - } - - } - - - } - - - - - - dcdr.deserializeArray(reinterpret_cast(m_multi_alias_array_42.data()), m_multi_alias_array_42.size()); - - - - dcdr >> m_my_array_arrays; - - - - dcdr >> m_my_sequences_array; - - -} - - -bool ComplexStruct::isKeyDefined() -{ - return false; -} - -void ComplexStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_octet - * @param _my_octet New value for member my_octet - */ -void ComplexStruct::my_octet( - uint8_t _my_octet) -{ - m_my_octet = _my_octet; -} - -/*! - * @brief This function returns the value of member my_octet - * @return Value of member my_octet - */ -uint8_t ComplexStruct::my_octet() const -{ - return m_my_octet; -} - -/*! - * @brief This function returns a reference to member my_octet - * @return Reference to member my_octet - */ -uint8_t& ComplexStruct::my_octet() -{ - return m_my_octet; -} - - -/*! - * @brief This function copies the value in member my_basic_struct - * @param _my_basic_struct New value to be copied in member my_basic_struct - */ -void ComplexStruct::my_basic_struct( - const BasicStruct& _my_basic_struct) -{ - m_my_basic_struct = _my_basic_struct; -} - -/*! - * @brief This function moves the value in member my_basic_struct - * @param _my_basic_struct New value to be moved in member my_basic_struct - */ -void ComplexStruct::my_basic_struct( - BasicStruct&& _my_basic_struct) -{ - m_my_basic_struct = std::move(_my_basic_struct); -} - -/*! - * @brief This function returns a constant reference to member my_basic_struct - * @return Constant reference to member my_basic_struct - */ -const BasicStruct& ComplexStruct::my_basic_struct() const -{ - return m_my_basic_struct; -} - -/*! - * @brief This function returns a reference to member my_basic_struct - * @return Reference to member my_basic_struct - */ -BasicStruct& ComplexStruct::my_basic_struct() -{ - return m_my_basic_struct; -} - - -/*! - * @brief This function sets a value in member my_alias_enum - * @param _my_alias_enum New value for member my_alias_enum - */ -void ComplexStruct::my_alias_enum( - MyAliasEnum _my_alias_enum) -{ - m_my_alias_enum = _my_alias_enum; -} - -/*! - * @brief This function returns the value of member my_alias_enum - * @return Value of member my_alias_enum - */ -MyAliasEnum ComplexStruct::my_alias_enum() const -{ - return m_my_alias_enum; -} - -/*! - * @brief This function returns a reference to member my_alias_enum - * @return Reference to member my_alias_enum - */ -MyAliasEnum& ComplexStruct::my_alias_enum() -{ - return m_my_alias_enum; -} - - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void ComplexStruct::my_enum( - MyEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyEnum ComplexStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyEnum& ComplexStruct::my_enum() -{ - return m_my_enum; -} - - -/*! - * @brief This function copies the value in member my_sequence_octet - * @param _my_sequence_octet New value to be copied in member my_sequence_octet - */ -void ComplexStruct::my_sequence_octet( - const std::vector& _my_sequence_octet) -{ - m_my_sequence_octet = _my_sequence_octet; -} - -/*! - * @brief This function moves the value in member my_sequence_octet - * @param _my_sequence_octet New value to be moved in member my_sequence_octet - */ -void ComplexStruct::my_sequence_octet( - std::vector&& _my_sequence_octet) -{ - m_my_sequence_octet = std::move(_my_sequence_octet); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_octet - * @return Constant reference to member my_sequence_octet - */ -const std::vector& ComplexStruct::my_sequence_octet() const -{ - return m_my_sequence_octet; -} - -/*! - * @brief This function returns a reference to member my_sequence_octet - * @return Reference to member my_sequence_octet - */ -std::vector& ComplexStruct::my_sequence_octet() -{ - return m_my_sequence_octet; -} - - -/*! - * @brief This function copies the value in member my_sequence_struct - * @param _my_sequence_struct New value to be copied in member my_sequence_struct - */ -void ComplexStruct::my_sequence_struct( - const std::vector& _my_sequence_struct) -{ - m_my_sequence_struct = _my_sequence_struct; -} - -/*! - * @brief This function moves the value in member my_sequence_struct - * @param _my_sequence_struct New value to be moved in member my_sequence_struct - */ -void ComplexStruct::my_sequence_struct( - std::vector&& _my_sequence_struct) -{ - m_my_sequence_struct = std::move(_my_sequence_struct); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_struct - * @return Constant reference to member my_sequence_struct - */ -const std::vector& ComplexStruct::my_sequence_struct() const -{ - return m_my_sequence_struct; -} - -/*! - * @brief This function returns a reference to member my_sequence_struct - * @return Reference to member my_sequence_struct - */ -std::vector& ComplexStruct::my_sequence_struct() -{ - return m_my_sequence_struct; -} - - -/*! - * @brief This function copies the value in member my_array_octet - * @param _my_array_octet New value to be copied in member my_array_octet - */ -void ComplexStruct::my_array_octet( - const std::array, 5>, 500>& _my_array_octet) -{ - m_my_array_octet = _my_array_octet; -} - -/*! - * @brief This function moves the value in member my_array_octet - * @param _my_array_octet New value to be moved in member my_array_octet - */ -void ComplexStruct::my_array_octet( - std::array, 5>, 500>&& _my_array_octet) -{ - m_my_array_octet = std::move(_my_array_octet); -} - -/*! - * @brief This function returns a constant reference to member my_array_octet - * @return Constant reference to member my_array_octet - */ -const std::array, 5>, 500>& ComplexStruct::my_array_octet() const -{ - return m_my_array_octet; -} - -/*! - * @brief This function returns a reference to member my_array_octet - * @return Reference to member my_array_octet - */ -std::array, 5>, 500>& ComplexStruct::my_array_octet() -{ - return m_my_array_octet; -} - - -/*! - * @brief This function copies the value in member my_octet_array_500 - * @param _my_octet_array_500 New value to be copied in member my_octet_array_500 - */ -void ComplexStruct::my_octet_array_500( - const MyOctetArray500& _my_octet_array_500) -{ - m_my_octet_array_500 = _my_octet_array_500; -} - -/*! - * @brief This function moves the value in member my_octet_array_500 - * @param _my_octet_array_500 New value to be moved in member my_octet_array_500 - */ -void ComplexStruct::my_octet_array_500( - MyOctetArray500&& _my_octet_array_500) -{ - m_my_octet_array_500 = std::move(_my_octet_array_500); -} - -/*! - * @brief This function returns a constant reference to member my_octet_array_500 - * @return Constant reference to member my_octet_array_500 - */ -const MyOctetArray500& ComplexStruct::my_octet_array_500() const -{ - return m_my_octet_array_500; -} - -/*! - * @brief This function returns a reference to member my_octet_array_500 - * @return Reference to member my_octet_array_500 - */ -MyOctetArray500& ComplexStruct::my_octet_array_500() -{ - return m_my_octet_array_500; -} - - -/*! - * @brief This function copies the value in member my_array_struct - * @param _my_array_struct New value to be copied in member my_array_struct - */ -void ComplexStruct::my_array_struct( - const std::array& _my_array_struct) -{ - m_my_array_struct = _my_array_struct; -} - -/*! - * @brief This function moves the value in member my_array_struct - * @param _my_array_struct New value to be moved in member my_array_struct - */ -void ComplexStruct::my_array_struct( - std::array&& _my_array_struct) -{ - m_my_array_struct = std::move(_my_array_struct); -} - -/*! - * @brief This function returns a constant reference to member my_array_struct - * @return Constant reference to member my_array_struct - */ -const std::array& ComplexStruct::my_array_struct() const -{ - return m_my_array_struct; -} - -/*! - * @brief This function returns a reference to member my_array_struct - * @return Reference to member my_array_struct - */ -std::array& ComplexStruct::my_array_struct() -{ - return m_my_array_struct; -} - - -/*! - * @brief This function copies the value in member my_map_octet_short - * @param _my_map_octet_short New value to be copied in member my_map_octet_short - */ -void ComplexStruct::my_map_octet_short( - const std::map& _my_map_octet_short) -{ - m_my_map_octet_short = _my_map_octet_short; -} - -/*! - * @brief This function moves the value in member my_map_octet_short - * @param _my_map_octet_short New value to be moved in member my_map_octet_short - */ -void ComplexStruct::my_map_octet_short( - std::map&& _my_map_octet_short) -{ - m_my_map_octet_short = std::move(_my_map_octet_short); -} - -/*! - * @brief This function returns a constant reference to member my_map_octet_short - * @return Constant reference to member my_map_octet_short - */ -const std::map& ComplexStruct::my_map_octet_short() const -{ - return m_my_map_octet_short; -} - -/*! - * @brief This function returns a reference to member my_map_octet_short - * @return Reference to member my_map_octet_short - */ -std::map& ComplexStruct::my_map_octet_short() -{ - return m_my_map_octet_short; -} - - -/*! - * @brief This function copies the value in member my_map_long_struct - * @param _my_map_long_struct New value to be copied in member my_map_long_struct - */ -void ComplexStruct::my_map_long_struct( - const std::map& _my_map_long_struct) -{ - m_my_map_long_struct = _my_map_long_struct; -} - -/*! - * @brief This function moves the value in member my_map_long_struct - * @param _my_map_long_struct New value to be moved in member my_map_long_struct - */ -void ComplexStruct::my_map_long_struct( - std::map&& _my_map_long_struct) -{ - m_my_map_long_struct = std::move(_my_map_long_struct); -} - -/*! - * @brief This function returns a constant reference to member my_map_long_struct - * @return Constant reference to member my_map_long_struct - */ -const std::map& ComplexStruct::my_map_long_struct() const -{ - return m_my_map_long_struct; -} - -/*! - * @brief This function returns a reference to member my_map_long_struct - * @return Reference to member my_map_long_struct - */ -std::map& ComplexStruct::my_map_long_struct() -{ - return m_my_map_long_struct; -} - - -/*! - * @brief This function copies the value in member my_map_long_seq_octet - * @param _my_map_long_seq_octet New value to be copied in member my_map_long_seq_octet - */ -void ComplexStruct::my_map_long_seq_octet( - const std::map>>& _my_map_long_seq_octet) -{ - m_my_map_long_seq_octet = _my_map_long_seq_octet; -} - -/*! - * @brief This function moves the value in member my_map_long_seq_octet - * @param _my_map_long_seq_octet New value to be moved in member my_map_long_seq_octet - */ -void ComplexStruct::my_map_long_seq_octet( - std::map>>&& _my_map_long_seq_octet) -{ - m_my_map_long_seq_octet = std::move(_my_map_long_seq_octet); -} - -/*! - * @brief This function returns a constant reference to member my_map_long_seq_octet - * @return Constant reference to member my_map_long_seq_octet - */ -const std::map>>& ComplexStruct::my_map_long_seq_octet() const -{ - return m_my_map_long_seq_octet; -} - -/*! - * @brief This function returns a reference to member my_map_long_seq_octet - * @return Reference to member my_map_long_seq_octet - */ -std::map>>& ComplexStruct::my_map_long_seq_octet() -{ - return m_my_map_long_seq_octet; -} - - -/*! - * @brief This function copies the value in member my_map_long_octet_array_500 - * @param _my_map_long_octet_array_500 New value to be copied in member my_map_long_octet_array_500 - */ -void ComplexStruct::my_map_long_octet_array_500( - const std::map& _my_map_long_octet_array_500) -{ - m_my_map_long_octet_array_500 = _my_map_long_octet_array_500; -} - -/*! - * @brief This function moves the value in member my_map_long_octet_array_500 - * @param _my_map_long_octet_array_500 New value to be moved in member my_map_long_octet_array_500 - */ -void ComplexStruct::my_map_long_octet_array_500( - std::map&& _my_map_long_octet_array_500) -{ - m_my_map_long_octet_array_500 = std::move(_my_map_long_octet_array_500); -} - -/*! - * @brief This function returns a constant reference to member my_map_long_octet_array_500 - * @return Constant reference to member my_map_long_octet_array_500 - */ -const std::map& ComplexStruct::my_map_long_octet_array_500() const -{ - return m_my_map_long_octet_array_500; -} - -/*! - * @brief This function returns a reference to member my_map_long_octet_array_500 - * @return Reference to member my_map_long_octet_array_500 - */ -std::map& ComplexStruct::my_map_long_octet_array_500() -{ - return m_my_map_long_octet_array_500; -} - - -/*! - * @brief This function copies the value in member my_map_long_lol_type - * @param _my_map_long_lol_type New value to be copied in member my_map_long_lol_type - */ -void ComplexStruct::my_map_long_lol_type( - const std::map>& _my_map_long_lol_type) -{ - m_my_map_long_lol_type = _my_map_long_lol_type; -} - -/*! - * @brief This function moves the value in member my_map_long_lol_type - * @param _my_map_long_lol_type New value to be moved in member my_map_long_lol_type - */ -void ComplexStruct::my_map_long_lol_type( - std::map>&& _my_map_long_lol_type) -{ - m_my_map_long_lol_type = std::move(_my_map_long_lol_type); -} - -/*! - * @brief This function returns a constant reference to member my_map_long_lol_type - * @return Constant reference to member my_map_long_lol_type - */ -const std::map>& ComplexStruct::my_map_long_lol_type() const -{ - return m_my_map_long_lol_type; -} - -/*! - * @brief This function returns a reference to member my_map_long_lol_type - * @return Reference to member my_map_long_lol_type - */ -std::map>& ComplexStruct::my_map_long_lol_type() -{ - return m_my_map_long_lol_type; -} - - -/*! - * @brief This function copies the value in member my_small_string_8 - * @param _my_small_string_8 New value to be copied in member my_small_string_8 - */ -void ComplexStruct::my_small_string_8( - const eprosima::fastrtps::fixed_string<128>& _my_small_string_8) -{ - m_my_small_string_8 = _my_small_string_8; -} - -/*! - * @brief This function moves the value in member my_small_string_8 - * @param _my_small_string_8 New value to be moved in member my_small_string_8 - */ -void ComplexStruct::my_small_string_8( - eprosima::fastrtps::fixed_string<128>&& _my_small_string_8) -{ - m_my_small_string_8 = std::move(_my_small_string_8); -} - -/*! - * @brief This function returns a constant reference to member my_small_string_8 - * @return Constant reference to member my_small_string_8 - */ -const eprosima::fastrtps::fixed_string<128>& ComplexStruct::my_small_string_8() const -{ - return m_my_small_string_8; -} - -/*! - * @brief This function returns a reference to member my_small_string_8 - * @return Reference to member my_small_string_8 - */ -eprosima::fastrtps::fixed_string<128>& ComplexStruct::my_small_string_8() -{ - return m_my_small_string_8; -} - - -/*! - * @brief This function copies the value in member my_large_string_8 - * @param _my_large_string_8 New value to be copied in member my_large_string_8 - */ -void ComplexStruct::my_large_string_8( - const eprosima::fastrtps::fixed_string<500>& _my_large_string_8) -{ - m_my_large_string_8 = _my_large_string_8; -} - -/*! - * @brief This function moves the value in member my_large_string_8 - * @param _my_large_string_8 New value to be moved in member my_large_string_8 - */ -void ComplexStruct::my_large_string_8( - eprosima::fastrtps::fixed_string<500>&& _my_large_string_8) -{ - m_my_large_string_8 = std::move(_my_large_string_8); -} - -/*! - * @brief This function returns a constant reference to member my_large_string_8 - * @return Constant reference to member my_large_string_8 - */ -const eprosima::fastrtps::fixed_string<500>& ComplexStruct::my_large_string_8() const -{ - return m_my_large_string_8; -} - -/*! - * @brief This function returns a reference to member my_large_string_8 - * @return Reference to member my_large_string_8 - */ -eprosima::fastrtps::fixed_string<500>& ComplexStruct::my_large_string_8() -{ - return m_my_large_string_8; -} - - -/*! - * @brief This function copies the value in member my_array_string - * @param _my_array_string New value to be copied in member my_array_string - */ -void ComplexStruct::my_array_string( - const std::array, 5>, 5>& _my_array_string) -{ - m_my_array_string = _my_array_string; -} - -/*! - * @brief This function moves the value in member my_array_string - * @param _my_array_string New value to be moved in member my_array_string - */ -void ComplexStruct::my_array_string( - std::array, 5>, 5>&& _my_array_string) -{ - m_my_array_string = std::move(_my_array_string); -} - -/*! - * @brief This function returns a constant reference to member my_array_string - * @return Constant reference to member my_array_string - */ -const std::array, 5>, 5>& ComplexStruct::my_array_string() const -{ - return m_my_array_string; -} - -/*! - * @brief This function returns a reference to member my_array_string - * @return Reference to member my_array_string - */ -std::array, 5>, 5>& ComplexStruct::my_array_string() -{ - return m_my_array_string; -} - - -/*! - * @brief This function copies the value in member multi_alias_array_42 - * @param _multi_alias_array_42 New value to be copied in member multi_alias_array_42 - */ -void ComplexStruct::multi_alias_array_42( - const MA3& _multi_alias_array_42) -{ - m_multi_alias_array_42 = _multi_alias_array_42; -} - -/*! - * @brief This function moves the value in member multi_alias_array_42 - * @param _multi_alias_array_42 New value to be moved in member multi_alias_array_42 - */ -void ComplexStruct::multi_alias_array_42( - MA3&& _multi_alias_array_42) -{ - m_multi_alias_array_42 = std::move(_multi_alias_array_42); -} - -/*! - * @brief This function returns a constant reference to member multi_alias_array_42 - * @return Constant reference to member multi_alias_array_42 - */ -const MA3& ComplexStruct::multi_alias_array_42() const -{ - return m_multi_alias_array_42; -} - -/*! - * @brief This function returns a reference to member multi_alias_array_42 - * @return Reference to member multi_alias_array_42 - */ -MA3& ComplexStruct::multi_alias_array_42() -{ - return m_multi_alias_array_42; -} - - -/*! - * @brief This function copies the value in member my_array_arrays - * @param _my_array_arrays New value to be copied in member my_array_arrays - */ -void ComplexStruct::my_array_arrays( - const std::array& _my_array_arrays) -{ - m_my_array_arrays = _my_array_arrays; -} - -/*! - * @brief This function moves the value in member my_array_arrays - * @param _my_array_arrays New value to be moved in member my_array_arrays - */ -void ComplexStruct::my_array_arrays( - std::array&& _my_array_arrays) -{ - m_my_array_arrays = std::move(_my_array_arrays); -} - -/*! - * @brief This function returns a constant reference to member my_array_arrays - * @return Constant reference to member my_array_arrays - */ -const std::array& ComplexStruct::my_array_arrays() const -{ - return m_my_array_arrays; -} - -/*! - * @brief This function returns a reference to member my_array_arrays - * @return Reference to member my_array_arrays - */ -std::array& ComplexStruct::my_array_arrays() -{ - return m_my_array_arrays; -} - - -/*! - * @brief This function copies the value in member my_sequences_array - * @param _my_sequences_array New value to be copied in member my_sequences_array - */ -void ComplexStruct::my_sequences_array( - const std::array& _my_sequences_array) -{ - m_my_sequences_array = _my_sequences_array; -} - -/*! - * @brief This function moves the value in member my_sequences_array - * @param _my_sequences_array New value to be moved in member my_sequences_array - */ -void ComplexStruct::my_sequences_array( - std::array&& _my_sequences_array) -{ - m_my_sequences_array = std::move(_my_sequences_array); -} - -/*! - * @brief This function returns a constant reference to member my_sequences_array - * @return Constant reference to member my_sequences_array - */ -const std::array& ComplexStruct::my_sequences_array() const -{ - return m_my_sequences_array; -} - -/*! - * @brief This function returns a reference to member my_sequences_array - * @return Reference to member my_sequences_array - */ -std::array& ComplexStruct::my_sequences_array() -{ - return m_my_sequences_array; -} - - - - - -MyUnion::MyUnion() -{ - m__d = ::A; - // BasicStruct m_basic - - // ComplexStruct m_complex - -} - -MyUnion::~MyUnion() -{ -} - -MyUnion::MyUnion( - const MyUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case ::A: - m_basic = x.m_basic; - break; - - - case ::B: - case ::C: - m_complex = x.m_complex; - break; - - default: - break; - } -} - -MyUnion::MyUnion( - MyUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case ::A: - m_basic = std::move(x.m_basic); - - break; - - - case ::B: - case ::C: - m_complex = std::move(x.m_complex); - - break; - - default: - break; - } -} - -MyUnion& MyUnion::operator =( - const MyUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case ::A: - m_basic = x.m_basic; - break; - - - case ::B: - case ::C: - m_complex = x.m_complex; - break; - - default: - break; - } - - return *this; -} - -MyUnion& MyUnion::operator =( - MyUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case ::A: - m_basic = std::move(x.m_basic); - - break; - - - case ::B: - case ::C: - m_complex = std::move(x.m_complex); - - break; - - default: - break; - } - - return *this; -} - -bool MyUnion::operator ==( - const MyUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case ::A: - return (m_basic == x.m_basic); - break; - - - case ::B: - case ::C: - return (m_complex == x.m_complex); - break; - - default: - break; - } - return false; -} - -bool MyUnion::operator !=( - const MyUnion& x) const -{ - return !(*this == x); -} - -void MyUnion::_d( - MyEnum __d) -{ - bool b = false; - - switch(m__d) - { - case ::A: - switch(__d) - { - case ::A: - b = true; - break; - default: - break; - } - break; - - - case ::B: - case ::C: - switch(__d) - { - case ::B: - case ::C: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -MyEnum MyUnion::_d() const -{ - return m__d; -} - -MyEnum& MyUnion::_d() -{ - return m__d; -} - -void MyUnion::basic( - const BasicStruct& _basic) -{ - m_basic = _basic; - m__d = ::A; - -} - -void MyUnion::basic( - BasicStruct&& _basic) -{ - m_basic = std::move(_basic); - m__d = ::A; - -} - -const BasicStruct& MyUnion::basic() const -{ - bool b = false; - - switch(m__d) - { - case ::A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_basic; -} - -BasicStruct& MyUnion::basic() -{ - bool b = false; - - switch(m__d) - { - case ::A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_basic; -} - - -void MyUnion::complex( - const ComplexStruct& _complex) -{ - m_complex = _complex; - m__d = ::B; - -} - -void MyUnion::complex( - ComplexStruct&& _complex) -{ - m_complex = std::move(_complex); - m__d = ::B; - -} - -const ComplexStruct& MyUnion::complex() const -{ - bool b = false; - - switch(m__d) - { - case ::B: - case ::C: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_complex; -} - -ComplexStruct& MyUnion::complex() -{ - bool b = false; - - switch(m__d) - { - case ::B: - case ::C: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_complex; -} - - -// TODO(Ricardo) Review -size_t MyUnion::getCdrSerializedSize( - const MyUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case ::A: - current_alignment += BasicStruct::getCdrSerializedSize(data.basic(), current_alignment); - - break; - - - case ::B: - case ::C: - current_alignment += ComplexStruct::getCdrSerializedSize(data.complex(), current_alignment); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void MyUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m__d; - - switch(m__d) - { - case ::A: - scdr << m_basic; - - break; - - - case ::B: - case ::C: - scdr << m_complex; - - break; - - default: - break; - } -} - -void MyUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m__d = (MyEnum)enum_value; - } - - - switch(m__d) - { - case ::A: - dcdr >> m_basic; - - - break; - - - case ::B: - case ::C: - dcdr >> m_complex; - - - break; - - default: - break; - } -} - - - - - -MyUnion2::MyUnion2() -{ - m__d = A; - // long m_uno - m_uno = 0; - // /type_d() m_imString - - // long m_tres - m_tres = 0; -} - -MyUnion2::~MyUnion2() -{ -} - -MyUnion2::MyUnion2( - const MyUnion2& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_uno = x.m_uno; - break; - - - case B: - m_imString = x.m_imString; - break; - - - case C: - m_tres = x.m_tres; - break; - - default: - break; - } -} - -MyUnion2::MyUnion2( - MyUnion2&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_uno = x.m_uno; - break; - - - case B: - m_imString = std::move(x.m_imString); - - break; - - - case C: - m_tres = x.m_tres; - break; - - default: - break; - } -} - -MyUnion2& MyUnion2::operator =( - const MyUnion2& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_uno = x.m_uno; - break; - - - case B: - m_imString = x.m_imString; - break; - - - case C: - m_tres = x.m_tres; - break; - - default: - break; - } - - return *this; -} - -MyUnion2& MyUnion2::operator =( - MyUnion2&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_uno = x.m_uno; - break; - - - case B: - m_imString = std::move(x.m_imString); - - break; - - - case C: - m_tres = x.m_tres; - break; - - default: - break; - } - - return *this; -} - -bool MyUnion2::operator ==( - const MyUnion2& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_uno == x.m_uno); - break; - - - case B: - return (m_imString == x.m_imString); - break; - - - case C: - return (m_tres == x.m_tres); - break; - - default: - break; - } - return false; -} - -bool MyUnion2::operator !=( - const MyUnion2& x) const -{ - return !(*this == x); -} - -void MyUnion2::_d( - uint8_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch(__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - - case C: - switch(__d) - { - case C: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -uint8_t MyUnion2::_d() const -{ - return m__d; -} - -uint8_t& MyUnion2::_d() -{ - return m__d; -} - -void MyUnion2::uno( - int32_t _uno) -{ - m_uno = _uno; - m__d = A; - -} - -int32_t MyUnion2::uno() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_uno; -} - -int32_t& MyUnion2::uno() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_uno; -} - - -void MyUnion2::imString( - const std::string& _imString) -{ - m_imString = _imString; - m__d = B; - -} - -void MyUnion2::imString( - std::string&& _imString) -{ - m_imString = std::move(_imString); - m__d = B; - -} - -const std::string& MyUnion2::imString() const -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_imString; -} - -std::string& MyUnion2::imString() -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_imString; -} - - -void MyUnion2::tres( - int32_t _tres) -{ - m_tres = _tres; - m__d = C; - -} - -int32_t MyUnion2::tres() const -{ - bool b = false; - - switch(m__d) - { - case C: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_tres; -} - -int32_t& MyUnion2::tres() -{ - bool b = false; - - switch(m__d) - { - case C: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_tres; -} - - -// TODO(Ricardo) Review -size_t MyUnion2::getCdrSerializedSize( - const MyUnion2& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - switch(data.m__d) - { - case A: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case B: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.imString().size() + 1; - - break; - - - case C: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void MyUnion2::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_uno; - - break; - - - case B: - scdr << m_imString.c_str(); - - break; - - - case C: - scdr << m_tres; - - break; - - default: - break; - } -} - -void MyUnion2::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_uno; - - - break; - - - case B: - dcdr >> m_imString; - - - break; - - - case C: - dcdr >> m_tres; - - - break; - - default: - break; - } -} - - - - - -CompleteStruct::CompleteStruct() -{ - // MyUnion m_my_union - - // MyUnion2 m_my_union_2 - - - // Just to register all known types - registerTestTypes(); -} - -CompleteStruct::~CompleteStruct() -{ -} - -CompleteStruct::CompleteStruct( - const CompleteStruct& x) -{ - m_my_union = x.m_my_union; - - - m_my_union_2 = x.m_my_union_2; - -} - -CompleteStruct::CompleteStruct( - CompleteStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - - m_my_union_2 = std::move(x.m_my_union_2); - -} - -CompleteStruct& CompleteStruct::operator =( - const CompleteStruct& x) -{ - m_my_union = x.m_my_union; - - - m_my_union_2 = x.m_my_union_2; - - return *this; -} - -CompleteStruct& CompleteStruct::operator =( - CompleteStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - - m_my_union_2 = std::move(x.m_my_union_2); - - return *this; -} - -bool CompleteStruct::operator ==( - const CompleteStruct& x) const -{ - return (m_my_union == x.m_my_union && - m_my_union_2 == x.m_my_union_2); -} - -bool CompleteStruct::operator !=( - const CompleteStruct& x) const -{ - return !(*this == x); -} - -size_t CompleteStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return CompleteStruct_max_cdr_typesize; -} - -size_t CompleteStruct::getCdrSerializedSize( - const CompleteStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += MyUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - current_alignment += MyUnion2::getCdrSerializedSize(data.my_union_2(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void CompleteStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - - scdr << m_my_union_2; - -} - -void CompleteStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - - - dcdr >> m_my_union_2; - - -} - - -bool CompleteStruct::isKeyDefined() -{ - return false; -} - -void CompleteStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void CompleteStruct::my_union( - const MyUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void CompleteStruct::my_union( - MyUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const MyUnion& CompleteStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -MyUnion& CompleteStruct::my_union() -{ - return m_my_union; -} - - -/*! - * @brief This function copies the value in member my_union_2 - * @param _my_union_2 New value to be copied in member my_union_2 - */ -void CompleteStruct::my_union_2( - const MyUnion2& _my_union_2) -{ - m_my_union_2 = _my_union_2; -} - -/*! - * @brief This function moves the value in member my_union_2 - * @param _my_union_2 New value to be moved in member my_union_2 - */ -void CompleteStruct::my_union_2( - MyUnion2&& _my_union_2) -{ - m_my_union_2 = std::move(_my_union_2); -} - -/*! - * @brief This function returns a constant reference to member my_union_2 - * @return Constant reference to member my_union_2 - */ -const MyUnion2& CompleteStruct::my_union_2() const -{ - return m_my_union_2; -} - -/*! - * @brief This function returns a reference to member my_union_2 - * @return Reference to member my_union_2 - */ -MyUnion2& CompleteStruct::my_union_2() -{ - return m_my_union_2; -} - - - - - -KeyedStruct::KeyedStruct() -{ - // octet m_key - m_key = 0; - // BasicStruct m_basic - - - // Just to register all known types - registerTestTypes(); -} - -KeyedStruct::~KeyedStruct() -{ -} - -KeyedStruct::KeyedStruct( - const KeyedStruct& x) -{ - m_key = x.m_key; - - - m_basic = x.m_basic; - -} - -KeyedStruct::KeyedStruct( - KeyedStruct&& x) noexcept -{ - m_key = x.m_key; - - - m_basic = std::move(x.m_basic); - -} - -KeyedStruct& KeyedStruct::operator =( - const KeyedStruct& x) -{ - m_key = x.m_key; - - - m_basic = x.m_basic; - - return *this; -} - -KeyedStruct& KeyedStruct::operator =( - KeyedStruct&& x) noexcept -{ - m_key = x.m_key; - - - m_basic = std::move(x.m_basic); - - return *this; -} - -bool KeyedStruct::operator ==( - const KeyedStruct& x) const -{ - return (m_key == x.m_key && - m_basic == x.m_basic); -} - -bool KeyedStruct::operator !=( - const KeyedStruct& x) const -{ - return !(*this == x); -} - -size_t KeyedStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return KeyedStruct_max_cdr_typesize; -} - -size_t KeyedStruct::getCdrSerializedSize( - const KeyedStruct& 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 += BasicStruct::getCdrSerializedSize(data.basic(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void KeyedStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_key; - - scdr << m_basic; - -} - -void KeyedStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_key; - - - - dcdr >> m_basic; - - -} - - -bool KeyedStruct::isKeyDefined() -{ - return true; -} - -void KeyedStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - - scdr << m_key; - - -} - -/*! - * @brief This function sets a value in member key - * @param _key New value for member key - */ -void KeyedStruct::key( - uint8_t _key) -{ - m_key = _key; -} - -/*! - * @brief This function returns the value of member key - * @return Value of member key - */ -uint8_t KeyedStruct::key() const -{ - return m_key; -} - -/*! - * @brief This function returns a reference to member key - * @return Reference to member key - */ -uint8_t& KeyedStruct::key() -{ - return m_key; -} - - -/*! - * @brief This function copies the value in member basic - * @param _basic New value to be copied in member basic - */ -void KeyedStruct::basic( - const BasicStruct& _basic) -{ - m_basic = _basic; -} - -/*! - * @brief This function moves the value in member basic - * @param _basic New value to be moved in member basic - */ -void KeyedStruct::basic( - BasicStruct&& _basic) -{ - m_basic = std::move(_basic); -} - -/*! - * @brief This function returns a constant reference to member basic - * @return Constant reference to member basic - */ -const BasicStruct& KeyedStruct::basic() const -{ - return m_basic; -} - -/*! - * @brief This function returns a reference to member basic - * @return Reference to member basic - */ -BasicStruct& KeyedStruct::basic() -{ - return m_basic; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/unittest/dynamic_types/idl/Testv1.h b/test/unittest/dynamic_types/idl/Testv1.h deleted file mode 100644 index 6c0a546aa8f..00000000000 --- a/test/unittest/dynamic_types/idl/Testv1.h +++ /dev/null @@ -1,1872 +0,0 @@ -// 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.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_TEST_H_ -#define _FAST_DDS_GENERATED_TEST_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(TEST_SOURCE) -#define TEST_DllAPI __declspec( dllexport ) -#else -#define TEST_DllAPI __declspec( dllimport ) -#endif // TEST_SOURCE -#else -#define TEST_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define TEST_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - -/*! - * @brief This class represents the enumeration MyEnum defined by the user in the IDL file. - * @ingroup Test - */ -enum MyEnum : uint32_t -{ - A, - B, - C -}; -typedef MyEnum MyAliasEnum; - -typedef MyAliasEnum MyAliasEnum2; - -typedef MyAliasEnum2 MyAliasEnum3; - - - -/*! - * @brief This class represents the structure BasicStruct defined by the user in the IDL file. - * @ingroup Test - */ -class BasicStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BasicStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BasicStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BasicStruct that will be copied. - */ - eProsima_user_DllExport BasicStruct( - const BasicStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BasicStruct that will be copied. - */ - eProsima_user_DllExport BasicStruct( - BasicStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BasicStruct that will be copied. - */ - eProsima_user_DllExport BasicStruct& operator =( - const BasicStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BasicStruct that will be copied. - */ - eProsima_user_DllExport BasicStruct& operator =( - BasicStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BasicStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BasicStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BasicStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BasicStruct& x) const; - - /*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ - eProsima_user_DllExport void my_bool( - bool _my_bool); - - /*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ - eProsima_user_DllExport bool my_bool() const; - - /*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ - eProsima_user_DllExport bool& my_bool(); - - - /*! - * @brief This function sets a value in member my_octet - * @param _my_octet New value for member my_octet - */ - eProsima_user_DllExport void my_octet( - uint8_t _my_octet); - - /*! - * @brief This function returns the value of member my_octet - * @return Value of member my_octet - */ - eProsima_user_DllExport uint8_t my_octet() const; - - /*! - * @brief This function returns a reference to member my_octet - * @return Reference to member my_octet - */ - eProsima_user_DllExport uint8_t& my_octet(); - - - /*! - * @brief This function sets a value in member my_int16 - * @param _my_int16 New value for member my_int16 - */ - eProsima_user_DllExport void my_int16( - int16_t _my_int16); - - /*! - * @brief This function returns the value of member my_int16 - * @return Value of member my_int16 - */ - eProsima_user_DllExport int16_t my_int16() const; - - /*! - * @brief This function returns a reference to member my_int16 - * @return Reference to member my_int16 - */ - eProsima_user_DllExport int16_t& my_int16(); - - - /*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ - eProsima_user_DllExport void my_int32( - int32_t _my_int32); - - /*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ - eProsima_user_DllExport int32_t my_int32() const; - - /*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ - eProsima_user_DllExport int32_t& my_int32(); - - - /*! - * @brief This function sets a value in member my_int64 - * @param _my_int64 New value for member my_int64 - */ - eProsima_user_DllExport void my_int64( - int64_t _my_int64); - - /*! - * @brief This function returns the value of member my_int64 - * @return Value of member my_int64 - */ - eProsima_user_DllExport int64_t my_int64() const; - - /*! - * @brief This function returns a reference to member my_int64 - * @return Reference to member my_int64 - */ - eProsima_user_DllExport int64_t& my_int64(); - - - /*! - * @brief This function sets a value in member my_uint16 - * @param _my_uint16 New value for member my_uint16 - */ - eProsima_user_DllExport void my_uint16( - uint16_t _my_uint16); - - /*! - * @brief This function returns the value of member my_uint16 - * @return Value of member my_uint16 - */ - eProsima_user_DllExport uint16_t my_uint16() const; - - /*! - * @brief This function returns a reference to member my_uint16 - * @return Reference to member my_uint16 - */ - eProsima_user_DllExport uint16_t& my_uint16(); - - - /*! - * @brief This function sets a value in member my_uint32 - * @param _my_uint32 New value for member my_uint32 - */ - eProsima_user_DllExport void my_uint32( - uint32_t _my_uint32); - - /*! - * @brief This function returns the value of member my_uint32 - * @return Value of member my_uint32 - */ - eProsima_user_DllExport uint32_t my_uint32() const; - - /*! - * @brief This function returns a reference to member my_uint32 - * @return Reference to member my_uint32 - */ - eProsima_user_DllExport uint32_t& my_uint32(); - - - /*! - * @brief This function sets a value in member my_uint64 - * @param _my_uint64 New value for member my_uint64 - */ - eProsima_user_DllExport void my_uint64( - uint64_t _my_uint64); - - /*! - * @brief This function returns the value of member my_uint64 - * @return Value of member my_uint64 - */ - eProsima_user_DllExport uint64_t my_uint64() const; - - /*! - * @brief This function returns a reference to member my_uint64 - * @return Reference to member my_uint64 - */ - eProsima_user_DllExport uint64_t& my_uint64(); - - - /*! - * @brief This function sets a value in member my_float32 - * @param _my_float32 New value for member my_float32 - */ - eProsima_user_DllExport void my_float32( - float _my_float32); - - /*! - * @brief This function returns the value of member my_float32 - * @return Value of member my_float32 - */ - eProsima_user_DllExport float my_float32() const; - - /*! - * @brief This function returns a reference to member my_float32 - * @return Reference to member my_float32 - */ - eProsima_user_DllExport float& my_float32(); - - - /*! - * @brief This function sets a value in member my_float64 - * @param _my_float64 New value for member my_float64 - */ - eProsima_user_DllExport void my_float64( - double _my_float64); - - /*! - * @brief This function returns the value of member my_float64 - * @return Value of member my_float64 - */ - eProsima_user_DllExport double my_float64() const; - - /*! - * @brief This function returns a reference to member my_float64 - * @return Reference to member my_float64 - */ - eProsima_user_DllExport double& my_float64(); - - - /*! - * @brief This function sets a value in member my_float128 - * @param _my_float128 New value for member my_float128 - */ - eProsima_user_DllExport void my_float128( - long double _my_float128); - - /*! - * @brief This function returns the value of member my_float128 - * @return Value of member my_float128 - */ - eProsima_user_DllExport long double my_float128() const; - - /*! - * @brief This function returns a reference to member my_float128 - * @return Reference to member my_float128 - */ - eProsima_user_DllExport long double& my_float128(); - - - /*! - * @brief This function sets a value in member my_char - * @param _my_char New value for member my_char - */ - eProsima_user_DllExport void my_char( - char _my_char); - - /*! - * @brief This function returns the value of member my_char - * @return Value of member my_char - */ - eProsima_user_DllExport char my_char() const; - - /*! - * @brief This function returns a reference to member my_char - * @return Reference to member my_char - */ - eProsima_user_DllExport char& my_char(); - - - /*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ - eProsima_user_DllExport void my_string( - const std::string& _my_string); - - /*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ - eProsima_user_DllExport void my_string( - std::string&& _my_string); - - /*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ - eProsima_user_DllExport const std::string& my_string() const; - - /*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ - eProsima_user_DllExport std::string& my_string(); - - - /*! - * @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 BasicStruct& 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 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: - - bool m_my_bool; - uint8_t m_my_octet; - int16_t m_my_int16; - int32_t m_my_int32; - int64_t m_my_int64; - uint16_t m_my_uint16; - uint32_t m_my_uint32; - uint64_t m_my_uint64; - float m_my_float32; - double m_my_float64; - long double m_my_float128; - char m_my_char; - std::string m_my_string; - -}; - -typedef std::array MyOctetArray500; - -typedef std::array BSAlias5; - -typedef std::array MA3; - -typedef std::array MyMiniArray; - - - -typedef std::vector MySequenceLong; - - - -/*! - * @brief This class represents the structure ComplexStruct defined by the user in the IDL file. - * @ingroup Test - */ -class ComplexStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ComplexStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ComplexStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ComplexStruct that will be copied. - */ - eProsima_user_DllExport ComplexStruct( - const ComplexStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ComplexStruct that will be copied. - */ - eProsima_user_DllExport ComplexStruct( - ComplexStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ComplexStruct that will be copied. - */ - eProsima_user_DllExport ComplexStruct& operator =( - const ComplexStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ComplexStruct that will be copied. - */ - eProsima_user_DllExport ComplexStruct& operator =( - ComplexStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ComplexStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ComplexStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ComplexStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ComplexStruct& x) const; - - /*! - * @brief This function sets a value in member my_octet - * @param _my_octet New value for member my_octet - */ - eProsima_user_DllExport void my_octet( - uint8_t _my_octet); - - /*! - * @brief This function returns the value of member my_octet - * @return Value of member my_octet - */ - eProsima_user_DllExport uint8_t my_octet() const; - - /*! - * @brief This function returns a reference to member my_octet - * @return Reference to member my_octet - */ - eProsima_user_DllExport uint8_t& my_octet(); - - - /*! - * @brief This function copies the value in member my_basic_struct - * @param _my_basic_struct New value to be copied in member my_basic_struct - */ - eProsima_user_DllExport void my_basic_struct( - const BasicStruct& _my_basic_struct); - - /*! - * @brief This function moves the value in member my_basic_struct - * @param _my_basic_struct New value to be moved in member my_basic_struct - */ - eProsima_user_DllExport void my_basic_struct( - BasicStruct&& _my_basic_struct); - - /*! - * @brief This function returns a constant reference to member my_basic_struct - * @return Constant reference to member my_basic_struct - */ - eProsima_user_DllExport const BasicStruct& my_basic_struct() const; - - /*! - * @brief This function returns a reference to member my_basic_struct - * @return Reference to member my_basic_struct - */ - eProsima_user_DllExport BasicStruct& my_basic_struct(); - - - /*! - * @brief This function sets a value in member my_alias_enum - * @param _my_alias_enum New value for member my_alias_enum - */ - eProsima_user_DllExport void my_alias_enum( - MyAliasEnum _my_alias_enum); - - /*! - * @brief This function returns the value of member my_alias_enum - * @return Value of member my_alias_enum - */ - eProsima_user_DllExport MyAliasEnum my_alias_enum() const; - - /*! - * @brief This function returns a reference to member my_alias_enum - * @return Reference to member my_alias_enum - */ - eProsima_user_DllExport MyAliasEnum& my_alias_enum(); - - - /*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ - eProsima_user_DllExport void my_enum( - MyEnum _my_enum); - - /*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ - eProsima_user_DllExport MyEnum my_enum() const; - - /*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ - eProsima_user_DllExport MyEnum& my_enum(); - - - /*! - * @brief This function copies the value in member my_sequence_octet - * @param _my_sequence_octet New value to be copied in member my_sequence_octet - */ - eProsima_user_DllExport void my_sequence_octet( - const std::vector& _my_sequence_octet); - - /*! - * @brief This function moves the value in member my_sequence_octet - * @param _my_sequence_octet New value to be moved in member my_sequence_octet - */ - eProsima_user_DllExport void my_sequence_octet( - std::vector&& _my_sequence_octet); - - /*! - * @brief This function returns a constant reference to member my_sequence_octet - * @return Constant reference to member my_sequence_octet - */ - eProsima_user_DllExport const std::vector& my_sequence_octet() const; - - /*! - * @brief This function returns a reference to member my_sequence_octet - * @return Reference to member my_sequence_octet - */ - eProsima_user_DllExport std::vector& my_sequence_octet(); - - - /*! - * @brief This function copies the value in member my_sequence_struct - * @param _my_sequence_struct New value to be copied in member my_sequence_struct - */ - eProsima_user_DllExport void my_sequence_struct( - const std::vector& _my_sequence_struct); - - /*! - * @brief This function moves the value in member my_sequence_struct - * @param _my_sequence_struct New value to be moved in member my_sequence_struct - */ - eProsima_user_DllExport void my_sequence_struct( - std::vector&& _my_sequence_struct); - - /*! - * @brief This function returns a constant reference to member my_sequence_struct - * @return Constant reference to member my_sequence_struct - */ - eProsima_user_DllExport const std::vector& my_sequence_struct() const; - - /*! - * @brief This function returns a reference to member my_sequence_struct - * @return Reference to member my_sequence_struct - */ - eProsima_user_DllExport std::vector& my_sequence_struct(); - - - /*! - * @brief This function copies the value in member my_array_octet - * @param _my_array_octet New value to be copied in member my_array_octet - */ - eProsima_user_DllExport void my_array_octet( - const std::array, 5>, 500>& _my_array_octet); - - /*! - * @brief This function moves the value in member my_array_octet - * @param _my_array_octet New value to be moved in member my_array_octet - */ - eProsima_user_DllExport void my_array_octet( - std::array, 5>, 500>&& _my_array_octet); - - /*! - * @brief This function returns a constant reference to member my_array_octet - * @return Constant reference to member my_array_octet - */ - eProsima_user_DllExport const std::array, 5>, 500>& my_array_octet() const; - - /*! - * @brief This function returns a reference to member my_array_octet - * @return Reference to member my_array_octet - */ - eProsima_user_DllExport std::array, 5>, 500>& my_array_octet(); - - - /*! - * @brief This function copies the value in member my_octet_array_500 - * @param _my_octet_array_500 New value to be copied in member my_octet_array_500 - */ - eProsima_user_DllExport void my_octet_array_500( - const MyOctetArray500& _my_octet_array_500); - - /*! - * @brief This function moves the value in member my_octet_array_500 - * @param _my_octet_array_500 New value to be moved in member my_octet_array_500 - */ - eProsima_user_DllExport void my_octet_array_500( - MyOctetArray500&& _my_octet_array_500); - - /*! - * @brief This function returns a constant reference to member my_octet_array_500 - * @return Constant reference to member my_octet_array_500 - */ - eProsima_user_DllExport const MyOctetArray500& my_octet_array_500() const; - - /*! - * @brief This function returns a reference to member my_octet_array_500 - * @return Reference to member my_octet_array_500 - */ - eProsima_user_DllExport MyOctetArray500& my_octet_array_500(); - - - /*! - * @brief This function copies the value in member my_array_struct - * @param _my_array_struct New value to be copied in member my_array_struct - */ - eProsima_user_DllExport void my_array_struct( - const std::array& _my_array_struct); - - /*! - * @brief This function moves the value in member my_array_struct - * @param _my_array_struct New value to be moved in member my_array_struct - */ - eProsima_user_DllExport void my_array_struct( - std::array&& _my_array_struct); - - /*! - * @brief This function returns a constant reference to member my_array_struct - * @return Constant reference to member my_array_struct - */ - eProsima_user_DllExport const std::array& my_array_struct() const; - - /*! - * @brief This function returns a reference to member my_array_struct - * @return Reference to member my_array_struct - */ - eProsima_user_DllExport std::array& my_array_struct(); - - - /*! - * @brief This function copies the value in member my_map_octet_short - * @param _my_map_octet_short New value to be copied in member my_map_octet_short - */ - eProsima_user_DllExport void my_map_octet_short( - const std::map& _my_map_octet_short); - - /*! - * @brief This function moves the value in member my_map_octet_short - * @param _my_map_octet_short New value to be moved in member my_map_octet_short - */ - eProsima_user_DllExport void my_map_octet_short( - std::map&& _my_map_octet_short); - - /*! - * @brief This function returns a constant reference to member my_map_octet_short - * @return Constant reference to member my_map_octet_short - */ - eProsima_user_DllExport const std::map& my_map_octet_short() const; - - /*! - * @brief This function returns a reference to member my_map_octet_short - * @return Reference to member my_map_octet_short - */ - eProsima_user_DllExport std::map& my_map_octet_short(); - - - /*! - * @brief This function copies the value in member my_map_long_struct - * @param _my_map_long_struct New value to be copied in member my_map_long_struct - */ - eProsima_user_DllExport void my_map_long_struct( - const std::map& _my_map_long_struct); - - /*! - * @brief This function moves the value in member my_map_long_struct - * @param _my_map_long_struct New value to be moved in member my_map_long_struct - */ - eProsima_user_DllExport void my_map_long_struct( - std::map&& _my_map_long_struct); - - /*! - * @brief This function returns a constant reference to member my_map_long_struct - * @return Constant reference to member my_map_long_struct - */ - eProsima_user_DllExport const std::map& my_map_long_struct() const; - - /*! - * @brief This function returns a reference to member my_map_long_struct - * @return Reference to member my_map_long_struct - */ - eProsima_user_DllExport std::map& my_map_long_struct(); - - - /*! - * @brief This function copies the value in member my_map_long_seq_octet - * @param _my_map_long_seq_octet New value to be copied in member my_map_long_seq_octet - */ - eProsima_user_DllExport void my_map_long_seq_octet( - const std::map>>& _my_map_long_seq_octet); - - /*! - * @brief This function moves the value in member my_map_long_seq_octet - * @param _my_map_long_seq_octet New value to be moved in member my_map_long_seq_octet - */ - eProsima_user_DllExport void my_map_long_seq_octet( - std::map>>&& _my_map_long_seq_octet); - - /*! - * @brief This function returns a constant reference to member my_map_long_seq_octet - * @return Constant reference to member my_map_long_seq_octet - */ - eProsima_user_DllExport const std::map>>& my_map_long_seq_octet() const; - - /*! - * @brief This function returns a reference to member my_map_long_seq_octet - * @return Reference to member my_map_long_seq_octet - */ - eProsima_user_DllExport std::map>>& my_map_long_seq_octet(); - - - /*! - * @brief This function copies the value in member my_map_long_octet_array_500 - * @param _my_map_long_octet_array_500 New value to be copied in member my_map_long_octet_array_500 - */ - eProsima_user_DllExport void my_map_long_octet_array_500( - const std::map& _my_map_long_octet_array_500); - - /*! - * @brief This function moves the value in member my_map_long_octet_array_500 - * @param _my_map_long_octet_array_500 New value to be moved in member my_map_long_octet_array_500 - */ - eProsima_user_DllExport void my_map_long_octet_array_500( - std::map&& _my_map_long_octet_array_500); - - /*! - * @brief This function returns a constant reference to member my_map_long_octet_array_500 - * @return Constant reference to member my_map_long_octet_array_500 - */ - eProsima_user_DllExport const std::map& my_map_long_octet_array_500() const; - - /*! - * @brief This function returns a reference to member my_map_long_octet_array_500 - * @return Reference to member my_map_long_octet_array_500 - */ - eProsima_user_DllExport std::map& my_map_long_octet_array_500(); - - - /*! - * @brief This function copies the value in member my_map_long_lol_type - * @param _my_map_long_lol_type New value to be copied in member my_map_long_lol_type - */ - eProsima_user_DllExport void my_map_long_lol_type( - const std::map>& _my_map_long_lol_type); - - /*! - * @brief This function moves the value in member my_map_long_lol_type - * @param _my_map_long_lol_type New value to be moved in member my_map_long_lol_type - */ - eProsima_user_DllExport void my_map_long_lol_type( - std::map>&& _my_map_long_lol_type); - - /*! - * @brief This function returns a constant reference to member my_map_long_lol_type - * @return Constant reference to member my_map_long_lol_type - */ - eProsima_user_DllExport const std::map>& my_map_long_lol_type() const; - - /*! - * @brief This function returns a reference to member my_map_long_lol_type - * @return Reference to member my_map_long_lol_type - */ - eProsima_user_DllExport std::map>& my_map_long_lol_type(); - - - /*! - * @brief This function copies the value in member my_small_string_8 - * @param _my_small_string_8 New value to be copied in member my_small_string_8 - */ - eProsima_user_DllExport void my_small_string_8( - const eprosima::fastrtps::fixed_string<128>& _my_small_string_8); - - /*! - * @brief This function moves the value in member my_small_string_8 - * @param _my_small_string_8 New value to be moved in member my_small_string_8 - */ - eProsima_user_DllExport void my_small_string_8( - eprosima::fastrtps::fixed_string<128>&& _my_small_string_8); - - /*! - * @brief This function returns a constant reference to member my_small_string_8 - * @return Constant reference to member my_small_string_8 - */ - eProsima_user_DllExport const eprosima::fastrtps::fixed_string<128>& my_small_string_8() const; - - /*! - * @brief This function returns a reference to member my_small_string_8 - * @return Reference to member my_small_string_8 - */ - eProsima_user_DllExport eprosima::fastrtps::fixed_string<128>& my_small_string_8(); - - - /*! - * @brief This function copies the value in member my_large_string_8 - * @param _my_large_string_8 New value to be copied in member my_large_string_8 - */ - eProsima_user_DllExport void my_large_string_8( - const eprosima::fastrtps::fixed_string<500>& _my_large_string_8); - - /*! - * @brief This function moves the value in member my_large_string_8 - * @param _my_large_string_8 New value to be moved in member my_large_string_8 - */ - eProsima_user_DllExport void my_large_string_8( - eprosima::fastrtps::fixed_string<500>&& _my_large_string_8); - - /*! - * @brief This function returns a constant reference to member my_large_string_8 - * @return Constant reference to member my_large_string_8 - */ - eProsima_user_DllExport const eprosima::fastrtps::fixed_string<500>& my_large_string_8() const; - - /*! - * @brief This function returns a reference to member my_large_string_8 - * @return Reference to member my_large_string_8 - */ - eProsima_user_DllExport eprosima::fastrtps::fixed_string<500>& my_large_string_8(); - - - /*! - * @brief This function copies the value in member my_array_string - * @param _my_array_string New value to be copied in member my_array_string - */ - eProsima_user_DllExport void my_array_string( - const std::array, 5>, 5>& _my_array_string); - - /*! - * @brief This function moves the value in member my_array_string - * @param _my_array_string New value to be moved in member my_array_string - */ - eProsima_user_DllExport void my_array_string( - std::array, 5>, 5>&& _my_array_string); - - /*! - * @brief This function returns a constant reference to member my_array_string - * @return Constant reference to member my_array_string - */ - eProsima_user_DllExport const std::array, 5>, 5>& my_array_string() const; - - /*! - * @brief This function returns a reference to member my_array_string - * @return Reference to member my_array_string - */ - eProsima_user_DllExport std::array, 5>, 5>& my_array_string(); - - - /*! - * @brief This function copies the value in member multi_alias_array_42 - * @param _multi_alias_array_42 New value to be copied in member multi_alias_array_42 - */ - eProsima_user_DllExport void multi_alias_array_42( - const MA3& _multi_alias_array_42); - - /*! - * @brief This function moves the value in member multi_alias_array_42 - * @param _multi_alias_array_42 New value to be moved in member multi_alias_array_42 - */ - eProsima_user_DllExport void multi_alias_array_42( - MA3&& _multi_alias_array_42); - - /*! - * @brief This function returns a constant reference to member multi_alias_array_42 - * @return Constant reference to member multi_alias_array_42 - */ - eProsima_user_DllExport const MA3& multi_alias_array_42() const; - - /*! - * @brief This function returns a reference to member multi_alias_array_42 - * @return Reference to member multi_alias_array_42 - */ - eProsima_user_DllExport MA3& multi_alias_array_42(); - - - /*! - * @brief This function copies the value in member my_array_arrays - * @param _my_array_arrays New value to be copied in member my_array_arrays - */ - eProsima_user_DllExport void my_array_arrays( - const std::array& _my_array_arrays); - - /*! - * @brief This function moves the value in member my_array_arrays - * @param _my_array_arrays New value to be moved in member my_array_arrays - */ - eProsima_user_DllExport void my_array_arrays( - std::array&& _my_array_arrays); - - /*! - * @brief This function returns a constant reference to member my_array_arrays - * @return Constant reference to member my_array_arrays - */ - eProsima_user_DllExport const std::array& my_array_arrays() const; - - /*! - * @brief This function returns a reference to member my_array_arrays - * @return Reference to member my_array_arrays - */ - eProsima_user_DllExport std::array& my_array_arrays(); - - - /*! - * @brief This function copies the value in member my_sequences_array - * @param _my_sequences_array New value to be copied in member my_sequences_array - */ - eProsima_user_DllExport void my_sequences_array( - const std::array& _my_sequences_array); - - /*! - * @brief This function moves the value in member my_sequences_array - * @param _my_sequences_array New value to be moved in member my_sequences_array - */ - eProsima_user_DllExport void my_sequences_array( - std::array&& _my_sequences_array); - - /*! - * @brief This function returns a constant reference to member my_sequences_array - * @return Constant reference to member my_sequences_array - */ - eProsima_user_DllExport const std::array& my_sequences_array() const; - - /*! - * @brief This function returns a reference to member my_sequences_array - * @return Reference to member my_sequences_array - */ - eProsima_user_DllExport std::array& my_sequences_array(); - - - /*! - * @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 ComplexStruct& 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 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: - - uint8_t m_my_octet; - BasicStruct m_my_basic_struct; - MyAliasEnum m_my_alias_enum; - MyEnum m_my_enum; - std::vector m_my_sequence_octet; - std::vector m_my_sequence_struct; - std::array, 5>, 500> m_my_array_octet; - MyOctetArray500 m_my_octet_array_500; - std::array m_my_array_struct; - std::map m_my_map_octet_short; - std::map m_my_map_long_struct; - std::map>> m_my_map_long_seq_octet; - std::map m_my_map_long_octet_array_500; - std::map> m_my_map_long_lol_type; - eprosima::fastrtps::fixed_string<128> m_my_small_string_8; - eprosima::fastrtps::fixed_string<500> m_my_large_string_8; - std::array, 5>, 5> m_my_array_string; - MA3 m_multi_alias_array_42; - std::array m_my_array_arrays; - std::array m_my_sequences_array; - -}; - - - -/*! - * @brief This class represents the union MyUnion defined by the user in the IDL file. - * @ingroup Test - */ -class MyUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MyUnion that will be copied. - */ - eProsima_user_DllExport MyUnion( - const MyUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MyUnion that will be copied. - */ - eProsima_user_DllExport MyUnion( - MyUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MyUnion that will be copied. - */ - eProsima_user_DllExport MyUnion& operator =( - const MyUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MyUnion that will be copied. - */ - eProsima_user_DllExport MyUnion& operator =( - MyUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MyUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x MyUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - MyEnum __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport MyEnum _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport MyEnum& _d(); - - /*! - * @brief This function copies the value in member basic - * @param _basic New value to be copied in member basic - */ - eProsima_user_DllExport void basic( - const BasicStruct& _basic); - - /*! - * @brief This function moves the value in member basic - * @param _basic New value to be moved in member basic - */ - eProsima_user_DllExport void basic( - BasicStruct&& _basic); - - /*! - * @brief This function returns a constant reference to member basic - * @return Constant reference to member basic - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const BasicStruct& basic() const; - - /*! - * @brief This function returns a reference to member basic - * @return Reference to member basic - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport BasicStruct& basic(); - - - /*! - * @brief This function copies the value in member complex - * @param _complex New value to be copied in member complex - */ - eProsima_user_DllExport void complex( - const ComplexStruct& _complex); - - /*! - * @brief This function moves the value in member complex - * @param _complex New value to be moved in member complex - */ - eProsima_user_DllExport void complex( - ComplexStruct&& _complex); - - /*! - * @brief This function returns a constant reference to member complex - * @return Constant reference to member complex - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const ComplexStruct& complex() const; - - /*! - * @brief This function returns a reference to member complex - * @return Reference to member complex - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport ComplexStruct& complex(); - - - /*! - * @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 MyUnion& 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); - - - - - -private: - - MyEnum m__d; - - BasicStruct m_basic; - ComplexStruct m_complex; -}; - - - -/*! - * @brief This class represents the union MyUnion2 defined by the user in the IDL file. - * @ingroup Test - */ -class MyUnion2 -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyUnion2(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyUnion2(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MyUnion2 that will be copied. - */ - eProsima_user_DllExport MyUnion2( - const MyUnion2& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MyUnion2 that will be copied. - */ - eProsima_user_DllExport MyUnion2( - MyUnion2&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MyUnion2 that will be copied. - */ - eProsima_user_DllExport MyUnion2& operator =( - const MyUnion2& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MyUnion2 that will be copied. - */ - eProsima_user_DllExport MyUnion2& operator =( - MyUnion2&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MyUnion2 object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyUnion2& x) const; - - /*! - * @brief Comparison operator. - * @param x MyUnion2 object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyUnion2& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - uint8_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport uint8_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport uint8_t& _d(); - - /*! - * @brief This function sets a value in member uno - * @param _uno New value for member uno - */ - eProsima_user_DllExport void uno( - int32_t _uno); - - /*! - * @brief This function returns the value of member uno - * @return Value of member uno - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t uno() const; - - /*! - * @brief This function returns a reference to member uno - * @return Reference to member uno - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& uno(); - - - /*! - * @brief This function copies the value in member imString - * @param _imString New value to be copied in member imString - */ - eProsima_user_DllExport void imString( - const std::string& _imString); - - /*! - * @brief This function moves the value in member imString - * @param _imString New value to be moved in member imString - */ - eProsima_user_DllExport void imString( - std::string&& _imString); - - /*! - * @brief This function returns a constant reference to member imString - * @return Constant reference to member imString - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const std::string& imString() const; - - /*! - * @brief This function returns a reference to member imString - * @return Reference to member imString - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport std::string& imString(); - - - /*! - * @brief This function sets a value in member tres - * @param _tres New value for member tres - */ - eProsima_user_DllExport void tres( - int32_t _tres); - - /*! - * @brief This function returns the value of member tres - * @return Value of member tres - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t tres() const; - - /*! - * @brief This function returns a reference to member tres - * @return Reference to member tres - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& tres(); - - - /*! - * @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 MyUnion2& 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); - - - - - -private: - - uint8_t m__d; - - int32_t m_uno; - std::string m_imString; - int32_t m_tres; -}; - - - -/*! - * @brief This class represents the structure CompleteStruct defined by the user in the IDL file. - * @ingroup Test - */ -class CompleteStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport CompleteStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~CompleteStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object CompleteStruct that will be copied. - */ - eProsima_user_DllExport CompleteStruct( - const CompleteStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object CompleteStruct that will be copied. - */ - eProsima_user_DllExport CompleteStruct( - CompleteStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object CompleteStruct that will be copied. - */ - eProsima_user_DllExport CompleteStruct& operator =( - const CompleteStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object CompleteStruct that will be copied. - */ - eProsima_user_DllExport CompleteStruct& operator =( - CompleteStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x CompleteStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const CompleteStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x CompleteStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const CompleteStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const MyUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - MyUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const MyUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport MyUnion& my_union(); - - - /*! - * @brief This function copies the value in member my_union_2 - * @param _my_union_2 New value to be copied in member my_union_2 - */ - eProsima_user_DllExport void my_union_2( - const MyUnion2& _my_union_2); - - /*! - * @brief This function moves the value in member my_union_2 - * @param _my_union_2 New value to be moved in member my_union_2 - */ - eProsima_user_DllExport void my_union_2( - MyUnion2&& _my_union_2); - - /*! - * @brief This function returns a constant reference to member my_union_2 - * @return Constant reference to member my_union_2 - */ - eProsima_user_DllExport const MyUnion2& my_union_2() const; - - /*! - * @brief This function returns a reference to member my_union_2 - * @return Reference to member my_union_2 - */ - eProsima_user_DllExport MyUnion2& my_union_2(); - - - /*! - * @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 CompleteStruct& 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 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: - - MyUnion m_my_union; - MyUnion2 m_my_union_2; - -}; - - - -/*! - * @brief This class represents the structure KeyedStruct defined by the user in the IDL file. - * @ingroup Test - */ -class KeyedStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport KeyedStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~KeyedStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object KeyedStruct that will be copied. - */ - eProsima_user_DllExport KeyedStruct( - const KeyedStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object KeyedStruct that will be copied. - */ - eProsima_user_DllExport KeyedStruct( - KeyedStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object KeyedStruct that will be copied. - */ - eProsima_user_DllExport KeyedStruct& operator =( - const KeyedStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object KeyedStruct that will be copied. - */ - eProsima_user_DllExport KeyedStruct& operator =( - KeyedStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x KeyedStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const KeyedStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x KeyedStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const KeyedStruct& x) const; - - /*! - * @brief This function sets a value in member key - * @param _key New value for member key - */ - eProsima_user_DllExport void key( - uint8_t _key); - - /*! - * @brief This function returns the value of member key - * @return Value of member key - */ - eProsima_user_DllExport uint8_t key() const; - - /*! - * @brief This function returns a reference to member key - * @return Reference to member key - */ - eProsima_user_DllExport uint8_t& key(); - - - /*! - * @brief This function copies the value in member basic - * @param _basic New value to be copied in member basic - */ - eProsima_user_DllExport void basic( - const BasicStruct& _basic); - - /*! - * @brief This function moves the value in member basic - * @param _basic New value to be moved in member basic - */ - eProsima_user_DllExport void basic( - BasicStruct&& _basic); - - /*! - * @brief This function returns a constant reference to member basic - * @return Constant reference to member basic - */ - eProsima_user_DllExport const BasicStruct& basic() const; - - /*! - * @brief This function returns a reference to member basic - * @return Reference to member basic - */ - eProsima_user_DllExport BasicStruct& basic(); - - - /*! - * @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 KeyedStruct& 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 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: - - uint8_t m_key; - BasicStruct m_basic; - -}; - - -#endif // _FAST_DDS_GENERATED_TEST_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/unittest/dynamic_types/idl/new_features_4_2.cxx b/test/unittest/dynamic_types/idl/new_features_4_2.cxx deleted file mode 100644 index 17bb0eb11e5..00000000000 --- a/test/unittest/dynamic_types/idl/new_features_4_2.cxx +++ /dev/null @@ -1,2065 +0,0 @@ -// 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 new_features_4_2.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "new_features_4_2.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include "new_features_4_2TypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -NewAliases::NewAliases() -{ - // Just to register all known types - registernew_features_4_2Types(); -} - -NewAliases::~NewAliases() -{ -} - -NewAliases::NewAliases( - const NewAliases& x) -{ - m_int8_ = x.m_int8_; - m_uint8_ = x.m_uint8_; - m_int16_ = x.m_int16_; - m_uint16_ = x.m_uint16_; - m_int32_ = x.m_int32_; - m_uint32_ = x.m_uint32_; - m_int64_ = x.m_int64_; - m_uint64_ = x.m_uint64_; - m_local_string = x.m_local_string; -} - -NewAliases::NewAliases( - NewAliases&& x) noexcept -{ - m_int8_ = x.m_int8_; - m_uint8_ = x.m_uint8_; - m_int16_ = x.m_int16_; - m_uint16_ = x.m_uint16_; - m_int32_ = x.m_int32_; - m_uint32_ = x.m_uint32_; - m_int64_ = x.m_int64_; - m_uint64_ = x.m_uint64_; - m_local_string = std::move(x.m_local_string); -} - -NewAliases& NewAliases::operator =( - const NewAliases& x) -{ - - m_int8_ = x.m_int8_; - m_uint8_ = x.m_uint8_; - m_int16_ = x.m_int16_; - m_uint16_ = x.m_uint16_; - m_int32_ = x.m_int32_; - m_uint32_ = x.m_uint32_; - m_int64_ = x.m_int64_; - m_uint64_ = x.m_uint64_; - m_local_string = x.m_local_string; - return *this; -} - -NewAliases& NewAliases::operator =( - NewAliases&& x) noexcept -{ - - m_int8_ = x.m_int8_; - m_uint8_ = x.m_uint8_; - m_int16_ = x.m_int16_; - m_uint16_ = x.m_uint16_; - m_int32_ = x.m_int32_; - m_uint32_ = x.m_uint32_; - m_int64_ = x.m_int64_; - m_uint64_ = x.m_uint64_; - m_local_string = std::move(x.m_local_string); - return *this; -} - -bool NewAliases::operator ==( - const NewAliases& x) const -{ - return (m_int8_ == x.m_int8_ && - m_uint8_ == x.m_uint8_ && - m_int16_ == x.m_int16_ && - m_uint16_ == x.m_uint16_ && - m_int32_ == x.m_int32_ && - m_uint32_ == x.m_uint32_ && - m_int64_ == x.m_int64_ && - m_uint64_ == x.m_uint64_ && - m_local_string == x.m_local_string); -} - -bool NewAliases::operator !=( - const NewAliases& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member int8_ - * @param _int8_ New value for member int8_ - */ -void NewAliases::int8_( - int8_t _int8_) -{ - m_int8_ = _int8_; -} - -/*! - * @brief This function returns the value of member int8_ - * @return Value of member int8_ - */ -int8_t NewAliases::int8_() const -{ - return m_int8_; -} - -/*! - * @brief This function returns a reference to member int8_ - * @return Reference to member int8_ - */ -int8_t& NewAliases::int8_() -{ - return m_int8_; -} - - -/*! - * @brief This function sets a value in member uint8_ - * @param _uint8_ New value for member uint8_ - */ -void NewAliases::uint8_( - uint8_t _uint8_) -{ - m_uint8_ = _uint8_; -} - -/*! - * @brief This function returns the value of member uint8_ - * @return Value of member uint8_ - */ -uint8_t NewAliases::uint8_() const -{ - return m_uint8_; -} - -/*! - * @brief This function returns a reference to member uint8_ - * @return Reference to member uint8_ - */ -uint8_t& NewAliases::uint8_() -{ - return m_uint8_; -} - - -/*! - * @brief This function sets a value in member int16_ - * @param _int16_ New value for member int16_ - */ -void NewAliases::int16_( - int16_t _int16_) -{ - m_int16_ = _int16_; -} - -/*! - * @brief This function returns the value of member int16_ - * @return Value of member int16_ - */ -int16_t NewAliases::int16_() const -{ - return m_int16_; -} - -/*! - * @brief This function returns a reference to member int16_ - * @return Reference to member int16_ - */ -int16_t& NewAliases::int16_() -{ - return m_int16_; -} - - -/*! - * @brief This function sets a value in member uint16_ - * @param _uint16_ New value for member uint16_ - */ -void NewAliases::uint16_( - uint16_t _uint16_) -{ - m_uint16_ = _uint16_; -} - -/*! - * @brief This function returns the value of member uint16_ - * @return Value of member uint16_ - */ -uint16_t NewAliases::uint16_() const -{ - return m_uint16_; -} - -/*! - * @brief This function returns a reference to member uint16_ - * @return Reference to member uint16_ - */ -uint16_t& NewAliases::uint16_() -{ - return m_uint16_; -} - - -/*! - * @brief This function sets a value in member int32_ - * @param _int32_ New value for member int32_ - */ -void NewAliases::int32_( - int32_t _int32_) -{ - m_int32_ = _int32_; -} - -/*! - * @brief This function returns the value of member int32_ - * @return Value of member int32_ - */ -int32_t NewAliases::int32_() const -{ - return m_int32_; -} - -/*! - * @brief This function returns a reference to member int32_ - * @return Reference to member int32_ - */ -int32_t& NewAliases::int32_() -{ - return m_int32_; -} - - -/*! - * @brief This function sets a value in member uint32_ - * @param _uint32_ New value for member uint32_ - */ -void NewAliases::uint32_( - uint32_t _uint32_) -{ - m_uint32_ = _uint32_; -} - -/*! - * @brief This function returns the value of member uint32_ - * @return Value of member uint32_ - */ -uint32_t NewAliases::uint32_() const -{ - return m_uint32_; -} - -/*! - * @brief This function returns a reference to member uint32_ - * @return Reference to member uint32_ - */ -uint32_t& NewAliases::uint32_() -{ - return m_uint32_; -} - - -/*! - * @brief This function sets a value in member int64_ - * @param _int64_ New value for member int64_ - */ -void NewAliases::int64_( - int64_t _int64_) -{ - m_int64_ = _int64_; -} - -/*! - * @brief This function returns the value of member int64_ - * @return Value of member int64_ - */ -int64_t NewAliases::int64_() const -{ - return m_int64_; -} - -/*! - * @brief This function returns a reference to member int64_ - * @return Reference to member int64_ - */ -int64_t& NewAliases::int64_() -{ - return m_int64_; -} - - -/*! - * @brief This function sets a value in member uint64_ - * @param _uint64_ New value for member uint64_ - */ -void NewAliases::uint64_( - uint64_t _uint64_) -{ - m_uint64_ = _uint64_; -} - -/*! - * @brief This function returns the value of member uint64_ - * @return Value of member uint64_ - */ -uint64_t NewAliases::uint64_() const -{ - return m_uint64_; -} - -/*! - * @brief This function returns a reference to member uint64_ - * @return Reference to member uint64_ - */ -uint64_t& NewAliases::uint64_() -{ - return m_uint64_; -} - - -/*! - * @brief This function copies the value in member local_string - * @param _local_string New value to be copied in member local_string - */ -void NewAliases::local_string( - const std::string& _local_string) -{ - m_local_string = _local_string; -} - -/*! - * @brief This function moves the value in member local_string - * @param _local_string New value to be moved in member local_string - */ -void NewAliases::local_string( - std::string&& _local_string) -{ - m_local_string = std::move(_local_string); -} - -/*! - * @brief This function returns a constant reference to member local_string - * @return Constant reference to member local_string - */ -const std::string& NewAliases::local_string() const -{ - return m_local_string; -} - -/*! - * @brief This function returns a reference to member local_string - * @return Reference to member local_string - */ -std::string& NewAliases::local_string() -{ - return m_local_string; -} - - - - -WCharUnion::WCharUnion() -{ - m__d = 'a'; -} - -WCharUnion::~WCharUnion() -{ -} - -WCharUnion::WCharUnion( - const WCharUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case 'a': - m_case_zero = x.m_case_zero; - break; - - - case 'b': - m_case_one = x.m_case_one; - break; - - default: - break; - } -} - -WCharUnion::WCharUnion( - WCharUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case 'a': - m_case_zero = x.m_case_zero; - break; - - - case 'b': - m_case_one = x.m_case_one; - break; - - default: - break; - } -} - -WCharUnion& WCharUnion::operator =( - const WCharUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case 'a': - m_case_zero = x.m_case_zero; - break; - - - case 'b': - m_case_one = x.m_case_one; - break; - - default: - break; - } - - return *this; -} - -WCharUnion& WCharUnion::operator =( - WCharUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case 'a': - m_case_zero = x.m_case_zero; - break; - - - case 'b': - m_case_one = x.m_case_one; - break; - - default: - break; - } - - return *this; -} - -bool WCharUnion::operator ==( - const WCharUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case 'a': - return (m_case_zero == x.m_case_zero); - break; - - - case 'b': - return (m_case_one == x.m_case_one); - break; - - default: - break; - } - return false; -} - -bool WCharUnion::operator !=( - const WCharUnion& x) const -{ - return !(*this == x); -} - -void WCharUnion::_d( - wchar_t __d) -{ - bool b = false; - - switch (m__d) - { - case 'a': - switch (__d) - { - case 'a': - b = true; - break; - default: - break; - } - break; - - - case 'b': - switch (__d) - { - case 'b': - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -wchar_t WCharUnion::_d() const -{ - return m__d; -} - -wchar_t& WCharUnion::_d() -{ - return m__d; -} - -void WCharUnion::case_zero( - int32_t _case_zero) -{ - m_case_zero = _case_zero; - m__d = 'a'; - -} - -int32_t WCharUnion::case_zero() const -{ - bool b = false; - - switch (m__d) - { - case 'a': - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_zero; -} - -int32_t& WCharUnion::case_zero() -{ - bool b = false; - - switch (m__d) - { - case 'a': - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_zero; -} - - -void WCharUnion::case_one( - int32_t _case_one) -{ - m_case_one = _case_one; - m__d = 'b'; - -} - -int32_t WCharUnion::case_one() const -{ - bool b = false; - - switch (m__d) - { - case 'b': - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_one; -} - -int32_t& WCharUnion::case_one() -{ - bool b = false; - - switch (m__d) - { - case 'b': - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_one; -} - - - - -OctetUnion::OctetUnion() -{ - m__d = 5; -} - -OctetUnion::~OctetUnion() -{ -} - -OctetUnion::OctetUnion( - const OctetUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case 5: - m_case_five = x.m_case_five; - break; - - - case 7: - m_case_seven = x.m_case_seven; - break; - - default: - break; - } -} - -OctetUnion::OctetUnion( - OctetUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case 5: - m_case_five = x.m_case_five; - break; - - - case 7: - m_case_seven = x.m_case_seven; - break; - - default: - break; - } -} - -OctetUnion& OctetUnion::operator =( - const OctetUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case 5: - m_case_five = x.m_case_five; - break; - - - case 7: - m_case_seven = x.m_case_seven; - break; - - default: - break; - } - - return *this; -} - -OctetUnion& OctetUnion::operator =( - OctetUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case 5: - m_case_five = x.m_case_five; - break; - - - case 7: - m_case_seven = x.m_case_seven; - break; - - default: - break; - } - - return *this; -} - -bool OctetUnion::operator ==( - const OctetUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case 5: - return (m_case_five == x.m_case_five); - break; - - - case 7: - return (m_case_seven == x.m_case_seven); - break; - - default: - break; - } - return false; -} - -bool OctetUnion::operator !=( - const OctetUnion& x) const -{ - return !(*this == x); -} - -void OctetUnion::_d( - uint8_t __d) -{ - bool b = false; - - switch (m__d) - { - case 5: - switch (__d) - { - case 5: - b = true; - break; - default: - break; - } - break; - - - case 7: - switch (__d) - { - case 7: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -uint8_t OctetUnion::_d() const -{ - return m__d; -} - -uint8_t& OctetUnion::_d() -{ - return m__d; -} - -void OctetUnion::case_five( - int32_t _case_five) -{ - m_case_five = _case_five; - m__d = 5; - -} - -int32_t OctetUnion::case_five() const -{ - bool b = false; - - switch (m__d) - { - case 5: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_five; -} - -int32_t& OctetUnion::case_five() -{ - bool b = false; - - switch (m__d) - { - case 5: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_five; -} - - -void OctetUnion::case_seven( - int32_t _case_seven) -{ - m_case_seven = _case_seven; - m__d = 7; - -} - -int32_t OctetUnion::case_seven() const -{ - bool b = false; - - switch (m__d) - { - case 7: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_seven; -} - -int32_t& OctetUnion::case_seven() -{ - bool b = false; - - switch (m__d) - { - case 7: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_seven; -} - - - - -Int8Union::Int8Union() -{ - m__d = 3; -} - -Int8Union::~Int8Union() -{ -} - -Int8Union::Int8Union( - const Int8Union& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case 3: - m_case_three = x.m_case_three; - break; - - - case 6: - m_case_six = x.m_case_six; - break; - - default: - break; - } -} - -Int8Union::Int8Union( - Int8Union&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case 3: - m_case_three = x.m_case_three; - break; - - - case 6: - m_case_six = x.m_case_six; - break; - - default: - break; - } -} - -Int8Union& Int8Union::operator =( - const Int8Union& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case 3: - m_case_three = x.m_case_three; - break; - - - case 6: - m_case_six = x.m_case_six; - break; - - default: - break; - } - - return *this; -} - -Int8Union& Int8Union::operator =( - Int8Union&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case 3: - m_case_three = x.m_case_three; - break; - - - case 6: - m_case_six = x.m_case_six; - break; - - default: - break; - } - - return *this; -} - -bool Int8Union::operator ==( - const Int8Union& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case 3: - return (m_case_three == x.m_case_three); - break; - - - case 6: - return (m_case_six == x.m_case_six); - break; - - default: - break; - } - return false; -} - -bool Int8Union::operator !=( - const Int8Union& x) const -{ - return !(*this == x); -} - -void Int8Union::_d( - int8_t __d) -{ - bool b = false; - - switch (m__d) - { - case 3: - switch (__d) - { - case 3: - b = true; - break; - default: - break; - } - break; - - - case 6: - switch (__d) - { - case 6: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int8_t Int8Union::_d() const -{ - return m__d; -} - -int8_t& Int8Union::_d() -{ - return m__d; -} - -void Int8Union::case_three( - int32_t _case_three) -{ - m_case_three = _case_three; - m__d = 3; - -} - -int32_t Int8Union::case_three() const -{ - bool b = false; - - switch (m__d) - { - case 3: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_three; -} - -int32_t& Int8Union::case_three() -{ - bool b = false; - - switch (m__d) - { - case 3: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_three; -} - - -void Int8Union::case_six( - int32_t _case_six) -{ - m_case_six = _case_six; - m__d = 6; - -} - -int32_t Int8Union::case_six() const -{ - bool b = false; - - switch (m__d) - { - case 6: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_six; -} - -int32_t& Int8Union::case_six() -{ - bool b = false; - - switch (m__d) - { - case 6: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_six; -} - - -namespace bitmodule { - -ParentBitset::ParentBitset(){ - // Just to register all known types - registernew_features_4_2Types(); -} - -ParentBitset::~ParentBitset() -{ -} - -ParentBitset::ParentBitset( - const ParentBitset& x){ - m_bitset = x.m_bitset; -} - -ParentBitset::ParentBitset( - ParentBitset&& x) noexcept { - m_bitset = x.m_bitset; -} - -ParentBitset& ParentBitset::operator =( - const ParentBitset& x) -{ - - m_bitset = x.m_bitset; - - return *this; -} - -ParentBitset& ParentBitset::operator =( - ParentBitset&& x) noexcept -{ - - m_bitset = x.m_bitset; - - return *this; -} - -bool ParentBitset::operator ==( - const ParentBitset& x) const -{ - - return m_bitset == x.m_bitset; -} - -bool ParentBitset::operator !=( - const ParentBitset& x) const -{ - return !(*this == x); -} - - -void ParentBitset::parent_bitfield( - uint32_t _parent_bitfield) -{ - int base = 0; - int size = 17; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_parent_bitfield & 0x01)); - _parent_bitfield = _parent_bitfield >> 1; - } - -} - -uint32_t ParentBitset::parent_bitfield() const -{ - int base = 0; - int size = 17; - std::bitset<17> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -std::bitset<17> ParentBitset::bitset() const -{ - std::string str_value; - - str_value = m_bitset.to_string() + str_value; - - return std::bitset<17>(str_value); -} - -void ParentBitset::bitset( - const std::bitset<17>& bitset) -{ - std::string str_value {bitset.to_string()}; - size_t base_diff {0}; - size_t last_post {std::string::npos}; - - base_diff += 17; - m_bitset = std::bitset<17>(str_value.substr(str_value.length() - base_diff, last_post)); -} - -MyBitset::MyBitset() - : bitmodule::ParentBitset(){ - // Just to register all known types - registernew_features_4_2Types(); -} - -MyBitset::~MyBitset() -{ -} - -MyBitset::MyBitset( - const MyBitset& x) - : bitmodule::ParentBitset(x){ - m_bitset = x.m_bitset; -} - -MyBitset::MyBitset( - MyBitset&& x) noexcept - : bitmodule::ParentBitset(std::move(x)){ - m_bitset = x.m_bitset; -} - -MyBitset& MyBitset::operator =( - const MyBitset& x) -{ - bitmodule::ParentBitset::operator =(x); - - m_bitset = x.m_bitset; - - return *this; -} - -MyBitset& MyBitset::operator =( - MyBitset&& x) noexcept -{ - bitmodule::ParentBitset::operator =(std::move(x)); - - m_bitset = x.m_bitset; - - return *this; -} - -bool MyBitset::operator ==( - const MyBitset& x) const -{ - if (bitmodule::ParentBitset::operator !=(x)) return false; - - return m_bitset == x.m_bitset; -} - -bool MyBitset::operator !=( - const MyBitset& x) const -{ - return !(*this == x); -} - - -void MyBitset::a( - char _a) -{ - int base = 0; - int size = 3; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_a & 0x01)); - _a = _a >> 1; - } - -} - -char MyBitset::a() const -{ - int base = 0; - int size = 3; - std::bitset<3> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -void MyBitset::b( - bool _b) -{ - int base = 3; - m_bitset.set(base, _b); -} - -bool MyBitset::b() const -{ - int base = 3; - return m_bitset.test(base); -} - - - -void MyBitset::c( - uint16_t _c) -{ - int base = 8; - int size = 10; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_c & 0x01)); - _c = _c >> 1; - } - -} - -uint16_t MyBitset::c() const -{ - int base = 8; - int size = 10; - std::bitset<10> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -void MyBitset::d( - int16_t _d) -{ - int base = 18; - int size = 5; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_d & 0x01)); - _d = _d >> 1; - } - -} - -int16_t MyBitset::d() const -{ - int base = 18; - int size = 5; - std::bitset<5> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -void MyBitset::e( - int16_t _e) -{ - int base = 23; - int size = 5; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_e & 0x01)); - _e = _e >> 1; - } - -} - -int16_t MyBitset::e() const -{ - int base = 23; - int size = 5; - std::bitset<5> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -void MyBitset::f( - int16_t _f) -{ - int base = 28; - int size = 5; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_f & 0x01)); - _f = _f >> 1; - } - -} - -int16_t MyBitset::f() const -{ - int base = 28; - int size = 5; - std::bitset<5> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -std::bitset<50> MyBitset::bitset() const -{ - std::string str_value; - - str_value = static_cast(this)->bitset().to_string() + str_value; - - str_value = m_bitset.to_string() + str_value; - - return std::bitset<50>(str_value); -} - -void MyBitset::bitset( - const std::bitset<50>& bitset) -{ - std::string str_value {bitset.to_string()}; - size_t base_diff {0}; - size_t last_post {std::string::npos}; - - { - base_diff += 17; - std::bitset<17> internal_bitset(str_value.substr(str_value.length() - base_diff, last_post)); - static_cast(this)->bitset(internal_bitset); - last_post = base_diff; - } - - base_diff += 33; - m_bitset = std::bitset<33>(str_value.substr(str_value.length() - base_diff, last_post)); -} - - - - -BitsetBitmask::BitsetBitmask() -{ - // Just to register all known types - registernew_features_4_2Types(); -} - -BitsetBitmask::~BitsetBitmask() -{ -} - -BitsetBitmask::BitsetBitmask( - const BitsetBitmask& x) -{ - m_mybitset = x.m_mybitset; - m_mybitmask = x.m_mybitmask; -} - -BitsetBitmask::BitsetBitmask( - BitsetBitmask&& x) noexcept -{ - m_mybitset = std::move(x.m_mybitset); - m_mybitmask = std::move(x.m_mybitmask); -} - -BitsetBitmask& BitsetBitmask::operator =( - const BitsetBitmask& x) -{ - - m_mybitset = x.m_mybitset; - m_mybitmask = x.m_mybitmask; - return *this; -} - -BitsetBitmask& BitsetBitmask::operator =( - BitsetBitmask&& x) noexcept -{ - - m_mybitset = std::move(x.m_mybitset); - m_mybitmask = std::move(x.m_mybitmask); - return *this; -} - -bool BitsetBitmask::operator ==( - const BitsetBitmask& x) const -{ - return (m_mybitset == x.m_mybitset && - m_mybitmask == x.m_mybitmask); -} - -bool BitsetBitmask::operator !=( - const BitsetBitmask& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member mybitset - * @param _mybitset New value to be copied in member mybitset - */ -void BitsetBitmask::mybitset( - const bitmodule::MyBitset& _mybitset) -{ - m_mybitset = _mybitset; -} - -/*! - * @brief This function moves the value in member mybitset - * @param _mybitset New value to be moved in member mybitset - */ -void BitsetBitmask::mybitset( - bitmodule::MyBitset&& _mybitset) -{ - m_mybitset = std::move(_mybitset); -} - -/*! - * @brief This function returns a constant reference to member mybitset - * @return Constant reference to member mybitset - */ -const bitmodule::MyBitset& BitsetBitmask::mybitset() const -{ - return m_mybitset; -} - -/*! - * @brief This function returns a reference to member mybitset - * @return Reference to member mybitset - */ -bitmodule::MyBitset& BitsetBitmask::mybitset() -{ - return m_mybitset; -} - - -/*! - * @brief This function copies the value in member mybitmask - * @param _mybitmask New value to be copied in member mybitmask - */ -void BitsetBitmask::mybitmask( - const bitmodule::MyBitMask& _mybitmask) -{ - m_mybitmask = _mybitmask; -} - -/*! - * @brief This function moves the value in member mybitmask - * @param _mybitmask New value to be moved in member mybitmask - */ -void BitsetBitmask::mybitmask( - bitmodule::MyBitMask&& _mybitmask) -{ - m_mybitmask = std::move(_mybitmask); -} - -/*! - * @brief This function returns a constant reference to member mybitmask - * @return Constant reference to member mybitmask - */ -const bitmodule::MyBitMask& BitsetBitmask::mybitmask() const -{ - return m_mybitmask; -} - -/*! - * @brief This function returns a reference to member mybitmask - * @return Reference to member mybitmask - */ -bitmodule::MyBitMask& BitsetBitmask::mybitmask() -{ - return m_mybitmask; -} - - - - -BM2::BM2() - : bitmodule::BitsetBitmask() - -{ - // Just to register all known types - registernew_features_4_2Types(); -} - -BM2::~BM2() -{ -} - -BM2::BM2( - const BM2& x) - : bitmodule::BitsetBitmask(x) - -{ - m_two = x.m_two; - m_mylong = x.m_mylong; -} - -BM2::BM2( - BM2&& x) noexcept - : bitmodule::BitsetBitmask(std::move(x)) - -{ - m_two = std::move(x.m_two); - m_mylong = x.m_mylong; -} - -BM2& BM2::operator =( - const BM2& x) -{ - bitmodule::BitsetBitmask::operator =(x); - - m_two = x.m_two; - m_mylong = x.m_mylong; - return *this; -} - -BM2& BM2::operator =( - BM2&& x) noexcept -{ - bitmodule::BitsetBitmask::operator =(std::move(x)); - - m_two = std::move(x.m_two); - m_mylong = x.m_mylong; - return *this; -} - -bool BM2::operator ==( - const BM2& x) const -{ - if (bitmodule::BitsetBitmask::operator !=(x)) - { - return false; - } - return (m_two == x.m_two && - m_mylong == x.m_mylong); -} - -bool BM2::operator !=( - const BM2& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member two - * @param _two New value to be copied in member two - */ -void BM2::two( - const bitmodule::MyBitMask& _two) -{ - m_two = _two; -} - -/*! - * @brief This function moves the value in member two - * @param _two New value to be moved in member two - */ -void BM2::two( - bitmodule::MyBitMask&& _two) -{ - m_two = std::move(_two); -} - -/*! - * @brief This function returns a constant reference to member two - * @return Constant reference to member two - */ -const bitmodule::MyBitMask& BM2::two() const -{ - return m_two; -} - -/*! - * @brief This function returns a reference to member two - * @return Reference to member two - */ -bitmodule::MyBitMask& BM2::two() -{ - return m_two; -} - - -/*! - * @brief This function sets a value in member mylong - * @param _mylong New value for member mylong - */ -void BM2::mylong( - int32_t _mylong) -{ - m_mylong = _mylong; -} - -/*! - * @brief This function returns the value of member mylong - * @return Value of member mylong - */ -int32_t BM2::mylong() const -{ - return m_mylong; -} - -/*! - * @brief This function returns a reference to member mylong - * @return Reference to member mylong - */ -int32_t& BM2::mylong() -{ - return m_mylong; -} - - - - -} // namespace bitmodule - - -StructTest::StructTest() - : NewAliases() - -{ - // Just to register all known types - registernew_features_4_2Types(); -} - -StructTest::~StructTest() -{ -} - -StructTest::StructTest( - const StructTest& x) - : NewAliases(x) - -{ - m_octetUnion = x.m_octetUnion; - m_int8Union = x.m_int8Union; - m_myStructBits = x.m_myStructBits; -} - -StructTest::StructTest( - StructTest&& x) noexcept - : NewAliases(std::move(x)) - -{ - m_octetUnion = std::move(x.m_octetUnion); - m_int8Union = std::move(x.m_int8Union); - m_myStructBits = std::move(x.m_myStructBits); -} - -StructTest& StructTest::operator =( - const StructTest& x) -{ - NewAliases::operator =(x); - - m_octetUnion = x.m_octetUnion; - m_int8Union = x.m_int8Union; - m_myStructBits = x.m_myStructBits; - return *this; -} - -StructTest& StructTest::operator =( - StructTest&& x) noexcept -{ - NewAliases::operator =(std::move(x)); - - m_octetUnion = std::move(x.m_octetUnion); - m_int8Union = std::move(x.m_int8Union); - m_myStructBits = std::move(x.m_myStructBits); - return *this; -} - -bool StructTest::operator ==( - const StructTest& x) const -{ - if (NewAliases::operator !=(x)) - { - return false; - } - return (m_octetUnion == x.m_octetUnion && - m_int8Union == x.m_int8Union && - m_myStructBits == x.m_myStructBits); -} - -bool StructTest::operator !=( - const StructTest& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member octetUnion - * @param _octetUnion New value to be copied in member octetUnion - */ -void StructTest::octetUnion( - const OctetUnion& _octetUnion) -{ - m_octetUnion = _octetUnion; -} - -/*! - * @brief This function moves the value in member octetUnion - * @param _octetUnion New value to be moved in member octetUnion - */ -void StructTest::octetUnion( - OctetUnion&& _octetUnion) -{ - m_octetUnion = std::move(_octetUnion); -} - -/*! - * @brief This function returns a constant reference to member octetUnion - * @return Constant reference to member octetUnion - */ -const OctetUnion& StructTest::octetUnion() const -{ - return m_octetUnion; -} - -/*! - * @brief This function returns a reference to member octetUnion - * @return Reference to member octetUnion - */ -OctetUnion& StructTest::octetUnion() -{ - return m_octetUnion; -} - - -/*! - * @brief This function copies the value in member int8Union - * @param _int8Union New value to be copied in member int8Union - */ -void StructTest::int8Union( - const Int8Union& _int8Union) -{ - m_int8Union = _int8Union; -} - -/*! - * @brief This function moves the value in member int8Union - * @param _int8Union New value to be moved in member int8Union - */ -void StructTest::int8Union( - Int8Union&& _int8Union) -{ - m_int8Union = std::move(_int8Union); -} - -/*! - * @brief This function returns a constant reference to member int8Union - * @return Constant reference to member int8Union - */ -const Int8Union& StructTest::int8Union() const -{ - return m_int8Union; -} - -/*! - * @brief This function returns a reference to member int8Union - * @return Reference to member int8Union - */ -Int8Union& StructTest::int8Union() -{ - return m_int8Union; -} - - -/*! - * @brief This function copies the value in member myStructBits - * @param _myStructBits New value to be copied in member myStructBits - */ -void StructTest::myStructBits( - const bitmodule::BM2& _myStructBits) -{ - m_myStructBits = _myStructBits; -} - -/*! - * @brief This function moves the value in member myStructBits - * @param _myStructBits New value to be moved in member myStructBits - */ -void StructTest::myStructBits( - bitmodule::BM2&& _myStructBits) -{ - m_myStructBits = std::move(_myStructBits); -} - -/*! - * @brief This function returns a constant reference to member myStructBits - * @return Constant reference to member myStructBits - */ -const bitmodule::BM2& StructTest::myStructBits() const -{ - return m_myStructBits; -} - -/*! - * @brief This function returns a reference to member myStructBits - * @return Reference to member myStructBits - */ -bitmodule::BM2& StructTest::myStructBits() -{ - return m_myStructBits; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "new_features_4_2CdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/unittest/dynamic_types/idl/new_features_4_2.h b/test/unittest/dynamic_types/idl/new_features_4_2.h deleted file mode 100644 index de85dadf42c..00000000000 --- a/test/unittest/dynamic_types/idl/new_features_4_2.h +++ /dev/null @@ -1,1380 +0,0 @@ -// 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 new_features_4_2.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include -#include "new_features_4_2v1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_NEW_FEATURES_4_2_H_ -#define _FAST_DDS_GENERATED_NEW_FEATURES_4_2_H_ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(NEW_FEATURES_4_2_SOURCE) -#define NEW_FEATURES_4_2_DllAPI __declspec( dllexport ) -#else -#define NEW_FEATURES_4_2_DllAPI __declspec( dllimport ) -#endif // NEW_FEATURES_4_2_SOURCE -#else -#define NEW_FEATURES_4_2_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define NEW_FEATURES_4_2_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure NewAliases defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class NewAliases -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport NewAliases(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~NewAliases(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object NewAliases that will be copied. - */ - eProsima_user_DllExport NewAliases( - const NewAliases& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object NewAliases that will be copied. - */ - eProsima_user_DllExport NewAliases( - NewAliases&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object NewAliases that will be copied. - */ - eProsima_user_DllExport NewAliases& operator =( - const NewAliases& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object NewAliases that will be copied. - */ - eProsima_user_DllExport NewAliases& operator =( - NewAliases&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x NewAliases object to compare. - */ - eProsima_user_DllExport bool operator ==( - const NewAliases& x) const; - - /*! - * @brief Comparison operator. - * @param x NewAliases object to compare. - */ - eProsima_user_DllExport bool operator !=( - const NewAliases& x) const; - - /*! - * @brief This function sets a value in member int8_ - * @param _int8_ New value for member int8_ - */ - eProsima_user_DllExport void int8_( - int8_t _int8_); - - /*! - * @brief This function returns the value of member int8_ - * @return Value of member int8_ - */ - eProsima_user_DllExport int8_t int8_() const; - - /*! - * @brief This function returns a reference to member int8_ - * @return Reference to member int8_ - */ - eProsima_user_DllExport int8_t& int8_(); - - - /*! - * @brief This function sets a value in member uint8_ - * @param _uint8_ New value for member uint8_ - */ - eProsima_user_DllExport void uint8_( - uint8_t _uint8_); - - /*! - * @brief This function returns the value of member uint8_ - * @return Value of member uint8_ - */ - eProsima_user_DllExport uint8_t uint8_() const; - - /*! - * @brief This function returns a reference to member uint8_ - * @return Reference to member uint8_ - */ - eProsima_user_DllExport uint8_t& uint8_(); - - - /*! - * @brief This function sets a value in member int16_ - * @param _int16_ New value for member int16_ - */ - eProsima_user_DllExport void int16_( - int16_t _int16_); - - /*! - * @brief This function returns the value of member int16_ - * @return Value of member int16_ - */ - eProsima_user_DllExport int16_t int16_() const; - - /*! - * @brief This function returns a reference to member int16_ - * @return Reference to member int16_ - */ - eProsima_user_DllExport int16_t& int16_(); - - - /*! - * @brief This function sets a value in member uint16_ - * @param _uint16_ New value for member uint16_ - */ - eProsima_user_DllExport void uint16_( - uint16_t _uint16_); - - /*! - * @brief This function returns the value of member uint16_ - * @return Value of member uint16_ - */ - eProsima_user_DllExport uint16_t uint16_() const; - - /*! - * @brief This function returns a reference to member uint16_ - * @return Reference to member uint16_ - */ - eProsima_user_DllExport uint16_t& uint16_(); - - - /*! - * @brief This function sets a value in member int32_ - * @param _int32_ New value for member int32_ - */ - eProsima_user_DllExport void int32_( - int32_t _int32_); - - /*! - * @brief This function returns the value of member int32_ - * @return Value of member int32_ - */ - eProsima_user_DllExport int32_t int32_() const; - - /*! - * @brief This function returns a reference to member int32_ - * @return Reference to member int32_ - */ - eProsima_user_DllExport int32_t& int32_(); - - - /*! - * @brief This function sets a value in member uint32_ - * @param _uint32_ New value for member uint32_ - */ - eProsima_user_DllExport void uint32_( - uint32_t _uint32_); - - /*! - * @brief This function returns the value of member uint32_ - * @return Value of member uint32_ - */ - eProsima_user_DllExport uint32_t uint32_() const; - - /*! - * @brief This function returns a reference to member uint32_ - * @return Reference to member uint32_ - */ - eProsima_user_DllExport uint32_t& uint32_(); - - - /*! - * @brief This function sets a value in member int64_ - * @param _int64_ New value for member int64_ - */ - eProsima_user_DllExport void int64_( - int64_t _int64_); - - /*! - * @brief This function returns the value of member int64_ - * @return Value of member int64_ - */ - eProsima_user_DllExport int64_t int64_() const; - - /*! - * @brief This function returns a reference to member int64_ - * @return Reference to member int64_ - */ - eProsima_user_DllExport int64_t& int64_(); - - - /*! - * @brief This function sets a value in member uint64_ - * @param _uint64_ New value for member uint64_ - */ - eProsima_user_DllExport void uint64_( - uint64_t _uint64_); - - /*! - * @brief This function returns the value of member uint64_ - * @return Value of member uint64_ - */ - eProsima_user_DllExport uint64_t uint64_() const; - - /*! - * @brief This function returns a reference to member uint64_ - * @return Reference to member uint64_ - */ - eProsima_user_DllExport uint64_t& uint64_(); - - - /*! - * @brief This function copies the value in member local_string - * @param _local_string New value to be copied in member local_string - */ - eProsima_user_DllExport void local_string( - const std::string& _local_string); - - /*! - * @brief This function moves the value in member local_string - * @param _local_string New value to be moved in member local_string - */ - eProsima_user_DllExport void local_string( - std::string&& _local_string); - - /*! - * @brief This function returns a constant reference to member local_string - * @return Constant reference to member local_string - */ - eProsima_user_DllExport const std::string& local_string() const; - - /*! - * @brief This function returns a reference to member local_string - * @return Reference to member local_string - */ - eProsima_user_DllExport std::string& local_string(); - -private: - - int8_t m_int8_{0}; - uint8_t m_uint8_{0}; - int16_t m_int16_{0}; - uint16_t m_uint16_{0}; - int32_t m_int32_{0}; - uint32_t m_uint32_{0}; - int64_t m_int64_{0}; - uint64_t m_uint64_{555}; - std::string m_local_string; - -}; - - -/*! - * @brief This class represents the union WCharUnion defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class WCharUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport WCharUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~WCharUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object WCharUnion that will be copied. - */ - eProsima_user_DllExport WCharUnion( - const WCharUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object WCharUnion that will be copied. - */ - eProsima_user_DllExport WCharUnion( - WCharUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object WCharUnion that will be copied. - */ - eProsima_user_DllExport WCharUnion& operator =( - const WCharUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object WCharUnion that will be copied. - */ - eProsima_user_DllExport WCharUnion& operator =( - WCharUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x WCharUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const WCharUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x WCharUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const WCharUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - wchar_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport wchar_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport wchar_t& _d(); - - /*! - * @brief This function sets a value in member case_zero - * @param _case_zero New value for member case_zero - */ - eProsima_user_DllExport void case_zero( - int32_t _case_zero); - - /*! - * @brief This function returns the value of member case_zero - * @return Value of member case_zero - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t case_zero() const; - - /*! - * @brief This function returns a reference to member case_zero - * @return Reference to member case_zero - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& case_zero(); - - - /*! - * @brief This function sets a value in member case_one - * @param _case_one New value for member case_one - */ - eProsima_user_DllExport void case_one( - int32_t _case_one); - - /*! - * @brief This function returns the value of member case_one - * @return Value of member case_one - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t case_one() const; - - /*! - * @brief This function returns a reference to member case_one - * @return Reference to member case_one - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& case_one(); - -private: - - wchar_t m__d; - - int32_t m_case_zero{0}; - int32_t m_case_one{0}; -}; - - -/*! - * @brief This class represents the union OctetUnion defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class OctetUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport OctetUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~OctetUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object OctetUnion that will be copied. - */ - eProsima_user_DllExport OctetUnion( - const OctetUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object OctetUnion that will be copied. - */ - eProsima_user_DllExport OctetUnion( - OctetUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object OctetUnion that will be copied. - */ - eProsima_user_DllExport OctetUnion& operator =( - const OctetUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object OctetUnion that will be copied. - */ - eProsima_user_DllExport OctetUnion& operator =( - OctetUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x OctetUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const OctetUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x OctetUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const OctetUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - uint8_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport uint8_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport uint8_t& _d(); - - /*! - * @brief This function sets a value in member case_five - * @param _case_five New value for member case_five - */ - eProsima_user_DllExport void case_five( - int32_t _case_five); - - /*! - * @brief This function returns the value of member case_five - * @return Value of member case_five - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t case_five() const; - - /*! - * @brief This function returns a reference to member case_five - * @return Reference to member case_five - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& case_five(); - - - /*! - * @brief This function sets a value in member case_seven - * @param _case_seven New value for member case_seven - */ - eProsima_user_DllExport void case_seven( - int32_t _case_seven); - - /*! - * @brief This function returns the value of member case_seven - * @return Value of member case_seven - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t case_seven() const; - - /*! - * @brief This function returns a reference to member case_seven - * @return Reference to member case_seven - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& case_seven(); - -private: - - uint8_t m__d; - - int32_t m_case_five{0}; - int32_t m_case_seven{0}; -}; - - -/*! - * @brief This class represents the union Int8Union defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class Int8Union -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Int8Union(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Int8Union(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object Int8Union that will be copied. - */ - eProsima_user_DllExport Int8Union( - const Int8Union& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object Int8Union that will be copied. - */ - eProsima_user_DllExport Int8Union( - Int8Union&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object Int8Union that will be copied. - */ - eProsima_user_DllExport Int8Union& operator =( - const Int8Union& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object Int8Union that will be copied. - */ - eProsima_user_DllExport Int8Union& operator =( - Int8Union&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x Int8Union object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Int8Union& x) const; - - /*! - * @brief Comparison operator. - * @param x Int8Union object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Int8Union& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int8_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int8_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int8_t& _d(); - - /*! - * @brief This function sets a value in member case_three - * @param _case_three New value for member case_three - */ - eProsima_user_DllExport void case_three( - int32_t _case_three); - - /*! - * @brief This function returns the value of member case_three - * @return Value of member case_three - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t case_three() const; - - /*! - * @brief This function returns a reference to member case_three - * @return Reference to member case_three - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& case_three(); - - - /*! - * @brief This function sets a value in member case_six - * @param _case_six New value for member case_six - */ - eProsima_user_DllExport void case_six( - int32_t _case_six); - - /*! - * @brief This function returns the value of member case_six - * @return Value of member case_six - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t case_six() const; - - /*! - * @brief This function returns a reference to member case_six - * @return Reference to member case_six - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& case_six(); - -private: - - int8_t m__d; - - int32_t m_case_three{0}; - int32_t m_case_six{0}; -}; -namespace bitmodule { - -/*! - * @brief This class represents the structure ParentBitset defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class ParentBitset -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ParentBitset(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ParentBitset(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object bitmodule::ParentBitset that will be copied. - */ - eProsima_user_DllExport ParentBitset( - const ParentBitset& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object bitmodule::ParentBitset that will be copied. - */ - eProsima_user_DllExport ParentBitset( - ParentBitset&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object bitmodule::ParentBitset that will be copied. - */ - eProsima_user_DllExport ParentBitset& operator =( - const ParentBitset& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object bitmodule::ParentBitset that will be copied. - */ - eProsima_user_DllExport ParentBitset& operator =( - ParentBitset&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x bitmodule::ParentBitset object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ParentBitset& x) const; - - /*! - * @brief Comparison operator. - * @param x bitmodule::ParentBitset object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ParentBitset& x) const; - - /*! - * @brief This function sets a value in member parent_bitfield - * @param _parent_bitfield New value for member parent_bitfield - */ - eProsima_user_DllExport void parent_bitfield( - uint32_t _parent_bitfield); - - /*! - * @brief This function returns the value of member parent_bitfield - * @return Value of member parent_bitfield - */ - eProsima_user_DllExport uint32_t parent_bitfield() const; - - - eProsima_user_DllExport std::bitset<17> bitset() const; - - eProsima_user_DllExport void bitset( - const std::bitset<17>&); - - - -private: - - std::bitset<17> m_bitset; -}; -/*! - * @brief This class represents the structure MyBitset defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class MyBitset : public bitmodule::ParentBitset -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyBitset(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyBitset(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object bitmodule::MyBitset that will be copied. - */ - eProsima_user_DllExport MyBitset( - const MyBitset& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object bitmodule::MyBitset that will be copied. - */ - eProsima_user_DllExport MyBitset( - MyBitset&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object bitmodule::MyBitset that will be copied. - */ - eProsima_user_DllExport MyBitset& operator =( - const MyBitset& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object bitmodule::MyBitset that will be copied. - */ - eProsima_user_DllExport MyBitset& operator =( - MyBitset&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x bitmodule::MyBitset object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyBitset& x) const; - - /*! - * @brief Comparison operator. - * @param x bitmodule::MyBitset object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyBitset& x) const; - - /*! - * @brief This function sets a value in member a - * @param _a New value for member a - */ - eProsima_user_DllExport void a( - char _a); - - /*! - * @brief This function returns the value of member a - * @return Value of member a - */ - eProsima_user_DllExport char a() const; - - - /*! - * @brief This function sets a value in member b - * @param _b New value for member b - */ - eProsima_user_DllExport void b( - bool _b); - - /*! - * @brief This function returns the value of member b - * @return Value of member b - */ - eProsima_user_DllExport bool b() const; - - - - /*! - * @brief This function sets a value in member c - * @param _c New value for member c - */ - eProsima_user_DllExport void c( - uint16_t _c); - - /*! - * @brief This function returns the value of member c - * @return Value of member c - */ - eProsima_user_DllExport uint16_t c() const; - - - /*! - * @brief This function sets a value in member d - * @param _d New value for member d - */ - eProsima_user_DllExport void d( - int16_t _d); - - /*! - * @brief This function returns the value of member d - * @return Value of member d - */ - eProsima_user_DllExport int16_t d() const; - - - /*! - * @brief This function sets a value in member e - * @param _e New value for member e - */ - eProsima_user_DllExport void e( - int16_t _e); - - /*! - * @brief This function returns the value of member e - * @return Value of member e - */ - eProsima_user_DllExport int16_t e() const; - - - /*! - * @brief This function sets a value in member f - * @param _f New value for member f - */ - eProsima_user_DllExport void f( - int16_t _f); - - /*! - * @brief This function returns the value of member f - * @return Value of member f - */ - eProsima_user_DllExport int16_t f() const; - - - eProsima_user_DllExport std::bitset<50> bitset() const; - - eProsima_user_DllExport void bitset( - const std::bitset<50>&); - - - -private: - - std::bitset<33> m_bitset; -}; -/*! - * @brief This enumeration represents the MyBitMask bitflags defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -enum MyBitMaskBits : uint8_t -{ - flag0 = 0x01ull << 0, - flag1 = 0x01ull << 1, - flag4 = 0x01ull << 4, - flag6 = 0x01ull << 6, - flag7 = 0x01ull << 7 -}; -typedef uint8_t MyBitMask; - - -/*! - * @brief This class represents the structure BitsetBitmask defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class BitsetBitmask -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BitsetBitmask(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BitsetBitmask(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object bitmodule::BitsetBitmask that will be copied. - */ - eProsima_user_DllExport BitsetBitmask( - const BitsetBitmask& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object bitmodule::BitsetBitmask that will be copied. - */ - eProsima_user_DllExport BitsetBitmask( - BitsetBitmask&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object bitmodule::BitsetBitmask that will be copied. - */ - eProsima_user_DllExport BitsetBitmask& operator =( - const BitsetBitmask& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object bitmodule::BitsetBitmask that will be copied. - */ - eProsima_user_DllExport BitsetBitmask& operator =( - BitsetBitmask&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x bitmodule::BitsetBitmask object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BitsetBitmask& x) const; - - /*! - * @brief Comparison operator. - * @param x bitmodule::BitsetBitmask object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BitsetBitmask& x) const; - - /*! - * @brief This function copies the value in member mybitset - * @param _mybitset New value to be copied in member mybitset - */ - eProsima_user_DllExport void mybitset( - const bitmodule::MyBitset& _mybitset); - - /*! - * @brief This function moves the value in member mybitset - * @param _mybitset New value to be moved in member mybitset - */ - eProsima_user_DllExport void mybitset( - bitmodule::MyBitset&& _mybitset); - - /*! - * @brief This function returns a constant reference to member mybitset - * @return Constant reference to member mybitset - */ - eProsima_user_DllExport const bitmodule::MyBitset& mybitset() const; - - /*! - * @brief This function returns a reference to member mybitset - * @return Reference to member mybitset - */ - eProsima_user_DllExport bitmodule::MyBitset& mybitset(); - - - /*! - * @brief This function copies the value in member mybitmask - * @param _mybitmask New value to be copied in member mybitmask - */ - eProsima_user_DllExport void mybitmask( - const bitmodule::MyBitMask& _mybitmask); - - /*! - * @brief This function moves the value in member mybitmask - * @param _mybitmask New value to be moved in member mybitmask - */ - eProsima_user_DllExport void mybitmask( - bitmodule::MyBitMask&& _mybitmask); - - /*! - * @brief This function returns a constant reference to member mybitmask - * @return Constant reference to member mybitmask - */ - eProsima_user_DllExport const bitmodule::MyBitMask& mybitmask() const; - - /*! - * @brief This function returns a reference to member mybitmask - * @return Reference to member mybitmask - */ - eProsima_user_DllExport bitmodule::MyBitMask& mybitmask(); - -private: - - bitmodule::MyBitset m_mybitset; - bitmodule::MyBitMask m_mybitmask{0}; - -}; - - -/*! - * @brief This class represents the structure BM2 defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class BM2 : public bitmodule::BitsetBitmask -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BM2(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BM2(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object bitmodule::BM2 that will be copied. - */ - eProsima_user_DllExport BM2( - const BM2& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object bitmodule::BM2 that will be copied. - */ - eProsima_user_DllExport BM2( - BM2&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object bitmodule::BM2 that will be copied. - */ - eProsima_user_DllExport BM2& operator =( - const BM2& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object bitmodule::BM2 that will be copied. - */ - eProsima_user_DllExport BM2& operator =( - BM2&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x bitmodule::BM2 object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BM2& x) const; - - /*! - * @brief Comparison operator. - * @param x bitmodule::BM2 object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BM2& x) const; - - /*! - * @brief This function copies the value in member two - * @param _two New value to be copied in member two - */ - eProsima_user_DllExport void two( - const bitmodule::MyBitMask& _two); - - /*! - * @brief This function moves the value in member two - * @param _two New value to be moved in member two - */ - eProsima_user_DllExport void two( - bitmodule::MyBitMask&& _two); - - /*! - * @brief This function returns a constant reference to member two - * @return Constant reference to member two - */ - eProsima_user_DllExport const bitmodule::MyBitMask& two() const; - - /*! - * @brief This function returns a reference to member two - * @return Reference to member two - */ - eProsima_user_DllExport bitmodule::MyBitMask& two(); - - - /*! - * @brief This function sets a value in member mylong - * @param _mylong New value for member mylong - */ - eProsima_user_DllExport void mylong( - int32_t _mylong); - - /*! - * @brief This function returns the value of member mylong - * @return Value of member mylong - */ - eProsima_user_DllExport int32_t mylong() const; - - /*! - * @brief This function returns a reference to member mylong - * @return Reference to member mylong - */ - eProsima_user_DllExport int32_t& mylong(); - -private: - - bitmodule::MyBitMask m_two{0}; - int32_t m_mylong{0}; - -}; - -} // namespace bitmodule - - -/*! - * @brief This class represents the structure StructTest defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class StructTest : public NewAliases -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport StructTest(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~StructTest(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object StructTest that will be copied. - */ - eProsima_user_DllExport StructTest( - const StructTest& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object StructTest that will be copied. - */ - eProsima_user_DllExport StructTest( - StructTest&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object StructTest that will be copied. - */ - eProsima_user_DllExport StructTest& operator =( - const StructTest& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object StructTest that will be copied. - */ - eProsima_user_DllExport StructTest& operator =( - StructTest&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x StructTest object to compare. - */ - eProsima_user_DllExport bool operator ==( - const StructTest& x) const; - - /*! - * @brief Comparison operator. - * @param x StructTest object to compare. - */ - eProsima_user_DllExport bool operator !=( - const StructTest& x) const; - - /*! - * @brief This function copies the value in member octetUnion - * @param _octetUnion New value to be copied in member octetUnion - */ - eProsima_user_DllExport void octetUnion( - const OctetUnion& _octetUnion); - - /*! - * @brief This function moves the value in member octetUnion - * @param _octetUnion New value to be moved in member octetUnion - */ - eProsima_user_DllExport void octetUnion( - OctetUnion&& _octetUnion); - - /*! - * @brief This function returns a constant reference to member octetUnion - * @return Constant reference to member octetUnion - */ - eProsima_user_DllExport const OctetUnion& octetUnion() const; - - /*! - * @brief This function returns a reference to member octetUnion - * @return Reference to member octetUnion - */ - eProsima_user_DllExport OctetUnion& octetUnion(); - - - /*! - * @brief This function copies the value in member int8Union - * @param _int8Union New value to be copied in member int8Union - */ - eProsima_user_DllExport void int8Union( - const Int8Union& _int8Union); - - /*! - * @brief This function moves the value in member int8Union - * @param _int8Union New value to be moved in member int8Union - */ - eProsima_user_DllExport void int8Union( - Int8Union&& _int8Union); - - /*! - * @brief This function returns a constant reference to member int8Union - * @return Constant reference to member int8Union - */ - eProsima_user_DllExport const Int8Union& int8Union() const; - - /*! - * @brief This function returns a reference to member int8Union - * @return Reference to member int8Union - */ - eProsima_user_DllExport Int8Union& int8Union(); - - - /*! - * @brief This function copies the value in member myStructBits - * @param _myStructBits New value to be copied in member myStructBits - */ - eProsima_user_DllExport void myStructBits( - const bitmodule::BM2& _myStructBits); - - /*! - * @brief This function moves the value in member myStructBits - * @param _myStructBits New value to be moved in member myStructBits - */ - eProsima_user_DllExport void myStructBits( - bitmodule::BM2&& _myStructBits); - - /*! - * @brief This function returns a constant reference to member myStructBits - * @return Constant reference to member myStructBits - */ - eProsima_user_DllExport const bitmodule::BM2& myStructBits() const; - - /*! - * @brief This function returns a reference to member myStructBits - * @return Reference to member myStructBits - */ - eProsima_user_DllExport bitmodule::BM2& myStructBits(); - -private: - - OctetUnion m_octetUnion; - Int8Union m_int8Union; - bitmodule::BM2 m_myStructBits; - -}; - -#endif // _FAST_DDS_GENERATED_NEW_FEATURES_4_2_H_ - - - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/unittest/dynamic_types/idl/new_features_4_2.hpp b/test/unittest/dynamic_types/idl/new_features_4_2.hpp new file mode 100644 index 00000000000..75141f9bb8b --- /dev/null +++ b/test/unittest/dynamic_types/idl/new_features_4_2.hpp @@ -0,0 +1,2720 @@ +// 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 new_features_4_2.hpp + * This header file contains the declaration of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_NEW_FEATURES_4_2_HPP_ +#define _FAST_DDS_GENERATED_NEW_FEATURES_4_2_HPP_ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +#include "new_features_4_2TypeObject.h" + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#define eProsima_user_DllExport __declspec( dllexport ) +#else +#define eProsima_user_DllExport +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define eProsima_user_DllExport +#endif // _WIN32 + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#if defined(NEW_FEATURES_4_2_SOURCE) +#define NEW_FEATURES_4_2_DllAPI __declspec( dllexport ) +#else +#define NEW_FEATURES_4_2_DllAPI __declspec( dllimport ) +#endif // NEW_FEATURES_4_2_SOURCE +#else +#define NEW_FEATURES_4_2_DllAPI +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define NEW_FEATURES_4_2_DllAPI +#endif // _WIN32 + + + +/*! + * @brief This class represents the structure NewAliases defined by the user in the IDL file. + * @ingroup new_features_4_2 + */ +class NewAliases +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport NewAliases() + { + // Just to register all known types + registernew_features_4_2Types(); + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~NewAliases() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object NewAliases that will be copied. + */ + eProsima_user_DllExport NewAliases( + const NewAliases& x) + { + m_int8_ = x.m_int8_; + + m_uint8_ = x.m_uint8_; + + m_int16_ = x.m_int16_; + + m_uint16_ = x.m_uint16_; + + m_int32_ = x.m_int32_; + + m_uint32_ = x.m_uint32_; + + m_int64_ = x.m_int64_; + + m_uint64_ = x.m_uint64_; + + m_local_string = x.m_local_string; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object NewAliases that will be copied. + */ + eProsima_user_DllExport NewAliases( + NewAliases&& x) noexcept + { + m_int8_ = x.m_int8_; + m_uint8_ = x.m_uint8_; + m_int16_ = x.m_int16_; + m_uint16_ = x.m_uint16_; + m_int32_ = x.m_int32_; + m_uint32_ = x.m_uint32_; + m_int64_ = x.m_int64_; + m_uint64_ = x.m_uint64_; + m_local_string = std::move(x.m_local_string); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object NewAliases that will be copied. + */ + eProsima_user_DllExport NewAliases& operator =( + const NewAliases& x) + { + + m_int8_ = x.m_int8_; + + m_uint8_ = x.m_uint8_; + + m_int16_ = x.m_int16_; + + m_uint16_ = x.m_uint16_; + + m_int32_ = x.m_int32_; + + m_uint32_ = x.m_uint32_; + + m_int64_ = x.m_int64_; + + m_uint64_ = x.m_uint64_; + + m_local_string = x.m_local_string; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object NewAliases that will be copied. + */ + eProsima_user_DllExport NewAliases& operator =( + NewAliases&& x) noexcept + { + + m_int8_ = x.m_int8_; + m_uint8_ = x.m_uint8_; + m_int16_ = x.m_int16_; + m_uint16_ = x.m_uint16_; + m_int32_ = x.m_int32_; + m_uint32_ = x.m_uint32_; + m_int64_ = x.m_int64_; + m_uint64_ = x.m_uint64_; + m_local_string = std::move(x.m_local_string); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x NewAliases object to compare. + */ + eProsima_user_DllExport bool operator ==( + const NewAliases& x) const + { + return (m_int8_ == x.m_int8_ && + m_uint8_ == x.m_uint8_ && + m_int16_ == x.m_int16_ && + m_uint16_ == x.m_uint16_ && + m_int32_ == x.m_int32_ && + m_uint32_ == x.m_uint32_ && + m_int64_ == x.m_int64_ && + m_uint64_ == x.m_uint64_ && + m_local_string == x.m_local_string); + } + + /*! + * @brief Comparison operator. + * @param x NewAliases object to compare. + */ + eProsima_user_DllExport bool operator !=( + const NewAliases& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member int8_ + * @param _int8_ New value for member int8_ + */ + eProsima_user_DllExport void int8_( + int8_t _int8_) + { + m_int8_ = _int8_; + } + + /*! + * @brief This function returns the value of member int8_ + * @return Value of member int8_ + */ + eProsima_user_DllExport int8_t int8_() const + { + return m_int8_; + } + + /*! + * @brief This function returns a reference to member int8_ + * @return Reference to member int8_ + */ + eProsima_user_DllExport int8_t& int8_() + { + return m_int8_; + } + + + /*! + * @brief This function sets a value in member uint8_ + * @param _uint8_ New value for member uint8_ + */ + eProsima_user_DllExport void uint8_( + uint8_t _uint8_) + { + m_uint8_ = _uint8_; + } + + /*! + * @brief This function returns the value of member uint8_ + * @return Value of member uint8_ + */ + eProsima_user_DllExport uint8_t uint8_() const + { + return m_uint8_; + } + + /*! + * @brief This function returns a reference to member uint8_ + * @return Reference to member uint8_ + */ + eProsima_user_DllExport uint8_t& uint8_() + { + return m_uint8_; + } + + + /*! + * @brief This function sets a value in member int16_ + * @param _int16_ New value for member int16_ + */ + eProsima_user_DllExport void int16_( + int16_t _int16_) + { + m_int16_ = _int16_; + } + + /*! + * @brief This function returns the value of member int16_ + * @return Value of member int16_ + */ + eProsima_user_DllExport int16_t int16_() const + { + return m_int16_; + } + + /*! + * @brief This function returns a reference to member int16_ + * @return Reference to member int16_ + */ + eProsima_user_DllExport int16_t& int16_() + { + return m_int16_; + } + + + /*! + * @brief This function sets a value in member uint16_ + * @param _uint16_ New value for member uint16_ + */ + eProsima_user_DllExport void uint16_( + uint16_t _uint16_) + { + m_uint16_ = _uint16_; + } + + /*! + * @brief This function returns the value of member uint16_ + * @return Value of member uint16_ + */ + eProsima_user_DllExport uint16_t uint16_() const + { + return m_uint16_; + } + + /*! + * @brief This function returns a reference to member uint16_ + * @return Reference to member uint16_ + */ + eProsima_user_DllExport uint16_t& uint16_() + { + return m_uint16_; + } + + + /*! + * @brief This function sets a value in member int32_ + * @param _int32_ New value for member int32_ + */ + eProsima_user_DllExport void int32_( + int32_t _int32_) + { + m_int32_ = _int32_; + } + + /*! + * @brief This function returns the value of member int32_ + * @return Value of member int32_ + */ + eProsima_user_DllExport int32_t int32_() const + { + return m_int32_; + } + + /*! + * @brief This function returns a reference to member int32_ + * @return Reference to member int32_ + */ + eProsima_user_DllExport int32_t& int32_() + { + return m_int32_; + } + + + /*! + * @brief This function sets a value in member uint32_ + * @param _uint32_ New value for member uint32_ + */ + eProsima_user_DllExport void uint32_( + uint32_t _uint32_) + { + m_uint32_ = _uint32_; + } + + /*! + * @brief This function returns the value of member uint32_ + * @return Value of member uint32_ + */ + eProsima_user_DllExport uint32_t uint32_() const + { + return m_uint32_; + } + + /*! + * @brief This function returns a reference to member uint32_ + * @return Reference to member uint32_ + */ + eProsima_user_DllExport uint32_t& uint32_() + { + return m_uint32_; + } + + + /*! + * @brief This function sets a value in member int64_ + * @param _int64_ New value for member int64_ + */ + eProsima_user_DllExport void int64_( + int64_t _int64_) + { + m_int64_ = _int64_; + } + + /*! + * @brief This function returns the value of member int64_ + * @return Value of member int64_ + */ + eProsima_user_DllExport int64_t int64_() const + { + return m_int64_; + } + + /*! + * @brief This function returns a reference to member int64_ + * @return Reference to member int64_ + */ + eProsima_user_DllExport int64_t& int64_() + { + return m_int64_; + } + + + /*! + * @brief This function sets a value in member uint64_ + * @param _uint64_ New value for member uint64_ + */ + eProsima_user_DllExport void uint64_( + uint64_t _uint64_) + { + m_uint64_ = _uint64_; + } + + /*! + * @brief This function returns the value of member uint64_ + * @return Value of member uint64_ + */ + eProsima_user_DllExport uint64_t uint64_() const + { + return m_uint64_; + } + + /*! + * @brief This function returns a reference to member uint64_ + * @return Reference to member uint64_ + */ + eProsima_user_DllExport uint64_t& uint64_() + { + return m_uint64_; + } + + + /*! + * @brief This function copies the value in member local_string + * @param _local_string New value to be copied in member local_string + */ + eProsima_user_DllExport void local_string( + const std::string& _local_string) + { + m_local_string = _local_string; + } + + /*! + * @brief This function moves the value in member local_string + * @param _local_string New value to be moved in member local_string + */ + eProsima_user_DllExport void local_string( + std::string&& _local_string) + { + m_local_string = std::move(_local_string); + } + + /*! + * @brief This function returns a constant reference to member local_string + * @return Constant reference to member local_string + */ + eProsima_user_DllExport const std::string& local_string() const + { + return m_local_string; + } + + /*! + * @brief This function returns a reference to member local_string + * @return Reference to member local_string + */ + eProsima_user_DllExport std::string& local_string() + { + return m_local_string; + } + + + +private: + + int8_t m_int8_{0}; + uint8_t m_uint8_{0}; + int16_t m_int16_{0}; + uint16_t m_uint16_{0}; + int32_t m_int32_{0}; + uint32_t m_uint32_{0}; + int64_t m_int64_{0}; + uint64_t m_uint64_{555}; + std::string m_local_string; + +}; + + +/*! + * @brief This class represents the union WCharUnion defined by the user in the IDL file. + * @ingroup new_features_4_2 + */ +class WCharUnion +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport WCharUnion() + { + m__d = 'a'; + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~WCharUnion() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object WCharUnion that will be copied. + */ + eProsima_user_DllExport WCharUnion( + const WCharUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case 'a': + m_case_zero = x.m_case_zero; + break; + + + case 'b': + m_case_one = x.m_case_one; + break; + + default: + break; + } + } + + /*! + * @brief Move constructor. + * @param x Reference to the object WCharUnion that will be copied. + */ + eProsima_user_DllExport WCharUnion( + WCharUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case 'a': + m_case_zero = x.m_case_zero; + break; + + + case 'b': + m_case_one = x.m_case_one; + break; + + default: + break; + } + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object WCharUnion that will be copied. + */ + eProsima_user_DllExport WCharUnion& operator =( + const WCharUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case 'a': + m_case_zero = x.m_case_zero; + break; + + + case 'b': + m_case_one = x.m_case_one; + break; + + default: + break; + } + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object WCharUnion that will be copied. + */ + eProsima_user_DllExport WCharUnion& operator =( + WCharUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case 'a': + m_case_zero = x.m_case_zero; + break; + + + case 'b': + m_case_one = x.m_case_one; + break; + + default: + break; + } + + return *this; + } + + /*! + * @brief Comparison operator. + * @param x WCharUnion object to compare. + */ + eProsima_user_DllExport bool operator ==( + const WCharUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case 'a': + return (m_case_zero == x.m_case_zero); + break; + + + case 'b': + return (m_case_one == x.m_case_one); + break; + + default: + break; + } + return false; + } + + /*! + * @brief Comparison operator. + * @param x WCharUnion object to compare. + */ + eProsima_user_DllExport bool operator !=( + const WCharUnion& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets the discriminator value. + * @param __d New value for the discriminator. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + */ + eProsima_user_DllExport void _d( + wchar_t __d) + { + bool b = false; + + switch (m__d) + { + case 'a': + switch (__d) + { + case 'a': + b = true; + break; + default: + break; + } + break; + + + case 'b': + switch (__d) + { + case 'b': + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } + + /*! + * @brief This function returns the value of the discriminator. + * @return Value of the discriminator + */ + eProsima_user_DllExport wchar_t _d() const + { + return m__d; + } + + /*! + * @brief This function returns a reference to the discriminator. + * @return Reference to the discriminator. + */ + eProsima_user_DllExport wchar_t& _d() + { + return m__d; + } + + /*! + * @brief This function sets a value in member case_zero + * @param _case_zero New value for member case_zero + */ + eProsima_user_DllExport void case_zero( + int32_t _case_zero) + { + m_case_zero = _case_zero; + m__d = 'a'; + + } + + /*! + * @brief This function returns the value of member case_zero + * @return Value of member case_zero + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t case_zero() const + { + bool b = false; + + switch (m__d) + { + case 'a': + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_case_zero; + } + + /*! + * @brief This function returns a reference to member case_zero + * @return Reference to member case_zero + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t& case_zero() + { + bool b = false; + + switch (m__d) + { + case 'a': + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_case_zero; + } + + + /*! + * @brief This function sets a value in member case_one + * @param _case_one New value for member case_one + */ + eProsima_user_DllExport void case_one( + int32_t _case_one) + { + m_case_one = _case_one; + m__d = 'b'; + + } + + /*! + * @brief This function returns the value of member case_one + * @return Value of member case_one + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t case_one() const + { + bool b = false; + + switch (m__d) + { + case 'b': + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_case_one; + } + + /*! + * @brief This function returns a reference to member case_one + * @return Reference to member case_one + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t& case_one() + { + bool b = false; + + switch (m__d) + { + case 'b': + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_case_one; + } + + + +private: + + wchar_t m__d; + + int32_t m_case_zero{0}; + int32_t m_case_one{0}; +}; + + +/*! + * @brief This class represents the union OctetUnion defined by the user in the IDL file. + * @ingroup new_features_4_2 + */ +class OctetUnion +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport OctetUnion() + { + m__d = 5; + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~OctetUnion() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object OctetUnion that will be copied. + */ + eProsima_user_DllExport OctetUnion( + const OctetUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case 5: + m_case_five = x.m_case_five; + break; + + + case 7: + m_case_seven = x.m_case_seven; + break; + + default: + break; + } + } + + /*! + * @brief Move constructor. + * @param x Reference to the object OctetUnion that will be copied. + */ + eProsima_user_DllExport OctetUnion( + OctetUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case 5: + m_case_five = x.m_case_five; + break; + + + case 7: + m_case_seven = x.m_case_seven; + break; + + default: + break; + } + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object OctetUnion that will be copied. + */ + eProsima_user_DllExport OctetUnion& operator =( + const OctetUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case 5: + m_case_five = x.m_case_five; + break; + + + case 7: + m_case_seven = x.m_case_seven; + break; + + default: + break; + } + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object OctetUnion that will be copied. + */ + eProsima_user_DllExport OctetUnion& operator =( + OctetUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case 5: + m_case_five = x.m_case_five; + break; + + + case 7: + m_case_seven = x.m_case_seven; + break; + + default: + break; + } + + return *this; + } + + /*! + * @brief Comparison operator. + * @param x OctetUnion object to compare. + */ + eProsima_user_DllExport bool operator ==( + const OctetUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case 5: + return (m_case_five == x.m_case_five); + break; + + + case 7: + return (m_case_seven == x.m_case_seven); + break; + + default: + break; + } + return false; + } + + /*! + * @brief Comparison operator. + * @param x OctetUnion object to compare. + */ + eProsima_user_DllExport bool operator !=( + const OctetUnion& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets the discriminator value. + * @param __d New value for the discriminator. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + */ + eProsima_user_DllExport void _d( + uint8_t __d) + { + bool b = false; + + switch (m__d) + { + case 5: + switch (__d) + { + case 5: + b = true; + break; + default: + break; + } + break; + + + case 7: + switch (__d) + { + case 7: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } + + /*! + * @brief This function returns the value of the discriminator. + * @return Value of the discriminator + */ + eProsima_user_DllExport uint8_t _d() const + { + return m__d; + } + + /*! + * @brief This function returns a reference to the discriminator. + * @return Reference to the discriminator. + */ + eProsima_user_DllExport uint8_t& _d() + { + return m__d; + } + + /*! + * @brief This function sets a value in member case_five + * @param _case_five New value for member case_five + */ + eProsima_user_DllExport void case_five( + int32_t _case_five) + { + m_case_five = _case_five; + m__d = 5; + + } + + /*! + * @brief This function returns the value of member case_five + * @return Value of member case_five + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t case_five() const + { + bool b = false; + + switch (m__d) + { + case 5: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_case_five; + } + + /*! + * @brief This function returns a reference to member case_five + * @return Reference to member case_five + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t& case_five() + { + bool b = false; + + switch (m__d) + { + case 5: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_case_five; + } + + + /*! + * @brief This function sets a value in member case_seven + * @param _case_seven New value for member case_seven + */ + eProsima_user_DllExport void case_seven( + int32_t _case_seven) + { + m_case_seven = _case_seven; + m__d = 7; + + } + + /*! + * @brief This function returns the value of member case_seven + * @return Value of member case_seven + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t case_seven() const + { + bool b = false; + + switch (m__d) + { + case 7: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_case_seven; + } + + /*! + * @brief This function returns a reference to member case_seven + * @return Reference to member case_seven + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t& case_seven() + { + bool b = false; + + switch (m__d) + { + case 7: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_case_seven; + } + + + +private: + + uint8_t m__d; + + int32_t m_case_five{0}; + int32_t m_case_seven{0}; +}; + + +/*! + * @brief This class represents the union Int8Union defined by the user in the IDL file. + * @ingroup new_features_4_2 + */ +class Int8Union +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport Int8Union() + { + m__d = 3; + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~Int8Union() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object Int8Union that will be copied. + */ + eProsima_user_DllExport Int8Union( + const Int8Union& x) + { + m__d = x.m__d; + + switch (m__d) + { + case 3: + m_case_three = x.m_case_three; + break; + + + case 6: + m_case_six = x.m_case_six; + break; + + default: + break; + } + } + + /*! + * @brief Move constructor. + * @param x Reference to the object Int8Union that will be copied. + */ + eProsima_user_DllExport Int8Union( + Int8Union&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case 3: + m_case_three = x.m_case_three; + break; + + + case 6: + m_case_six = x.m_case_six; + break; + + default: + break; + } + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object Int8Union that will be copied. + */ + eProsima_user_DllExport Int8Union& operator =( + const Int8Union& x) + { + m__d = x.m__d; + + switch (m__d) + { + case 3: + m_case_three = x.m_case_three; + break; + + + case 6: + m_case_six = x.m_case_six; + break; + + default: + break; + } + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object Int8Union that will be copied. + */ + eProsima_user_DllExport Int8Union& operator =( + Int8Union&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case 3: + m_case_three = x.m_case_three; + break; + + + case 6: + m_case_six = x.m_case_six; + break; + + default: + break; + } + + return *this; + } + + /*! + * @brief Comparison operator. + * @param x Int8Union object to compare. + */ + eProsima_user_DllExport bool operator ==( + const Int8Union& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case 3: + return (m_case_three == x.m_case_three); + break; + + + case 6: + return (m_case_six == x.m_case_six); + break; + + default: + break; + } + return false; + } + + /*! + * @brief Comparison operator. + * @param x Int8Union object to compare. + */ + eProsima_user_DllExport bool operator !=( + const Int8Union& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets the discriminator value. + * @param __d New value for the discriminator. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + */ + eProsima_user_DllExport void _d( + int8_t __d) + { + bool b = false; + + switch (m__d) + { + case 3: + switch (__d) + { + case 3: + b = true; + break; + default: + break; + } + break; + + + case 6: + switch (__d) + { + case 6: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } + + /*! + * @brief This function returns the value of the discriminator. + * @return Value of the discriminator + */ + eProsima_user_DllExport int8_t _d() const + { + return m__d; + } + + /*! + * @brief This function returns a reference to the discriminator. + * @return Reference to the discriminator. + */ + eProsima_user_DllExport int8_t& _d() + { + return m__d; + } + + /*! + * @brief This function sets a value in member case_three + * @param _case_three New value for member case_three + */ + eProsima_user_DllExport void case_three( + int32_t _case_three) + { + m_case_three = _case_three; + m__d = 3; + + } + + /*! + * @brief This function returns the value of member case_three + * @return Value of member case_three + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t case_three() const + { + bool b = false; + + switch (m__d) + { + case 3: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_case_three; + } + + /*! + * @brief This function returns a reference to member case_three + * @return Reference to member case_three + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t& case_three() + { + bool b = false; + + switch (m__d) + { + case 3: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_case_three; + } + + + /*! + * @brief This function sets a value in member case_six + * @param _case_six New value for member case_six + */ + eProsima_user_DllExport void case_six( + int32_t _case_six) + { + m_case_six = _case_six; + m__d = 6; + + } + + /*! + * @brief This function returns the value of member case_six + * @return Value of member case_six + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t case_six() const + { + bool b = false; + + switch (m__d) + { + case 6: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_case_six; + } + + /*! + * @brief This function returns a reference to member case_six + * @return Reference to member case_six + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t& case_six() + { + bool b = false; + + switch (m__d) + { + case 6: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_case_six; + } + + + +private: + + int8_t m__d; + + int32_t m_case_three{0}; + int32_t m_case_six{0}; +}; +namespace bitmodule { + +/*! + * @brief This class represents the structure ParentBitset defined by the user in the IDL file. + * @ingroup new_features_4_2 + */ +class ParentBitset +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport ParentBitset() + { + // Just to register all known types + registernew_features_4_2Types(); + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~ParentBitset() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object ParentBitset that will be copied. + */ + eProsima_user_DllExport ParentBitset( + const ParentBitset& x) + { + m_bitset = x.m_bitset; + } + + /*! + * @brief Move constructor. + * @param x Reference to the object ParentBitset that will be copied. + */ + eProsima_user_DllExport ParentBitset( + ParentBitset&& x) noexcept + { + m_bitset = x.m_bitset; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object ParentBitset that will be copied. + */ + eProsima_user_DllExport ParentBitset& operator =( + const ParentBitset& x) + { + + m_bitset = x.m_bitset; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object ParentBitset that will be copied. + */ + eProsima_user_DllExport ParentBitset& operator =( + ParentBitset&& x) noexcept + { + + m_bitset = x.m_bitset; + + return *this; + } + + /*! + * @brief Comparison operator. + * @param x ParentBitset object to compare. + */ + eProsima_user_DllExport bool operator ==( + const ParentBitset& x) const + { + + return m_bitset == x.m_bitset; + } + + /*! + * @brief Comparison operator. + * @param x ParentBitset object to compare. + */ + eProsima_user_DllExport bool operator !=( + const ParentBitset& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member parent_bitfield + * @param _parent_bitfield New value for member parent_bitfield + */ + eProsima_user_DllExport void parent_bitfield( + uint32_t _parent_bitfield) + { + int base = 0; + int size = 17; + for (int i = base; i < base + size; ++i) + { + m_bitset.set(i, !!(_parent_bitfield & 0x01)); + _parent_bitfield = _parent_bitfield >> 1; + } + + } + + /*! + * @brief This function returns the value of member parent_bitfield + * @return Value of member parent_bitfield + */ + eProsima_user_DllExport uint32_t parent_bitfield() const + { + int base = 0; + int size = 17; + std::bitset<17> aux; + for (int i = 0; i < size; ++i) + { + aux.set(i, m_bitset.test(i + base)); + } + return static_cast(aux.to_ullong()); + + } + + + eProsima_user_DllExport std::bitset<17> bitset() const + { + std::string str_value; + + str_value = m_bitset.to_string() + str_value; + + return std::bitset<17>(str_value); + } + + eProsima_user_DllExport void bitset( + const std::bitset<17>& bitset) + { + std::string str_value {bitset.to_string()}; + size_t base_diff {0}; + size_t last_post {std::string::npos}; + + base_diff += 17; + m_bitset = std::bitset<17>(str_value.substr(str_value.length() - base_diff, last_post)); + } + + +private: + + std::bitset<17> m_bitset; +}; +/*! + * @brief This class represents the structure MyBitset defined by the user in the IDL file. + * @ingroup new_features_4_2 + */ +class MyBitset : public ParentBitset +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport MyBitset() + : ParentBitset() + { + // Just to register all known types + registernew_features_4_2Types(); + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~MyBitset() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object MyBitset that will be copied. + */ + eProsima_user_DllExport MyBitset( + const MyBitset& x) + : ParentBitset(x) + { + m_bitset = x.m_bitset; + } + + /*! + * @brief Move constructor. + * @param x Reference to the object MyBitset that will be copied. + */ + eProsima_user_DllExport MyBitset( + MyBitset&& x) noexcept + : ParentBitset(std::move(x)) + { + m_bitset = x.m_bitset; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object MyBitset that will be copied. + */ + eProsima_user_DllExport MyBitset& operator =( + const MyBitset& x) + { + ParentBitset::operator =(x); + + m_bitset = x.m_bitset; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object MyBitset that will be copied. + */ + eProsima_user_DllExport MyBitset& operator =( + MyBitset&& x) noexcept + { + ParentBitset::operator =(std::move(x)); + + m_bitset = x.m_bitset; + + return *this; + } + + /*! + * @brief Comparison operator. + * @param x MyBitset object to compare. + */ + eProsima_user_DllExport bool operator ==( + const MyBitset& x) const + { + if (ParentBitset::operator !=(x)) return false; + + return m_bitset == x.m_bitset; + } + + /*! + * @brief Comparison operator. + * @param x MyBitset object to compare. + */ + eProsima_user_DllExport bool operator !=( + const MyBitset& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member a + * @param _a New value for member a + */ + eProsima_user_DllExport void a( + char _a) + { + int base = 0; + int size = 3; + for (int i = base; i < base + size; ++i) + { + m_bitset.set(i, !!(_a & 0x01)); + _a = _a >> 1; + } + + } + + /*! + * @brief This function returns the value of member a + * @return Value of member a + */ + eProsima_user_DllExport char a() const + { + int base = 0; + int size = 3; + std::bitset<3> aux; + for (int i = 0; i < size; ++i) + { + aux.set(i, m_bitset.test(i + base)); + } + return static_cast(aux.to_ullong()); + + } + + + /*! + * @brief This function sets a value in member b + * @param _b New value for member b + */ + eProsima_user_DllExport void b( + bool _b) + { + int base = 3; + m_bitset.set(base, _b); + } + + /*! + * @brief This function returns the value of member b + * @return Value of member b + */ + eProsima_user_DllExport bool b() const + { + int base = 3; + return m_bitset.test(base); + } + + + + /*! + * @brief This function sets a value in member c + * @param _c New value for member c + */ + eProsima_user_DllExport void c( + uint16_t _c) + { + int base = 8; + int size = 10; + for (int i = base; i < base + size; ++i) + { + m_bitset.set(i, !!(_c & 0x01)); + _c = _c >> 1; + } + + } + + /*! + * @brief This function returns the value of member c + * @return Value of member c + */ + eProsima_user_DllExport uint16_t c() const + { + int base = 8; + int size = 10; + std::bitset<10> aux; + for (int i = 0; i < size; ++i) + { + aux.set(i, m_bitset.test(i + base)); + } + return static_cast(aux.to_ullong()); + + } + + + /*! + * @brief This function sets a value in member d + * @param _d New value for member d + */ + eProsima_user_DllExport void d( + int16_t _d) + { + int base = 18; + int size = 5; + for (int i = base; i < base + size; ++i) + { + m_bitset.set(i, !!(_d & 0x01)); + _d = _d >> 1; + } + + } + + /*! + * @brief This function returns the value of member d + * @return Value of member d + */ + eProsima_user_DllExport int16_t d() const + { + int base = 18; + int size = 5; + std::bitset<5> aux; + for (int i = 0; i < size; ++i) + { + aux.set(i, m_bitset.test(i + base)); + } + return static_cast(aux.to_ullong()); + + } + + + /*! + * @brief This function sets a value in member e + * @param _e New value for member e + */ + eProsima_user_DllExport void e( + int16_t _e) + { + int base = 23; + int size = 5; + for (int i = base; i < base + size; ++i) + { + m_bitset.set(i, !!(_e & 0x01)); + _e = _e >> 1; + } + + } + + /*! + * @brief This function returns the value of member e + * @return Value of member e + */ + eProsima_user_DllExport int16_t e() const + { + int base = 23; + int size = 5; + std::bitset<5> aux; + for (int i = 0; i < size; ++i) + { + aux.set(i, m_bitset.test(i + base)); + } + return static_cast(aux.to_ullong()); + + } + + + /*! + * @brief This function sets a value in member f + * @param _f New value for member f + */ + eProsima_user_DllExport void f( + int16_t _f) + { + int base = 28; + int size = 5; + for (int i = base; i < base + size; ++i) + { + m_bitset.set(i, !!(_f & 0x01)); + _f = _f >> 1; + } + + } + + /*! + * @brief This function returns the value of member f + * @return Value of member f + */ + eProsima_user_DllExport int16_t f() const + { + int base = 28; + int size = 5; + std::bitset<5> aux; + for (int i = 0; i < size; ++i) + { + aux.set(i, m_bitset.test(i + base)); + } + return static_cast(aux.to_ullong()); + + } + + + eProsima_user_DllExport std::bitset<50> bitset() const + { + std::string str_value; + + str_value = static_cast(this)->bitset().to_string() + str_value; + + str_value = m_bitset.to_string() + str_value; + + return std::bitset<50>(str_value); + } + + eProsima_user_DllExport void bitset( + const std::bitset<50>& bitset) + { + std::string str_value {bitset.to_string()}; + size_t base_diff {0}; + size_t last_post {std::string::npos}; + + { + base_diff += 17; + std::bitset<17> internal_bitset(str_value.substr(str_value.length() - base_diff, last_post)); + static_cast(this)->bitset(internal_bitset); + last_post = base_diff; + } + + base_diff += 33; + m_bitset = std::bitset<33>(str_value.substr(str_value.length() - base_diff, last_post)); + } + + +private: + + std::bitset<33> m_bitset; +}; +/*! + * @brief This enumeration represents the MyBitMask bitflags defined by the user in the IDL file. + * @ingroup new_features_4_2 + */ +enum MyBitMaskBits : uint8_t +{ + flag0 = 0x01ull << 0, + flag1 = 0x01ull << 1, + flag4 = 0x01ull << 4, + flag6 = 0x01ull << 6, + flag7 = 0x01ull << 7 +}; +typedef uint8_t MyBitMask; + + +/*! + * @brief This class represents the structure BitsetBitmask defined by the user in the IDL file. + * @ingroup new_features_4_2 + */ +class BitsetBitmask +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport BitsetBitmask() + { + // Just to register all known types + registernew_features_4_2Types(); + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~BitsetBitmask() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object BitsetBitmask that will be copied. + */ + eProsima_user_DllExport BitsetBitmask( + const BitsetBitmask& x) + { + m_mybitset = x.m_mybitset; + + m_mybitmask = x.m_mybitmask; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object BitsetBitmask that will be copied. + */ + eProsima_user_DllExport BitsetBitmask( + BitsetBitmask&& x) noexcept + { + m_mybitset = std::move(x.m_mybitset); + m_mybitmask = std::move(x.m_mybitmask); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object BitsetBitmask that will be copied. + */ + eProsima_user_DllExport BitsetBitmask& operator =( + const BitsetBitmask& x) + { + + m_mybitset = x.m_mybitset; + + m_mybitmask = x.m_mybitmask; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object BitsetBitmask that will be copied. + */ + eProsima_user_DllExport BitsetBitmask& operator =( + BitsetBitmask&& x) noexcept + { + + m_mybitset = std::move(x.m_mybitset); + m_mybitmask = std::move(x.m_mybitmask); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x BitsetBitmask object to compare. + */ + eProsima_user_DllExport bool operator ==( + const BitsetBitmask& x) const + { + return (m_mybitset == x.m_mybitset && + m_mybitmask == x.m_mybitmask); + } + + /*! + * @brief Comparison operator. + * @param x BitsetBitmask object to compare. + */ + eProsima_user_DllExport bool operator !=( + const BitsetBitmask& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member mybitset + * @param _mybitset New value to be copied in member mybitset + */ + eProsima_user_DllExport void mybitset( + const MyBitset& _mybitset) + { + m_mybitset = _mybitset; + } + + /*! + * @brief This function moves the value in member mybitset + * @param _mybitset New value to be moved in member mybitset + */ + eProsima_user_DllExport void mybitset( + MyBitset&& _mybitset) + { + m_mybitset = std::move(_mybitset); + } + + /*! + * @brief This function returns a constant reference to member mybitset + * @return Constant reference to member mybitset + */ + eProsima_user_DllExport const MyBitset& mybitset() const + { + return m_mybitset; + } + + /*! + * @brief This function returns a reference to member mybitset + * @return Reference to member mybitset + */ + eProsima_user_DllExport MyBitset& mybitset() + { + return m_mybitset; + } + + + /*! + * @brief This function copies the value in member mybitmask + * @param _mybitmask New value to be copied in member mybitmask + */ + eProsima_user_DllExport void mybitmask( + const MyBitMask& _mybitmask) + { + m_mybitmask = _mybitmask; + } + + /*! + * @brief This function moves the value in member mybitmask + * @param _mybitmask New value to be moved in member mybitmask + */ + eProsima_user_DllExport void mybitmask( + MyBitMask&& _mybitmask) + { + m_mybitmask = std::move(_mybitmask); + } + + /*! + * @brief This function returns a constant reference to member mybitmask + * @return Constant reference to member mybitmask + */ + eProsima_user_DllExport const MyBitMask& mybitmask() const + { + return m_mybitmask; + } + + /*! + * @brief This function returns a reference to member mybitmask + * @return Reference to member mybitmask + */ + eProsima_user_DllExport MyBitMask& mybitmask() + { + return m_mybitmask; + } + + + +private: + + MyBitset m_mybitset; + MyBitMask m_mybitmask{0}; + +}; + + +/*! + * @brief This class represents the structure BM2 defined by the user in the IDL file. + * @ingroup new_features_4_2 + */ +class BM2 : public BitsetBitmask +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport BM2() + : BitsetBitmask() + { + // Just to register all known types + registernew_features_4_2Types(); + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~BM2() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object BM2 that will be copied. + */ + eProsima_user_DllExport BM2( + const BM2& x) + : BitsetBitmask(x) + { + m_two = x.m_two; + + m_mylong = x.m_mylong; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object BM2 that will be copied. + */ + eProsima_user_DllExport BM2( + BM2&& x) noexcept + : BitsetBitmask(std::move(x)) + + { + m_two = std::move(x.m_two); + m_mylong = x.m_mylong; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object BM2 that will be copied. + */ + eProsima_user_DllExport BM2& operator =( + const BM2& x) + { + BitsetBitmask::operator =(x); + + m_two = x.m_two; + + m_mylong = x.m_mylong; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object BM2 that will be copied. + */ + eProsima_user_DllExport BM2& operator =( + BM2&& x) noexcept + { + BitsetBitmask::operator =(std::move(x)); + + m_two = std::move(x.m_two); + m_mylong = x.m_mylong; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x BM2 object to compare. + */ + eProsima_user_DllExport bool operator ==( + const BM2& x) const + { + if (BitsetBitmask::operator !=(x)) + { + return false; + } + return (m_two == x.m_two && + m_mylong == x.m_mylong); + } + + /*! + * @brief Comparison operator. + * @param x BM2 object to compare. + */ + eProsima_user_DllExport bool operator !=( + const BM2& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member two + * @param _two New value to be copied in member two + */ + eProsima_user_DllExport void two( + const MyBitMask& _two) + { + m_two = _two; + } + + /*! + * @brief This function moves the value in member two + * @param _two New value to be moved in member two + */ + eProsima_user_DllExport void two( + MyBitMask&& _two) + { + m_two = std::move(_two); + } + + /*! + * @brief This function returns a constant reference to member two + * @return Constant reference to member two + */ + eProsima_user_DllExport const MyBitMask& two() const + { + return m_two; + } + + /*! + * @brief This function returns a reference to member two + * @return Reference to member two + */ + eProsima_user_DllExport MyBitMask& two() + { + return m_two; + } + + + /*! + * @brief This function sets a value in member mylong + * @param _mylong New value for member mylong + */ + eProsima_user_DllExport void mylong( + int32_t _mylong) + { + m_mylong = _mylong; + } + + /*! + * @brief This function returns the value of member mylong + * @return Value of member mylong + */ + eProsima_user_DllExport int32_t mylong() const + { + return m_mylong; + } + + /*! + * @brief This function returns a reference to member mylong + * @return Reference to member mylong + */ + eProsima_user_DllExport int32_t& mylong() + { + return m_mylong; + } + + + +private: + + MyBitMask m_two{0}; + int32_t m_mylong{0}; + +}; + +} // namespace bitmodule + + +/*! + * @brief This class represents the structure StructTest defined by the user in the IDL file. + * @ingroup new_features_4_2 + */ +class StructTest : public NewAliases +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport StructTest() + : NewAliases() + { + // Just to register all known types + registernew_features_4_2Types(); + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~StructTest() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object StructTest that will be copied. + */ + eProsima_user_DllExport StructTest( + const StructTest& x) + : NewAliases(x) + { + m_octetUnion = x.m_octetUnion; + + m_int8Union = x.m_int8Union; + + m_myStructBits = x.m_myStructBits; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object StructTest that will be copied. + */ + eProsima_user_DllExport StructTest( + StructTest&& x) noexcept + : NewAliases(std::move(x)) + + { + m_octetUnion = std::move(x.m_octetUnion); + m_int8Union = std::move(x.m_int8Union); + m_myStructBits = std::move(x.m_myStructBits); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object StructTest that will be copied. + */ + eProsima_user_DllExport StructTest& operator =( + const StructTest& x) + { + NewAliases::operator =(x); + + m_octetUnion = x.m_octetUnion; + + m_int8Union = x.m_int8Union; + + m_myStructBits = x.m_myStructBits; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object StructTest that will be copied. + */ + eProsima_user_DllExport StructTest& operator =( + StructTest&& x) noexcept + { + NewAliases::operator =(std::move(x)); + + m_octetUnion = std::move(x.m_octetUnion); + m_int8Union = std::move(x.m_int8Union); + m_myStructBits = std::move(x.m_myStructBits); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x StructTest object to compare. + */ + eProsima_user_DllExport bool operator ==( + const StructTest& x) const + { + if (NewAliases::operator !=(x)) + { + return false; + } + return (m_octetUnion == x.m_octetUnion && + m_int8Union == x.m_int8Union && + m_myStructBits == x.m_myStructBits); + } + + /*! + * @brief Comparison operator. + * @param x StructTest object to compare. + */ + eProsima_user_DllExport bool operator !=( + const StructTest& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member octetUnion + * @param _octetUnion New value to be copied in member octetUnion + */ + eProsima_user_DllExport void octetUnion( + const OctetUnion& _octetUnion) + { + m_octetUnion = _octetUnion; + } + + /*! + * @brief This function moves the value in member octetUnion + * @param _octetUnion New value to be moved in member octetUnion + */ + eProsima_user_DllExport void octetUnion( + OctetUnion&& _octetUnion) + { + m_octetUnion = std::move(_octetUnion); + } + + /*! + * @brief This function returns a constant reference to member octetUnion + * @return Constant reference to member octetUnion + */ + eProsima_user_DllExport const OctetUnion& octetUnion() const + { + return m_octetUnion; + } + + /*! + * @brief This function returns a reference to member octetUnion + * @return Reference to member octetUnion + */ + eProsima_user_DllExport OctetUnion& octetUnion() + { + return m_octetUnion; + } + + + /*! + * @brief This function copies the value in member int8Union + * @param _int8Union New value to be copied in member int8Union + */ + eProsima_user_DllExport void int8Union( + const Int8Union& _int8Union) + { + m_int8Union = _int8Union; + } + + /*! + * @brief This function moves the value in member int8Union + * @param _int8Union New value to be moved in member int8Union + */ + eProsima_user_DllExport void int8Union( + Int8Union&& _int8Union) + { + m_int8Union = std::move(_int8Union); + } + + /*! + * @brief This function returns a constant reference to member int8Union + * @return Constant reference to member int8Union + */ + eProsima_user_DllExport const Int8Union& int8Union() const + { + return m_int8Union; + } + + /*! + * @brief This function returns a reference to member int8Union + * @return Reference to member int8Union + */ + eProsima_user_DllExport Int8Union& int8Union() + { + return m_int8Union; + } + + + /*! + * @brief This function copies the value in member myStructBits + * @param _myStructBits New value to be copied in member myStructBits + */ + eProsima_user_DllExport void myStructBits( + const bitmodule::BM2& _myStructBits) + { + m_myStructBits = _myStructBits; + } + + /*! + * @brief This function moves the value in member myStructBits + * @param _myStructBits New value to be moved in member myStructBits + */ + eProsima_user_DllExport void myStructBits( + bitmodule::BM2&& _myStructBits) + { + m_myStructBits = std::move(_myStructBits); + } + + /*! + * @brief This function returns a constant reference to member myStructBits + * @return Constant reference to member myStructBits + */ + eProsima_user_DllExport const bitmodule::BM2& myStructBits() const + { + return m_myStructBits; + } + + /*! + * @brief This function returns a reference to member myStructBits + * @return Reference to member myStructBits + */ + eProsima_user_DllExport bitmodule::BM2& myStructBits() + { + return m_myStructBits; + } + + + +private: + + OctetUnion m_octetUnion; + Int8Union m_int8Union; + bitmodule::BM2 m_myStructBits; + +}; + +#endif // _FAST_DDS_GENERATED_NEW_FEATURES_4_2_HPP_ + + diff --git a/test/unittest/dynamic_types/idl/new_features_4_2CdrAux.hpp b/test/unittest/dynamic_types/idl/new_features_4_2CdrAux.hpp index 213ee811979..267a00924ba 100644 --- a/test/unittest/dynamic_types/idl/new_features_4_2CdrAux.hpp +++ b/test/unittest/dynamic_types/idl/new_features_4_2CdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_NEW_FEATURES_4_2CDRAUX_HPP_ #define _FAST_DDS_GENERATED_NEW_FEATURES_4_2CDRAUX_HPP_ -#include "new_features_4_2.h" +#include "new_features_4_2.hpp" constexpr uint32_t bitmodule_BM2_max_cdr_typesize {24UL}; constexpr uint32_t bitmodule_BM2_max_key_cdr_typesize {0UL}; @@ -61,12 +61,6 @@ eProsima_user_DllExport void serialize_key( - - - - - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const bitmodule::BitsetBitmask& data); @@ -79,7 +73,6 @@ eProsima_user_DllExport void serialize_key( - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const StructTest& data); diff --git a/test/unittest/dynamic_types/idl/new_features_4_2CdrAux.ipp b/test/unittest/dynamic_types/idl/new_features_4_2CdrAux.ipp index c8b73b1b452..dc8e3741601 100644 --- a/test/unittest/dynamic_types/idl/new_features_4_2CdrAux.ipp +++ b/test/unittest/dynamic_types/idl/new_features_4_2CdrAux.ipp @@ -772,7 +772,6 @@ void serialize_key( - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, diff --git a/test/unittest/dynamic_types/idl/new_features_4_2PubSubTypes.cxx b/test/unittest/dynamic_types/idl/new_features_4_2PubSubTypes.cxx index 61982d3150e..1a18006c486 100644 --- a/test/unittest/dynamic_types/idl/new_features_4_2PubSubTypes.cxx +++ b/test/unittest/dynamic_types/idl/new_features_4_2PubSubTypes.cxx @@ -225,12 +225,6 @@ bool NewAliasesPubSubType::getKey( - - - - - - namespace bitmodule { @@ -612,8 +606,7 @@ namespace bitmodule { return true; } - -} //End of namespace bitmodule +} // namespace bitmodule @@ -805,3 +798,6 @@ bool StructTestPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "new_features_4_2CdrAux.ipp" diff --git a/test/unittest/dynamic_types/idl/new_features_4_2PubSubTypes.h b/test/unittest/dynamic_types/idl/new_features_4_2PubSubTypes.h index 03f413ae74f..a3da7982547 100644 --- a/test/unittest/dynamic_types/idl/new_features_4_2PubSubTypes.h +++ b/test/unittest/dynamic_types/idl/new_features_4_2PubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "new_features_4_2.h" +#include "new_features_4_2.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -133,12 +133,6 @@ class NewAliasesPubSubType : public eprosima::fastdds::dds::TopicDataType - - - - - - namespace bitmodule { @@ -321,7 +315,7 @@ namespace bitmodule unsigned char* m_keyBuffer; }; -} +} // namespace bitmodule diff --git a/test/unittest/dynamic_types/idl/new_features_4_2TypeObject.cxx b/test/unittest/dynamic_types/idl/new_features_4_2TypeObject.cxx index 32f204ac131..54d9dd63a6c 100644 --- a/test/unittest/dynamic_types/idl/new_features_4_2TypeObject.cxx +++ b/test/unittest/dynamic_types/idl/new_features_4_2TypeObject.cxx @@ -24,7 +24,7 @@ namespace { char dummy; } #endif -#include "new_features_4_2.h" +#include "new_features_4_2.hpp" #include "new_features_4_2TypeObject.h" #include #include diff --git a/test/unittest/dynamic_types/idl/new_features_4_2v1.cxx b/test/unittest/dynamic_types/idl/new_features_4_2v1.cxx deleted file mode 100644 index 4287df4cf97..00000000000 --- a/test/unittest/dynamic_types/idl/new_features_4_2v1.cxx +++ /dev/null @@ -1,2905 +0,0 @@ -// 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 new_features_4_2.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "new_features_4_2.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include "new_features_4_2TypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define bitmodule_BM2_max_cdr_typesize 24ULL; -#define NewAliases_max_cdr_typesize 40ULL; - -#define StructTest_max_cdr_typesize 88ULL; - - - -#define bitmodule_BitsetBitmask_max_cdr_typesize 17ULL; - - - - -NewAliases::NewAliases() -{ - // int8 m_int8_ - m_int8_ = 0; - // uint8 m_uint8_ - m_uint8_ = 0; - // short m_int16_ - m_int16_ = 0; - // unsigned short m_uint16_ - m_uint16_ = 0; - // long m_int32_ - m_int32_ = 0; - // unsigned long m_uint32_ - m_uint32_ = 0; - // long long m_int64_ - m_int64_ = 0; - // unsigned long long m_uint64_ - m_uint64_ = 555; - // /type_d() m_local_string - - - // Just to register all known types - registernew_features_4_2Types(); -} - -NewAliases::~NewAliases() -{ -} - -NewAliases::NewAliases( - const NewAliases& x) -{ - m_int8_ = x.m_int8_; - - - m_uint8_ = x.m_uint8_; - - - m_int16_ = x.m_int16_; - - - m_uint16_ = x.m_uint16_; - - - m_int32_ = x.m_int32_; - - - m_uint32_ = x.m_uint32_; - - - m_int64_ = x.m_int64_; - - - m_uint64_ = x.m_uint64_; - - - m_local_string = x.m_local_string; - -} - -NewAliases::NewAliases( - NewAliases&& x) noexcept -{ - m_int8_ = x.m_int8_; - - - m_uint8_ = x.m_uint8_; - - - m_int16_ = x.m_int16_; - - - m_uint16_ = x.m_uint16_; - - - m_int32_ = x.m_int32_; - - - m_uint32_ = x.m_uint32_; - - - m_int64_ = x.m_int64_; - - - m_uint64_ = x.m_uint64_; - - - m_local_string = std::move(x.m_local_string); - -} - -NewAliases& NewAliases::operator =( - const NewAliases& x) -{ - m_int8_ = x.m_int8_; - - - m_uint8_ = x.m_uint8_; - - - m_int16_ = x.m_int16_; - - - m_uint16_ = x.m_uint16_; - - - m_int32_ = x.m_int32_; - - - m_uint32_ = x.m_uint32_; - - - m_int64_ = x.m_int64_; - - - m_uint64_ = x.m_uint64_; - - - m_local_string = x.m_local_string; - - return *this; -} - -NewAliases& NewAliases::operator =( - NewAliases&& x) noexcept -{ - m_int8_ = x.m_int8_; - - - m_uint8_ = x.m_uint8_; - - - m_int16_ = x.m_int16_; - - - m_uint16_ = x.m_uint16_; - - - m_int32_ = x.m_int32_; - - - m_uint32_ = x.m_uint32_; - - - m_int64_ = x.m_int64_; - - - m_uint64_ = x.m_uint64_; - - - m_local_string = std::move(x.m_local_string); - - return *this; -} - -bool NewAliases::operator ==( - const NewAliases& x) const -{ - return (m_int8_ == x.m_int8_ && - m_uint8_ == x.m_uint8_ && - m_int16_ == x.m_int16_ && - m_uint16_ == x.m_uint16_ && - m_int32_ == x.m_int32_ && - m_uint32_ == x.m_uint32_ && - m_int64_ == x.m_int64_ && - m_uint64_ == x.m_uint64_ && - m_local_string == x.m_local_string); -} - -bool NewAliases::operator !=( - const NewAliases& x) const -{ - return !(*this == x); -} - -size_t NewAliases::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return NewAliases_max_cdr_typesize; -} - -size_t NewAliases::getCdrSerializedSize( - const NewAliases& 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); - - - - return current_alignment - initial_alignment; -} - - -void NewAliases::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_int8_; - - scdr << m_uint8_; - - scdr << m_int16_; - - scdr << m_uint16_; - - scdr << m_int32_; - - scdr << m_uint32_; - - scdr << m_int64_; - - scdr << m_uint64_; - -} - -void NewAliases::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_int8_; - - - - dcdr >> m_uint8_; - - - - dcdr >> m_int16_; - - - - dcdr >> m_uint16_; - - - - dcdr >> m_int32_; - - - - dcdr >> m_uint32_; - - - - dcdr >> m_int64_; - - - - dcdr >> m_uint64_; - - - -} - - -bool NewAliases::isKeyDefined() -{ - return false; -} - -void NewAliases::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member int8_ - * @param _int8_ New value for member int8_ - */ -void NewAliases::int8_( - int8_t _int8_) -{ - m_int8_ = _int8_; -} - -/*! - * @brief This function returns the value of member int8_ - * @return Value of member int8_ - */ -int8_t NewAliases::int8_() const -{ - return m_int8_; -} - -/*! - * @brief This function returns a reference to member int8_ - * @return Reference to member int8_ - */ -int8_t& NewAliases::int8_() -{ - return m_int8_; -} - - -/*! - * @brief This function sets a value in member uint8_ - * @param _uint8_ New value for member uint8_ - */ -void NewAliases::uint8_( - uint8_t _uint8_) -{ - m_uint8_ = _uint8_; -} - -/*! - * @brief This function returns the value of member uint8_ - * @return Value of member uint8_ - */ -uint8_t NewAliases::uint8_() const -{ - return m_uint8_; -} - -/*! - * @brief This function returns a reference to member uint8_ - * @return Reference to member uint8_ - */ -uint8_t& NewAliases::uint8_() -{ - return m_uint8_; -} - - -/*! - * @brief This function sets a value in member int16_ - * @param _int16_ New value for member int16_ - */ -void NewAliases::int16_( - int16_t _int16_) -{ - m_int16_ = _int16_; -} - -/*! - * @brief This function returns the value of member int16_ - * @return Value of member int16_ - */ -int16_t NewAliases::int16_() const -{ - return m_int16_; -} - -/*! - * @brief This function returns a reference to member int16_ - * @return Reference to member int16_ - */ -int16_t& NewAliases::int16_() -{ - return m_int16_; -} - - -/*! - * @brief This function sets a value in member uint16_ - * @param _uint16_ New value for member uint16_ - */ -void NewAliases::uint16_( - uint16_t _uint16_) -{ - m_uint16_ = _uint16_; -} - -/*! - * @brief This function returns the value of member uint16_ - * @return Value of member uint16_ - */ -uint16_t NewAliases::uint16_() const -{ - return m_uint16_; -} - -/*! - * @brief This function returns a reference to member uint16_ - * @return Reference to member uint16_ - */ -uint16_t& NewAliases::uint16_() -{ - return m_uint16_; -} - - -/*! - * @brief This function sets a value in member int32_ - * @param _int32_ New value for member int32_ - */ -void NewAliases::int32_( - int32_t _int32_) -{ - m_int32_ = _int32_; -} - -/*! - * @brief This function returns the value of member int32_ - * @return Value of member int32_ - */ -int32_t NewAliases::int32_() const -{ - return m_int32_; -} - -/*! - * @brief This function returns a reference to member int32_ - * @return Reference to member int32_ - */ -int32_t& NewAliases::int32_() -{ - return m_int32_; -} - - -/*! - * @brief This function sets a value in member uint32_ - * @param _uint32_ New value for member uint32_ - */ -void NewAliases::uint32_( - uint32_t _uint32_) -{ - m_uint32_ = _uint32_; -} - -/*! - * @brief This function returns the value of member uint32_ - * @return Value of member uint32_ - */ -uint32_t NewAliases::uint32_() const -{ - return m_uint32_; -} - -/*! - * @brief This function returns a reference to member uint32_ - * @return Reference to member uint32_ - */ -uint32_t& NewAliases::uint32_() -{ - return m_uint32_; -} - - -/*! - * @brief This function sets a value in member int64_ - * @param _int64_ New value for member int64_ - */ -void NewAliases::int64_( - int64_t _int64_) -{ - m_int64_ = _int64_; -} - -/*! - * @brief This function returns the value of member int64_ - * @return Value of member int64_ - */ -int64_t NewAliases::int64_() const -{ - return m_int64_; -} - -/*! - * @brief This function returns a reference to member int64_ - * @return Reference to member int64_ - */ -int64_t& NewAliases::int64_() -{ - return m_int64_; -} - - -/*! - * @brief This function sets a value in member uint64_ - * @param _uint64_ New value for member uint64_ - */ -void NewAliases::uint64_( - uint64_t _uint64_) -{ - m_uint64_ = _uint64_; -} - -/*! - * @brief This function returns the value of member uint64_ - * @return Value of member uint64_ - */ -uint64_t NewAliases::uint64_() const -{ - return m_uint64_; -} - -/*! - * @brief This function returns a reference to member uint64_ - * @return Reference to member uint64_ - */ -uint64_t& NewAliases::uint64_() -{ - return m_uint64_; -} - - -/*! - * @brief This function copies the value in member local_string - * @param _local_string New value to be copied in member local_string - */ -void NewAliases::local_string( - const std::string& _local_string) -{ - m_local_string = _local_string; -} - -/*! - * @brief This function moves the value in member local_string - * @param _local_string New value to be moved in member local_string - */ -void NewAliases::local_string( - std::string&& _local_string) -{ - m_local_string = std::move(_local_string); -} - -/*! - * @brief This function returns a constant reference to member local_string - * @return Constant reference to member local_string - */ -const std::string& NewAliases::local_string() const -{ - return m_local_string; -} - -/*! - * @brief This function returns a reference to member local_string - * @return Reference to member local_string - */ -std::string& NewAliases::local_string() -{ - return m_local_string; -} - - - - - -WCharUnion::WCharUnion() -{ - m__d = 'a'; - // long m_case_zero - m_case_zero = 0; - // long m_case_one - m_case_one = 0; -} - -WCharUnion::~WCharUnion() -{ -} - -WCharUnion::WCharUnion( - const WCharUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case 'a': - m_case_zero = x.m_case_zero; - break; - - - case 'b': - m_case_one = x.m_case_one; - break; - - default: - break; - } -} - -WCharUnion::WCharUnion( - WCharUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case 'a': - m_case_zero = x.m_case_zero; - break; - - - case 'b': - m_case_one = x.m_case_one; - break; - - default: - break; - } -} - -WCharUnion& WCharUnion::operator =( - const WCharUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case 'a': - m_case_zero = x.m_case_zero; - break; - - - case 'b': - m_case_one = x.m_case_one; - break; - - default: - break; - } - - return *this; -} - -WCharUnion& WCharUnion::operator =( - WCharUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case 'a': - m_case_zero = x.m_case_zero; - break; - - - case 'b': - m_case_one = x.m_case_one; - break; - - default: - break; - } - - return *this; -} - -bool WCharUnion::operator ==( - const WCharUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case 'a': - return (m_case_zero == x.m_case_zero); - break; - - - case 'b': - return (m_case_one == x.m_case_one); - break; - - default: - break; - } - return false; -} - -bool WCharUnion::operator !=( - const WCharUnion& x) const -{ - return !(*this == x); -} - -void WCharUnion::_d( - wchar_t __d) -{ - bool b = false; - - switch(m__d) - { - case 'a': - switch(__d) - { - case 'a': - b = true; - break; - default: - break; - } - break; - - - case 'b': - switch(__d) - { - case 'b': - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -wchar_t WCharUnion::_d() const -{ - return m__d; -} - -wchar_t& WCharUnion::_d() -{ - return m__d; -} - -void WCharUnion::case_zero( - int32_t _case_zero) -{ - m_case_zero = _case_zero; - m__d = 'a'; - -} - -int32_t WCharUnion::case_zero() const -{ - bool b = false; - - switch(m__d) - { - case 'a': - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_zero; -} - -int32_t& WCharUnion::case_zero() -{ - bool b = false; - - switch(m__d) - { - case 'a': - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_zero; -} - - -void WCharUnion::case_one( - int32_t _case_one) -{ - m_case_one = _case_one; - m__d = 'b'; - -} - -int32_t WCharUnion::case_one() const -{ - bool b = false; - - switch(m__d) - { - case 'b': - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_one; -} - -int32_t& WCharUnion::case_one() -{ - bool b = false; - - switch(m__d) - { - case 'b': - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_one; -} - - -// TODO(Ricardo) Review -size_t WCharUnion::getCdrSerializedSize( - const WCharUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case 'a': - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case 'b': - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void WCharUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case 'a': - scdr << m_case_zero; - - break; - - - case 'b': - scdr << m_case_one; - - break; - - default: - break; - } -} - -void WCharUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case 'a': - dcdr >> m_case_zero; - - - break; - - - case 'b': - dcdr >> m_case_one; - - - break; - - default: - break; - } -} - - - - - -OctetUnion::OctetUnion() -{ - m__d = 5; - // long m_case_five - m_case_five = 0; - // long m_case_seven - m_case_seven = 0; -} - -OctetUnion::~OctetUnion() -{ -} - -OctetUnion::OctetUnion( - const OctetUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case 5: - m_case_five = x.m_case_five; - break; - - - case 7: - m_case_seven = x.m_case_seven; - break; - - default: - break; - } -} - -OctetUnion::OctetUnion( - OctetUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case 5: - m_case_five = x.m_case_five; - break; - - - case 7: - m_case_seven = x.m_case_seven; - break; - - default: - break; - } -} - -OctetUnion& OctetUnion::operator =( - const OctetUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case 5: - m_case_five = x.m_case_five; - break; - - - case 7: - m_case_seven = x.m_case_seven; - break; - - default: - break; - } - - return *this; -} - -OctetUnion& OctetUnion::operator =( - OctetUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case 5: - m_case_five = x.m_case_five; - break; - - - case 7: - m_case_seven = x.m_case_seven; - break; - - default: - break; - } - - return *this; -} - -bool OctetUnion::operator ==( - const OctetUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case 5: - return (m_case_five == x.m_case_five); - break; - - - case 7: - return (m_case_seven == x.m_case_seven); - break; - - default: - break; - } - return false; -} - -bool OctetUnion::operator !=( - const OctetUnion& x) const -{ - return !(*this == x); -} - -void OctetUnion::_d( - uint8_t __d) -{ - bool b = false; - - switch(m__d) - { - case 5: - switch(__d) - { - case 5: - b = true; - break; - default: - break; - } - break; - - - case 7: - switch(__d) - { - case 7: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -uint8_t OctetUnion::_d() const -{ - return m__d; -} - -uint8_t& OctetUnion::_d() -{ - return m__d; -} - -void OctetUnion::case_five( - int32_t _case_five) -{ - m_case_five = _case_five; - m__d = 5; - -} - -int32_t OctetUnion::case_five() const -{ - bool b = false; - - switch(m__d) - { - case 5: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_five; -} - -int32_t& OctetUnion::case_five() -{ - bool b = false; - - switch(m__d) - { - case 5: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_five; -} - - -void OctetUnion::case_seven( - int32_t _case_seven) -{ - m_case_seven = _case_seven; - m__d = 7; - -} - -int32_t OctetUnion::case_seven() const -{ - bool b = false; - - switch(m__d) - { - case 7: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_seven; -} - -int32_t& OctetUnion::case_seven() -{ - bool b = false; - - switch(m__d) - { - case 7: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_seven; -} - - -// TODO(Ricardo) Review -size_t OctetUnion::getCdrSerializedSize( - const OctetUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - switch(data.m__d) - { - case 5: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case 7: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void OctetUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case 5: - scdr << m_case_five; - - break; - - - case 7: - scdr << m_case_seven; - - break; - - default: - break; - } -} - -void OctetUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case 5: - dcdr >> m_case_five; - - - break; - - - case 7: - dcdr >> m_case_seven; - - - break; - - default: - break; - } -} - - - - - -Int8Union::Int8Union() -{ - m__d = 3; - // long m_case_three - m_case_three = 0; - // long m_case_six - m_case_six = 0; -} - -Int8Union::~Int8Union() -{ -} - -Int8Union::Int8Union( - const Int8Union& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case 3: - m_case_three = x.m_case_three; - break; - - - case 6: - m_case_six = x.m_case_six; - break; - - default: - break; - } -} - -Int8Union::Int8Union( - Int8Union&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case 3: - m_case_three = x.m_case_three; - break; - - - case 6: - m_case_six = x.m_case_six; - break; - - default: - break; - } -} - -Int8Union& Int8Union::operator =( - const Int8Union& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case 3: - m_case_three = x.m_case_three; - break; - - - case 6: - m_case_six = x.m_case_six; - break; - - default: - break; - } - - return *this; -} - -Int8Union& Int8Union::operator =( - Int8Union&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case 3: - m_case_three = x.m_case_three; - break; - - - case 6: - m_case_six = x.m_case_six; - break; - - default: - break; - } - - return *this; -} - -bool Int8Union::operator ==( - const Int8Union& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case 3: - return (m_case_three == x.m_case_three); - break; - - - case 6: - return (m_case_six == x.m_case_six); - break; - - default: - break; - } - return false; -} - -bool Int8Union::operator !=( - const Int8Union& x) const -{ - return !(*this == x); -} - -void Int8Union::_d( - int8_t __d) -{ - bool b = false; - - switch(m__d) - { - case 3: - switch(__d) - { - case 3: - b = true; - break; - default: - break; - } - break; - - - case 6: - switch(__d) - { - case 6: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int8_t Int8Union::_d() const -{ - return m__d; -} - -int8_t& Int8Union::_d() -{ - return m__d; -} - -void Int8Union::case_three( - int32_t _case_three) -{ - m_case_three = _case_three; - m__d = 3; - -} - -int32_t Int8Union::case_three() const -{ - bool b = false; - - switch(m__d) - { - case 3: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_three; -} - -int32_t& Int8Union::case_three() -{ - bool b = false; - - switch(m__d) - { - case 3: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_three; -} - - -void Int8Union::case_six( - int32_t _case_six) -{ - m_case_six = _case_six; - m__d = 6; - -} - -int32_t Int8Union::case_six() const -{ - bool b = false; - - switch(m__d) - { - case 6: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_six; -} - -int32_t& Int8Union::case_six() -{ - bool b = false; - - switch(m__d) - { - case 6: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_case_six; -} - - -// TODO(Ricardo) Review -size_t Int8Union::getCdrSerializedSize( - const Int8Union& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - switch(data.m__d) - { - case 3: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case 6: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void Int8Union::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case 3: - scdr << m_case_three; - - break; - - - case 6: - scdr << m_case_six; - - break; - - default: - break; - } -} - -void Int8Union::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case 3: - dcdr >> m_case_three; - - - break; - - - case 6: - dcdr >> m_case_six; - - - break; - - default: - break; - } -} - - - -namespace bitmodule { - -ParentBitset::ParentBitset() -{ - // Just to register all known types - registernew_features_4_2Types(); -} - -ParentBitset::~ParentBitset() -{ -} - -ParentBitset::ParentBitset( - const ParentBitset& x) -{ - m_bitset = x.m_bitset; -} - -ParentBitset::ParentBitset( - ParentBitset&& x) noexcept -{ - m_bitset = x.m_bitset; -} - -ParentBitset& ParentBitset::operator =( - const ParentBitset& x) -{ - m_bitset = x.m_bitset; - - return *this; -} - -ParentBitset& ParentBitset::operator =( - ParentBitset&& x) noexcept -{ - m_bitset = x.m_bitset; - - return *this; -} - -bool ParentBitset::operator ==( - const ParentBitset& x) const -{ - return m_bitset == x.m_bitset; -} - -bool ParentBitset::operator !=( - const ParentBitset& x) const -{ - return !(*this == x); -} - -size_t ParentBitset::getCdrSerializedSize( - const ParentBitset&, - size_t current_alignment) -{ - size_t initial_alignment = current_alignment; - - current_alignment += sizeof(helper::FindType<17>::type) + - eprosima::fastcdr::Cdr::alignment(current_alignment, sizeof(helper::FindType<17>::type)); - - return current_alignment - initial_alignment; -} - - -void ParentBitset::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - using namespace bitmodule; - - helper::FindType<17>::type bits = static_cast::type>(bitset().to_ullong()); - scdr << bits; -} - -void ParentBitset::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - using namespace bitmodule; - - helper::FindType<17>::type bits; - dcdr >> bits; - bitset(std::bitset<17>(bits)); -} - - - -void bitmodule::ParentBitset::parent_bitfield( - uint32_t _parent_bitfield) -{ - int base = 0; - int size = 17; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_parent_bitfield & 0x01)); - _parent_bitfield = _parent_bitfield >> 1; - } - -} - -uint32_t bitmodule::ParentBitset::parent_bitfield() const -{ - int base = 0; - int size = 17; - std::bitset<17> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -std::bitset<17> ParentBitset::bitset() const -{ - std::string str_value; - - str_value = m_bitset.to_string() + str_value; - - return std::bitset<17>(str_value); -} - -void ParentBitset::bitset( - const std::bitset<17>& bitset) -{ - std::string str_value {bitset.to_string()}; - size_t base_diff {0}; - size_t last_post {std::string::npos}; - - base_diff += 17; - m_bitset = std::bitset<17>(str_value.substr(str_value.length() - base_diff, last_post)); -} - -MyBitset::MyBitset() - : bitmodule::ParentBitset() -{ - // Just to register all known types - registernew_features_4_2Types(); -} - -MyBitset::~MyBitset() -{ -} - -MyBitset::MyBitset( - const MyBitset& x) - : bitmodule::ParentBitset(x) -{ - m_bitset = x.m_bitset; -} - -MyBitset::MyBitset( - MyBitset&& x) noexcept - : bitmodule::ParentBitset(std::move(x)) -{ - m_bitset = x.m_bitset; -} - -MyBitset& MyBitset::operator =( - const MyBitset& x) -{ - bitmodule::ParentBitset::operator =(x); - - m_bitset = x.m_bitset; - - return *this; -} - -MyBitset& MyBitset::operator =( - MyBitset&& x) noexcept -{ - bitmodule::ParentBitset::operator =(std::move(x)); - - m_bitset = x.m_bitset; - - return *this; -} - -bool MyBitset::operator ==( - const MyBitset& x) const -{ - if (bitmodule::ParentBitset::operator !=(x)) return false; - - return m_bitset == x.m_bitset; -} - -bool MyBitset::operator !=( - const MyBitset& x) const -{ - return !(*this == x); -} - -size_t MyBitset::getCdrSerializedSize( - const MyBitset&, - size_t current_alignment) -{ - size_t initial_alignment = current_alignment; - - current_alignment += sizeof(helper::FindType<50>::type) + - eprosima::fastcdr::Cdr::alignment(current_alignment, sizeof(helper::FindType<50>::type)); - - return current_alignment - initial_alignment; -} - - -void MyBitset::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - using namespace bitmodule; - - helper::FindType<50>::type bits = static_cast::type>(bitset().to_ullong()); - scdr << bits; -} - -void MyBitset::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - using namespace bitmodule; - - helper::FindType<50>::type bits; - dcdr >> bits; - bitset(std::bitset<50>(bits)); -} - - - -void bitmodule::MyBitset::a( - char _a) -{ - int base = 0; - int size = 3; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_a & 0x01)); - _a = _a >> 1; - } - -} - -char bitmodule::MyBitset::a() const -{ - int base = 0; - int size = 3; - std::bitset<3> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -void bitmodule::MyBitset::b( - bool _b) -{ - int base = 3; - m_bitset.set(base, _b); -} - -bool bitmodule::MyBitset::b() const -{ - int base = 3; - return m_bitset.test(base); -} - - - -void bitmodule::MyBitset::c( - uint16_t _c) -{ - int base = 8; - int size = 10; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_c & 0x01)); - _c = _c >> 1; - } - -} - -uint16_t bitmodule::MyBitset::c() const -{ - int base = 8; - int size = 10; - std::bitset<10> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -void bitmodule::MyBitset::d( - int16_t _d) -{ - int base = 18; - int size = 5; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_d & 0x01)); - _d = _d >> 1; - } - -} - -int16_t bitmodule::MyBitset::d() const -{ - int base = 18; - int size = 5; - std::bitset<5> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -void bitmodule::MyBitset::e( - int16_t _e) -{ - int base = 23; - int size = 5; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_e & 0x01)); - _e = _e >> 1; - } - -} - -int16_t bitmodule::MyBitset::e() const -{ - int base = 23; - int size = 5; - std::bitset<5> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -void bitmodule::MyBitset::f( - int16_t _f) -{ - int base = 28; - int size = 5; - for (int i = base; i < base + size; ++i) - { - m_bitset.set(i, !!(_f & 0x01)); - _f = _f >> 1; - } - -} - -int16_t bitmodule::MyBitset::f() const -{ - int base = 28; - int size = 5; - std::bitset<5> aux; - for (int i = 0; i < size; ++i) - { - aux.set(i, m_bitset.test(i + base)); - } - return static_cast(aux.to_ullong()); - -} - - -std::bitset<50> MyBitset::bitset() const -{ - std::string str_value; - - str_value = static_cast(this)->bitset().to_string() + str_value; - - str_value = m_bitset.to_string() + str_value; - - return std::bitset<50>(str_value); -} - -void MyBitset::bitset( - const std::bitset<50>& bitset) -{ - std::string str_value {bitset.to_string()}; - size_t base_diff {0}; - size_t last_post {std::string::npos}; - - { - base_diff += 17; - std::bitset<17> internal_bitset(str_value.substr(str_value.length() - base_diff, last_post)); - static_cast(this)->bitset(internal_bitset); - last_post = base_diff; - } - - base_diff += 33; - m_bitset = std::bitset<33>(str_value.substr(str_value.length() - base_diff, last_post)); -} - - - - -BitsetBitmask::BitsetBitmask() -{ - // bitmodule::MyBitset m_mybitset - - // bitmodule::MyBitMask m_mybitmask - - - // Just to register all known types - registernew_features_4_2Types(); -} - -BitsetBitmask::~BitsetBitmask() -{ -} - -BitsetBitmask::BitsetBitmask( - const BitsetBitmask& x) -{ - m_mybitset = x.m_mybitset; - - - m_mybitmask = x.m_mybitmask; - -} - -BitsetBitmask::BitsetBitmask( - BitsetBitmask&& x) noexcept -{ - m_mybitset = std::move(x.m_mybitset); - - - m_mybitmask = std::move(x.m_mybitmask); - -} - -BitsetBitmask& BitsetBitmask::operator =( - const BitsetBitmask& x) -{ - m_mybitset = x.m_mybitset; - - - m_mybitmask = x.m_mybitmask; - - return *this; -} - -BitsetBitmask& BitsetBitmask::operator =( - BitsetBitmask&& x) noexcept -{ - m_mybitset = std::move(x.m_mybitset); - - - m_mybitmask = std::move(x.m_mybitmask); - - return *this; -} - -bool BitsetBitmask::operator ==( - const BitsetBitmask& x) const -{ - return (m_mybitset == x.m_mybitset && - m_mybitmask == x.m_mybitmask); -} - -bool BitsetBitmask::operator !=( - const BitsetBitmask& x) const -{ - return !(*this == x); -} - -size_t BitsetBitmask::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return bitmodule_BitsetBitmask_max_cdr_typesize; -} - -size_t BitsetBitmask::getCdrSerializedSize( - const BitsetBitmask& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += bitmodule::MyBitset::getCdrSerializedSize(data.mybitset(), current_alignment); - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - return current_alignment - initial_alignment; -} - - -void BitsetBitmask::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_mybitset; - - scdr << (uint8_t)m_mybitmask; - -} - -void BitsetBitmask::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_mybitset; - - - - { - uint8_t bitmask_value = 0; - dcdr >> bitmask_value; - m_mybitmask = (bitmodule::MyBitMask)bitmask_value; - } - - - -} - - -bool BitsetBitmask::isKeyDefined() -{ - return false; -} - -void BitsetBitmask::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member mybitset - * @param _mybitset New value to be copied in member mybitset - */ -void BitsetBitmask::mybitset( - const bitmodule::MyBitset& _mybitset) -{ - m_mybitset = _mybitset; -} - -/*! - * @brief This function moves the value in member mybitset - * @param _mybitset New value to be moved in member mybitset - */ -void BitsetBitmask::mybitset( - bitmodule::MyBitset&& _mybitset) -{ - m_mybitset = std::move(_mybitset); -} - -/*! - * @brief This function returns a constant reference to member mybitset - * @return Constant reference to member mybitset - */ -const bitmodule::MyBitset& BitsetBitmask::mybitset() const -{ - return m_mybitset; -} - -/*! - * @brief This function returns a reference to member mybitset - * @return Reference to member mybitset - */ -bitmodule::MyBitset& BitsetBitmask::mybitset() -{ - return m_mybitset; -} - - -/*! - * @brief This function copies the value in member mybitmask - * @param _mybitmask New value to be copied in member mybitmask - */ -void BitsetBitmask::mybitmask( - const bitmodule::MyBitMask& _mybitmask) -{ - m_mybitmask = _mybitmask; -} - -/*! - * @brief This function moves the value in member mybitmask - * @param _mybitmask New value to be moved in member mybitmask - */ -void BitsetBitmask::mybitmask( - bitmodule::MyBitMask&& _mybitmask) -{ - m_mybitmask = std::move(_mybitmask); -} - -/*! - * @brief This function returns a constant reference to member mybitmask - * @return Constant reference to member mybitmask - */ -const bitmodule::MyBitMask& BitsetBitmask::mybitmask() const -{ - return m_mybitmask; -} - -/*! - * @brief This function returns a reference to member mybitmask - * @return Reference to member mybitmask - */ -bitmodule::MyBitMask& BitsetBitmask::mybitmask() -{ - return m_mybitmask; -} - - - - - -BM2::BM2() - : bitmodule::BitsetBitmask() -{ - // bitmodule::MyBitMask m_two - - // long m_mylong - m_mylong = 0; - - // Just to register all known types - registernew_features_4_2Types(); -} - -BM2::~BM2() -{ -} - -BM2::BM2( - const BM2& x) - : bitmodule::BitsetBitmask(x) -{ - m_two = x.m_two; - - - m_mylong = x.m_mylong; - -} - -BM2::BM2( - BM2&& x) noexcept - : bitmodule::BitsetBitmask(std::move(x)) -{ - m_two = std::move(x.m_two); - - - m_mylong = x.m_mylong; - -} - -BM2& BM2::operator =( - const BM2& x) -{ - bitmodule::BitsetBitmask::operator =(x); - - m_two = x.m_two; - - - m_mylong = x.m_mylong; - - return *this; -} - -BM2& BM2::operator =( - BM2&& x) noexcept -{ - bitmodule::BitsetBitmask::operator =(std::move(x)); - - m_two = std::move(x.m_two); - - - m_mylong = x.m_mylong; - - return *this; -} - -bool BM2::operator ==( - const BM2& x) const -{ - if (bitmodule::BitsetBitmask::operator !=(x)) return false; - - return (m_two == x.m_two && - m_mylong == x.m_mylong); -} - -bool BM2::operator !=( - const BM2& x) const -{ - return !(*this == x); -} - -size_t BM2::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return bitmodule_BM2_max_cdr_typesize; -} - -size_t BM2::getCdrSerializedSize( - const BM2& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += bitmodule::BitsetBitmask::getCdrSerializedSize(data, current_alignment); - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void BM2::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - bitmodule::BitsetBitmask::serialize(scdr); - - scdr << (uint8_t)m_two; - - scdr << m_mylong; - -} - -void BM2::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - bitmodule::BitsetBitmask::deserialize(dcdr); - - { - uint8_t bitmask_value = 0; - dcdr >> bitmask_value; - m_two = (bitmodule::MyBitMask)bitmask_value; - } - - - - - dcdr >> m_mylong; - - -} - - -bool BM2::isKeyDefined() -{ - if (bitmodule::BitsetBitmask::isKeyDefined()) - return true; - - return false; -} - -void BM2::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - bitmodule::BitsetBitmask::serializeKey(scdr); -} - -/*! - * @brief This function copies the value in member two - * @param _two New value to be copied in member two - */ -void BM2::two( - const bitmodule::MyBitMask& _two) -{ - m_two = _two; -} - -/*! - * @brief This function moves the value in member two - * @param _two New value to be moved in member two - */ -void BM2::two( - bitmodule::MyBitMask&& _two) -{ - m_two = std::move(_two); -} - -/*! - * @brief This function returns a constant reference to member two - * @return Constant reference to member two - */ -const bitmodule::MyBitMask& BM2::two() const -{ - return m_two; -} - -/*! - * @brief This function returns a reference to member two - * @return Reference to member two - */ -bitmodule::MyBitMask& BM2::two() -{ - return m_two; -} - - -/*! - * @brief This function sets a value in member mylong - * @param _mylong New value for member mylong - */ -void BM2::mylong( - int32_t _mylong) -{ - m_mylong = _mylong; -} - -/*! - * @brief This function returns the value of member mylong - * @return Value of member mylong - */ -int32_t BM2::mylong() const -{ - return m_mylong; -} - -/*! - * @brief This function returns a reference to member mylong - * @return Reference to member mylong - */ -int32_t& BM2::mylong() -{ - return m_mylong; -} - - - - - -} // namespace bitmodule - - -StructTest::StructTest() - : NewAliases() -{ - // OctetUnion m_octetUnion - - // Int8Union m_int8Union - - // bitmodule::BM2 m_myStructBits - - - // Just to register all known types - registernew_features_4_2Types(); -} - -StructTest::~StructTest() -{ -} - -StructTest::StructTest( - const StructTest& x) - : NewAliases(x) -{ - m_octetUnion = x.m_octetUnion; - - - m_int8Union = x.m_int8Union; - - - m_myStructBits = x.m_myStructBits; - -} - -StructTest::StructTest( - StructTest&& x) noexcept - : NewAliases(std::move(x)) -{ - m_octetUnion = std::move(x.m_octetUnion); - - - m_int8Union = std::move(x.m_int8Union); - - - m_myStructBits = std::move(x.m_myStructBits); - -} - -StructTest& StructTest::operator =( - const StructTest& x) -{ - NewAliases::operator =(x); - - m_octetUnion = x.m_octetUnion; - - - m_int8Union = x.m_int8Union; - - - m_myStructBits = x.m_myStructBits; - - return *this; -} - -StructTest& StructTest::operator =( - StructTest&& x) noexcept -{ - NewAliases::operator =(std::move(x)); - - m_octetUnion = std::move(x.m_octetUnion); - - - m_int8Union = std::move(x.m_int8Union); - - - m_myStructBits = std::move(x.m_myStructBits); - - return *this; -} - -bool StructTest::operator ==( - const StructTest& x) const -{ - if (NewAliases::operator !=(x)) return false; - - return (m_octetUnion == x.m_octetUnion && - m_int8Union == x.m_int8Union && - m_myStructBits == x.m_myStructBits); -} - -bool StructTest::operator !=( - const StructTest& x) const -{ - return !(*this == x); -} - -size_t StructTest::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return StructTest_max_cdr_typesize; -} - -size_t StructTest::getCdrSerializedSize( - const StructTest& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += NewAliases::getCdrSerializedSize(data, current_alignment); - - current_alignment += OctetUnion::getCdrSerializedSize(data.octetUnion(), current_alignment); - - - current_alignment += Int8Union::getCdrSerializedSize(data.int8Union(), current_alignment); - - - current_alignment += bitmodule::BM2::getCdrSerializedSize(data.myStructBits(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void StructTest::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - NewAliases::serialize(scdr); - - scdr << m_octetUnion; - - scdr << m_int8Union; - - scdr << m_myStructBits; - -} - -void StructTest::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - NewAliases::deserialize(dcdr); - - dcdr >> m_octetUnion; - - - - dcdr >> m_int8Union; - - - - dcdr >> m_myStructBits; - - -} - - -bool StructTest::isKeyDefined() -{ - if (NewAliases::isKeyDefined()) - return true; - - return false; -} - -void StructTest::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; - NewAliases::serializeKey(scdr); -} - -/*! - * @brief This function copies the value in member octetUnion - * @param _octetUnion New value to be copied in member octetUnion - */ -void StructTest::octetUnion( - const OctetUnion& _octetUnion) -{ - m_octetUnion = _octetUnion; -} - -/*! - * @brief This function moves the value in member octetUnion - * @param _octetUnion New value to be moved in member octetUnion - */ -void StructTest::octetUnion( - OctetUnion&& _octetUnion) -{ - m_octetUnion = std::move(_octetUnion); -} - -/*! - * @brief This function returns a constant reference to member octetUnion - * @return Constant reference to member octetUnion - */ -const OctetUnion& StructTest::octetUnion() const -{ - return m_octetUnion; -} - -/*! - * @brief This function returns a reference to member octetUnion - * @return Reference to member octetUnion - */ -OctetUnion& StructTest::octetUnion() -{ - return m_octetUnion; -} - - -/*! - * @brief This function copies the value in member int8Union - * @param _int8Union New value to be copied in member int8Union - */ -void StructTest::int8Union( - const Int8Union& _int8Union) -{ - m_int8Union = _int8Union; -} - -/*! - * @brief This function moves the value in member int8Union - * @param _int8Union New value to be moved in member int8Union - */ -void StructTest::int8Union( - Int8Union&& _int8Union) -{ - m_int8Union = std::move(_int8Union); -} - -/*! - * @brief This function returns a constant reference to member int8Union - * @return Constant reference to member int8Union - */ -const Int8Union& StructTest::int8Union() const -{ - return m_int8Union; -} - -/*! - * @brief This function returns a reference to member int8Union - * @return Reference to member int8Union - */ -Int8Union& StructTest::int8Union() -{ - return m_int8Union; -} - - -/*! - * @brief This function copies the value in member myStructBits - * @param _myStructBits New value to be copied in member myStructBits - */ -void StructTest::myStructBits( - const bitmodule::BM2& _myStructBits) -{ - m_myStructBits = _myStructBits; -} - -/*! - * @brief This function moves the value in member myStructBits - * @param _myStructBits New value to be moved in member myStructBits - */ -void StructTest::myStructBits( - bitmodule::BM2&& _myStructBits) -{ - m_myStructBits = std::move(_myStructBits); -} - -/*! - * @brief This function returns a constant reference to member myStructBits - * @return Constant reference to member myStructBits - */ -const bitmodule::BM2& StructTest::myStructBits() const -{ - return m_myStructBits; -} - -/*! - * @brief This function returns a reference to member myStructBits - * @return Reference to member myStructBits - */ -bitmodule::BM2& StructTest::myStructBits() -{ - return m_myStructBits; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/unittest/dynamic_types/idl/new_features_4_2v1.h b/test/unittest/dynamic_types/idl/new_features_4_2v1.h deleted file mode 100644 index 4a659ada31e..00000000000 --- a/test/unittest/dynamic_types/idl/new_features_4_2v1.h +++ /dev/null @@ -1,1737 +0,0 @@ -// 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 new_features_4_2.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_NEW_FEATURES_4_2_H_ -#define _FAST_DDS_GENERATED_NEW_FEATURES_4_2_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(NEW_FEATURES_4_2_SOURCE) -#define NEW_FEATURES_4_2_DllAPI __declspec( dllexport ) -#else -#define NEW_FEATURES_4_2_DllAPI __declspec( dllimport ) -#endif // NEW_FEATURES_4_2_SOURCE -#else -#define NEW_FEATURES_4_2_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define NEW_FEATURES_4_2_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - - - -/*! - * @brief This class represents the structure NewAliases defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class NewAliases -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport NewAliases(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~NewAliases(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object NewAliases that will be copied. - */ - eProsima_user_DllExport NewAliases( - const NewAliases& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object NewAliases that will be copied. - */ - eProsima_user_DllExport NewAliases( - NewAliases&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object NewAliases that will be copied. - */ - eProsima_user_DllExport NewAliases& operator =( - const NewAliases& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object NewAliases that will be copied. - */ - eProsima_user_DllExport NewAliases& operator =( - NewAliases&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x NewAliases object to compare. - */ - eProsima_user_DllExport bool operator ==( - const NewAliases& x) const; - - /*! - * @brief Comparison operator. - * @param x NewAliases object to compare. - */ - eProsima_user_DllExport bool operator !=( - const NewAliases& x) const; - - /*! - * @brief This function sets a value in member int8_ - * @param _int8_ New value for member int8_ - */ - eProsima_user_DllExport void int8_( - int8_t _int8_); - - /*! - * @brief This function returns the value of member int8_ - * @return Value of member int8_ - */ - eProsima_user_DllExport int8_t int8_() const; - - /*! - * @brief This function returns a reference to member int8_ - * @return Reference to member int8_ - */ - eProsima_user_DllExport int8_t& int8_(); - - - /*! - * @brief This function sets a value in member uint8_ - * @param _uint8_ New value for member uint8_ - */ - eProsima_user_DllExport void uint8_( - uint8_t _uint8_); - - /*! - * @brief This function returns the value of member uint8_ - * @return Value of member uint8_ - */ - eProsima_user_DllExport uint8_t uint8_() const; - - /*! - * @brief This function returns a reference to member uint8_ - * @return Reference to member uint8_ - */ - eProsima_user_DllExport uint8_t& uint8_(); - - - /*! - * @brief This function sets a value in member int16_ - * @param _int16_ New value for member int16_ - */ - eProsima_user_DllExport void int16_( - int16_t _int16_); - - /*! - * @brief This function returns the value of member int16_ - * @return Value of member int16_ - */ - eProsima_user_DllExport int16_t int16_() const; - - /*! - * @brief This function returns a reference to member int16_ - * @return Reference to member int16_ - */ - eProsima_user_DllExport int16_t& int16_(); - - - /*! - * @brief This function sets a value in member uint16_ - * @param _uint16_ New value for member uint16_ - */ - eProsima_user_DllExport void uint16_( - uint16_t _uint16_); - - /*! - * @brief This function returns the value of member uint16_ - * @return Value of member uint16_ - */ - eProsima_user_DllExport uint16_t uint16_() const; - - /*! - * @brief This function returns a reference to member uint16_ - * @return Reference to member uint16_ - */ - eProsima_user_DllExport uint16_t& uint16_(); - - - /*! - * @brief This function sets a value in member int32_ - * @param _int32_ New value for member int32_ - */ - eProsima_user_DllExport void int32_( - int32_t _int32_); - - /*! - * @brief This function returns the value of member int32_ - * @return Value of member int32_ - */ - eProsima_user_DllExport int32_t int32_() const; - - /*! - * @brief This function returns a reference to member int32_ - * @return Reference to member int32_ - */ - eProsima_user_DllExport int32_t& int32_(); - - - /*! - * @brief This function sets a value in member uint32_ - * @param _uint32_ New value for member uint32_ - */ - eProsima_user_DllExport void uint32_( - uint32_t _uint32_); - - /*! - * @brief This function returns the value of member uint32_ - * @return Value of member uint32_ - */ - eProsima_user_DllExport uint32_t uint32_() const; - - /*! - * @brief This function returns a reference to member uint32_ - * @return Reference to member uint32_ - */ - eProsima_user_DllExport uint32_t& uint32_(); - - - /*! - * @brief This function sets a value in member int64_ - * @param _int64_ New value for member int64_ - */ - eProsima_user_DllExport void int64_( - int64_t _int64_); - - /*! - * @brief This function returns the value of member int64_ - * @return Value of member int64_ - */ - eProsima_user_DllExport int64_t int64_() const; - - /*! - * @brief This function returns a reference to member int64_ - * @return Reference to member int64_ - */ - eProsima_user_DllExport int64_t& int64_(); - - - /*! - * @brief This function sets a value in member uint64_ - * @param _uint64_ New value for member uint64_ - */ - eProsima_user_DllExport void uint64_( - uint64_t _uint64_); - - /*! - * @brief This function returns the value of member uint64_ - * @return Value of member uint64_ - */ - eProsima_user_DllExport uint64_t uint64_() const; - - /*! - * @brief This function returns a reference to member uint64_ - * @return Reference to member uint64_ - */ - eProsima_user_DllExport uint64_t& uint64_(); - - - /*! - * @brief This function copies the value in member local_string - * @param _local_string New value to be copied in member local_string - */ - eProsima_user_DllExport void local_string( - const std::string& _local_string); - - /*! - * @brief This function moves the value in member local_string - * @param _local_string New value to be moved in member local_string - */ - eProsima_user_DllExport void local_string( - std::string&& _local_string); - - /*! - * @brief This function returns a constant reference to member local_string - * @return Constant reference to member local_string - */ - eProsima_user_DllExport const std::string& local_string() const; - - /*! - * @brief This function returns a reference to member local_string - * @return Reference to member local_string - */ - eProsima_user_DllExport std::string& local_string(); - - - /*! - * @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 NewAliases& 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 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: - - int8_t m_int8_; - uint8_t m_uint8_; - int16_t m_int16_; - uint16_t m_uint16_; - int32_t m_int32_; - uint32_t m_uint32_; - int64_t m_int64_; - uint64_t m_uint64_; - std::string m_local_string; - -}; - - - -/*! - * @brief This class represents the union WCharUnion defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class WCharUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport WCharUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~WCharUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object WCharUnion that will be copied. - */ - eProsima_user_DllExport WCharUnion( - const WCharUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object WCharUnion that will be copied. - */ - eProsima_user_DllExport WCharUnion( - WCharUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object WCharUnion that will be copied. - */ - eProsima_user_DllExport WCharUnion& operator =( - const WCharUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object WCharUnion that will be copied. - */ - eProsima_user_DllExport WCharUnion& operator =( - WCharUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x WCharUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const WCharUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x WCharUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const WCharUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - wchar_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport wchar_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport wchar_t& _d(); - - /*! - * @brief This function sets a value in member case_zero - * @param _case_zero New value for member case_zero - */ - eProsima_user_DllExport void case_zero( - int32_t _case_zero); - - /*! - * @brief This function returns the value of member case_zero - * @return Value of member case_zero - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t case_zero() const; - - /*! - * @brief This function returns a reference to member case_zero - * @return Reference to member case_zero - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& case_zero(); - - - /*! - * @brief This function sets a value in member case_one - * @param _case_one New value for member case_one - */ - eProsima_user_DllExport void case_one( - int32_t _case_one); - - /*! - * @brief This function returns the value of member case_one - * @return Value of member case_one - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t case_one() const; - - /*! - * @brief This function returns a reference to member case_one - * @return Reference to member case_one - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& case_one(); - - - /*! - * @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 WCharUnion& 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); - - - - - -private: - - wchar_t m__d; - - int32_t m_case_zero; - int32_t m_case_one; -}; - - - -/*! - * @brief This class represents the union OctetUnion defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class OctetUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport OctetUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~OctetUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object OctetUnion that will be copied. - */ - eProsima_user_DllExport OctetUnion( - const OctetUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object OctetUnion that will be copied. - */ - eProsima_user_DllExport OctetUnion( - OctetUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object OctetUnion that will be copied. - */ - eProsima_user_DllExport OctetUnion& operator =( - const OctetUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object OctetUnion that will be copied. - */ - eProsima_user_DllExport OctetUnion& operator =( - OctetUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x OctetUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const OctetUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x OctetUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const OctetUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - uint8_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport uint8_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport uint8_t& _d(); - - /*! - * @brief This function sets a value in member case_five - * @param _case_five New value for member case_five - */ - eProsima_user_DllExport void case_five( - int32_t _case_five); - - /*! - * @brief This function returns the value of member case_five - * @return Value of member case_five - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t case_five() const; - - /*! - * @brief This function returns a reference to member case_five - * @return Reference to member case_five - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& case_five(); - - - /*! - * @brief This function sets a value in member case_seven - * @param _case_seven New value for member case_seven - */ - eProsima_user_DllExport void case_seven( - int32_t _case_seven); - - /*! - * @brief This function returns the value of member case_seven - * @return Value of member case_seven - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t case_seven() const; - - /*! - * @brief This function returns a reference to member case_seven - * @return Reference to member case_seven - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& case_seven(); - - - /*! - * @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 OctetUnion& 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); - - - - - -private: - - uint8_t m__d; - - int32_t m_case_five; - int32_t m_case_seven; -}; - - - -/*! - * @brief This class represents the union Int8Union defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class Int8Union -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport Int8Union(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~Int8Union(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object Int8Union that will be copied. - */ - eProsima_user_DllExport Int8Union( - const Int8Union& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object Int8Union that will be copied. - */ - eProsima_user_DllExport Int8Union( - Int8Union&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object Int8Union that will be copied. - */ - eProsima_user_DllExport Int8Union& operator =( - const Int8Union& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object Int8Union that will be copied. - */ - eProsima_user_DllExport Int8Union& operator =( - Int8Union&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x Int8Union object to compare. - */ - eProsima_user_DllExport bool operator ==( - const Int8Union& x) const; - - /*! - * @brief Comparison operator. - * @param x Int8Union object to compare. - */ - eProsima_user_DllExport bool operator !=( - const Int8Union& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int8_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int8_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int8_t& _d(); - - /*! - * @brief This function sets a value in member case_three - * @param _case_three New value for member case_three - */ - eProsima_user_DllExport void case_three( - int32_t _case_three); - - /*! - * @brief This function returns the value of member case_three - * @return Value of member case_three - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t case_three() const; - - /*! - * @brief This function returns a reference to member case_three - * @return Reference to member case_three - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& case_three(); - - - /*! - * @brief This function sets a value in member case_six - * @param _case_six New value for member case_six - */ - eProsima_user_DllExport void case_six( - int32_t _case_six); - - /*! - * @brief This function returns the value of member case_six - * @return Value of member case_six - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t case_six() const; - - /*! - * @brief This function returns a reference to member case_six - * @return Reference to member case_six - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& case_six(); - - - /*! - * @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 Int8Union& 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); - - - - - -private: - - int8_t m__d; - - int32_t m_case_three; - int32_t m_case_six; -}; - -namespace bitmodule { - /*! - * @brief This class represents the structure ParentBitset defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ - class ParentBitset - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ParentBitset(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ParentBitset(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object bitmodule::ParentBitset that will be copied. - */ - eProsima_user_DllExport ParentBitset( - const ParentBitset& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object bitmodule::ParentBitset that will be copied. - */ - eProsima_user_DllExport ParentBitset( - ParentBitset&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object bitmodule::ParentBitset that will be copied. - */ - eProsima_user_DllExport ParentBitset& operator =( - const ParentBitset& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object bitmodule::ParentBitset that will be copied. - */ - eProsima_user_DllExport ParentBitset& operator =( - ParentBitset&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x bitmodule::ParentBitset object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ParentBitset& x) const; - - /*! - * @brief Comparison operator. - * @param x bitmodule::ParentBitset object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ParentBitset& x) const; - - /*! - * @brief This function sets a value in member parent_bitfield - * @param _parent_bitfield New value for member parent_bitfield - */ - eProsima_user_DllExport void parent_bitfield( - uint32_t _parent_bitfield); - - /*! - * @brief This function returns the value of member parent_bitfield - * @return Value of member parent_bitfield - */ - eProsima_user_DllExport uint32_t parent_bitfield() const; - - - eProsima_user_DllExport std::bitset<17> bitset() const; - - eProsima_user_DllExport void bitset( - const std::bitset<17>&); - - /*! - * @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 bitmodule::ParentBitset& 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); - - - - - - private: - - std::bitset<17> m_bitset; - }; - /*! - * @brief This class represents the structure MyBitset defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ - class MyBitset : public bitmodule::ParentBitset - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyBitset(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyBitset(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object bitmodule::MyBitset that will be copied. - */ - eProsima_user_DllExport MyBitset( - const MyBitset& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object bitmodule::MyBitset that will be copied. - */ - eProsima_user_DllExport MyBitset( - MyBitset&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object bitmodule::MyBitset that will be copied. - */ - eProsima_user_DllExport MyBitset& operator =( - const MyBitset& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object bitmodule::MyBitset that will be copied. - */ - eProsima_user_DllExport MyBitset& operator =( - MyBitset&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x bitmodule::MyBitset object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyBitset& x) const; - - /*! - * @brief Comparison operator. - * @param x bitmodule::MyBitset object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyBitset& x) const; - - /*! - * @brief This function sets a value in member a - * @param _a New value for member a - */ - eProsima_user_DllExport void a( - char _a); - - /*! - * @brief This function returns the value of member a - * @return Value of member a - */ - eProsima_user_DllExport char a() const; - - - /*! - * @brief This function sets a value in member b - * @param _b New value for member b - */ - eProsima_user_DllExport void b( - bool _b); - - /*! - * @brief This function returns the value of member b - * @return Value of member b - */ - eProsima_user_DllExport bool b() const; - - - - /*! - * @brief This function sets a value in member c - * @param _c New value for member c - */ - eProsima_user_DllExport void c( - uint16_t _c); - - /*! - * @brief This function returns the value of member c - * @return Value of member c - */ - eProsima_user_DllExport uint16_t c() const; - - - /*! - * @brief This function sets a value in member d - * @param _d New value for member d - */ - eProsima_user_DllExport void d( - int16_t _d); - - /*! - * @brief This function returns the value of member d - * @return Value of member d - */ - eProsima_user_DllExport int16_t d() const; - - - /*! - * @brief This function sets a value in member e - * @param _e New value for member e - */ - eProsima_user_DllExport void e( - int16_t _e); - - /*! - * @brief This function returns the value of member e - * @return Value of member e - */ - eProsima_user_DllExport int16_t e() const; - - - /*! - * @brief This function sets a value in member f - * @param _f New value for member f - */ - eProsima_user_DllExport void f( - int16_t _f); - - /*! - * @brief This function returns the value of member f - * @return Value of member f - */ - eProsima_user_DllExport int16_t f() const; - - - eProsima_user_DllExport std::bitset<50> bitset() const; - - eProsima_user_DllExport void bitset( - const std::bitset<50>&); - - /*! - * @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 bitmodule::MyBitset& 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); - - - - - - private: - - std::bitset<33> m_bitset; - }; - /*! - * @brief This class represents the bitmask MyBitMask defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ - enum MyBitMaskBits : uint8_t - { - flag0 = 0x01ull << 0, - flag1 = 0x01ull << 1, - flag4 = 0x01ull << 4, - flag6 = 0x01ull << 6, - flag7 = 0x01ull << 7 - }; - typedef uint8_t MyBitMask; - - - /*! - * @brief This class represents the structure BitsetBitmask defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ - class BitsetBitmask - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BitsetBitmask(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BitsetBitmask(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object bitmodule::BitsetBitmask that will be copied. - */ - eProsima_user_DllExport BitsetBitmask( - const BitsetBitmask& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object bitmodule::BitsetBitmask that will be copied. - */ - eProsima_user_DllExport BitsetBitmask( - BitsetBitmask&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object bitmodule::BitsetBitmask that will be copied. - */ - eProsima_user_DllExport BitsetBitmask& operator =( - const BitsetBitmask& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object bitmodule::BitsetBitmask that will be copied. - */ - eProsima_user_DllExport BitsetBitmask& operator =( - BitsetBitmask&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x bitmodule::BitsetBitmask object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BitsetBitmask& x) const; - - /*! - * @brief Comparison operator. - * @param x bitmodule::BitsetBitmask object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BitsetBitmask& x) const; - - /*! - * @brief This function copies the value in member mybitset - * @param _mybitset New value to be copied in member mybitset - */ - eProsima_user_DllExport void mybitset( - const bitmodule::MyBitset& _mybitset); - - /*! - * @brief This function moves the value in member mybitset - * @param _mybitset New value to be moved in member mybitset - */ - eProsima_user_DllExport void mybitset( - bitmodule::MyBitset&& _mybitset); - - /*! - * @brief This function returns a constant reference to member mybitset - * @return Constant reference to member mybitset - */ - eProsima_user_DllExport const bitmodule::MyBitset& mybitset() const; - - /*! - * @brief This function returns a reference to member mybitset - * @return Reference to member mybitset - */ - eProsima_user_DllExport bitmodule::MyBitset& mybitset(); - - - /*! - * @brief This function copies the value in member mybitmask - * @param _mybitmask New value to be copied in member mybitmask - */ - eProsima_user_DllExport void mybitmask( - const bitmodule::MyBitMask& _mybitmask); - - /*! - * @brief This function moves the value in member mybitmask - * @param _mybitmask New value to be moved in member mybitmask - */ - eProsima_user_DllExport void mybitmask( - bitmodule::MyBitMask&& _mybitmask); - - /*! - * @brief This function returns a constant reference to member mybitmask - * @return Constant reference to member mybitmask - */ - eProsima_user_DllExport const bitmodule::MyBitMask& mybitmask() const; - - /*! - * @brief This function returns a reference to member mybitmask - * @return Reference to member mybitmask - */ - eProsima_user_DllExport bitmodule::MyBitMask& mybitmask(); - - - /*! - * @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 bitmodule::BitsetBitmask& 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 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: - - bitmodule::MyBitset m_mybitset; - bitmodule::MyBitMask m_mybitmask; - - }; - - - - /*! - * @brief This class represents the structure BM2 defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ - class BM2 : public bitmodule::BitsetBitmask - { - public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BM2(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BM2(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object bitmodule::BM2 that will be copied. - */ - eProsima_user_DllExport BM2( - const BM2& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object bitmodule::BM2 that will be copied. - */ - eProsima_user_DllExport BM2( - BM2&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object bitmodule::BM2 that will be copied. - */ - eProsima_user_DllExport BM2& operator =( - const BM2& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object bitmodule::BM2 that will be copied. - */ - eProsima_user_DllExport BM2& operator =( - BM2&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x bitmodule::BM2 object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BM2& x) const; - - /*! - * @brief Comparison operator. - * @param x bitmodule::BM2 object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BM2& x) const; - - /*! - * @brief This function copies the value in member two - * @param _two New value to be copied in member two - */ - eProsima_user_DllExport void two( - const bitmodule::MyBitMask& _two); - - /*! - * @brief This function moves the value in member two - * @param _two New value to be moved in member two - */ - eProsima_user_DllExport void two( - bitmodule::MyBitMask&& _two); - - /*! - * @brief This function returns a constant reference to member two - * @return Constant reference to member two - */ - eProsima_user_DllExport const bitmodule::MyBitMask& two() const; - - /*! - * @brief This function returns a reference to member two - * @return Reference to member two - */ - eProsima_user_DllExport bitmodule::MyBitMask& two(); - - - /*! - * @brief This function sets a value in member mylong - * @param _mylong New value for member mylong - */ - eProsima_user_DllExport void mylong( - int32_t _mylong); - - /*! - * @brief This function returns the value of member mylong - * @return Value of member mylong - */ - eProsima_user_DllExport int32_t mylong() const; - - /*! - * @brief This function returns a reference to member mylong - * @return Reference to member mylong - */ - eProsima_user_DllExport int32_t& mylong(); - - - /*! - * @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 bitmodule::BM2& 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 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: - - bitmodule::MyBitMask m_two; - int32_t m_mylong; - - }; - -} // namespace bitmodule - - -/*! - * @brief This class represents the structure StructTest defined by the user in the IDL file. - * @ingroup new_features_4_2 - */ -class StructTest : public NewAliases -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport StructTest(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~StructTest(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object StructTest that will be copied. - */ - eProsima_user_DllExport StructTest( - const StructTest& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object StructTest that will be copied. - */ - eProsima_user_DllExport StructTest( - StructTest&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object StructTest that will be copied. - */ - eProsima_user_DllExport StructTest& operator =( - const StructTest& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object StructTest that will be copied. - */ - eProsima_user_DllExport StructTest& operator =( - StructTest&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x StructTest object to compare. - */ - eProsima_user_DllExport bool operator ==( - const StructTest& x) const; - - /*! - * @brief Comparison operator. - * @param x StructTest object to compare. - */ - eProsima_user_DllExport bool operator !=( - const StructTest& x) const; - - /*! - * @brief This function copies the value in member octetUnion - * @param _octetUnion New value to be copied in member octetUnion - */ - eProsima_user_DllExport void octetUnion( - const OctetUnion& _octetUnion); - - /*! - * @brief This function moves the value in member octetUnion - * @param _octetUnion New value to be moved in member octetUnion - */ - eProsima_user_DllExport void octetUnion( - OctetUnion&& _octetUnion); - - /*! - * @brief This function returns a constant reference to member octetUnion - * @return Constant reference to member octetUnion - */ - eProsima_user_DllExport const OctetUnion& octetUnion() const; - - /*! - * @brief This function returns a reference to member octetUnion - * @return Reference to member octetUnion - */ - eProsima_user_DllExport OctetUnion& octetUnion(); - - - /*! - * @brief This function copies the value in member int8Union - * @param _int8Union New value to be copied in member int8Union - */ - eProsima_user_DllExport void int8Union( - const Int8Union& _int8Union); - - /*! - * @brief This function moves the value in member int8Union - * @param _int8Union New value to be moved in member int8Union - */ - eProsima_user_DllExport void int8Union( - Int8Union&& _int8Union); - - /*! - * @brief This function returns a constant reference to member int8Union - * @return Constant reference to member int8Union - */ - eProsima_user_DllExport const Int8Union& int8Union() const; - - /*! - * @brief This function returns a reference to member int8Union - * @return Reference to member int8Union - */ - eProsima_user_DllExport Int8Union& int8Union(); - - - /*! - * @brief This function copies the value in member myStructBits - * @param _myStructBits New value to be copied in member myStructBits - */ - eProsima_user_DllExport void myStructBits( - const bitmodule::BM2& _myStructBits); - - /*! - * @brief This function moves the value in member myStructBits - * @param _myStructBits New value to be moved in member myStructBits - */ - eProsima_user_DllExport void myStructBits( - bitmodule::BM2&& _myStructBits); - - /*! - * @brief This function returns a constant reference to member myStructBits - * @return Constant reference to member myStructBits - */ - eProsima_user_DllExport const bitmodule::BM2& myStructBits() const; - - /*! - * @brief This function returns a reference to member myStructBits - * @return Reference to member myStructBits - */ - eProsima_user_DllExport bitmodule::BM2& myStructBits(); - - - /*! - * @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 StructTest& 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 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: - - OctetUnion m_octetUnion; - Int8Union m_int8Union; - bitmodule::BM2 m_myStructBits; - -}; - - -#endif // _FAST_DDS_GENERATED_NEW_FEATURES_4_2_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/unittest/statistics/dds/CMakeLists.txt b/test/unittest/statistics/dds/CMakeLists.txt index 52308f43c09..8cc807f99a0 100644 --- a/test/unittest/statistics/dds/CMakeLists.txt +++ b/test/unittest/statistics/dds/CMakeLists.txt @@ -26,8 +26,6 @@ endif(TINYXML2_INCLUDE_DIR) set(STATISTICS_DOMAINPARTICIPANT_TESTS_SOURCE StatisticsDomainParticipantTests.cpp ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesPubSubTypes.cxx - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/types.cxx - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesv1.cxx ) add_executable(StatisticsDomainParticipantTests ${STATISTICS_DOMAINPARTICIPANT_TESTS_SOURCE}) @@ -72,8 +70,6 @@ if (FASTDDS_STATISTICS) add_executable(DomainParticipantStatisticsListenerTests ${PROJECT_SOURCE_DIR}/src/cpp/statistics/fastdds/domain/DomainParticipantStatisticsListener.cpp ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesPubSubTypes.cxx - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/types.cxx - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesv1.cxx ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/Time_t.cpp ${PROJECT_SOURCE_DIR}/src/cpp/utils/md5.cpp ${TINYXML2_SOURCES} @@ -272,8 +268,6 @@ if (SQLITE3_SUPPORT AND FASTDDS_STATISTICS AND NOT QNX) ${PROJECT_SOURCE_DIR}/src/cpp/statistics/rtps/reader/StatisticsReaderImpl.cpp ${PROJECT_SOURCE_DIR}/src/cpp/statistics/rtps/StatisticsBase.cpp ${PROJECT_SOURCE_DIR}/src/cpp/statistics/rtps/writer/StatisticsWriterImpl.cpp - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/types.cxx - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesv1.cxx ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesPubSubTypes.cxx ${PROJECT_SOURCE_DIR}/src/cpp/utils/IPFinder.cpp ${PROJECT_SOURCE_DIR}/src/cpp/utils/IPLocator.cpp diff --git a/test/unittest/statistics/dds/DomainParticipantStatisticsListenerTests.cpp b/test/unittest/statistics/dds/DomainParticipantStatisticsListenerTests.cpp index 553ab7d2b98..bb5ac18f14a 100644 --- a/test/unittest/statistics/dds/DomainParticipantStatisticsListenerTests.cpp +++ b/test/unittest/statistics/dds/DomainParticipantStatisticsListenerTests.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include namespace eprosima { namespace fastdds { diff --git a/test/unittest/statistics/dds/StatisticsQosTests.cpp b/test/unittest/statistics/dds/StatisticsQosTests.cpp index ed61dc1d39a..22c2f1b25b9 100644 --- a/test/unittest/statistics/dds/StatisticsQosTests.cpp +++ b/test/unittest/statistics/dds/StatisticsQosTests.cpp @@ -40,7 +40,7 @@ namespace fastdds { namespace statistics { namespace dds { -using ReturnCode_t = eprosima::fastrtps::types::ReturnCode_t; +using ReturnCode_t = eprosima::fastdds::dds::ReturnCode_t; class StatisticsFromXMLProfileTests : public ::testing::Test { diff --git a/test/unittest/statistics/rtps/CMakeLists.txt b/test/unittest/statistics/rtps/CMakeLists.txt index 5fe2d62948e..93f2768596a 100644 --- a/test/unittest/statistics/rtps/CMakeLists.txt +++ b/test/unittest/statistics/rtps/CMakeLists.txt @@ -18,8 +18,6 @@ endif() set(STATISTICS_RTPS_TESTS_SOURCE RTPSStatisticsTests.cpp - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/types.cxx - ${PROJECT_SOURCE_DIR}/src/cpp/statistics/types/typesv1.cxx ) add_executable(RTPSStatisticsTests ${STATISTICS_RTPS_TESTS_SOURCE}) diff --git a/test/unittest/statistics/rtps/RTPSStatisticsTests.cpp b/test/unittest/statistics/rtps/RTPSStatisticsTests.cpp index f3431ee4fd1..cf270cd79cf 100644 --- a/test/unittest/statistics/rtps/RTPSStatisticsTests.cpp +++ b/test/unittest/statistics/rtps/RTPSStatisticsTests.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include diff --git a/test/unittest/xtypes/CMakeLists.txt b/test/unittest/xtypes/CMakeLists.txt index ee433220032..d4b7964dcff 100644 --- a/test/unittest/xtypes/CMakeLists.txt +++ b/test/unittest/xtypes/CMakeLists.txt @@ -55,11 +55,7 @@ set(XTYPES_SOURCE set(XTYPES_TEST_SOURCE XTypesTests.cpp idl/TypesTypeObject.cxx - idl/Types.cxx - idl/Typesv1.cxx idl/WideEnumTypeObject.cxx - idl/WideEnum.cxx - idl/WideEnumv1.cxx ${XTYPES_SOURCE} ) diff --git a/test/unittest/xtypes/idl/Types.cxx b/test/unittest/xtypes/idl/Types.cxx deleted file mode 100644 index d0ee9153b8d..00000000000 --- a/test/unittest/xtypes/idl/Types.cxx +++ /dev/null @@ -1,5244 +0,0 @@ -// 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 Types.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Types.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include "TypesTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -MyEnumStruct::MyEnumStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MyEnumStruct::~MyEnumStruct() -{ -} - -MyEnumStruct::MyEnumStruct( - const MyEnumStruct& x) -{ - m_my_enum = x.m_my_enum; -} - -MyEnumStruct::MyEnumStruct( - MyEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; -} - -MyEnumStruct& MyEnumStruct::operator =( - const MyEnumStruct& x) -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -MyEnumStruct& MyEnumStruct::operator =( - MyEnumStruct&& x) noexcept -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -bool MyEnumStruct::operator ==( - const MyEnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool MyEnumStruct::operator !=( - const MyEnumStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void MyEnumStruct::my_enum( - MyEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyEnum MyEnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyEnum& MyEnumStruct::my_enum() -{ - return m_my_enum; -} - - - - -MyBadEnumStruct::MyBadEnumStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MyBadEnumStruct::~MyBadEnumStruct() -{ -} - -MyBadEnumStruct::MyBadEnumStruct( - const MyBadEnumStruct& x) -{ - m_my_enum = x.m_my_enum; -} - -MyBadEnumStruct::MyBadEnumStruct( - MyBadEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; -} - -MyBadEnumStruct& MyBadEnumStruct::operator =( - const MyBadEnumStruct& x) -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -MyBadEnumStruct& MyBadEnumStruct::operator =( - MyBadEnumStruct&& x) noexcept -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -bool MyBadEnumStruct::operator ==( - const MyBadEnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool MyBadEnumStruct::operator !=( - const MyBadEnumStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void MyBadEnumStruct::my_enum( - MyBadEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyBadEnum MyBadEnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyBadEnum& MyBadEnumStruct::my_enum() -{ - return m_my_enum; -} - - - - - -MyAliasEnumStruct::MyAliasEnumStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MyAliasEnumStruct::~MyAliasEnumStruct() -{ -} - -MyAliasEnumStruct::MyAliasEnumStruct( - const MyAliasEnumStruct& x) -{ - m_my_enum = x.m_my_enum; -} - -MyAliasEnumStruct::MyAliasEnumStruct( - MyAliasEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; -} - -MyAliasEnumStruct& MyAliasEnumStruct::operator =( - const MyAliasEnumStruct& x) -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -MyAliasEnumStruct& MyAliasEnumStruct::operator =( - MyAliasEnumStruct&& x) noexcept -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -bool MyAliasEnumStruct::operator ==( - const MyAliasEnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool MyAliasEnumStruct::operator !=( - const MyAliasEnumStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void MyAliasEnumStruct::my_enum( - MyAliasEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyAliasEnum MyAliasEnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyAliasEnum& MyAliasEnumStruct::my_enum() -{ - return m_my_enum; -} - - - - -BasicStruct::BasicStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -BasicStruct::~BasicStruct() -{ -} - -BasicStruct::BasicStruct( - const BasicStruct& x) -{ - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; -} - -BasicStruct::BasicStruct( - BasicStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); -} - -BasicStruct& BasicStruct::operator =( - const BasicStruct& x) -{ - - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; - return *this; -} - -BasicStruct& BasicStruct::operator =( - BasicStruct&& x) noexcept -{ - - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); - return *this; -} - -bool BasicStruct::operator ==( - const BasicStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string); -} - -bool BasicStruct::operator !=( - const BasicStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BasicStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BasicStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicStruct::my_string() -{ - return m_my_string; -} - - - - -BasicNamesStruct::BasicNamesStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -BasicNamesStruct::~BasicNamesStruct() -{ -} - -BasicNamesStruct::BasicNamesStruct( - const BasicNamesStruct& x) -{ - m_my_bool_name = x.m_my_bool_name; - m_my_int32_name = x.m_my_int32_name; - m_my_string_name = x.m_my_string_name; -} - -BasicNamesStruct::BasicNamesStruct( - BasicNamesStruct&& x) noexcept -{ - m_my_bool_name = x.m_my_bool_name; - m_my_int32_name = x.m_my_int32_name; - m_my_string_name = std::move(x.m_my_string_name); -} - -BasicNamesStruct& BasicNamesStruct::operator =( - const BasicNamesStruct& x) -{ - - m_my_bool_name = x.m_my_bool_name; - m_my_int32_name = x.m_my_int32_name; - m_my_string_name = x.m_my_string_name; - return *this; -} - -BasicNamesStruct& BasicNamesStruct::operator =( - BasicNamesStruct&& x) noexcept -{ - - m_my_bool_name = x.m_my_bool_name; - m_my_int32_name = x.m_my_int32_name; - m_my_string_name = std::move(x.m_my_string_name); - return *this; -} - -bool BasicNamesStruct::operator ==( - const BasicNamesStruct& x) const -{ - return (m_my_bool_name == x.m_my_bool_name && - m_my_int32_name == x.m_my_int32_name && - m_my_string_name == x.m_my_string_name); -} - -bool BasicNamesStruct::operator !=( - const BasicNamesStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_bool_name - * @param _my_bool_name New value for member my_bool_name - */ -void BasicNamesStruct::my_bool_name( - bool _my_bool_name) -{ - m_my_bool_name = _my_bool_name; -} - -/*! - * @brief This function returns the value of member my_bool_name - * @return Value of member my_bool_name - */ -bool BasicNamesStruct::my_bool_name() const -{ - return m_my_bool_name; -} - -/*! - * @brief This function returns a reference to member my_bool_name - * @return Reference to member my_bool_name - */ -bool& BasicNamesStruct::my_bool_name() -{ - return m_my_bool_name; -} - - -/*! - * @brief This function sets a value in member my_int32_name - * @param _my_int32_name New value for member my_int32_name - */ -void BasicNamesStruct::my_int32_name( - int32_t _my_int32_name) -{ - m_my_int32_name = _my_int32_name; -} - -/*! - * @brief This function returns the value of member my_int32_name - * @return Value of member my_int32_name - */ -int32_t BasicNamesStruct::my_int32_name() const -{ - return m_my_int32_name; -} - -/*! - * @brief This function returns a reference to member my_int32_name - * @return Reference to member my_int32_name - */ -int32_t& BasicNamesStruct::my_int32_name() -{ - return m_my_int32_name; -} - - -/*! - * @brief This function copies the value in member my_string_name - * @param _my_string_name New value to be copied in member my_string_name - */ -void BasicNamesStruct::my_string_name( - const std::string& _my_string_name) -{ - m_my_string_name = _my_string_name; -} - -/*! - * @brief This function moves the value in member my_string_name - * @param _my_string_name New value to be moved in member my_string_name - */ -void BasicNamesStruct::my_string_name( - std::string&& _my_string_name) -{ - m_my_string_name = std::move(_my_string_name); -} - -/*! - * @brief This function returns a constant reference to member my_string_name - * @return Constant reference to member my_string_name - */ -const std::string& BasicNamesStruct::my_string_name() const -{ - return m_my_string_name; -} - -/*! - * @brief This function returns a reference to member my_string_name - * @return Reference to member my_string_name - */ -std::string& BasicNamesStruct::my_string_name() -{ - return m_my_string_name; -} - - - - -BasicBadStruct::BasicBadStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -BasicBadStruct::~BasicBadStruct() -{ -} - -BasicBadStruct::BasicBadStruct( - const BasicBadStruct& x) -{ - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; -} - -BasicBadStruct::BasicBadStruct( - BasicBadStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); -} - -BasicBadStruct& BasicBadStruct::operator =( - const BasicBadStruct& x) -{ - - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; - return *this; -} - -BasicBadStruct& BasicBadStruct::operator =( - BasicBadStruct&& x) noexcept -{ - - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); - return *this; -} - -bool BasicBadStruct::operator ==( - const BasicBadStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string); -} - -bool BasicBadStruct::operator !=( - const BasicBadStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicBadStruct::my_bool( - uint8_t _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -uint8_t BasicBadStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -uint8_t& BasicBadStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicBadStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicBadStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicBadStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicBadStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicBadStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicBadStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicBadStruct::my_string() -{ - return m_my_string; -} - - - - -BasicWideStruct::BasicWideStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -BasicWideStruct::~BasicWideStruct() -{ -} - -BasicWideStruct::BasicWideStruct( - const BasicWideStruct& x) -{ - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; - m_new_int32 = x.m_new_int32; - m_new_string = x.m_new_string; -} - -BasicWideStruct::BasicWideStruct( - BasicWideStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); - m_new_int32 = x.m_new_int32; - m_new_string = std::move(x.m_new_string); -} - -BasicWideStruct& BasicWideStruct::operator =( - const BasicWideStruct& x) -{ - - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; - m_new_int32 = x.m_new_int32; - m_new_string = x.m_new_string; - return *this; -} - -BasicWideStruct& BasicWideStruct::operator =( - BasicWideStruct&& x) noexcept -{ - - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); - m_new_int32 = x.m_new_int32; - m_new_string = std::move(x.m_new_string); - return *this; -} - -bool BasicWideStruct::operator ==( - const BasicWideStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string && - m_new_int32 == x.m_new_int32 && - m_new_string == x.m_new_string); -} - -bool BasicWideStruct::operator !=( - const BasicWideStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicWideStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BasicWideStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BasicWideStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicWideStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicWideStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicWideStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicWideStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicWideStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicWideStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicWideStruct::my_string() -{ - return m_my_string; -} - - -/*! - * @brief This function sets a value in member new_int32 - * @param _new_int32 New value for member new_int32 - */ -void BasicWideStruct::new_int32( - int32_t _new_int32) -{ - m_new_int32 = _new_int32; -} - -/*! - * @brief This function returns the value of member new_int32 - * @return Value of member new_int32 - */ -int32_t BasicWideStruct::new_int32() const -{ - return m_new_int32; -} - -/*! - * @brief This function returns a reference to member new_int32 - * @return Reference to member new_int32 - */ -int32_t& BasicWideStruct::new_int32() -{ - return m_new_int32; -} - - -/*! - * @brief This function copies the value in member new_string - * @param _new_string New value to be copied in member new_string - */ -void BasicWideStruct::new_string( - const std::string& _new_string) -{ - m_new_string = _new_string; -} - -/*! - * @brief This function moves the value in member new_string - * @param _new_string New value to be moved in member new_string - */ -void BasicWideStruct::new_string( - std::string&& _new_string) -{ - m_new_string = std::move(_new_string); -} - -/*! - * @brief This function returns a constant reference to member new_string - * @return Constant reference to member new_string - */ -const std::string& BasicWideStruct::new_string() const -{ - return m_new_string; -} - -/*! - * @brief This function returns a reference to member new_string - * @return Reference to member new_string - */ -std::string& BasicWideStruct::new_string() -{ - return m_new_string; -} - - - - -BadBasicWideStruct::BadBasicWideStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -BadBasicWideStruct::~BadBasicWideStruct() -{ -} - -BadBasicWideStruct::BadBasicWideStruct( - const BadBasicWideStruct& x) -{ - m_new_int32 = x.m_new_int32; - m_new_string = x.m_new_string; - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; -} - -BadBasicWideStruct::BadBasicWideStruct( - BadBasicWideStruct&& x) noexcept -{ - m_new_int32 = x.m_new_int32; - m_new_string = std::move(x.m_new_string); - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); -} - -BadBasicWideStruct& BadBasicWideStruct::operator =( - const BadBasicWideStruct& x) -{ - - m_new_int32 = x.m_new_int32; - m_new_string = x.m_new_string; - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; - return *this; -} - -BadBasicWideStruct& BadBasicWideStruct::operator =( - BadBasicWideStruct&& x) noexcept -{ - - m_new_int32 = x.m_new_int32; - m_new_string = std::move(x.m_new_string); - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); - return *this; -} - -bool BadBasicWideStruct::operator ==( - const BadBasicWideStruct& x) const -{ - return (m_new_int32 == x.m_new_int32 && - m_new_string == x.m_new_string && - m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string); -} - -bool BadBasicWideStruct::operator !=( - const BadBasicWideStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member new_int32 - * @param _new_int32 New value for member new_int32 - */ -void BadBasicWideStruct::new_int32( - int32_t _new_int32) -{ - m_new_int32 = _new_int32; -} - -/*! - * @brief This function returns the value of member new_int32 - * @return Value of member new_int32 - */ -int32_t BadBasicWideStruct::new_int32() const -{ - return m_new_int32; -} - -/*! - * @brief This function returns a reference to member new_int32 - * @return Reference to member new_int32 - */ -int32_t& BadBasicWideStruct::new_int32() -{ - return m_new_int32; -} - - -/*! - * @brief This function copies the value in member new_string - * @param _new_string New value to be copied in member new_string - */ -void BadBasicWideStruct::new_string( - const std::string& _new_string) -{ - m_new_string = _new_string; -} - -/*! - * @brief This function moves the value in member new_string - * @param _new_string New value to be moved in member new_string - */ -void BadBasicWideStruct::new_string( - std::string&& _new_string) -{ - m_new_string = std::move(_new_string); -} - -/*! - * @brief This function returns a constant reference to member new_string - * @return Constant reference to member new_string - */ -const std::string& BadBasicWideStruct::new_string() const -{ - return m_new_string; -} - -/*! - * @brief This function returns a reference to member new_string - * @return Reference to member new_string - */ -std::string& BadBasicWideStruct::new_string() -{ - return m_new_string; -} - - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BadBasicWideStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BadBasicWideStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BadBasicWideStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BadBasicWideStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BadBasicWideStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BadBasicWideStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BadBasicWideStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BadBasicWideStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BadBasicWideStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BadBasicWideStruct::my_string() -{ - return m_my_string; -} - - - - -StringStruct::StringStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -StringStruct::~StringStruct() -{ -} - -StringStruct::StringStruct( - const StringStruct& x) -{ - m_my_string = x.m_my_string; -} - -StringStruct::StringStruct( - StringStruct&& x) noexcept -{ - m_my_string = std::move(x.m_my_string); -} - -StringStruct& StringStruct::operator =( - const StringStruct& x) -{ - - m_my_string = x.m_my_string; - return *this; -} - -StringStruct& StringStruct::operator =( - StringStruct&& x) noexcept -{ - - m_my_string = std::move(x.m_my_string); - return *this; -} - -bool StringStruct::operator ==( - const StringStruct& x) const -{ - return (m_my_string == x.m_my_string); -} - -bool StringStruct::operator !=( - const StringStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void StringStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void StringStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& StringStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& StringStruct::my_string() -{ - return m_my_string; -} - - - - -LargeStringStruct::LargeStringStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -LargeStringStruct::~LargeStringStruct() -{ -} - -LargeStringStruct::LargeStringStruct( - const LargeStringStruct& x) -{ - m_my_large_string = x.m_my_large_string; -} - -LargeStringStruct::LargeStringStruct( - LargeStringStruct&& x) noexcept -{ - m_my_large_string = std::move(x.m_my_large_string); -} - -LargeStringStruct& LargeStringStruct::operator =( - const LargeStringStruct& x) -{ - - m_my_large_string = x.m_my_large_string; - return *this; -} - -LargeStringStruct& LargeStringStruct::operator =( - LargeStringStruct&& x) noexcept -{ - - m_my_large_string = std::move(x.m_my_large_string); - return *this; -} - -bool LargeStringStruct::operator ==( - const LargeStringStruct& x) const -{ - return (m_my_large_string == x.m_my_large_string); -} - -bool LargeStringStruct::operator !=( - const LargeStringStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_large_string - * @param _my_large_string New value to be copied in member my_large_string - */ -void LargeStringStruct::my_large_string( - const eprosima::fastcdr::fixed_string<41925>& _my_large_string) -{ - m_my_large_string = _my_large_string; -} - -/*! - * @brief This function moves the value in member my_large_string - * @param _my_large_string New value to be moved in member my_large_string - */ -void LargeStringStruct::my_large_string( - eprosima::fastcdr::fixed_string<41925>&& _my_large_string) -{ - m_my_large_string = std::move(_my_large_string); -} - -/*! - * @brief This function returns a constant reference to member my_large_string - * @return Constant reference to member my_large_string - */ -const eprosima::fastcdr::fixed_string<41925>& LargeStringStruct::my_large_string() const -{ - return m_my_large_string; -} - -/*! - * @brief This function returns a reference to member my_large_string - * @return Reference to member my_large_string - */ -eprosima::fastcdr::fixed_string<41925>& LargeStringStruct::my_large_string() -{ - return m_my_large_string; -} - - - - -WStringStruct::WStringStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -WStringStruct::~WStringStruct() -{ -} - -WStringStruct::WStringStruct( - const WStringStruct& x) -{ - m_my_wstring = x.m_my_wstring; -} - -WStringStruct::WStringStruct( - WStringStruct&& x) noexcept -{ - m_my_wstring = std::move(x.m_my_wstring); -} - -WStringStruct& WStringStruct::operator =( - const WStringStruct& x) -{ - - m_my_wstring = x.m_my_wstring; - return *this; -} - -WStringStruct& WStringStruct::operator =( - WStringStruct&& x) noexcept -{ - - m_my_wstring = std::move(x.m_my_wstring); - return *this; -} - -bool WStringStruct::operator ==( - const WStringStruct& x) const -{ - return (m_my_wstring == x.m_my_wstring); -} - -bool WStringStruct::operator !=( - const WStringStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_wstring - * @param _my_wstring New value to be copied in member my_wstring - */ -void WStringStruct::my_wstring( - const std::wstring& _my_wstring) -{ - m_my_wstring = _my_wstring; -} - -/*! - * @brief This function moves the value in member my_wstring - * @param _my_wstring New value to be moved in member my_wstring - */ -void WStringStruct::my_wstring( - std::wstring&& _my_wstring) -{ - m_my_wstring = std::move(_my_wstring); -} - -/*! - * @brief This function returns a constant reference to member my_wstring - * @return Constant reference to member my_wstring - */ -const std::wstring& WStringStruct::my_wstring() const -{ - return m_my_wstring; -} - -/*! - * @brief This function returns a reference to member my_wstring - * @return Reference to member my_wstring - */ -std::wstring& WStringStruct::my_wstring() -{ - return m_my_wstring; -} - - - - -LargeWStringStruct::LargeWStringStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -LargeWStringStruct::~LargeWStringStruct() -{ -} - -LargeWStringStruct::LargeWStringStruct( - const LargeWStringStruct& x) -{ - m_my_large_wstring = x.m_my_large_wstring; -} - -LargeWStringStruct::LargeWStringStruct( - LargeWStringStruct&& x) noexcept -{ - m_my_large_wstring = std::move(x.m_my_large_wstring); -} - -LargeWStringStruct& LargeWStringStruct::operator =( - const LargeWStringStruct& x) -{ - - m_my_large_wstring = x.m_my_large_wstring; - return *this; -} - -LargeWStringStruct& LargeWStringStruct::operator =( - LargeWStringStruct&& x) noexcept -{ - - m_my_large_wstring = std::move(x.m_my_large_wstring); - return *this; -} - -bool LargeWStringStruct::operator ==( - const LargeWStringStruct& x) const -{ - return (m_my_large_wstring == x.m_my_large_wstring); -} - -bool LargeWStringStruct::operator !=( - const LargeWStringStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_large_wstring - * @param _my_large_wstring New value to be copied in member my_large_wstring - */ -void LargeWStringStruct::my_large_wstring( - const std::wstring& _my_large_wstring) -{ - m_my_large_wstring = _my_large_wstring; -} - -/*! - * @brief This function moves the value in member my_large_wstring - * @param _my_large_wstring New value to be moved in member my_large_wstring - */ -void LargeWStringStruct::my_large_wstring( - std::wstring&& _my_large_wstring) -{ - m_my_large_wstring = std::move(_my_large_wstring); -} - -/*! - * @brief This function returns a constant reference to member my_large_wstring - * @return Constant reference to member my_large_wstring - */ -const std::wstring& LargeWStringStruct::my_large_wstring() const -{ - return m_my_large_wstring; -} - -/*! - * @brief This function returns a reference to member my_large_wstring - * @return Reference to member my_large_wstring - */ -std::wstring& LargeWStringStruct::my_large_wstring() -{ - return m_my_large_wstring; -} - - - - -ArrayStruct::ArrayStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -ArrayStruct::~ArrayStruct() -{ -} - -ArrayStruct::ArrayStruct( - const ArrayStruct& x) -{ - m_my_array = x.m_my_array; -} - -ArrayStruct::ArrayStruct( - ArrayStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); -} - -ArrayStruct& ArrayStruct::operator =( - const ArrayStruct& x) -{ - - m_my_array = x.m_my_array; - return *this; -} - -ArrayStruct& ArrayStruct::operator =( - ArrayStruct&& x) noexcept -{ - - m_my_array = std::move(x.m_my_array); - return *this; -} - -bool ArrayStruct::operator ==( - const ArrayStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArrayStruct::operator !=( - const ArrayStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArrayStruct::my_array( - const std::array& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArrayStruct::my_array( - std::array&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array& ArrayStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array& ArrayStruct::my_array() -{ - return m_my_array; -} - - - - -ArrayStructEqual::ArrayStructEqual() -{ - // Just to register all known types - registerTypesTypes(); -} - -ArrayStructEqual::~ArrayStructEqual() -{ -} - -ArrayStructEqual::ArrayStructEqual( - const ArrayStructEqual& x) -{ - m_my_array_equal = x.m_my_array_equal; -} - -ArrayStructEqual::ArrayStructEqual( - ArrayStructEqual&& x) noexcept -{ - m_my_array_equal = std::move(x.m_my_array_equal); -} - -ArrayStructEqual& ArrayStructEqual::operator =( - const ArrayStructEqual& x) -{ - - m_my_array_equal = x.m_my_array_equal; - return *this; -} - -ArrayStructEqual& ArrayStructEqual::operator =( - ArrayStructEqual&& x) noexcept -{ - - m_my_array_equal = std::move(x.m_my_array_equal); - return *this; -} - -bool ArrayStructEqual::operator ==( - const ArrayStructEqual& x) const -{ - return (m_my_array_equal == x.m_my_array_equal); -} - -bool ArrayStructEqual::operator !=( - const ArrayStructEqual& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_array_equal - * @param _my_array_equal New value to be copied in member my_array_equal - */ -void ArrayStructEqual::my_array_equal( - const std::array& _my_array_equal) -{ - m_my_array_equal = _my_array_equal; -} - -/*! - * @brief This function moves the value in member my_array_equal - * @param _my_array_equal New value to be moved in member my_array_equal - */ -void ArrayStructEqual::my_array_equal( - std::array&& _my_array_equal) -{ - m_my_array_equal = std::move(_my_array_equal); -} - -/*! - * @brief This function returns a constant reference to member my_array_equal - * @return Constant reference to member my_array_equal - */ -const std::array& ArrayStructEqual::my_array_equal() const -{ - return m_my_array_equal; -} - -/*! - * @brief This function returns a reference to member my_array_equal - * @return Reference to member my_array_equal - */ -std::array& ArrayStructEqual::my_array_equal() -{ - return m_my_array_equal; -} - - - - -ArrayBadStruct::ArrayBadStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -ArrayBadStruct::~ArrayBadStruct() -{ -} - -ArrayBadStruct::ArrayBadStruct( - const ArrayBadStruct& x) -{ - m_my_array = x.m_my_array; -} - -ArrayBadStruct::ArrayBadStruct( - ArrayBadStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); -} - -ArrayBadStruct& ArrayBadStruct::operator =( - const ArrayBadStruct& x) -{ - - m_my_array = x.m_my_array; - return *this; -} - -ArrayBadStruct& ArrayBadStruct::operator =( - ArrayBadStruct&& x) noexcept -{ - - m_my_array = std::move(x.m_my_array); - return *this; -} - -bool ArrayBadStruct::operator ==( - const ArrayBadStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArrayBadStruct::operator !=( - const ArrayBadStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArrayBadStruct::my_array( - const std::array& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArrayBadStruct::my_array( - std::array&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array& ArrayBadStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array& ArrayBadStruct::my_array() -{ - return m_my_array; -} - - - - -ArrayDimensionsStruct::ArrayDimensionsStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -ArrayDimensionsStruct::~ArrayDimensionsStruct() -{ -} - -ArrayDimensionsStruct::ArrayDimensionsStruct( - const ArrayDimensionsStruct& x) -{ - m_my_array = x.m_my_array; -} - -ArrayDimensionsStruct::ArrayDimensionsStruct( - ArrayDimensionsStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); -} - -ArrayDimensionsStruct& ArrayDimensionsStruct::operator =( - const ArrayDimensionsStruct& x) -{ - - m_my_array = x.m_my_array; - return *this; -} - -ArrayDimensionsStruct& ArrayDimensionsStruct::operator =( - ArrayDimensionsStruct&& x) noexcept -{ - - m_my_array = std::move(x.m_my_array); - return *this; -} - -bool ArrayDimensionsStruct::operator ==( - const ArrayDimensionsStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArrayDimensionsStruct::operator !=( - const ArrayDimensionsStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArrayDimensionsStruct::my_array( - const std::array, 2>& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArrayDimensionsStruct::my_array( - std::array, 2>&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array, 2>& ArrayDimensionsStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array, 2>& ArrayDimensionsStruct::my_array() -{ - return m_my_array; -} - - - - -ArraySizeStruct::ArraySizeStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -ArraySizeStruct::~ArraySizeStruct() -{ -} - -ArraySizeStruct::ArraySizeStruct( - const ArraySizeStruct& x) -{ - m_my_array = x.m_my_array; -} - -ArraySizeStruct::ArraySizeStruct( - ArraySizeStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); -} - -ArraySizeStruct& ArraySizeStruct::operator =( - const ArraySizeStruct& x) -{ - - m_my_array = x.m_my_array; - return *this; -} - -ArraySizeStruct& ArraySizeStruct::operator =( - ArraySizeStruct&& x) noexcept -{ - - m_my_array = std::move(x.m_my_array); - return *this; -} - -bool ArraySizeStruct::operator ==( - const ArraySizeStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArraySizeStruct::operator !=( - const ArraySizeStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArraySizeStruct::my_array( - const std::array& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArraySizeStruct::my_array( - std::array&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array& ArraySizeStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array& ArraySizeStruct::my_array() -{ - return m_my_array; -} - - - - - - -SequenceStruct::SequenceStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SequenceStruct::~SequenceStruct() -{ -} - -SequenceStruct::SequenceStruct( - const SequenceStruct& x) -{ - m_my_sequence = x.m_my_sequence; -} - -SequenceStruct::SequenceStruct( - SequenceStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); -} - -SequenceStruct& SequenceStruct::operator =( - const SequenceStruct& x) -{ - - m_my_sequence = x.m_my_sequence; - return *this; -} - -SequenceStruct& SequenceStruct::operator =( - SequenceStruct&& x) noexcept -{ - - m_my_sequence = std::move(x.m_my_sequence); - return *this; -} - -bool SequenceStruct::operator ==( - const SequenceStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceStruct::operator !=( - const SequenceStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - -SequenceStructEqual::SequenceStructEqual() -{ - // Just to register all known types - registerTypesTypes(); -} - -SequenceStructEqual::~SequenceStructEqual() -{ -} - -SequenceStructEqual::SequenceStructEqual( - const SequenceStructEqual& x) -{ - m_my_sequence_equal = x.m_my_sequence_equal; -} - -SequenceStructEqual::SequenceStructEqual( - SequenceStructEqual&& x) noexcept -{ - m_my_sequence_equal = std::move(x.m_my_sequence_equal); -} - -SequenceStructEqual& SequenceStructEqual::operator =( - const SequenceStructEqual& x) -{ - - m_my_sequence_equal = x.m_my_sequence_equal; - return *this; -} - -SequenceStructEqual& SequenceStructEqual::operator =( - SequenceStructEqual&& x) noexcept -{ - - m_my_sequence_equal = std::move(x.m_my_sequence_equal); - return *this; -} - -bool SequenceStructEqual::operator ==( - const SequenceStructEqual& x) const -{ - return (m_my_sequence_equal == x.m_my_sequence_equal); -} - -bool SequenceStructEqual::operator !=( - const SequenceStructEqual& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence_equal - * @param _my_sequence_equal New value to be copied in member my_sequence_equal - */ -void SequenceStructEqual::my_sequence_equal( - const std::vector& _my_sequence_equal) -{ - m_my_sequence_equal = _my_sequence_equal; -} - -/*! - * @brief This function moves the value in member my_sequence_equal - * @param _my_sequence_equal New value to be moved in member my_sequence_equal - */ -void SequenceStructEqual::my_sequence_equal( - std::vector&& _my_sequence_equal) -{ - m_my_sequence_equal = std::move(_my_sequence_equal); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_equal - * @return Constant reference to member my_sequence_equal - */ -const std::vector& SequenceStructEqual::my_sequence_equal() const -{ - return m_my_sequence_equal; -} - -/*! - * @brief This function returns a reference to member my_sequence_equal - * @return Reference to member my_sequence_equal - */ -std::vector& SequenceStructEqual::my_sequence_equal() -{ - return m_my_sequence_equal; -} - - - - - - -SequenceBadStruct::SequenceBadStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SequenceBadStruct::~SequenceBadStruct() -{ -} - -SequenceBadStruct::SequenceBadStruct( - const SequenceBadStruct& x) -{ - m_my_sequence = x.m_my_sequence; -} - -SequenceBadStruct::SequenceBadStruct( - SequenceBadStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); -} - -SequenceBadStruct& SequenceBadStruct::operator =( - const SequenceBadStruct& x) -{ - - m_my_sequence = x.m_my_sequence; - return *this; -} - -SequenceBadStruct& SequenceBadStruct::operator =( - SequenceBadStruct&& x) noexcept -{ - - m_my_sequence = std::move(x.m_my_sequence); - return *this; -} - -bool SequenceBadStruct::operator ==( - const SequenceBadStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceBadStruct::operator !=( - const SequenceBadStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceBadStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceBadStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceBadStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceBadStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - -SequenceBoundsStruct::SequenceBoundsStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SequenceBoundsStruct::~SequenceBoundsStruct() -{ -} - -SequenceBoundsStruct::SequenceBoundsStruct( - const SequenceBoundsStruct& x) -{ - m_my_sequence = x.m_my_sequence; -} - -SequenceBoundsStruct::SequenceBoundsStruct( - SequenceBoundsStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); -} - -SequenceBoundsStruct& SequenceBoundsStruct::operator =( - const SequenceBoundsStruct& x) -{ - - m_my_sequence = x.m_my_sequence; - return *this; -} - -SequenceBoundsStruct& SequenceBoundsStruct::operator =( - SequenceBoundsStruct&& x) noexcept -{ - - m_my_sequence = std::move(x.m_my_sequence); - return *this; -} - -bool SequenceBoundsStruct::operator ==( - const SequenceBoundsStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceBoundsStruct::operator !=( - const SequenceBoundsStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceBoundsStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceBoundsStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceBoundsStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceBoundsStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - - - -SequenceSequenceStruct::SequenceSequenceStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SequenceSequenceStruct::~SequenceSequenceStruct() -{ -} - -SequenceSequenceStruct::SequenceSequenceStruct( - const SequenceSequenceStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; -} - -SequenceSequenceStruct::SequenceSequenceStruct( - SequenceSequenceStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); -} - -SequenceSequenceStruct& SequenceSequenceStruct::operator =( - const SequenceSequenceStruct& x) -{ - - m_my_sequence_sequence = x.m_my_sequence_sequence; - return *this; -} - -SequenceSequenceStruct& SequenceSequenceStruct::operator =( - SequenceSequenceStruct&& x) noexcept -{ - - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - return *this; -} - -bool SequenceSequenceStruct::operator ==( - const SequenceSequenceStruct& x) const -{ - return (m_my_sequence_sequence == x.m_my_sequence_sequence); -} - -bool SequenceSequenceStruct::operator !=( - const SequenceSequenceStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ -void SequenceSequenceStruct::my_sequence_sequence( - const std::vector>& _my_sequence_sequence) -{ - m_my_sequence_sequence = _my_sequence_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ -void SequenceSequenceStruct::my_sequence_sequence( - std::vector>&& _my_sequence_sequence) -{ - m_my_sequence_sequence = std::move(_my_sequence_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ -const std::vector>& SequenceSequenceStruct::my_sequence_sequence() const -{ - return m_my_sequence_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ -std::vector>& SequenceSequenceStruct::my_sequence_sequence() -{ - return m_my_sequence_sequence; -} - - - - - - - - -SequenceSequenceBoundsStruct::SequenceSequenceBoundsStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SequenceSequenceBoundsStruct::~SequenceSequenceBoundsStruct() -{ -} - -SequenceSequenceBoundsStruct::SequenceSequenceBoundsStruct( - const SequenceSequenceBoundsStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; -} - -SequenceSequenceBoundsStruct::SequenceSequenceBoundsStruct( - SequenceSequenceBoundsStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); -} - -SequenceSequenceBoundsStruct& SequenceSequenceBoundsStruct::operator =( - const SequenceSequenceBoundsStruct& x) -{ - - m_my_sequence_sequence = x.m_my_sequence_sequence; - return *this; -} - -SequenceSequenceBoundsStruct& SequenceSequenceBoundsStruct::operator =( - SequenceSequenceBoundsStruct&& x) noexcept -{ - - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - return *this; -} - -bool SequenceSequenceBoundsStruct::operator ==( - const SequenceSequenceBoundsStruct& x) const -{ - return (m_my_sequence_sequence == x.m_my_sequence_sequence); -} - -bool SequenceSequenceBoundsStruct::operator !=( - const SequenceSequenceBoundsStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ -void SequenceSequenceBoundsStruct::my_sequence_sequence( - const std::vector>& _my_sequence_sequence) -{ - m_my_sequence_sequence = _my_sequence_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ -void SequenceSequenceBoundsStruct::my_sequence_sequence( - std::vector>&& _my_sequence_sequence) -{ - m_my_sequence_sequence = std::move(_my_sequence_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ -const std::vector>& SequenceSequenceBoundsStruct::my_sequence_sequence() const -{ - return m_my_sequence_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ -std::vector>& SequenceSequenceBoundsStruct::my_sequence_sequence() -{ - return m_my_sequence_sequence; -} - - - - - - -MapStruct::MapStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapStruct::~MapStruct() -{ -} - -MapStruct::MapStruct( - const MapStruct& x) -{ - m_my_map = x.m_my_map; -} - -MapStruct::MapStruct( - MapStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); -} - -MapStruct& MapStruct::operator =( - const MapStruct& x) -{ - - m_my_map = x.m_my_map; - return *this; -} - -MapStruct& MapStruct::operator =( - MapStruct&& x) noexcept -{ - - m_my_map = std::move(x.m_my_map); - return *this; -} - -bool MapStruct::operator ==( - const MapStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapStruct::operator !=( - const MapStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapStruct::my_map() -{ - return m_my_map; -} - - - - - - -MapStructEqual::MapStructEqual() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapStructEqual::~MapStructEqual() -{ -} - -MapStructEqual::MapStructEqual( - const MapStructEqual& x) -{ - m_my_map_equal = x.m_my_map_equal; -} - -MapStructEqual::MapStructEqual( - MapStructEqual&& x) noexcept -{ - m_my_map_equal = std::move(x.m_my_map_equal); -} - -MapStructEqual& MapStructEqual::operator =( - const MapStructEqual& x) -{ - - m_my_map_equal = x.m_my_map_equal; - return *this; -} - -MapStructEqual& MapStructEqual::operator =( - MapStructEqual&& x) noexcept -{ - - m_my_map_equal = std::move(x.m_my_map_equal); - return *this; -} - -bool MapStructEqual::operator ==( - const MapStructEqual& x) const -{ - return (m_my_map_equal == x.m_my_map_equal); -} - -bool MapStructEqual::operator !=( - const MapStructEqual& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map_equal - * @param _my_map_equal New value to be copied in member my_map_equal - */ -void MapStructEqual::my_map_equal( - const std::map& _my_map_equal) -{ - m_my_map_equal = _my_map_equal; -} - -/*! - * @brief This function moves the value in member my_map_equal - * @param _my_map_equal New value to be moved in member my_map_equal - */ -void MapStructEqual::my_map_equal( - std::map&& _my_map_equal) -{ - m_my_map_equal = std::move(_my_map_equal); -} - -/*! - * @brief This function returns a constant reference to member my_map_equal - * @return Constant reference to member my_map_equal - */ -const std::map& MapStructEqual::my_map_equal() const -{ - return m_my_map_equal; -} - -/*! - * @brief This function returns a reference to member my_map_equal - * @return Reference to member my_map_equal - */ -std::map& MapStructEqual::my_map_equal() -{ - return m_my_map_equal; -} - - - - - - -MapBadKeyStruct::MapBadKeyStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapBadKeyStruct::~MapBadKeyStruct() -{ -} - -MapBadKeyStruct::MapBadKeyStruct( - const MapBadKeyStruct& x) -{ - m_my_map = x.m_my_map; -} - -MapBadKeyStruct::MapBadKeyStruct( - MapBadKeyStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); -} - -MapBadKeyStruct& MapBadKeyStruct::operator =( - const MapBadKeyStruct& x) -{ - - m_my_map = x.m_my_map; - return *this; -} - -MapBadKeyStruct& MapBadKeyStruct::operator =( - MapBadKeyStruct&& x) noexcept -{ - - m_my_map = std::move(x.m_my_map); - return *this; -} - -bool MapBadKeyStruct::operator ==( - const MapBadKeyStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapBadKeyStruct::operator !=( - const MapBadKeyStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapBadKeyStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapBadKeyStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapBadKeyStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapBadKeyStruct::my_map() -{ - return m_my_map; -} - - - - - - -MapBadElemStruct::MapBadElemStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapBadElemStruct::~MapBadElemStruct() -{ -} - -MapBadElemStruct::MapBadElemStruct( - const MapBadElemStruct& x) -{ - m_my_map = x.m_my_map; -} - -MapBadElemStruct::MapBadElemStruct( - MapBadElemStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); -} - -MapBadElemStruct& MapBadElemStruct::operator =( - const MapBadElemStruct& x) -{ - - m_my_map = x.m_my_map; - return *this; -} - -MapBadElemStruct& MapBadElemStruct::operator =( - MapBadElemStruct&& x) noexcept -{ - - m_my_map = std::move(x.m_my_map); - return *this; -} - -bool MapBadElemStruct::operator ==( - const MapBadElemStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapBadElemStruct::operator !=( - const MapBadElemStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapBadElemStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapBadElemStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapBadElemStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapBadElemStruct::my_map() -{ - return m_my_map; -} - - - - - - -MapBoundsStruct::MapBoundsStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapBoundsStruct::~MapBoundsStruct() -{ -} - -MapBoundsStruct::MapBoundsStruct( - const MapBoundsStruct& x) -{ - m_my_map = x.m_my_map; -} - -MapBoundsStruct::MapBoundsStruct( - MapBoundsStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); -} - -MapBoundsStruct& MapBoundsStruct::operator =( - const MapBoundsStruct& x) -{ - - m_my_map = x.m_my_map; - return *this; -} - -MapBoundsStruct& MapBoundsStruct::operator =( - MapBoundsStruct&& x) noexcept -{ - - m_my_map = std::move(x.m_my_map); - return *this; -} - -bool MapBoundsStruct::operator ==( - const MapBoundsStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapBoundsStruct::operator !=( - const MapBoundsStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapBoundsStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapBoundsStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapBoundsStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapBoundsStruct::my_map() -{ - return m_my_map; -} - - - - - - - - -MapMapStruct::MapMapStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapMapStruct::~MapMapStruct() -{ -} - -MapMapStruct::MapMapStruct( - const MapMapStruct& x) -{ - m_my_map_map = x.m_my_map_map; -} - -MapMapStruct::MapMapStruct( - MapMapStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); -} - -MapMapStruct& MapMapStruct::operator =( - const MapMapStruct& x) -{ - - m_my_map_map = x.m_my_map_map; - return *this; -} - -MapMapStruct& MapMapStruct::operator =( - MapMapStruct&& x) noexcept -{ - - m_my_map_map = std::move(x.m_my_map_map); - return *this; -} - -bool MapMapStruct::operator ==( - const MapMapStruct& x) const -{ - return (m_my_map_map == x.m_my_map_map); -} - -bool MapMapStruct::operator !=( - const MapMapStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ -void MapMapStruct::my_map_map( - const std::map>& _my_map_map) -{ - m_my_map_map = _my_map_map; -} - -/*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ -void MapMapStruct::my_map_map( - std::map>&& _my_map_map) -{ - m_my_map_map = std::move(_my_map_map); -} - -/*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ -const std::map>& MapMapStruct::my_map_map() const -{ - return m_my_map_map; -} - -/*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ -std::map>& MapMapStruct::my_map_map() -{ - return m_my_map_map; -} - - - - - - - - -MapMapBoundsStruct::MapMapBoundsStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapMapBoundsStruct::~MapMapBoundsStruct() -{ -} - -MapMapBoundsStruct::MapMapBoundsStruct( - const MapMapBoundsStruct& x) -{ - m_my_map_map = x.m_my_map_map; -} - -MapMapBoundsStruct::MapMapBoundsStruct( - MapMapBoundsStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); -} - -MapMapBoundsStruct& MapMapBoundsStruct::operator =( - const MapMapBoundsStruct& x) -{ - - m_my_map_map = x.m_my_map_map; - return *this; -} - -MapMapBoundsStruct& MapMapBoundsStruct::operator =( - MapMapBoundsStruct&& x) noexcept -{ - - m_my_map_map = std::move(x.m_my_map_map); - return *this; -} - -bool MapMapBoundsStruct::operator ==( - const MapMapBoundsStruct& x) const -{ - return (m_my_map_map == x.m_my_map_map); -} - -bool MapMapBoundsStruct::operator !=( - const MapMapBoundsStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ -void MapMapBoundsStruct::my_map_map( - const std::map>& _my_map_map) -{ - m_my_map_map = _my_map_map; -} - -/*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ -void MapMapBoundsStruct::my_map_map( - std::map>&& _my_map_map) -{ - m_my_map_map = std::move(_my_map_map); -} - -/*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ -const std::map>& MapMapBoundsStruct::my_map_map() const -{ - return m_my_map_map; -} - -/*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ -std::map>& MapMapBoundsStruct::my_map_map() -{ - return m_my_map_map; -} - - - - -SimpleUnion::SimpleUnion() -{ - m__d = A; -} - -SimpleUnion::~SimpleUnion() -{ -} - -SimpleUnion::SimpleUnion( - const SimpleUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleUnion::SimpleUnion( - SimpleUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleUnion& SimpleUnion::operator =( - const SimpleUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleUnion& SimpleUnion::operator =( - SimpleUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleUnion::operator ==( - const SimpleUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleUnion::operator !=( - const SimpleUnion& x) const -{ - return !(*this == x); -} - -void SimpleUnion::_d( - int32_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch (__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleUnion::_d() -{ - return m__d; -} - -void SimpleUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t SimpleUnion::first() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleUnion::first() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t SimpleUnion::second() const -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleUnion::second() -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - - - -SimpleUnionNames::SimpleUnionNames() -{ - m__d = A; -} - -SimpleUnionNames::~SimpleUnionNames() -{ -} - -SimpleUnionNames::SimpleUnionNames( - const SimpleUnionNames& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } -} - -SimpleUnionNames::SimpleUnionNames( - SimpleUnionNames&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } -} - -SimpleUnionNames& SimpleUnionNames::operator =( - const SimpleUnionNames& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } - - return *this; -} - -SimpleUnionNames& SimpleUnionNames::operator =( - SimpleUnionNames&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } - - return *this; -} - -bool SimpleUnionNames::operator ==( - const SimpleUnionNames& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_first_case == x.m_first_case); - break; - - - case B: - return (m_second_case == x.m_second_case); - break; - - default: - break; - } - return false; -} - -bool SimpleUnionNames::operator !=( - const SimpleUnionNames& x) const -{ - return !(*this == x); -} - -void SimpleUnionNames::_d( - int32_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch (__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleUnionNames::_d() const -{ - return m__d; -} - -int32_t& SimpleUnionNames::_d() -{ - return m__d; -} - -void SimpleUnionNames::first_case( - int32_t _first_case) -{ - m_first_case = _first_case; - m__d = A; - -} - -int32_t SimpleUnionNames::first_case() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first_case; -} - -int32_t& SimpleUnionNames::first_case() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first_case; -} - - -void SimpleUnionNames::second_case( - int64_t _second_case) -{ - m_second_case = _second_case; - m__d = B; - -} - -int64_t SimpleUnionNames::second_case() const -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second_case; -} - -int64_t& SimpleUnionNames::second_case() -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second_case; -} - - - - -SimpleTypeUnion::SimpleTypeUnion() -{ - m__d = A; -} - -SimpleTypeUnion::~SimpleTypeUnion() -{ -} - -SimpleTypeUnion::SimpleTypeUnion( - const SimpleTypeUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleTypeUnion::SimpleTypeUnion( - SimpleTypeUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleTypeUnion& SimpleTypeUnion::operator =( - const SimpleTypeUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleTypeUnion& SimpleTypeUnion::operator =( - SimpleTypeUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleTypeUnion::operator ==( - const SimpleTypeUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleTypeUnion::operator !=( - const SimpleTypeUnion& x) const -{ - return !(*this == x); -} - -void SimpleTypeUnion::_d( - int32_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch (__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleTypeUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleTypeUnion::_d() -{ - return m__d; -} - -void SimpleTypeUnion::first( - uint8_t _first) -{ - m_first = _first; - m__d = A; - -} - -uint8_t SimpleTypeUnion::first() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -uint8_t& SimpleTypeUnion::first() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleTypeUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t SimpleTypeUnion::second() const -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleTypeUnion::second() -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - - - -SimpleBadUnion::SimpleBadUnion() -{ - m__d = A; -} - -SimpleBadUnion::~SimpleBadUnion() -{ -} - -SimpleBadUnion::SimpleBadUnion( - const SimpleBadUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadUnion::SimpleBadUnion( - SimpleBadUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadUnion& SimpleBadUnion::operator =( - const SimpleBadUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleBadUnion& SimpleBadUnion::operator =( - SimpleBadUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleBadUnion::operator ==( - const SimpleBadUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case C: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleBadUnion::operator !=( - const SimpleBadUnion& x) const -{ - return !(*this == x); -} - -void SimpleBadUnion::_d( - int32_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case C: - switch (__d) - { - case C: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleBadUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleBadUnion::_d() -{ - return m__d; -} - -void SimpleBadUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t SimpleBadUnion::first() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleBadUnion::first() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleBadUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = C; - -} - -int64_t SimpleBadUnion::second() const -{ - bool b = false; - - switch (m__d) - { - case C: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleBadUnion::second() -{ - bool b = false; - - switch (m__d) - { - case C: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - - - -SimpleBadDiscUnion::SimpleBadDiscUnion() -{ - m__d = 0; -} - -SimpleBadDiscUnion::~SimpleBadDiscUnion() -{ -} - -SimpleBadDiscUnion::SimpleBadDiscUnion( - const SimpleBadDiscUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadDiscUnion::SimpleBadDiscUnion( - SimpleBadDiscUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadDiscUnion& SimpleBadDiscUnion::operator =( - const SimpleBadDiscUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleBadDiscUnion& SimpleBadDiscUnion::operator =( - SimpleBadDiscUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleBadDiscUnion::operator ==( - const SimpleBadDiscUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case 0: - return (m_first == x.m_first); - break; - - - case 1: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleBadDiscUnion::operator !=( - const SimpleBadDiscUnion& x) const -{ - return !(*this == x); -} - -void SimpleBadDiscUnion::_d( - uint8_t __d) -{ - bool b = false; - - switch (m__d) - { - case 0: - switch (__d) - { - case 0: - b = true; - break; - default: - break; - } - break; - - - case 1: - switch (__d) - { - case 1: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -uint8_t SimpleBadDiscUnion::_d() const -{ - return m__d; -} - -uint8_t& SimpleBadDiscUnion::_d() -{ - return m__d; -} - -void SimpleBadDiscUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = 0; - -} - -int32_t SimpleBadDiscUnion::first() const -{ - bool b = false; - - switch (m__d) - { - case 0: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleBadDiscUnion::first() -{ - bool b = false; - - switch (m__d) - { - case 0: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleBadDiscUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = 1; - -} - -int64_t SimpleBadDiscUnion::second() const -{ - bool b = false; - - switch (m__d) - { - case 1: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleBadDiscUnion::second() -{ - bool b = false; - - switch (m__d) - { - case 1: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - - - -SimpleUnionStruct::SimpleUnionStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SimpleUnionStruct::~SimpleUnionStruct() -{ -} - -SimpleUnionStruct::SimpleUnionStruct( - const SimpleUnionStruct& x) -{ - m_my_union = x.m_my_union; -} - -SimpleUnionStruct::SimpleUnionStruct( - SimpleUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -SimpleUnionStruct& SimpleUnionStruct::operator =( - const SimpleUnionStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -SimpleUnionStruct& SimpleUnionStruct::operator =( - SimpleUnionStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool SimpleUnionStruct::operator ==( - const SimpleUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleUnionStruct::operator !=( - const SimpleUnionStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleUnionStruct::my_union( - const SimpleUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleUnionStruct::my_union( - SimpleUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleUnion& SimpleUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleUnion& SimpleUnionStruct::my_union() -{ - return m_my_union; -} - - - - -SimpleUnionStructEqual::SimpleUnionStructEqual() -{ - // Just to register all known types - registerTypesTypes(); -} - -SimpleUnionStructEqual::~SimpleUnionStructEqual() -{ -} - -SimpleUnionStructEqual::SimpleUnionStructEqual( - const SimpleUnionStructEqual& x) -{ - m_my_union_equal = x.m_my_union_equal; -} - -SimpleUnionStructEqual::SimpleUnionStructEqual( - SimpleUnionStructEqual&& x) noexcept -{ - m_my_union_equal = std::move(x.m_my_union_equal); -} - -SimpleUnionStructEqual& SimpleUnionStructEqual::operator =( - const SimpleUnionStructEqual& x) -{ - - m_my_union_equal = x.m_my_union_equal; - return *this; -} - -SimpleUnionStructEqual& SimpleUnionStructEqual::operator =( - SimpleUnionStructEqual&& x) noexcept -{ - - m_my_union_equal = std::move(x.m_my_union_equal); - return *this; -} - -bool SimpleUnionStructEqual::operator ==( - const SimpleUnionStructEqual& x) const -{ - return (m_my_union_equal == x.m_my_union_equal); -} - -bool SimpleUnionStructEqual::operator !=( - const SimpleUnionStructEqual& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union_equal - * @param _my_union_equal New value to be copied in member my_union_equal - */ -void SimpleUnionStructEqual::my_union_equal( - const SimpleUnion& _my_union_equal) -{ - m_my_union_equal = _my_union_equal; -} - -/*! - * @brief This function moves the value in member my_union_equal - * @param _my_union_equal New value to be moved in member my_union_equal - */ -void SimpleUnionStructEqual::my_union_equal( - SimpleUnion&& _my_union_equal) -{ - m_my_union_equal = std::move(_my_union_equal); -} - -/*! - * @brief This function returns a constant reference to member my_union_equal - * @return Constant reference to member my_union_equal - */ -const SimpleUnion& SimpleUnionStructEqual::my_union_equal() const -{ - return m_my_union_equal; -} - -/*! - * @brief This function returns a reference to member my_union_equal - * @return Reference to member my_union_equal - */ -SimpleUnion& SimpleUnionStructEqual::my_union_equal() -{ - return m_my_union_equal; -} - - - - -SimpleUnionNamesStruct::SimpleUnionNamesStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SimpleUnionNamesStruct::~SimpleUnionNamesStruct() -{ -} - -SimpleUnionNamesStruct::SimpleUnionNamesStruct( - const SimpleUnionNamesStruct& x) -{ - m_my_union = x.m_my_union; -} - -SimpleUnionNamesStruct::SimpleUnionNamesStruct( - SimpleUnionNamesStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -SimpleUnionNamesStruct& SimpleUnionNamesStruct::operator =( - const SimpleUnionNamesStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -SimpleUnionNamesStruct& SimpleUnionNamesStruct::operator =( - SimpleUnionNamesStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool SimpleUnionNamesStruct::operator ==( - const SimpleUnionNamesStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleUnionNamesStruct::operator !=( - const SimpleUnionNamesStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleUnionNamesStruct::my_union( - const SimpleUnionNames& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleUnionNamesStruct::my_union( - SimpleUnionNames&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleUnionNames& SimpleUnionNamesStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleUnionNames& SimpleUnionNamesStruct::my_union() -{ - return m_my_union; -} - - - - -SimpleTypeUnionStruct::SimpleTypeUnionStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SimpleTypeUnionStruct::~SimpleTypeUnionStruct() -{ -} - -SimpleTypeUnionStruct::SimpleTypeUnionStruct( - const SimpleTypeUnionStruct& x) -{ - m_my_union = x.m_my_union; -} - -SimpleTypeUnionStruct::SimpleTypeUnionStruct( - SimpleTypeUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -SimpleTypeUnionStruct& SimpleTypeUnionStruct::operator =( - const SimpleTypeUnionStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -SimpleTypeUnionStruct& SimpleTypeUnionStruct::operator =( - SimpleTypeUnionStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool SimpleTypeUnionStruct::operator ==( - const SimpleTypeUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleTypeUnionStruct::operator !=( - const SimpleTypeUnionStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleTypeUnionStruct::my_union( - const SimpleTypeUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleTypeUnionStruct::my_union( - SimpleTypeUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleTypeUnion& SimpleTypeUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleTypeUnion& SimpleTypeUnionStruct::my_union() -{ - return m_my_union; -} - - - - -SimpleBadUnionStruct::SimpleBadUnionStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SimpleBadUnionStruct::~SimpleBadUnionStruct() -{ -} - -SimpleBadUnionStruct::SimpleBadUnionStruct( - const SimpleBadUnionStruct& x) -{ - m_my_union = x.m_my_union; -} - -SimpleBadUnionStruct::SimpleBadUnionStruct( - SimpleBadUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -SimpleBadUnionStruct& SimpleBadUnionStruct::operator =( - const SimpleBadUnionStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -SimpleBadUnionStruct& SimpleBadUnionStruct::operator =( - SimpleBadUnionStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool SimpleBadUnionStruct::operator ==( - const SimpleBadUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleBadUnionStruct::operator !=( - const SimpleBadUnionStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleBadUnionStruct::my_union( - const SimpleBadUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleBadUnionStruct::my_union( - SimpleBadUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleBadUnion& SimpleBadUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleBadUnion& SimpleBadUnionStruct::my_union() -{ - return m_my_union; -} - - - - -SimplBadDiscUnionStruct::SimplBadDiscUnionStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SimplBadDiscUnionStruct::~SimplBadDiscUnionStruct() -{ -} - -SimplBadDiscUnionStruct::SimplBadDiscUnionStruct( - const SimplBadDiscUnionStruct& x) -{ - m_my_union = x.m_my_union; -} - -SimplBadDiscUnionStruct::SimplBadDiscUnionStruct( - SimplBadDiscUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -SimplBadDiscUnionStruct& SimplBadDiscUnionStruct::operator =( - const SimplBadDiscUnionStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -SimplBadDiscUnionStruct& SimplBadDiscUnionStruct::operator =( - SimplBadDiscUnionStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool SimplBadDiscUnionStruct::operator ==( - const SimplBadDiscUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimplBadDiscUnionStruct::operator !=( - const SimplBadDiscUnionStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimplBadDiscUnionStruct::my_union( - const SimpleBadDiscUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimplBadDiscUnionStruct::my_union( - SimpleBadDiscUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleBadDiscUnion& SimplBadDiscUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleBadDiscUnion& SimplBadDiscUnionStruct::my_union() -{ - return m_my_union; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "TypesCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/xtypes/idl/Types.h b/test/unittest/xtypes/idl/Types.hpp similarity index 55% rename from test/xtypes/idl/Types.h rename to test/unittest/xtypes/idl/Types.hpp index e482676e515..22c35fe7713 100644 --- a/test/xtypes/idl/Types.h +++ b/test/unittest/xtypes/idl/Types.hpp @@ -13,32 +13,30 @@ // limitations under the License. /*! - * @file Types.h + * @file Types.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "Typesv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_TYPES_H_ -#define _FAST_DDS_GENERATED_TYPES_H_ +#ifndef _FAST_DDS_GENERATED_TYPES_HPP_ +#define _FAST_DDS_GENERATED_TYPES_HPP_ #include #include #include #include #include +#include #include #include #include #include +#include +#include "TypesTypeObject.h" #if defined(_WIN32) #if defined(EPROSIMA_USER_DLL_EXPORT) @@ -64,15 +62,6 @@ #define TYPES_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! * @brief This class represents the enumeration MyEnum defined by the user in the IDL file. * @ingroup Types @@ -106,73 +95,114 @@ class MyEnumStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MyEnumStruct(); + eProsima_user_DllExport MyEnumStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MyEnumStruct(); + eProsima_user_DllExport ~MyEnumStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MyEnumStruct that will be copied. */ eProsima_user_DllExport MyEnumStruct( - const MyEnumStruct& x); + const MyEnumStruct& x) + { + m_my_enum = x.m_my_enum; + + } /*! * @brief Move constructor. * @param x Reference to the object MyEnumStruct that will be copied. */ eProsima_user_DllExport MyEnumStruct( - MyEnumStruct&& x) noexcept; + MyEnumStruct&& x) noexcept + { + m_my_enum = x.m_my_enum; + } /*! * @brief Copy assignment. * @param x Reference to the object MyEnumStruct that will be copied. */ eProsima_user_DllExport MyEnumStruct& operator =( - const MyEnumStruct& x); + const MyEnumStruct& x) + { + + m_my_enum = x.m_my_enum; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MyEnumStruct that will be copied. */ eProsima_user_DllExport MyEnumStruct& operator =( - MyEnumStruct&& x) noexcept; + MyEnumStruct&& x) noexcept + { + + m_my_enum = x.m_my_enum; + return *this; + } /*! * @brief Comparison operator. * @param x MyEnumStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MyEnumStruct& x) const; + const MyEnumStruct& x) const + { + return (m_my_enum == x.m_my_enum); + } /*! * @brief Comparison operator. * @param x MyEnumStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MyEnumStruct& x) const; + const MyEnumStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_enum * @param _my_enum New value for member my_enum */ eProsima_user_DllExport void my_enum( - MyEnum _my_enum); + MyEnum _my_enum) + { + m_my_enum = _my_enum; + } /*! * @brief This function returns the value of member my_enum * @return Value of member my_enum */ - eProsima_user_DllExport MyEnum my_enum() const; + eProsima_user_DllExport MyEnum my_enum() const + { + return m_my_enum; + } /*! * @brief This function returns a reference to member my_enum * @return Reference to member my_enum */ - eProsima_user_DllExport MyEnum& my_enum(); + eProsima_user_DllExport MyEnum& my_enum() + { + return m_my_enum; + } + + private: @@ -192,73 +222,114 @@ class MyBadEnumStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MyBadEnumStruct(); + eProsima_user_DllExport MyBadEnumStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MyBadEnumStruct(); + eProsima_user_DllExport ~MyBadEnumStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MyBadEnumStruct that will be copied. */ eProsima_user_DllExport MyBadEnumStruct( - const MyBadEnumStruct& x); + const MyBadEnumStruct& x) + { + m_my_enum = x.m_my_enum; + + } /*! * @brief Move constructor. * @param x Reference to the object MyBadEnumStruct that will be copied. */ eProsima_user_DllExport MyBadEnumStruct( - MyBadEnumStruct&& x) noexcept; + MyBadEnumStruct&& x) noexcept + { + m_my_enum = x.m_my_enum; + } /*! * @brief Copy assignment. * @param x Reference to the object MyBadEnumStruct that will be copied. */ eProsima_user_DllExport MyBadEnumStruct& operator =( - const MyBadEnumStruct& x); + const MyBadEnumStruct& x) + { + + m_my_enum = x.m_my_enum; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MyBadEnumStruct that will be copied. */ eProsima_user_DllExport MyBadEnumStruct& operator =( - MyBadEnumStruct&& x) noexcept; + MyBadEnumStruct&& x) noexcept + { + + m_my_enum = x.m_my_enum; + return *this; + } /*! * @brief Comparison operator. * @param x MyBadEnumStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MyBadEnumStruct& x) const; + const MyBadEnumStruct& x) const + { + return (m_my_enum == x.m_my_enum); + } /*! * @brief Comparison operator. * @param x MyBadEnumStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MyBadEnumStruct& x) const; + const MyBadEnumStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_enum * @param _my_enum New value for member my_enum */ eProsima_user_DllExport void my_enum( - MyBadEnum _my_enum); + MyBadEnum _my_enum) + { + m_my_enum = _my_enum; + } /*! * @brief This function returns the value of member my_enum * @return Value of member my_enum */ - eProsima_user_DllExport MyBadEnum my_enum() const; + eProsima_user_DllExport MyBadEnum my_enum() const + { + return m_my_enum; + } /*! * @brief This function returns a reference to member my_enum * @return Reference to member my_enum */ - eProsima_user_DllExport MyBadEnum& my_enum(); + eProsima_user_DllExport MyBadEnum& my_enum() + { + return m_my_enum; + } + + private: @@ -280,73 +351,114 @@ class MyAliasEnumStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MyAliasEnumStruct(); + eProsima_user_DllExport MyAliasEnumStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MyAliasEnumStruct(); + eProsima_user_DllExport ~MyAliasEnumStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MyAliasEnumStruct that will be copied. */ eProsima_user_DllExport MyAliasEnumStruct( - const MyAliasEnumStruct& x); + const MyAliasEnumStruct& x) + { + m_my_enum = x.m_my_enum; + + } /*! * @brief Move constructor. * @param x Reference to the object MyAliasEnumStruct that will be copied. */ eProsima_user_DllExport MyAliasEnumStruct( - MyAliasEnumStruct&& x) noexcept; + MyAliasEnumStruct&& x) noexcept + { + m_my_enum = x.m_my_enum; + } /*! * @brief Copy assignment. * @param x Reference to the object MyAliasEnumStruct that will be copied. */ eProsima_user_DllExport MyAliasEnumStruct& operator =( - const MyAliasEnumStruct& x); + const MyAliasEnumStruct& x) + { + + m_my_enum = x.m_my_enum; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MyAliasEnumStruct that will be copied. */ eProsima_user_DllExport MyAliasEnumStruct& operator =( - MyAliasEnumStruct&& x) noexcept; + MyAliasEnumStruct&& x) noexcept + { + + m_my_enum = x.m_my_enum; + return *this; + } /*! * @brief Comparison operator. * @param x MyAliasEnumStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MyAliasEnumStruct& x) const; + const MyAliasEnumStruct& x) const + { + return (m_my_enum == x.m_my_enum); + } /*! * @brief Comparison operator. * @param x MyAliasEnumStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MyAliasEnumStruct& x) const; + const MyAliasEnumStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_enum * @param _my_enum New value for member my_enum */ eProsima_user_DllExport void my_enum( - MyAliasEnum _my_enum); + MyAliasEnum _my_enum) + { + m_my_enum = _my_enum; + } /*! * @brief This function returns the value of member my_enum * @return Value of member my_enum */ - eProsima_user_DllExport MyAliasEnum my_enum() const; + eProsima_user_DllExport MyAliasEnum my_enum() const + { + return m_my_enum; + } /*! * @brief This function returns a reference to member my_enum * @return Reference to member my_enum */ - eProsima_user_DllExport MyAliasEnum& my_enum(); + eProsima_user_DllExport MyAliasEnum& my_enum() + { + return m_my_enum; + } + + private: @@ -366,73 +478,126 @@ class BasicStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BasicStruct(); + eProsima_user_DllExport BasicStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BasicStruct(); + eProsima_user_DllExport ~BasicStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BasicStruct that will be copied. */ eProsima_user_DllExport BasicStruct( - const BasicStruct& x); + const BasicStruct& x) + { + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + } /*! * @brief Move constructor. * @param x Reference to the object BasicStruct that will be copied. */ eProsima_user_DllExport BasicStruct( - BasicStruct&& x) noexcept; + BasicStruct&& x) noexcept + { + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + } /*! * @brief Copy assignment. * @param x Reference to the object BasicStruct that will be copied. */ eProsima_user_DllExport BasicStruct& operator =( - const BasicStruct& x); + const BasicStruct& x) + { + + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BasicStruct that will be copied. */ eProsima_user_DllExport BasicStruct& operator =( - BasicStruct&& x) noexcept; + BasicStruct&& x) noexcept + { + + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + return *this; + } /*! * @brief Comparison operator. * @param x BasicStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BasicStruct& x) const; + const BasicStruct& x) const + { + return (m_my_bool == x.m_my_bool && + m_my_int32 == x.m_my_int32 && + m_my_string == x.m_my_string); + } /*! * @brief Comparison operator. * @param x BasicStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BasicStruct& x) const; + const BasicStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_bool * @param _my_bool New value for member my_bool */ eProsima_user_DllExport void my_bool( - bool _my_bool); + bool _my_bool) + { + m_my_bool = _my_bool; + } /*! * @brief This function returns the value of member my_bool * @return Value of member my_bool */ - eProsima_user_DllExport bool my_bool() const; + eProsima_user_DllExport bool my_bool() const + { + return m_my_bool; + } /*! * @brief This function returns a reference to member my_bool * @return Reference to member my_bool */ - eProsima_user_DllExport bool& my_bool(); + eProsima_user_DllExport bool& my_bool() + { + return m_my_bool; + } /*! @@ -440,19 +605,28 @@ class BasicStruct * @param _my_int32 New value for member my_int32 */ eProsima_user_DllExport void my_int32( - int32_t _my_int32); + int32_t _my_int32) + { + m_my_int32 = _my_int32; + } /*! * @brief This function returns the value of member my_int32 * @return Value of member my_int32 */ - eProsima_user_DllExport int32_t my_int32() const; + eProsima_user_DllExport int32_t my_int32() const + { + return m_my_int32; + } /*! * @brief This function returns a reference to member my_int32 * @return Reference to member my_int32 */ - eProsima_user_DllExport int32_t& my_int32(); + eProsima_user_DllExport int32_t& my_int32() + { + return m_my_int32; + } /*! @@ -460,26 +634,40 @@ class BasicStruct * @param _my_string New value to be copied in member my_string */ eProsima_user_DllExport void my_string( - const std::string& _my_string); + const std::string& _my_string) + { + m_my_string = _my_string; + } /*! * @brief This function moves the value in member my_string * @param _my_string New value to be moved in member my_string */ eProsima_user_DllExport void my_string( - std::string&& _my_string); + std::string&& _my_string) + { + m_my_string = std::move(_my_string); + } /*! * @brief This function returns a constant reference to member my_string * @return Constant reference to member my_string */ - eProsima_user_DllExport const std::string& my_string() const; + eProsima_user_DllExport const std::string& my_string() const + { + return m_my_string; + } /*! * @brief This function returns a reference to member my_string * @return Reference to member my_string */ - eProsima_user_DllExport std::string& my_string(); + eProsima_user_DllExport std::string& my_string() + { + return m_my_string; + } + + private: @@ -501,73 +689,126 @@ class BasicNamesStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BasicNamesStruct(); + eProsima_user_DllExport BasicNamesStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BasicNamesStruct(); + eProsima_user_DllExport ~BasicNamesStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BasicNamesStruct that will be copied. */ eProsima_user_DllExport BasicNamesStruct( - const BasicNamesStruct& x); + const BasicNamesStruct& x) + { + m_my_bool_name = x.m_my_bool_name; + + m_my_int32_name = x.m_my_int32_name; + + m_my_string_name = x.m_my_string_name; + + } /*! * @brief Move constructor. * @param x Reference to the object BasicNamesStruct that will be copied. */ eProsima_user_DllExport BasicNamesStruct( - BasicNamesStruct&& x) noexcept; + BasicNamesStruct&& x) noexcept + { + m_my_bool_name = x.m_my_bool_name; + m_my_int32_name = x.m_my_int32_name; + m_my_string_name = std::move(x.m_my_string_name); + } /*! * @brief Copy assignment. * @param x Reference to the object BasicNamesStruct that will be copied. */ eProsima_user_DllExport BasicNamesStruct& operator =( - const BasicNamesStruct& x); + const BasicNamesStruct& x) + { + + m_my_bool_name = x.m_my_bool_name; + + m_my_int32_name = x.m_my_int32_name; + + m_my_string_name = x.m_my_string_name; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BasicNamesStruct that will be copied. */ eProsima_user_DllExport BasicNamesStruct& operator =( - BasicNamesStruct&& x) noexcept; + BasicNamesStruct&& x) noexcept + { + + m_my_bool_name = x.m_my_bool_name; + m_my_int32_name = x.m_my_int32_name; + m_my_string_name = std::move(x.m_my_string_name); + return *this; + } /*! * @brief Comparison operator. * @param x BasicNamesStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BasicNamesStruct& x) const; + const BasicNamesStruct& x) const + { + return (m_my_bool_name == x.m_my_bool_name && + m_my_int32_name == x.m_my_int32_name && + m_my_string_name == x.m_my_string_name); + } /*! * @brief Comparison operator. * @param x BasicNamesStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BasicNamesStruct& x) const; + const BasicNamesStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_bool_name * @param _my_bool_name New value for member my_bool_name */ eProsima_user_DllExport void my_bool_name( - bool _my_bool_name); + bool _my_bool_name) + { + m_my_bool_name = _my_bool_name; + } /*! * @brief This function returns the value of member my_bool_name * @return Value of member my_bool_name */ - eProsima_user_DllExport bool my_bool_name() const; + eProsima_user_DllExport bool my_bool_name() const + { + return m_my_bool_name; + } /*! * @brief This function returns a reference to member my_bool_name * @return Reference to member my_bool_name */ - eProsima_user_DllExport bool& my_bool_name(); + eProsima_user_DllExport bool& my_bool_name() + { + return m_my_bool_name; + } /*! @@ -575,19 +816,28 @@ class BasicNamesStruct * @param _my_int32_name New value for member my_int32_name */ eProsima_user_DllExport void my_int32_name( - int32_t _my_int32_name); + int32_t _my_int32_name) + { + m_my_int32_name = _my_int32_name; + } /*! * @brief This function returns the value of member my_int32_name * @return Value of member my_int32_name */ - eProsima_user_DllExport int32_t my_int32_name() const; + eProsima_user_DllExport int32_t my_int32_name() const + { + return m_my_int32_name; + } /*! * @brief This function returns a reference to member my_int32_name * @return Reference to member my_int32_name */ - eProsima_user_DllExport int32_t& my_int32_name(); + eProsima_user_DllExport int32_t& my_int32_name() + { + return m_my_int32_name; + } /*! @@ -595,26 +845,40 @@ class BasicNamesStruct * @param _my_string_name New value to be copied in member my_string_name */ eProsima_user_DllExport void my_string_name( - const std::string& _my_string_name); + const std::string& _my_string_name) + { + m_my_string_name = _my_string_name; + } /*! * @brief This function moves the value in member my_string_name * @param _my_string_name New value to be moved in member my_string_name */ eProsima_user_DllExport void my_string_name( - std::string&& _my_string_name); + std::string&& _my_string_name) + { + m_my_string_name = std::move(_my_string_name); + } /*! * @brief This function returns a constant reference to member my_string_name * @return Constant reference to member my_string_name */ - eProsima_user_DllExport const std::string& my_string_name() const; + eProsima_user_DllExport const std::string& my_string_name() const + { + return m_my_string_name; + } /*! * @brief This function returns a reference to member my_string_name * @return Reference to member my_string_name */ - eProsima_user_DllExport std::string& my_string_name(); + eProsima_user_DllExport std::string& my_string_name() + { + return m_my_string_name; + } + + private: @@ -636,73 +900,126 @@ class BasicBadStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BasicBadStruct(); + eProsima_user_DllExport BasicBadStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BasicBadStruct(); + eProsima_user_DllExport ~BasicBadStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BasicBadStruct that will be copied. */ eProsima_user_DllExport BasicBadStruct( - const BasicBadStruct& x); + const BasicBadStruct& x) + { + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + } /*! * @brief Move constructor. * @param x Reference to the object BasicBadStruct that will be copied. */ eProsima_user_DllExport BasicBadStruct( - BasicBadStruct&& x) noexcept; + BasicBadStruct&& x) noexcept + { + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + } /*! * @brief Copy assignment. * @param x Reference to the object BasicBadStruct that will be copied. */ eProsima_user_DllExport BasicBadStruct& operator =( - const BasicBadStruct& x); + const BasicBadStruct& x) + { + + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BasicBadStruct that will be copied. */ eProsima_user_DllExport BasicBadStruct& operator =( - BasicBadStruct&& x) noexcept; + BasicBadStruct&& x) noexcept + { + + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + return *this; + } /*! * @brief Comparison operator. * @param x BasicBadStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BasicBadStruct& x) const; + const BasicBadStruct& x) const + { + return (m_my_bool == x.m_my_bool && + m_my_int32 == x.m_my_int32 && + m_my_string == x.m_my_string); + } /*! * @brief Comparison operator. * @param x BasicBadStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BasicBadStruct& x) const; + const BasicBadStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_bool * @param _my_bool New value for member my_bool */ eProsima_user_DllExport void my_bool( - uint8_t _my_bool); + uint8_t _my_bool) + { + m_my_bool = _my_bool; + } /*! * @brief This function returns the value of member my_bool * @return Value of member my_bool */ - eProsima_user_DllExport uint8_t my_bool() const; + eProsima_user_DllExport uint8_t my_bool() const + { + return m_my_bool; + } /*! * @brief This function returns a reference to member my_bool * @return Reference to member my_bool */ - eProsima_user_DllExport uint8_t& my_bool(); + eProsima_user_DllExport uint8_t& my_bool() + { + return m_my_bool; + } /*! @@ -710,19 +1027,28 @@ class BasicBadStruct * @param _my_int32 New value for member my_int32 */ eProsima_user_DllExport void my_int32( - int32_t _my_int32); + int32_t _my_int32) + { + m_my_int32 = _my_int32; + } /*! * @brief This function returns the value of member my_int32 * @return Value of member my_int32 */ - eProsima_user_DllExport int32_t my_int32() const; + eProsima_user_DllExport int32_t my_int32() const + { + return m_my_int32; + } /*! * @brief This function returns a reference to member my_int32 * @return Reference to member my_int32 */ - eProsima_user_DllExport int32_t& my_int32(); + eProsima_user_DllExport int32_t& my_int32() + { + return m_my_int32; + } /*! @@ -730,26 +1056,40 @@ class BasicBadStruct * @param _my_string New value to be copied in member my_string */ eProsima_user_DllExport void my_string( - const std::string& _my_string); + const std::string& _my_string) + { + m_my_string = _my_string; + } /*! * @brief This function moves the value in member my_string * @param _my_string New value to be moved in member my_string */ eProsima_user_DllExport void my_string( - std::string&& _my_string); + std::string&& _my_string) + { + m_my_string = std::move(_my_string); + } /*! * @brief This function returns a constant reference to member my_string * @return Constant reference to member my_string */ - eProsima_user_DllExport const std::string& my_string() const; + eProsima_user_DllExport const std::string& my_string() const + { + return m_my_string; + } /*! * @brief This function returns a reference to member my_string * @return Reference to member my_string */ - eProsima_user_DllExport std::string& my_string(); + eProsima_user_DllExport std::string& my_string() + { + return m_my_string; + } + + private: @@ -771,73 +1111,140 @@ class BasicWideStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BasicWideStruct(); + eProsima_user_DllExport BasicWideStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BasicWideStruct(); + eProsima_user_DllExport ~BasicWideStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BasicWideStruct that will be copied. */ eProsima_user_DllExport BasicWideStruct( - const BasicWideStruct& x); + const BasicWideStruct& x) + { + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + m_new_int32 = x.m_new_int32; + + m_new_string = x.m_new_string; + + } /*! * @brief Move constructor. * @param x Reference to the object BasicWideStruct that will be copied. */ eProsima_user_DllExport BasicWideStruct( - BasicWideStruct&& x) noexcept; + BasicWideStruct&& x) noexcept + { + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + m_new_int32 = x.m_new_int32; + m_new_string = std::move(x.m_new_string); + } /*! * @brief Copy assignment. * @param x Reference to the object BasicWideStruct that will be copied. */ eProsima_user_DllExport BasicWideStruct& operator =( - const BasicWideStruct& x); + const BasicWideStruct& x) + { + + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + m_new_int32 = x.m_new_int32; + + m_new_string = x.m_new_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BasicWideStruct that will be copied. */ eProsima_user_DllExport BasicWideStruct& operator =( - BasicWideStruct&& x) noexcept; + BasicWideStruct&& x) noexcept + { + + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + m_new_int32 = x.m_new_int32; + m_new_string = std::move(x.m_new_string); + return *this; + } /*! * @brief Comparison operator. * @param x BasicWideStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BasicWideStruct& x) const; + const BasicWideStruct& x) const + { + return (m_my_bool == x.m_my_bool && + m_my_int32 == x.m_my_int32 && + m_my_string == x.m_my_string && + m_new_int32 == x.m_new_int32 && + m_new_string == x.m_new_string); + } /*! * @brief Comparison operator. * @param x BasicWideStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BasicWideStruct& x) const; + const BasicWideStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_bool * @param _my_bool New value for member my_bool */ eProsima_user_DllExport void my_bool( - bool _my_bool); + bool _my_bool) + { + m_my_bool = _my_bool; + } /*! * @brief This function returns the value of member my_bool * @return Value of member my_bool */ - eProsima_user_DllExport bool my_bool() const; + eProsima_user_DllExport bool my_bool() const + { + return m_my_bool; + } /*! * @brief This function returns a reference to member my_bool * @return Reference to member my_bool */ - eProsima_user_DllExport bool& my_bool(); + eProsima_user_DllExport bool& my_bool() + { + return m_my_bool; + } /*! @@ -845,19 +1252,28 @@ class BasicWideStruct * @param _my_int32 New value for member my_int32 */ eProsima_user_DllExport void my_int32( - int32_t _my_int32); + int32_t _my_int32) + { + m_my_int32 = _my_int32; + } /*! * @brief This function returns the value of member my_int32 * @return Value of member my_int32 */ - eProsima_user_DllExport int32_t my_int32() const; + eProsima_user_DllExport int32_t my_int32() const + { + return m_my_int32; + } /*! * @brief This function returns a reference to member my_int32 * @return Reference to member my_int32 */ - eProsima_user_DllExport int32_t& my_int32(); + eProsima_user_DllExport int32_t& my_int32() + { + return m_my_int32; + } /*! @@ -865,26 +1281,38 @@ class BasicWideStruct * @param _my_string New value to be copied in member my_string */ eProsima_user_DllExport void my_string( - const std::string& _my_string); + const std::string& _my_string) + { + m_my_string = _my_string; + } /*! * @brief This function moves the value in member my_string * @param _my_string New value to be moved in member my_string */ eProsima_user_DllExport void my_string( - std::string&& _my_string); + std::string&& _my_string) + { + m_my_string = std::move(_my_string); + } /*! * @brief This function returns a constant reference to member my_string * @return Constant reference to member my_string */ - eProsima_user_DllExport const std::string& my_string() const; + eProsima_user_DllExport const std::string& my_string() const + { + return m_my_string; + } /*! * @brief This function returns a reference to member my_string * @return Reference to member my_string */ - eProsima_user_DllExport std::string& my_string(); + eProsima_user_DllExport std::string& my_string() + { + return m_my_string; + } /*! @@ -892,19 +1320,28 @@ class BasicWideStruct * @param _new_int32 New value for member new_int32 */ eProsima_user_DllExport void new_int32( - int32_t _new_int32); + int32_t _new_int32) + { + m_new_int32 = _new_int32; + } /*! * @brief This function returns the value of member new_int32 * @return Value of member new_int32 */ - eProsima_user_DllExport int32_t new_int32() const; + eProsima_user_DllExport int32_t new_int32() const + { + return m_new_int32; + } /*! * @brief This function returns a reference to member new_int32 * @return Reference to member new_int32 */ - eProsima_user_DllExport int32_t& new_int32(); + eProsima_user_DllExport int32_t& new_int32() + { + return m_new_int32; + } /*! @@ -912,26 +1349,40 @@ class BasicWideStruct * @param _new_string New value to be copied in member new_string */ eProsima_user_DllExport void new_string( - const std::string& _new_string); + const std::string& _new_string) + { + m_new_string = _new_string; + } /*! * @brief This function moves the value in member new_string * @param _new_string New value to be moved in member new_string */ eProsima_user_DllExport void new_string( - std::string&& _new_string); + std::string&& _new_string) + { + m_new_string = std::move(_new_string); + } /*! * @brief This function returns a constant reference to member new_string * @return Constant reference to member new_string */ - eProsima_user_DllExport const std::string& new_string() const; + eProsima_user_DllExport const std::string& new_string() const + { + return m_new_string; + } /*! * @brief This function returns a reference to member new_string * @return Reference to member new_string */ - eProsima_user_DllExport std::string& new_string(); + eProsima_user_DllExport std::string& new_string() + { + return m_new_string; + } + + private: @@ -955,73 +1406,140 @@ class BadBasicWideStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BadBasicWideStruct(); + eProsima_user_DllExport BadBasicWideStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BadBasicWideStruct(); + eProsima_user_DllExport ~BadBasicWideStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BadBasicWideStruct that will be copied. */ eProsima_user_DllExport BadBasicWideStruct( - const BadBasicWideStruct& x); + const BadBasicWideStruct& x) + { + m_new_int32 = x.m_new_int32; + + m_new_string = x.m_new_string; + + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + } /*! * @brief Move constructor. * @param x Reference to the object BadBasicWideStruct that will be copied. */ eProsima_user_DllExport BadBasicWideStruct( - BadBasicWideStruct&& x) noexcept; + BadBasicWideStruct&& x) noexcept + { + m_new_int32 = x.m_new_int32; + m_new_string = std::move(x.m_new_string); + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + } /*! * @brief Copy assignment. * @param x Reference to the object BadBasicWideStruct that will be copied. */ eProsima_user_DllExport BadBasicWideStruct& operator =( - const BadBasicWideStruct& x); + const BadBasicWideStruct& x) + { + + m_new_int32 = x.m_new_int32; + + m_new_string = x.m_new_string; + + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BadBasicWideStruct that will be copied. */ eProsima_user_DllExport BadBasicWideStruct& operator =( - BadBasicWideStruct&& x) noexcept; + BadBasicWideStruct&& x) noexcept + { + + m_new_int32 = x.m_new_int32; + m_new_string = std::move(x.m_new_string); + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + return *this; + } /*! * @brief Comparison operator. * @param x BadBasicWideStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BadBasicWideStruct& x) const; + const BadBasicWideStruct& x) const + { + return (m_new_int32 == x.m_new_int32 && + m_new_string == x.m_new_string && + m_my_bool == x.m_my_bool && + m_my_int32 == x.m_my_int32 && + m_my_string == x.m_my_string); + } /*! * @brief Comparison operator. * @param x BadBasicWideStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BadBasicWideStruct& x) const; + const BadBasicWideStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member new_int32 * @param _new_int32 New value for member new_int32 */ eProsima_user_DllExport void new_int32( - int32_t _new_int32); + int32_t _new_int32) + { + m_new_int32 = _new_int32; + } /*! * @brief This function returns the value of member new_int32 * @return Value of member new_int32 */ - eProsima_user_DllExport int32_t new_int32() const; + eProsima_user_DllExport int32_t new_int32() const + { + return m_new_int32; + } /*! * @brief This function returns a reference to member new_int32 * @return Reference to member new_int32 */ - eProsima_user_DllExport int32_t& new_int32(); + eProsima_user_DllExport int32_t& new_int32() + { + return m_new_int32; + } /*! @@ -1029,26 +1547,38 @@ class BadBasicWideStruct * @param _new_string New value to be copied in member new_string */ eProsima_user_DllExport void new_string( - const std::string& _new_string); + const std::string& _new_string) + { + m_new_string = _new_string; + } /*! * @brief This function moves the value in member new_string * @param _new_string New value to be moved in member new_string */ eProsima_user_DllExport void new_string( - std::string&& _new_string); + std::string&& _new_string) + { + m_new_string = std::move(_new_string); + } /*! * @brief This function returns a constant reference to member new_string * @return Constant reference to member new_string */ - eProsima_user_DllExport const std::string& new_string() const; + eProsima_user_DllExport const std::string& new_string() const + { + return m_new_string; + } /*! * @brief This function returns a reference to member new_string * @return Reference to member new_string */ - eProsima_user_DllExport std::string& new_string(); + eProsima_user_DllExport std::string& new_string() + { + return m_new_string; + } /*! @@ -1056,19 +1586,28 @@ class BadBasicWideStruct * @param _my_bool New value for member my_bool */ eProsima_user_DllExport void my_bool( - bool _my_bool); + bool _my_bool) + { + m_my_bool = _my_bool; + } /*! * @brief This function returns the value of member my_bool * @return Value of member my_bool */ - eProsima_user_DllExport bool my_bool() const; + eProsima_user_DllExport bool my_bool() const + { + return m_my_bool; + } /*! * @brief This function returns a reference to member my_bool * @return Reference to member my_bool */ - eProsima_user_DllExport bool& my_bool(); + eProsima_user_DllExport bool& my_bool() + { + return m_my_bool; + } /*! @@ -1076,19 +1615,28 @@ class BadBasicWideStruct * @param _my_int32 New value for member my_int32 */ eProsima_user_DllExport void my_int32( - int32_t _my_int32); + int32_t _my_int32) + { + m_my_int32 = _my_int32; + } /*! * @brief This function returns the value of member my_int32 * @return Value of member my_int32 */ - eProsima_user_DllExport int32_t my_int32() const; + eProsima_user_DllExport int32_t my_int32() const + { + return m_my_int32; + } /*! * @brief This function returns a reference to member my_int32 * @return Reference to member my_int32 */ - eProsima_user_DllExport int32_t& my_int32(); + eProsima_user_DllExport int32_t& my_int32() + { + return m_my_int32; + } /*! @@ -1096,26 +1644,40 @@ class BadBasicWideStruct * @param _my_string New value to be copied in member my_string */ eProsima_user_DllExport void my_string( - const std::string& _my_string); + const std::string& _my_string) + { + m_my_string = _my_string; + } /*! * @brief This function moves the value in member my_string * @param _my_string New value to be moved in member my_string */ eProsima_user_DllExport void my_string( - std::string&& _my_string); + std::string&& _my_string) + { + m_my_string = std::move(_my_string); + } /*! * @brief This function returns a constant reference to member my_string * @return Constant reference to member my_string */ - eProsima_user_DllExport const std::string& my_string() const; + eProsima_user_DllExport const std::string& my_string() const + { + return m_my_string; + } /*! * @brief This function returns a reference to member my_string * @return Reference to member my_string */ - eProsima_user_DllExport std::string& my_string(); + eProsima_user_DllExport std::string& my_string() + { + return m_my_string; + } + + private: @@ -1139,80 +1701,124 @@ class StringStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport StringStruct(); + eProsima_user_DllExport StringStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~StringStruct(); + eProsima_user_DllExport ~StringStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object StringStruct that will be copied. */ eProsima_user_DllExport StringStruct( - const StringStruct& x); + const StringStruct& x) + { + m_my_string = x.m_my_string; + + } /*! * @brief Move constructor. * @param x Reference to the object StringStruct that will be copied. */ eProsima_user_DllExport StringStruct( - StringStruct&& x) noexcept; + StringStruct&& x) noexcept + { + m_my_string = std::move(x.m_my_string); + } /*! * @brief Copy assignment. * @param x Reference to the object StringStruct that will be copied. */ eProsima_user_DllExport StringStruct& operator =( - const StringStruct& x); + const StringStruct& x) + { + + m_my_string = x.m_my_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object StringStruct that will be copied. */ eProsima_user_DllExport StringStruct& operator =( - StringStruct&& x) noexcept; + StringStruct&& x) noexcept + { + + m_my_string = std::move(x.m_my_string); + return *this; + } /*! * @brief Comparison operator. * @param x StringStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const StringStruct& x) const; + const StringStruct& x) const + { + return (m_my_string == x.m_my_string); + } /*! * @brief Comparison operator. * @param x StringStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const StringStruct& x) const; + const StringStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_string * @param _my_string New value to be copied in member my_string */ eProsima_user_DllExport void my_string( - const std::string& _my_string); + const std::string& _my_string) + { + m_my_string = _my_string; + } /*! * @brief This function moves the value in member my_string * @param _my_string New value to be moved in member my_string */ eProsima_user_DllExport void my_string( - std::string&& _my_string); + std::string&& _my_string) + { + m_my_string = std::move(_my_string); + } /*! * @brief This function returns a constant reference to member my_string * @return Constant reference to member my_string */ - eProsima_user_DllExport const std::string& my_string() const; + eProsima_user_DllExport const std::string& my_string() const + { + return m_my_string; + } /*! * @brief This function returns a reference to member my_string * @return Reference to member my_string */ - eProsima_user_DllExport std::string& my_string(); + eProsima_user_DllExport std::string& my_string() + { + return m_my_string; + } + + private: @@ -1232,80 +1838,124 @@ class LargeStringStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport LargeStringStruct(); + eProsima_user_DllExport LargeStringStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~LargeStringStruct(); + eProsima_user_DllExport ~LargeStringStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object LargeStringStruct that will be copied. */ eProsima_user_DllExport LargeStringStruct( - const LargeStringStruct& x); + const LargeStringStruct& x) + { + m_my_large_string = x.m_my_large_string; + + } /*! * @brief Move constructor. * @param x Reference to the object LargeStringStruct that will be copied. */ eProsima_user_DllExport LargeStringStruct( - LargeStringStruct&& x) noexcept; + LargeStringStruct&& x) noexcept + { + m_my_large_string = std::move(x.m_my_large_string); + } /*! * @brief Copy assignment. * @param x Reference to the object LargeStringStruct that will be copied. */ eProsima_user_DllExport LargeStringStruct& operator =( - const LargeStringStruct& x); + const LargeStringStruct& x) + { + + m_my_large_string = x.m_my_large_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object LargeStringStruct that will be copied. */ eProsima_user_DllExport LargeStringStruct& operator =( - LargeStringStruct&& x) noexcept; + LargeStringStruct&& x) noexcept + { + + m_my_large_string = std::move(x.m_my_large_string); + return *this; + } /*! * @brief Comparison operator. * @param x LargeStringStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const LargeStringStruct& x) const; + const LargeStringStruct& x) const + { + return (m_my_large_string == x.m_my_large_string); + } /*! * @brief Comparison operator. * @param x LargeStringStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const LargeStringStruct& x) const; + const LargeStringStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_large_string * @param _my_large_string New value to be copied in member my_large_string */ eProsima_user_DllExport void my_large_string( - const eprosima::fastcdr::fixed_string<41925>& _my_large_string); + const eprosima::fastcdr::fixed_string<41925>& _my_large_string) + { + m_my_large_string = _my_large_string; + } /*! * @brief This function moves the value in member my_large_string * @param _my_large_string New value to be moved in member my_large_string */ eProsima_user_DllExport void my_large_string( - eprosima::fastcdr::fixed_string<41925>&& _my_large_string); + eprosima::fastcdr::fixed_string<41925>&& _my_large_string) + { + m_my_large_string = std::move(_my_large_string); + } /*! * @brief This function returns a constant reference to member my_large_string * @return Constant reference to member my_large_string */ - eProsima_user_DllExport const eprosima::fastcdr::fixed_string<41925>& my_large_string() const; + eProsima_user_DllExport const eprosima::fastcdr::fixed_string<41925>& my_large_string() const + { + return m_my_large_string; + } /*! * @brief This function returns a reference to member my_large_string * @return Reference to member my_large_string */ - eProsima_user_DllExport eprosima::fastcdr::fixed_string<41925>& my_large_string(); + eProsima_user_DllExport eprosima::fastcdr::fixed_string<41925>& my_large_string() + { + return m_my_large_string; + } + + private: @@ -1325,80 +1975,124 @@ class WStringStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport WStringStruct(); + eProsima_user_DllExport WStringStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~WStringStruct(); + eProsima_user_DllExport ~WStringStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object WStringStruct that will be copied. */ eProsima_user_DllExport WStringStruct( - const WStringStruct& x); + const WStringStruct& x) + { + m_my_wstring = x.m_my_wstring; + + } /*! * @brief Move constructor. * @param x Reference to the object WStringStruct that will be copied. */ eProsima_user_DllExport WStringStruct( - WStringStruct&& x) noexcept; + WStringStruct&& x) noexcept + { + m_my_wstring = std::move(x.m_my_wstring); + } /*! * @brief Copy assignment. * @param x Reference to the object WStringStruct that will be copied. */ eProsima_user_DllExport WStringStruct& operator =( - const WStringStruct& x); + const WStringStruct& x) + { + + m_my_wstring = x.m_my_wstring; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object WStringStruct that will be copied. */ eProsima_user_DllExport WStringStruct& operator =( - WStringStruct&& x) noexcept; + WStringStruct&& x) noexcept + { + + m_my_wstring = std::move(x.m_my_wstring); + return *this; + } /*! * @brief Comparison operator. * @param x WStringStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const WStringStruct& x) const; + const WStringStruct& x) const + { + return (m_my_wstring == x.m_my_wstring); + } /*! * @brief Comparison operator. * @param x WStringStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const WStringStruct& x) const; + const WStringStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_wstring * @param _my_wstring New value to be copied in member my_wstring */ eProsima_user_DllExport void my_wstring( - const std::wstring& _my_wstring); + const std::wstring& _my_wstring) + { + m_my_wstring = _my_wstring; + } /*! * @brief This function moves the value in member my_wstring * @param _my_wstring New value to be moved in member my_wstring */ eProsima_user_DllExport void my_wstring( - std::wstring&& _my_wstring); + std::wstring&& _my_wstring) + { + m_my_wstring = std::move(_my_wstring); + } /*! * @brief This function returns a constant reference to member my_wstring * @return Constant reference to member my_wstring */ - eProsima_user_DllExport const std::wstring& my_wstring() const; + eProsima_user_DllExport const std::wstring& my_wstring() const + { + return m_my_wstring; + } /*! * @brief This function returns a reference to member my_wstring * @return Reference to member my_wstring */ - eProsima_user_DllExport std::wstring& my_wstring(); + eProsima_user_DllExport std::wstring& my_wstring() + { + return m_my_wstring; + } + + private: @@ -1418,80 +2112,124 @@ class LargeWStringStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport LargeWStringStruct(); + eProsima_user_DllExport LargeWStringStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~LargeWStringStruct(); + eProsima_user_DllExport ~LargeWStringStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object LargeWStringStruct that will be copied. */ eProsima_user_DllExport LargeWStringStruct( - const LargeWStringStruct& x); + const LargeWStringStruct& x) + { + m_my_large_wstring = x.m_my_large_wstring; + + } /*! * @brief Move constructor. * @param x Reference to the object LargeWStringStruct that will be copied. */ eProsima_user_DllExport LargeWStringStruct( - LargeWStringStruct&& x) noexcept; + LargeWStringStruct&& x) noexcept + { + m_my_large_wstring = std::move(x.m_my_large_wstring); + } /*! * @brief Copy assignment. * @param x Reference to the object LargeWStringStruct that will be copied. */ eProsima_user_DllExport LargeWStringStruct& operator =( - const LargeWStringStruct& x); + const LargeWStringStruct& x) + { + + m_my_large_wstring = x.m_my_large_wstring; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object LargeWStringStruct that will be copied. */ eProsima_user_DllExport LargeWStringStruct& operator =( - LargeWStringStruct&& x) noexcept; + LargeWStringStruct&& x) noexcept + { + + m_my_large_wstring = std::move(x.m_my_large_wstring); + return *this; + } /*! * @brief Comparison operator. * @param x LargeWStringStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const LargeWStringStruct& x) const; + const LargeWStringStruct& x) const + { + return (m_my_large_wstring == x.m_my_large_wstring); + } /*! * @brief Comparison operator. * @param x LargeWStringStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const LargeWStringStruct& x) const; + const LargeWStringStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_large_wstring * @param _my_large_wstring New value to be copied in member my_large_wstring */ eProsima_user_DllExport void my_large_wstring( - const std::wstring& _my_large_wstring); + const std::wstring& _my_large_wstring) + { + m_my_large_wstring = _my_large_wstring; + } /*! * @brief This function moves the value in member my_large_wstring * @param _my_large_wstring New value to be moved in member my_large_wstring */ eProsima_user_DllExport void my_large_wstring( - std::wstring&& _my_large_wstring); + std::wstring&& _my_large_wstring) + { + m_my_large_wstring = std::move(_my_large_wstring); + } /*! * @brief This function returns a constant reference to member my_large_wstring * @return Constant reference to member my_large_wstring */ - eProsima_user_DllExport const std::wstring& my_large_wstring() const; + eProsima_user_DllExport const std::wstring& my_large_wstring() const + { + return m_my_large_wstring; + } /*! * @brief This function returns a reference to member my_large_wstring * @return Reference to member my_large_wstring */ - eProsima_user_DllExport std::wstring& my_large_wstring(); + eProsima_user_DllExport std::wstring& my_large_wstring() + { + return m_my_large_wstring; + } + + private: @@ -1511,80 +2249,124 @@ class ArrayStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ArrayStruct(); + eProsima_user_DllExport ArrayStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ArrayStruct(); + eProsima_user_DllExport ~ArrayStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ArrayStruct that will be copied. */ eProsima_user_DllExport ArrayStruct( - const ArrayStruct& x); + const ArrayStruct& x) + { + m_my_array = x.m_my_array; + + } /*! * @brief Move constructor. * @param x Reference to the object ArrayStruct that will be copied. */ eProsima_user_DllExport ArrayStruct( - ArrayStruct&& x) noexcept; + ArrayStruct&& x) noexcept + { + m_my_array = std::move(x.m_my_array); + } /*! * @brief Copy assignment. * @param x Reference to the object ArrayStruct that will be copied. */ eProsima_user_DllExport ArrayStruct& operator =( - const ArrayStruct& x); + const ArrayStruct& x) + { + + m_my_array = x.m_my_array; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ArrayStruct that will be copied. */ eProsima_user_DllExport ArrayStruct& operator =( - ArrayStruct&& x) noexcept; + ArrayStruct&& x) noexcept + { + + m_my_array = std::move(x.m_my_array); + return *this; + } /*! * @brief Comparison operator. * @param x ArrayStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ArrayStruct& x) const; + const ArrayStruct& x) const + { + return (m_my_array == x.m_my_array); + } /*! * @brief Comparison operator. * @param x ArrayStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ArrayStruct& x) const; + const ArrayStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_array * @param _my_array New value to be copied in member my_array */ eProsima_user_DllExport void my_array( - const std::array& _my_array); + const std::array& _my_array) + { + m_my_array = _my_array; + } /*! * @brief This function moves the value in member my_array * @param _my_array New value to be moved in member my_array */ eProsima_user_DllExport void my_array( - std::array&& _my_array); + std::array&& _my_array) + { + m_my_array = std::move(_my_array); + } /*! * @brief This function returns a constant reference to member my_array * @return Constant reference to member my_array */ - eProsima_user_DllExport const std::array& my_array() const; + eProsima_user_DllExport const std::array& my_array() const + { + return m_my_array; + } /*! * @brief This function returns a reference to member my_array * @return Reference to member my_array */ - eProsima_user_DllExport std::array& my_array(); + eProsima_user_DllExport std::array& my_array() + { + return m_my_array; + } + + private: @@ -1604,80 +2386,124 @@ class ArrayStructEqual /*! * @brief Default constructor. */ - eProsima_user_DllExport ArrayStructEqual(); + eProsima_user_DllExport ArrayStructEqual() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ArrayStructEqual(); + eProsima_user_DllExport ~ArrayStructEqual() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ArrayStructEqual that will be copied. */ eProsima_user_DllExport ArrayStructEqual( - const ArrayStructEqual& x); + const ArrayStructEqual& x) + { + m_my_array_equal = x.m_my_array_equal; + + } /*! * @brief Move constructor. * @param x Reference to the object ArrayStructEqual that will be copied. */ eProsima_user_DllExport ArrayStructEqual( - ArrayStructEqual&& x) noexcept; + ArrayStructEqual&& x) noexcept + { + m_my_array_equal = std::move(x.m_my_array_equal); + } /*! * @brief Copy assignment. * @param x Reference to the object ArrayStructEqual that will be copied. */ eProsima_user_DllExport ArrayStructEqual& operator =( - const ArrayStructEqual& x); + const ArrayStructEqual& x) + { + + m_my_array_equal = x.m_my_array_equal; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ArrayStructEqual that will be copied. */ eProsima_user_DllExport ArrayStructEqual& operator =( - ArrayStructEqual&& x) noexcept; + ArrayStructEqual&& x) noexcept + { + + m_my_array_equal = std::move(x.m_my_array_equal); + return *this; + } /*! * @brief Comparison operator. * @param x ArrayStructEqual object to compare. */ eProsima_user_DllExport bool operator ==( - const ArrayStructEqual& x) const; + const ArrayStructEqual& x) const + { + return (m_my_array_equal == x.m_my_array_equal); + } /*! * @brief Comparison operator. * @param x ArrayStructEqual object to compare. */ eProsima_user_DllExport bool operator !=( - const ArrayStructEqual& x) const; + const ArrayStructEqual& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_array_equal * @param _my_array_equal New value to be copied in member my_array_equal */ eProsima_user_DllExport void my_array_equal( - const std::array& _my_array_equal); + const std::array& _my_array_equal) + { + m_my_array_equal = _my_array_equal; + } /*! * @brief This function moves the value in member my_array_equal * @param _my_array_equal New value to be moved in member my_array_equal */ eProsima_user_DllExport void my_array_equal( - std::array&& _my_array_equal); + std::array&& _my_array_equal) + { + m_my_array_equal = std::move(_my_array_equal); + } /*! * @brief This function returns a constant reference to member my_array_equal * @return Constant reference to member my_array_equal */ - eProsima_user_DllExport const std::array& my_array_equal() const; + eProsima_user_DllExport const std::array& my_array_equal() const + { + return m_my_array_equal; + } /*! * @brief This function returns a reference to member my_array_equal * @return Reference to member my_array_equal */ - eProsima_user_DllExport std::array& my_array_equal(); + eProsima_user_DllExport std::array& my_array_equal() + { + return m_my_array_equal; + } + + private: @@ -1697,80 +2523,124 @@ class ArrayBadStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ArrayBadStruct(); + eProsima_user_DllExport ArrayBadStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ArrayBadStruct(); + eProsima_user_DllExport ~ArrayBadStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ArrayBadStruct that will be copied. */ eProsima_user_DllExport ArrayBadStruct( - const ArrayBadStruct& x); + const ArrayBadStruct& x) + { + m_my_array = x.m_my_array; + + } /*! * @brief Move constructor. * @param x Reference to the object ArrayBadStruct that will be copied. */ eProsima_user_DllExport ArrayBadStruct( - ArrayBadStruct&& x) noexcept; + ArrayBadStruct&& x) noexcept + { + m_my_array = std::move(x.m_my_array); + } /*! * @brief Copy assignment. * @param x Reference to the object ArrayBadStruct that will be copied. */ eProsima_user_DllExport ArrayBadStruct& operator =( - const ArrayBadStruct& x); + const ArrayBadStruct& x) + { + + m_my_array = x.m_my_array; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ArrayBadStruct that will be copied. */ eProsima_user_DllExport ArrayBadStruct& operator =( - ArrayBadStruct&& x) noexcept; + ArrayBadStruct&& x) noexcept + { + + m_my_array = std::move(x.m_my_array); + return *this; + } /*! * @brief Comparison operator. * @param x ArrayBadStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ArrayBadStruct& x) const; + const ArrayBadStruct& x) const + { + return (m_my_array == x.m_my_array); + } /*! * @brief Comparison operator. * @param x ArrayBadStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ArrayBadStruct& x) const; + const ArrayBadStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_array * @param _my_array New value to be copied in member my_array */ eProsima_user_DllExport void my_array( - const std::array& _my_array); + const std::array& _my_array) + { + m_my_array = _my_array; + } /*! * @brief This function moves the value in member my_array * @param _my_array New value to be moved in member my_array */ eProsima_user_DllExport void my_array( - std::array&& _my_array); + std::array&& _my_array) + { + m_my_array = std::move(_my_array); + } /*! * @brief This function returns a constant reference to member my_array * @return Constant reference to member my_array */ - eProsima_user_DllExport const std::array& my_array() const; + eProsima_user_DllExport const std::array& my_array() const + { + return m_my_array; + } /*! * @brief This function returns a reference to member my_array * @return Reference to member my_array */ - eProsima_user_DllExport std::array& my_array(); + eProsima_user_DllExport std::array& my_array() + { + return m_my_array; + } + + private: @@ -1790,80 +2660,124 @@ class ArrayDimensionsStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ArrayDimensionsStruct(); + eProsima_user_DllExport ArrayDimensionsStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ArrayDimensionsStruct(); + eProsima_user_DllExport ~ArrayDimensionsStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ArrayDimensionsStruct that will be copied. */ eProsima_user_DllExport ArrayDimensionsStruct( - const ArrayDimensionsStruct& x); + const ArrayDimensionsStruct& x) + { + m_my_array = x.m_my_array; + + } /*! * @brief Move constructor. * @param x Reference to the object ArrayDimensionsStruct that will be copied. */ eProsima_user_DllExport ArrayDimensionsStruct( - ArrayDimensionsStruct&& x) noexcept; + ArrayDimensionsStruct&& x) noexcept + { + m_my_array = std::move(x.m_my_array); + } /*! * @brief Copy assignment. * @param x Reference to the object ArrayDimensionsStruct that will be copied. */ eProsima_user_DllExport ArrayDimensionsStruct& operator =( - const ArrayDimensionsStruct& x); + const ArrayDimensionsStruct& x) + { + + m_my_array = x.m_my_array; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ArrayDimensionsStruct that will be copied. */ eProsima_user_DllExport ArrayDimensionsStruct& operator =( - ArrayDimensionsStruct&& x) noexcept; + ArrayDimensionsStruct&& x) noexcept + { + + m_my_array = std::move(x.m_my_array); + return *this; + } /*! * @brief Comparison operator. * @param x ArrayDimensionsStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ArrayDimensionsStruct& x) const; + const ArrayDimensionsStruct& x) const + { + return (m_my_array == x.m_my_array); + } /*! * @brief Comparison operator. * @param x ArrayDimensionsStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ArrayDimensionsStruct& x) const; + const ArrayDimensionsStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_array * @param _my_array New value to be copied in member my_array */ eProsima_user_DllExport void my_array( - const std::array, 2>& _my_array); + const std::array, 2>& _my_array) + { + m_my_array = _my_array; + } /*! * @brief This function moves the value in member my_array * @param _my_array New value to be moved in member my_array */ eProsima_user_DllExport void my_array( - std::array, 2>&& _my_array); + std::array, 2>&& _my_array) + { + m_my_array = std::move(_my_array); + } /*! * @brief This function returns a constant reference to member my_array * @return Constant reference to member my_array */ - eProsima_user_DllExport const std::array, 2>& my_array() const; + eProsima_user_DllExport const std::array, 2>& my_array() const + { + return m_my_array; + } /*! * @brief This function returns a reference to member my_array * @return Reference to member my_array */ - eProsima_user_DllExport std::array, 2>& my_array(); + eProsima_user_DllExport std::array, 2>& my_array() + { + return m_my_array; + } + + private: @@ -1883,80 +2797,124 @@ class ArraySizeStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ArraySizeStruct(); + eProsima_user_DllExport ArraySizeStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ArraySizeStruct(); + eProsima_user_DllExport ~ArraySizeStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ArraySizeStruct that will be copied. */ eProsima_user_DllExport ArraySizeStruct( - const ArraySizeStruct& x); + const ArraySizeStruct& x) + { + m_my_array = x.m_my_array; + + } /*! * @brief Move constructor. * @param x Reference to the object ArraySizeStruct that will be copied. */ eProsima_user_DllExport ArraySizeStruct( - ArraySizeStruct&& x) noexcept; + ArraySizeStruct&& x) noexcept + { + m_my_array = std::move(x.m_my_array); + } /*! * @brief Copy assignment. * @param x Reference to the object ArraySizeStruct that will be copied. */ eProsima_user_DllExport ArraySizeStruct& operator =( - const ArraySizeStruct& x); + const ArraySizeStruct& x) + { + + m_my_array = x.m_my_array; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ArraySizeStruct that will be copied. */ eProsima_user_DllExport ArraySizeStruct& operator =( - ArraySizeStruct&& x) noexcept; + ArraySizeStruct&& x) noexcept + { + + m_my_array = std::move(x.m_my_array); + return *this; + } /*! * @brief Comparison operator. * @param x ArraySizeStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ArraySizeStruct& x) const; + const ArraySizeStruct& x) const + { + return (m_my_array == x.m_my_array); + } /*! * @brief Comparison operator. * @param x ArraySizeStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ArraySizeStruct& x) const; + const ArraySizeStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_array * @param _my_array New value to be copied in member my_array */ eProsima_user_DllExport void my_array( - const std::array& _my_array); + const std::array& _my_array) + { + m_my_array = _my_array; + } /*! * @brief This function moves the value in member my_array * @param _my_array New value to be moved in member my_array */ eProsima_user_DllExport void my_array( - std::array&& _my_array); + std::array&& _my_array) + { + m_my_array = std::move(_my_array); + } /*! * @brief This function returns a constant reference to member my_array * @return Constant reference to member my_array */ - eProsima_user_DllExport const std::array& my_array() const; + eProsima_user_DllExport const std::array& my_array() const + { + return m_my_array; + } /*! * @brief This function returns a reference to member my_array * @return Reference to member my_array */ - eProsima_user_DllExport std::array& my_array(); + eProsima_user_DllExport std::array& my_array() + { + return m_my_array; + } + + private: @@ -1965,8 +2923,6 @@ class ArraySizeStruct }; - - /*! * @brief This class represents the structure SequenceStruct defined by the user in the IDL file. * @ingroup Types @@ -1978,80 +2934,124 @@ class SequenceStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceStruct(); + eProsima_user_DllExport SequenceStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceStruct(); + eProsima_user_DllExport ~SequenceStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceStruct that will be copied. */ eProsima_user_DllExport SequenceStruct( - const SequenceStruct& x); + const SequenceStruct& x) + { + m_my_sequence = x.m_my_sequence; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceStruct that will be copied. */ eProsima_user_DllExport SequenceStruct( - SequenceStruct&& x) noexcept; + SequenceStruct&& x) noexcept + { + m_my_sequence = std::move(x.m_my_sequence); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceStruct that will be copied. */ eProsima_user_DllExport SequenceStruct& operator =( - const SequenceStruct& x); + const SequenceStruct& x) + { + + m_my_sequence = x.m_my_sequence; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceStruct that will be copied. */ eProsima_user_DllExport SequenceStruct& operator =( - SequenceStruct&& x) noexcept; + SequenceStruct&& x) noexcept + { + + m_my_sequence = std::move(x.m_my_sequence); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceStruct& x) const; + const SequenceStruct& x) const + { + return (m_my_sequence == x.m_my_sequence); + } /*! * @brief Comparison operator. * @param x SequenceStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceStruct& x) const; + const SequenceStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence * @param _my_sequence New value to be copied in member my_sequence */ eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); + const std::vector& _my_sequence) + { + m_my_sequence = _my_sequence; + } /*! * @brief This function moves the value in member my_sequence * @param _my_sequence New value to be moved in member my_sequence */ eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); + std::vector&& _my_sequence) + { + m_my_sequence = std::move(_my_sequence); + } /*! * @brief This function returns a constant reference to member my_sequence * @return Constant reference to member my_sequence */ - eProsima_user_DllExport const std::vector& my_sequence() const; + eProsima_user_DllExport const std::vector& my_sequence() const + { + return m_my_sequence; + } /*! * @brief This function returns a reference to member my_sequence * @return Reference to member my_sequence */ - eProsima_user_DllExport std::vector& my_sequence(); + eProsima_user_DllExport std::vector& my_sequence() + { + return m_my_sequence; + } + + private: @@ -2060,8 +3060,6 @@ class SequenceStruct }; - - /*! * @brief This class represents the structure SequenceStructEqual defined by the user in the IDL file. * @ingroup Types @@ -2073,80 +3071,124 @@ class SequenceStructEqual /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceStructEqual(); + eProsima_user_DllExport SequenceStructEqual() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceStructEqual(); + eProsima_user_DllExport ~SequenceStructEqual() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceStructEqual that will be copied. */ eProsima_user_DllExport SequenceStructEqual( - const SequenceStructEqual& x); + const SequenceStructEqual& x) + { + m_my_sequence_equal = x.m_my_sequence_equal; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceStructEqual that will be copied. */ eProsima_user_DllExport SequenceStructEqual( - SequenceStructEqual&& x) noexcept; + SequenceStructEqual&& x) noexcept + { + m_my_sequence_equal = std::move(x.m_my_sequence_equal); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceStructEqual that will be copied. */ eProsima_user_DllExport SequenceStructEqual& operator =( - const SequenceStructEqual& x); + const SequenceStructEqual& x) + { + + m_my_sequence_equal = x.m_my_sequence_equal; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceStructEqual that will be copied. */ eProsima_user_DllExport SequenceStructEqual& operator =( - SequenceStructEqual&& x) noexcept; + SequenceStructEqual&& x) noexcept + { + + m_my_sequence_equal = std::move(x.m_my_sequence_equal); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceStructEqual object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceStructEqual& x) const; + const SequenceStructEqual& x) const + { + return (m_my_sequence_equal == x.m_my_sequence_equal); + } /*! * @brief Comparison operator. * @param x SequenceStructEqual object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceStructEqual& x) const; + const SequenceStructEqual& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence_equal * @param _my_sequence_equal New value to be copied in member my_sequence_equal */ eProsima_user_DllExport void my_sequence_equal( - const std::vector& _my_sequence_equal); + const std::vector& _my_sequence_equal) + { + m_my_sequence_equal = _my_sequence_equal; + } /*! * @brief This function moves the value in member my_sequence_equal * @param _my_sequence_equal New value to be moved in member my_sequence_equal */ eProsima_user_DllExport void my_sequence_equal( - std::vector&& _my_sequence_equal); + std::vector&& _my_sequence_equal) + { + m_my_sequence_equal = std::move(_my_sequence_equal); + } /*! * @brief This function returns a constant reference to member my_sequence_equal * @return Constant reference to member my_sequence_equal */ - eProsima_user_DllExport const std::vector& my_sequence_equal() const; + eProsima_user_DllExport const std::vector& my_sequence_equal() const + { + return m_my_sequence_equal; + } /*! * @brief This function returns a reference to member my_sequence_equal * @return Reference to member my_sequence_equal */ - eProsima_user_DllExport std::vector& my_sequence_equal(); + eProsima_user_DllExport std::vector& my_sequence_equal() + { + return m_my_sequence_equal; + } + + private: @@ -2155,8 +3197,6 @@ class SequenceStructEqual }; - - /*! * @brief This class represents the structure SequenceBadStruct defined by the user in the IDL file. * @ingroup Types @@ -2168,80 +3208,124 @@ class SequenceBadStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceBadStruct(); + eProsima_user_DllExport SequenceBadStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceBadStruct(); + eProsima_user_DllExport ~SequenceBadStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceBadStruct that will be copied. */ eProsima_user_DllExport SequenceBadStruct( - const SequenceBadStruct& x); + const SequenceBadStruct& x) + { + m_my_sequence = x.m_my_sequence; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceBadStruct that will be copied. */ eProsima_user_DllExport SequenceBadStruct( - SequenceBadStruct&& x) noexcept; + SequenceBadStruct&& x) noexcept + { + m_my_sequence = std::move(x.m_my_sequence); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceBadStruct that will be copied. */ eProsima_user_DllExport SequenceBadStruct& operator =( - const SequenceBadStruct& x); + const SequenceBadStruct& x) + { + + m_my_sequence = x.m_my_sequence; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceBadStruct that will be copied. */ eProsima_user_DllExport SequenceBadStruct& operator =( - SequenceBadStruct&& x) noexcept; + SequenceBadStruct&& x) noexcept + { + + m_my_sequence = std::move(x.m_my_sequence); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceBadStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceBadStruct& x) const; + const SequenceBadStruct& x) const + { + return (m_my_sequence == x.m_my_sequence); + } /*! * @brief Comparison operator. * @param x SequenceBadStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceBadStruct& x) const; + const SequenceBadStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence * @param _my_sequence New value to be copied in member my_sequence */ eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); + const std::vector& _my_sequence) + { + m_my_sequence = _my_sequence; + } /*! * @brief This function moves the value in member my_sequence * @param _my_sequence New value to be moved in member my_sequence */ eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); + std::vector&& _my_sequence) + { + m_my_sequence = std::move(_my_sequence); + } /*! * @brief This function returns a constant reference to member my_sequence * @return Constant reference to member my_sequence */ - eProsima_user_DllExport const std::vector& my_sequence() const; + eProsima_user_DllExport const std::vector& my_sequence() const + { + return m_my_sequence; + } /*! * @brief This function returns a reference to member my_sequence * @return Reference to member my_sequence */ - eProsima_user_DllExport std::vector& my_sequence(); + eProsima_user_DllExport std::vector& my_sequence() + { + return m_my_sequence; + } + + private: @@ -2250,8 +3334,6 @@ class SequenceBadStruct }; - - /*! * @brief This class represents the structure SequenceBoundsStruct defined by the user in the IDL file. * @ingroup Types @@ -2263,80 +3345,124 @@ class SequenceBoundsStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceBoundsStruct(); + eProsima_user_DllExport SequenceBoundsStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceBoundsStruct(); + eProsima_user_DllExport ~SequenceBoundsStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceBoundsStruct( - const SequenceBoundsStruct& x); + const SequenceBoundsStruct& x) + { + m_my_sequence = x.m_my_sequence; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceBoundsStruct( - SequenceBoundsStruct&& x) noexcept; + SequenceBoundsStruct&& x) noexcept + { + m_my_sequence = std::move(x.m_my_sequence); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceBoundsStruct& operator =( - const SequenceBoundsStruct& x); + const SequenceBoundsStruct& x) + { + + m_my_sequence = x.m_my_sequence; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceBoundsStruct& operator =( - SequenceBoundsStruct&& x) noexcept; + SequenceBoundsStruct&& x) noexcept + { + + m_my_sequence = std::move(x.m_my_sequence); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceBoundsStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceBoundsStruct& x) const; + const SequenceBoundsStruct& x) const + { + return (m_my_sequence == x.m_my_sequence); + } /*! * @brief Comparison operator. * @param x SequenceBoundsStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceBoundsStruct& x) const; + const SequenceBoundsStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence * @param _my_sequence New value to be copied in member my_sequence */ eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); + const std::vector& _my_sequence) + { + m_my_sequence = _my_sequence; + } /*! * @brief This function moves the value in member my_sequence * @param _my_sequence New value to be moved in member my_sequence */ eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); + std::vector&& _my_sequence) + { + m_my_sequence = std::move(_my_sequence); + } /*! * @brief This function returns a constant reference to member my_sequence * @return Constant reference to member my_sequence */ - eProsima_user_DllExport const std::vector& my_sequence() const; + eProsima_user_DllExport const std::vector& my_sequence() const + { + return m_my_sequence; + } /*! * @brief This function returns a reference to member my_sequence * @return Reference to member my_sequence */ - eProsima_user_DllExport std::vector& my_sequence(); + eProsima_user_DllExport std::vector& my_sequence() + { + return m_my_sequence; + } + + private: @@ -2345,10 +3471,6 @@ class SequenceBoundsStruct }; - - - - /*! * @brief This class represents the structure SequenceSequenceStruct defined by the user in the IDL file. * @ingroup Types @@ -2360,80 +3482,124 @@ class SequenceSequenceStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceSequenceStruct(); + eProsima_user_DllExport SequenceSequenceStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceSequenceStruct(); + eProsima_user_DllExport ~SequenceSequenceStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceSequenceStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceStruct( - const SequenceSequenceStruct& x); + const SequenceSequenceStruct& x) + { + m_my_sequence_sequence = x.m_my_sequence_sequence; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceSequenceStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceStruct( - SequenceSequenceStruct&& x) noexcept; + SequenceSequenceStruct&& x) noexcept + { + m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceSequenceStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceStruct& operator =( - const SequenceSequenceStruct& x); + const SequenceSequenceStruct& x) + { + + m_my_sequence_sequence = x.m_my_sequence_sequence; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceSequenceStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceStruct& operator =( - SequenceSequenceStruct&& x) noexcept; + SequenceSequenceStruct&& x) noexcept + { + + m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceSequenceStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceSequenceStruct& x) const; + const SequenceSequenceStruct& x) const + { + return (m_my_sequence_sequence == x.m_my_sequence_sequence); + } /*! * @brief Comparison operator. * @param x SequenceSequenceStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceSequenceStruct& x) const; + const SequenceSequenceStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence_sequence * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence */ eProsima_user_DllExport void my_sequence_sequence( - const std::vector>& _my_sequence_sequence); + const std::vector>& _my_sequence_sequence) + { + m_my_sequence_sequence = _my_sequence_sequence; + } /*! * @brief This function moves the value in member my_sequence_sequence * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence */ eProsima_user_DllExport void my_sequence_sequence( - std::vector>&& _my_sequence_sequence); + std::vector>&& _my_sequence_sequence) + { + m_my_sequence_sequence = std::move(_my_sequence_sequence); + } /*! * @brief This function returns a constant reference to member my_sequence_sequence * @return Constant reference to member my_sequence_sequence */ - eProsima_user_DllExport const std::vector>& my_sequence_sequence() const; + eProsima_user_DllExport const std::vector>& my_sequence_sequence() const + { + return m_my_sequence_sequence; + } /*! * @brief This function returns a reference to member my_sequence_sequence * @return Reference to member my_sequence_sequence */ - eProsima_user_DllExport std::vector>& my_sequence_sequence(); + eProsima_user_DllExport std::vector>& my_sequence_sequence() + { + return m_my_sequence_sequence; + } + + private: @@ -2442,10 +3608,6 @@ class SequenceSequenceStruct }; - - - - /*! * @brief This class represents the structure SequenceSequenceBoundsStruct defined by the user in the IDL file. * @ingroup Types @@ -2457,80 +3619,124 @@ class SequenceSequenceBoundsStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceSequenceBoundsStruct(); + eProsima_user_DllExport SequenceSequenceBoundsStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceSequenceBoundsStruct(); + eProsima_user_DllExport ~SequenceSequenceBoundsStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceBoundsStruct( - const SequenceSequenceBoundsStruct& x); + const SequenceSequenceBoundsStruct& x) + { + m_my_sequence_sequence = x.m_my_sequence_sequence; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceBoundsStruct( - SequenceSequenceBoundsStruct&& x) noexcept; + SequenceSequenceBoundsStruct&& x) noexcept + { + m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceBoundsStruct& operator =( - const SequenceSequenceBoundsStruct& x); + const SequenceSequenceBoundsStruct& x) + { + + m_my_sequence_sequence = x.m_my_sequence_sequence; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceBoundsStruct& operator =( - SequenceSequenceBoundsStruct&& x) noexcept; + SequenceSequenceBoundsStruct&& x) noexcept + { + + m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceSequenceBoundsStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceSequenceBoundsStruct& x) const; + const SequenceSequenceBoundsStruct& x) const + { + return (m_my_sequence_sequence == x.m_my_sequence_sequence); + } /*! * @brief Comparison operator. * @param x SequenceSequenceBoundsStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceSequenceBoundsStruct& x) const; + const SequenceSequenceBoundsStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence_sequence * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence */ eProsima_user_DllExport void my_sequence_sequence( - const std::vector>& _my_sequence_sequence); + const std::vector>& _my_sequence_sequence) + { + m_my_sequence_sequence = _my_sequence_sequence; + } /*! * @brief This function moves the value in member my_sequence_sequence * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence */ eProsima_user_DllExport void my_sequence_sequence( - std::vector>&& _my_sequence_sequence); + std::vector>&& _my_sequence_sequence) + { + m_my_sequence_sequence = std::move(_my_sequence_sequence); + } /*! * @brief This function returns a constant reference to member my_sequence_sequence * @return Constant reference to member my_sequence_sequence */ - eProsima_user_DllExport const std::vector>& my_sequence_sequence() const; + eProsima_user_DllExport const std::vector>& my_sequence_sequence() const + { + return m_my_sequence_sequence; + } /*! * @brief This function returns a reference to member my_sequence_sequence * @return Reference to member my_sequence_sequence */ - eProsima_user_DllExport std::vector>& my_sequence_sequence(); + eProsima_user_DllExport std::vector>& my_sequence_sequence() + { + return m_my_sequence_sequence; + } + + private: @@ -2552,80 +3758,124 @@ class MapStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapStruct(); + eProsima_user_DllExport MapStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapStruct(); + eProsima_user_DllExport ~MapStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapStruct that will be copied. */ eProsima_user_DllExport MapStruct( - const MapStruct& x); + const MapStruct& x) + { + m_my_map = x.m_my_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapStruct that will be copied. */ eProsima_user_DllExport MapStruct( - MapStruct&& x) noexcept; + MapStruct&& x) noexcept + { + m_my_map = std::move(x.m_my_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapStruct that will be copied. */ eProsima_user_DllExport MapStruct& operator =( - const MapStruct& x); + const MapStruct& x) + { + + m_my_map = x.m_my_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapStruct that will be copied. */ eProsima_user_DllExport MapStruct& operator =( - MapStruct&& x) noexcept; + MapStruct&& x) noexcept + { + + m_my_map = std::move(x.m_my_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapStruct& x) const; + const MapStruct& x) const + { + return (m_my_map == x.m_my_map); + } /*! * @brief Comparison operator. * @param x MapStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapStruct& x) const; + const MapStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map * @param _my_map New value to be copied in member my_map */ eProsima_user_DllExport void my_map( - const std::map& _my_map); + const std::map& _my_map) + { + m_my_map = _my_map; + } /*! * @brief This function moves the value in member my_map * @param _my_map New value to be moved in member my_map */ eProsima_user_DllExport void my_map( - std::map&& _my_map); + std::map&& _my_map) + { + m_my_map = std::move(_my_map); + } /*! * @brief This function returns a constant reference to member my_map * @return Constant reference to member my_map */ - eProsima_user_DllExport const std::map& my_map() const; + eProsima_user_DllExport const std::map& my_map() const + { + return m_my_map; + } /*! * @brief This function returns a reference to member my_map * @return Reference to member my_map */ - eProsima_user_DllExport std::map& my_map(); + eProsima_user_DllExport std::map& my_map() + { + return m_my_map; + } + + private: @@ -2647,80 +3897,124 @@ class MapStructEqual /*! * @brief Default constructor. */ - eProsima_user_DllExport MapStructEqual(); + eProsima_user_DllExport MapStructEqual() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapStructEqual(); + eProsima_user_DllExport ~MapStructEqual() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapStructEqual that will be copied. */ eProsima_user_DllExport MapStructEqual( - const MapStructEqual& x); + const MapStructEqual& x) + { + m_my_map_equal = x.m_my_map_equal; + + } /*! * @brief Move constructor. * @param x Reference to the object MapStructEqual that will be copied. */ eProsima_user_DllExport MapStructEqual( - MapStructEqual&& x) noexcept; + MapStructEqual&& x) noexcept + { + m_my_map_equal = std::move(x.m_my_map_equal); + } /*! * @brief Copy assignment. * @param x Reference to the object MapStructEqual that will be copied. */ eProsima_user_DllExport MapStructEqual& operator =( - const MapStructEqual& x); + const MapStructEqual& x) + { + + m_my_map_equal = x.m_my_map_equal; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapStructEqual that will be copied. */ eProsima_user_DllExport MapStructEqual& operator =( - MapStructEqual&& x) noexcept; + MapStructEqual&& x) noexcept + { + + m_my_map_equal = std::move(x.m_my_map_equal); + return *this; + } /*! * @brief Comparison operator. * @param x MapStructEqual object to compare. */ eProsima_user_DllExport bool operator ==( - const MapStructEqual& x) const; + const MapStructEqual& x) const + { + return (m_my_map_equal == x.m_my_map_equal); + } /*! * @brief Comparison operator. * @param x MapStructEqual object to compare. */ eProsima_user_DllExport bool operator !=( - const MapStructEqual& x) const; + const MapStructEqual& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map_equal * @param _my_map_equal New value to be copied in member my_map_equal */ eProsima_user_DllExport void my_map_equal( - const std::map& _my_map_equal); + const std::map& _my_map_equal) + { + m_my_map_equal = _my_map_equal; + } /*! * @brief This function moves the value in member my_map_equal * @param _my_map_equal New value to be moved in member my_map_equal */ eProsima_user_DllExport void my_map_equal( - std::map&& _my_map_equal); + std::map&& _my_map_equal) + { + m_my_map_equal = std::move(_my_map_equal); + } /*! * @brief This function returns a constant reference to member my_map_equal * @return Constant reference to member my_map_equal */ - eProsima_user_DllExport const std::map& my_map_equal() const; + eProsima_user_DllExport const std::map& my_map_equal() const + { + return m_my_map_equal; + } /*! * @brief This function returns a reference to member my_map_equal * @return Reference to member my_map_equal */ - eProsima_user_DllExport std::map& my_map_equal(); + eProsima_user_DllExport std::map& my_map_equal() + { + return m_my_map_equal; + } + + private: @@ -2742,80 +4036,124 @@ class MapBadKeyStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapBadKeyStruct(); + eProsima_user_DllExport MapBadKeyStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapBadKeyStruct(); + eProsima_user_DllExport ~MapBadKeyStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapBadKeyStruct that will be copied. */ eProsima_user_DllExport MapBadKeyStruct( - const MapBadKeyStruct& x); + const MapBadKeyStruct& x) + { + m_my_map = x.m_my_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapBadKeyStruct that will be copied. */ eProsima_user_DllExport MapBadKeyStruct( - MapBadKeyStruct&& x) noexcept; + MapBadKeyStruct&& x) noexcept + { + m_my_map = std::move(x.m_my_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapBadKeyStruct that will be copied. */ eProsima_user_DllExport MapBadKeyStruct& operator =( - const MapBadKeyStruct& x); + const MapBadKeyStruct& x) + { + + m_my_map = x.m_my_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapBadKeyStruct that will be copied. */ eProsima_user_DllExport MapBadKeyStruct& operator =( - MapBadKeyStruct&& x) noexcept; + MapBadKeyStruct&& x) noexcept + { + + m_my_map = std::move(x.m_my_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapBadKeyStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapBadKeyStruct& x) const; + const MapBadKeyStruct& x) const + { + return (m_my_map == x.m_my_map); + } /*! * @brief Comparison operator. * @param x MapBadKeyStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapBadKeyStruct& x) const; + const MapBadKeyStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map * @param _my_map New value to be copied in member my_map */ eProsima_user_DllExport void my_map( - const std::map& _my_map); + const std::map& _my_map) + { + m_my_map = _my_map; + } /*! * @brief This function moves the value in member my_map * @param _my_map New value to be moved in member my_map */ eProsima_user_DllExport void my_map( - std::map&& _my_map); + std::map&& _my_map) + { + m_my_map = std::move(_my_map); + } /*! * @brief This function returns a constant reference to member my_map * @return Constant reference to member my_map */ - eProsima_user_DllExport const std::map& my_map() const; + eProsima_user_DllExport const std::map& my_map() const + { + return m_my_map; + } /*! * @brief This function returns a reference to member my_map * @return Reference to member my_map */ - eProsima_user_DllExport std::map& my_map(); + eProsima_user_DllExport std::map& my_map() + { + return m_my_map; + } + + private: @@ -2837,80 +4175,124 @@ class MapBadElemStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapBadElemStruct(); + eProsima_user_DllExport MapBadElemStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapBadElemStruct(); + eProsima_user_DllExport ~MapBadElemStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapBadElemStruct that will be copied. */ eProsima_user_DllExport MapBadElemStruct( - const MapBadElemStruct& x); + const MapBadElemStruct& x) + { + m_my_map = x.m_my_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapBadElemStruct that will be copied. */ eProsima_user_DllExport MapBadElemStruct( - MapBadElemStruct&& x) noexcept; + MapBadElemStruct&& x) noexcept + { + m_my_map = std::move(x.m_my_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapBadElemStruct that will be copied. */ eProsima_user_DllExport MapBadElemStruct& operator =( - const MapBadElemStruct& x); + const MapBadElemStruct& x) + { + + m_my_map = x.m_my_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapBadElemStruct that will be copied. */ eProsima_user_DllExport MapBadElemStruct& operator =( - MapBadElemStruct&& x) noexcept; + MapBadElemStruct&& x) noexcept + { + + m_my_map = std::move(x.m_my_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapBadElemStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapBadElemStruct& x) const; + const MapBadElemStruct& x) const + { + return (m_my_map == x.m_my_map); + } /*! * @brief Comparison operator. * @param x MapBadElemStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapBadElemStruct& x) const; + const MapBadElemStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map * @param _my_map New value to be copied in member my_map */ eProsima_user_DllExport void my_map( - const std::map& _my_map); + const std::map& _my_map) + { + m_my_map = _my_map; + } /*! * @brief This function moves the value in member my_map * @param _my_map New value to be moved in member my_map */ eProsima_user_DllExport void my_map( - std::map&& _my_map); + std::map&& _my_map) + { + m_my_map = std::move(_my_map); + } /*! * @brief This function returns a constant reference to member my_map * @return Constant reference to member my_map */ - eProsima_user_DllExport const std::map& my_map() const; + eProsima_user_DllExport const std::map& my_map() const + { + return m_my_map; + } /*! * @brief This function returns a reference to member my_map * @return Reference to member my_map */ - eProsima_user_DllExport std::map& my_map(); + eProsima_user_DllExport std::map& my_map() + { + return m_my_map; + } + + private: @@ -2932,80 +4314,124 @@ class MapBoundsStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapBoundsStruct(); + eProsima_user_DllExport MapBoundsStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapBoundsStruct(); + eProsima_user_DllExport ~MapBoundsStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapBoundsStruct that will be copied. */ eProsima_user_DllExport MapBoundsStruct( - const MapBoundsStruct& x); + const MapBoundsStruct& x) + { + m_my_map = x.m_my_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapBoundsStruct that will be copied. */ eProsima_user_DllExport MapBoundsStruct( - MapBoundsStruct&& x) noexcept; + MapBoundsStruct&& x) noexcept + { + m_my_map = std::move(x.m_my_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapBoundsStruct that will be copied. */ eProsima_user_DllExport MapBoundsStruct& operator =( - const MapBoundsStruct& x); + const MapBoundsStruct& x) + { + + m_my_map = x.m_my_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapBoundsStruct that will be copied. */ eProsima_user_DllExport MapBoundsStruct& operator =( - MapBoundsStruct&& x) noexcept; + MapBoundsStruct&& x) noexcept + { + + m_my_map = std::move(x.m_my_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapBoundsStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapBoundsStruct& x) const; + const MapBoundsStruct& x) const + { + return (m_my_map == x.m_my_map); + } /*! * @brief Comparison operator. * @param x MapBoundsStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapBoundsStruct& x) const; + const MapBoundsStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map * @param _my_map New value to be copied in member my_map */ eProsima_user_DllExport void my_map( - const std::map& _my_map); + const std::map& _my_map) + { + m_my_map = _my_map; + } /*! * @brief This function moves the value in member my_map * @param _my_map New value to be moved in member my_map */ eProsima_user_DllExport void my_map( - std::map&& _my_map); + std::map&& _my_map) + { + m_my_map = std::move(_my_map); + } /*! * @brief This function returns a constant reference to member my_map * @return Constant reference to member my_map */ - eProsima_user_DllExport const std::map& my_map() const; + eProsima_user_DllExport const std::map& my_map() const + { + return m_my_map; + } /*! * @brief This function returns a reference to member my_map * @return Reference to member my_map */ - eProsima_user_DllExport std::map& my_map(); + eProsima_user_DllExport std::map& my_map() + { + return m_my_map; + } + + private: @@ -3017,7 +4443,6 @@ class MapBoundsStruct - /*! * @brief This class represents the structure MapMapStruct defined by the user in the IDL file. * @ingroup Types @@ -3029,80 +4454,124 @@ class MapMapStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapMapStruct(); + eProsima_user_DllExport MapMapStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapMapStruct(); + eProsima_user_DllExport ~MapMapStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapMapStruct that will be copied. */ eProsima_user_DllExport MapMapStruct( - const MapMapStruct& x); + const MapMapStruct& x) + { + m_my_map_map = x.m_my_map_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapMapStruct that will be copied. */ eProsima_user_DllExport MapMapStruct( - MapMapStruct&& x) noexcept; + MapMapStruct&& x) noexcept + { + m_my_map_map = std::move(x.m_my_map_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapMapStruct that will be copied. */ eProsima_user_DllExport MapMapStruct& operator =( - const MapMapStruct& x); + const MapMapStruct& x) + { + + m_my_map_map = x.m_my_map_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapMapStruct that will be copied. */ eProsima_user_DllExport MapMapStruct& operator =( - MapMapStruct&& x) noexcept; + MapMapStruct&& x) noexcept + { + + m_my_map_map = std::move(x.m_my_map_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapMapStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapMapStruct& x) const; + const MapMapStruct& x) const + { + return (m_my_map_map == x.m_my_map_map); + } /*! * @brief Comparison operator. * @param x MapMapStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapMapStruct& x) const; + const MapMapStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map_map * @param _my_map_map New value to be copied in member my_map_map */ eProsima_user_DllExport void my_map_map( - const std::map>& _my_map_map); + const std::map>& _my_map_map) + { + m_my_map_map = _my_map_map; + } /*! * @brief This function moves the value in member my_map_map * @param _my_map_map New value to be moved in member my_map_map */ eProsima_user_DllExport void my_map_map( - std::map>&& _my_map_map); + std::map>&& _my_map_map) + { + m_my_map_map = std::move(_my_map_map); + } /*! * @brief This function returns a constant reference to member my_map_map * @return Constant reference to member my_map_map */ - eProsima_user_DllExport const std::map>& my_map_map() const; + eProsima_user_DllExport const std::map>& my_map_map() const + { + return m_my_map_map; + } /*! * @brief This function returns a reference to member my_map_map * @return Reference to member my_map_map */ - eProsima_user_DllExport std::map>& my_map_map(); + eProsima_user_DllExport std::map>& my_map_map() + { + return m_my_map_map; + } + + private: @@ -3114,7 +4583,6 @@ class MapMapStruct - /*! * @brief This class represents the structure MapMapBoundsStruct defined by the user in the IDL file. * @ingroup Types @@ -3126,80 +4594,124 @@ class MapMapBoundsStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapMapBoundsStruct(); + eProsima_user_DllExport MapMapBoundsStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapMapBoundsStruct(); + eProsima_user_DllExport ~MapMapBoundsStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapMapBoundsStruct that will be copied. */ eProsima_user_DllExport MapMapBoundsStruct( - const MapMapBoundsStruct& x); + const MapMapBoundsStruct& x) + { + m_my_map_map = x.m_my_map_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapMapBoundsStruct that will be copied. */ eProsima_user_DllExport MapMapBoundsStruct( - MapMapBoundsStruct&& x) noexcept; + MapMapBoundsStruct&& x) noexcept + { + m_my_map_map = std::move(x.m_my_map_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapMapBoundsStruct that will be copied. */ eProsima_user_DllExport MapMapBoundsStruct& operator =( - const MapMapBoundsStruct& x); + const MapMapBoundsStruct& x) + { + + m_my_map_map = x.m_my_map_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapMapBoundsStruct that will be copied. */ eProsima_user_DllExport MapMapBoundsStruct& operator =( - MapMapBoundsStruct&& x) noexcept; + MapMapBoundsStruct&& x) noexcept + { + + m_my_map_map = std::move(x.m_my_map_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapMapBoundsStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapMapBoundsStruct& x) const; + const MapMapBoundsStruct& x) const + { + return (m_my_map_map == x.m_my_map_map); + } /*! * @brief Comparison operator. * @param x MapMapBoundsStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapMapBoundsStruct& x) const; + const MapMapBoundsStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map_map * @param _my_map_map New value to be copied in member my_map_map */ eProsima_user_DllExport void my_map_map( - const std::map>& _my_map_map); + const std::map>& _my_map_map) + { + m_my_map_map = _my_map_map; + } /*! * @brief This function moves the value in member my_map_map * @param _my_map_map New value to be moved in member my_map_map */ eProsima_user_DllExport void my_map_map( - std::map>&& _my_map_map); + std::map>&& _my_map_map) + { + m_my_map_map = std::move(_my_map_map); + } /*! * @brief This function returns a constant reference to member my_map_map * @return Constant reference to member my_map_map */ - eProsima_user_DllExport const std::map>& my_map_map() const; + eProsima_user_DllExport const std::map>& my_map_map() const + { + return m_my_map_map; + } /*! * @brief This function returns a reference to member my_map_map * @return Reference to member my_map_map */ - eProsima_user_DllExport std::map>& my_map_map(); + eProsima_user_DllExport std::map>& my_map_map() + { + return m_my_map_map; + } + + private: @@ -3219,95 +4731,289 @@ class SimpleUnion /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleUnion(); + eProsima_user_DllExport SimpleUnion() + { + m__d = A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleUnion(); + eProsima_user_DllExport ~SimpleUnion() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleUnion that will be copied. */ eProsima_user_DllExport SimpleUnion( - const SimpleUnion& x); + const SimpleUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object SimpleUnion that will be copied. */ eProsima_user_DllExport SimpleUnion( - SimpleUnion&& x) noexcept; + SimpleUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleUnion that will be copied. */ eProsima_user_DllExport SimpleUnion& operator =( - const SimpleUnion& x); + const SimpleUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleUnion that will be copied. */ eProsima_user_DllExport SimpleUnion& operator =( - SimpleUnion&& x) noexcept; + SimpleUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x SimpleUnion object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleUnion& x) const; + const SimpleUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_first == x.m_first); + break; + + + case B: + return (m_second == x.m_second); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x SimpleUnion object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleUnion& x) const; + const SimpleUnion& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - int32_t __d); + int32_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case B: + switch (__d) + { + case B: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport int32_t _d() const; + eProsima_user_DllExport int32_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport int32_t& _d(); + eProsima_user_DllExport int32_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first * @param _first New value for member first */ eProsima_user_DllExport void first( - int32_t _first); + int32_t _first) + { + m_first = _first; + m__d = A; + + } /*! * @brief This function returns the value of member first * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t first() const; + eProsima_user_DllExport int32_t first() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! * @brief This function returns a reference to member first * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& first(); + eProsima_user_DllExport int32_t& first() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! @@ -3315,21 +5021,66 @@ class SimpleUnion * @param _second New value for member second */ eProsima_user_DllExport void second( - int64_t _second); + int64_t _second) + { + m_second = _second; + m__d = B; + + } /*! * @brief This function returns the value of member second * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t second() const; + eProsima_user_DllExport int64_t second() const + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } /*! * @brief This function returns a reference to member second * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t& second(); + eProsima_user_DllExport int64_t& second() + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + private: @@ -3351,95 +5102,289 @@ class SimpleUnionNames /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleUnionNames(); + eProsima_user_DllExport SimpleUnionNames() + { + m__d = A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleUnionNames(); + eProsima_user_DllExport ~SimpleUnionNames() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleUnionNames that will be copied. */ eProsima_user_DllExport SimpleUnionNames( - const SimpleUnionNames& x); + const SimpleUnionNames& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first_case = x.m_first_case; + break; + + + case B: + m_second_case = x.m_second_case; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object SimpleUnionNames that will be copied. */ eProsima_user_DllExport SimpleUnionNames( - SimpleUnionNames&& x) noexcept; + SimpleUnionNames&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first_case = x.m_first_case; + break; + + + case B: + m_second_case = x.m_second_case; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleUnionNames that will be copied. */ eProsima_user_DllExport SimpleUnionNames& operator =( - const SimpleUnionNames& x); + const SimpleUnionNames& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first_case = x.m_first_case; + break; + + + case B: + m_second_case = x.m_second_case; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleUnionNames that will be copied. */ eProsima_user_DllExport SimpleUnionNames& operator =( - SimpleUnionNames&& x) noexcept; + SimpleUnionNames&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first_case = x.m_first_case; + break; + + + case B: + m_second_case = x.m_second_case; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x SimpleUnionNames object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleUnionNames& x) const; + const SimpleUnionNames& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_first_case == x.m_first_case); + break; + + + case B: + return (m_second_case == x.m_second_case); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x SimpleUnionNames object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleUnionNames& x) const; + const SimpleUnionNames& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - int32_t __d); + int32_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case B: + switch (__d) + { + case B: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport int32_t _d() const; + eProsima_user_DllExport int32_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport int32_t& _d(); + eProsima_user_DllExport int32_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first_case * @param _first_case New value for member first_case */ eProsima_user_DllExport void first_case( - int32_t _first_case); + int32_t _first_case) + { + m_first_case = _first_case; + m__d = A; + + } /*! * @brief This function returns the value of member first_case * @return Value of member first_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t first_case() const; + eProsima_user_DllExport int32_t first_case() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first_case; + } /*! * @brief This function returns a reference to member first_case * @return Reference to member first_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& first_case(); + eProsima_user_DllExport int32_t& first_case() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first_case; + } /*! @@ -3447,21 +5392,66 @@ class SimpleUnionNames * @param _second_case New value for member second_case */ eProsima_user_DllExport void second_case( - int64_t _second_case); + int64_t _second_case) + { + m_second_case = _second_case; + m__d = B; + + } /*! * @brief This function returns the value of member second_case * @return Value of member second_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t second_case() const; + eProsima_user_DllExport int64_t second_case() const + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second_case; + } /*! * @brief This function returns a reference to member second_case * @return Reference to member second_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t& second_case(); + eProsima_user_DllExport int64_t& second_case() + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second_case; + } + + private: @@ -3483,95 +5473,289 @@ class SimpleTypeUnion /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleTypeUnion(); + eProsima_user_DllExport SimpleTypeUnion() + { + m__d = A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleTypeUnion(); + eProsima_user_DllExport ~SimpleTypeUnion() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleTypeUnion that will be copied. */ eProsima_user_DllExport SimpleTypeUnion( - const SimpleTypeUnion& x); + const SimpleTypeUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object SimpleTypeUnion that will be copied. */ eProsima_user_DllExport SimpleTypeUnion( - SimpleTypeUnion&& x) noexcept; + SimpleTypeUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleTypeUnion that will be copied. */ eProsima_user_DllExport SimpleTypeUnion& operator =( - const SimpleTypeUnion& x); + const SimpleTypeUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleTypeUnion that will be copied. */ eProsima_user_DllExport SimpleTypeUnion& operator =( - SimpleTypeUnion&& x) noexcept; + SimpleTypeUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x SimpleTypeUnion object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleTypeUnion& x) const; + const SimpleTypeUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_first == x.m_first); + break; + + + case B: + return (m_second == x.m_second); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x SimpleTypeUnion object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleTypeUnion& x) const; + const SimpleTypeUnion& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - int32_t __d); + int32_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case B: + switch (__d) + { + case B: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport int32_t _d() const; + eProsima_user_DllExport int32_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport int32_t& _d(); + eProsima_user_DllExport int32_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first * @param _first New value for member first */ eProsima_user_DllExport void first( - uint8_t _first); + uint8_t _first) + { + m_first = _first; + m__d = A; + + } /*! * @brief This function returns the value of member first * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport uint8_t first() const; + eProsima_user_DllExport uint8_t first() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! * @brief This function returns a reference to member first * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport uint8_t& first(); + eProsima_user_DllExport uint8_t& first() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! @@ -3579,21 +5763,66 @@ class SimpleTypeUnion * @param _second New value for member second */ eProsima_user_DllExport void second( - int64_t _second); + int64_t _second) + { + m_second = _second; + m__d = B; + + } /*! * @brief This function returns the value of member second * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t second() const; + eProsima_user_DllExport int64_t second() const + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } /*! * @brief This function returns a reference to member second * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t& second(); + eProsima_user_DllExport int64_t& second() + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + private: @@ -3615,95 +5844,289 @@ class SimpleBadUnion /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleBadUnion(); + eProsima_user_DllExport SimpleBadUnion() + { + m__d = A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleBadUnion(); + eProsima_user_DllExport ~SimpleBadUnion() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleBadUnion that will be copied. */ eProsima_user_DllExport SimpleBadUnion( - const SimpleBadUnion& x); + const SimpleBadUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case C: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object SimpleBadUnion that will be copied. */ eProsima_user_DllExport SimpleBadUnion( - SimpleBadUnion&& x) noexcept; + SimpleBadUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case C: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleBadUnion that will be copied. */ eProsima_user_DllExport SimpleBadUnion& operator =( - const SimpleBadUnion& x); + const SimpleBadUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case C: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleBadUnion that will be copied. */ eProsima_user_DllExport SimpleBadUnion& operator =( - SimpleBadUnion&& x) noexcept; + SimpleBadUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case C: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x SimpleBadUnion object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleBadUnion& x) const; + const SimpleBadUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_first == x.m_first); + break; + + + case C: + return (m_second == x.m_second); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x SimpleBadUnion object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleBadUnion& x) const; + const SimpleBadUnion& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - int32_t __d); + int32_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case C: + switch (__d) + { + case C: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport int32_t _d() const; + eProsima_user_DllExport int32_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport int32_t& _d(); + eProsima_user_DllExport int32_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first * @param _first New value for member first */ eProsima_user_DllExport void first( - int32_t _first); + int32_t _first) + { + m_first = _first; + m__d = A; + + } /*! * @brief This function returns the value of member first * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t first() const; + eProsima_user_DllExport int32_t first() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! * @brief This function returns a reference to member first * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& first(); + eProsima_user_DllExport int32_t& first() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! @@ -3711,21 +6134,66 @@ class SimpleBadUnion * @param _second New value for member second */ eProsima_user_DllExport void second( - int64_t _second); + int64_t _second) + { + m_second = _second; + m__d = C; + + } /*! * @brief This function returns the value of member second * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t second() const; + eProsima_user_DllExport int64_t second() const + { + bool b = false; + + switch (m__d) + { + case C: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } /*! * @brief This function returns a reference to member second * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t& second(); + eProsima_user_DllExport int64_t& second() + { + bool b = false; + + switch (m__d) + { + case C: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + private: @@ -3747,95 +6215,289 @@ class SimpleBadDiscUnion /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleBadDiscUnion(); + eProsima_user_DllExport SimpleBadDiscUnion() + { + m__d = 0; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleBadDiscUnion(); + eProsima_user_DllExport ~SimpleBadDiscUnion() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleBadDiscUnion that will be copied. */ eProsima_user_DllExport SimpleBadDiscUnion( - const SimpleBadDiscUnion& x); + const SimpleBadDiscUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case 0: + m_first = x.m_first; + break; + + + case 1: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object SimpleBadDiscUnion that will be copied. */ eProsima_user_DllExport SimpleBadDiscUnion( - SimpleBadDiscUnion&& x) noexcept; + SimpleBadDiscUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case 0: + m_first = x.m_first; + break; + + + case 1: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleBadDiscUnion that will be copied. */ eProsima_user_DllExport SimpleBadDiscUnion& operator =( - const SimpleBadDiscUnion& x); + const SimpleBadDiscUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case 0: + m_first = x.m_first; + break; + + + case 1: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleBadDiscUnion that will be copied. */ eProsima_user_DllExport SimpleBadDiscUnion& operator =( - SimpleBadDiscUnion&& x) noexcept; + SimpleBadDiscUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case 0: + m_first = x.m_first; + break; + + + case 1: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x SimpleBadDiscUnion object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleBadDiscUnion& x) const; + const SimpleBadDiscUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case 0: + return (m_first == x.m_first); + break; + + + case 1: + return (m_second == x.m_second); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x SimpleBadDiscUnion object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleBadDiscUnion& x) const; + const SimpleBadDiscUnion& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - uint8_t __d); + uint8_t __d) + { + bool b = false; + + switch (m__d) + { + case 0: + switch (__d) + { + case 0: + b = true; + break; + default: + break; + } + break; + + + case 1: + switch (__d) + { + case 1: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport uint8_t _d() const; + eProsima_user_DllExport uint8_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport uint8_t& _d(); + eProsima_user_DllExport uint8_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first * @param _first New value for member first */ eProsima_user_DllExport void first( - int32_t _first); + int32_t _first) + { + m_first = _first; + m__d = 0; + + } /*! * @brief This function returns the value of member first * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t first() const; + eProsima_user_DllExport int32_t first() const + { + bool b = false; + + switch (m__d) + { + case 0: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! * @brief This function returns a reference to member first * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& first(); + eProsima_user_DllExport int32_t& first() + { + bool b = false; + + switch (m__d) + { + case 0: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! @@ -3843,21 +6505,66 @@ class SimpleBadDiscUnion * @param _second New value for member second */ eProsima_user_DllExport void second( - int64_t _second); + int64_t _second) + { + m_second = _second; + m__d = 1; + + } /*! * @brief This function returns the value of member second * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t second() const; + eProsima_user_DllExport int64_t second() const + { + bool b = false; + + switch (m__d) + { + case 1: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } /*! * @brief This function returns a reference to member second * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t& second(); + eProsima_user_DllExport int64_t& second() + { + bool b = false; + + switch (m__d) + { + case 1: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + private: @@ -3879,80 +6586,124 @@ class SimpleUnionStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleUnionStruct(); + eProsima_user_DllExport SimpleUnionStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleUnionStruct(); + eProsima_user_DllExport ~SimpleUnionStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleUnionStruct that will be copied. */ eProsima_user_DllExport SimpleUnionStruct( - const SimpleUnionStruct& x); + const SimpleUnionStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object SimpleUnionStruct that will be copied. */ eProsima_user_DllExport SimpleUnionStruct( - SimpleUnionStruct&& x) noexcept; + SimpleUnionStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleUnionStruct that will be copied. */ eProsima_user_DllExport SimpleUnionStruct& operator =( - const SimpleUnionStruct& x); + const SimpleUnionStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleUnionStruct that will be copied. */ eProsima_user_DllExport SimpleUnionStruct& operator =( - SimpleUnionStruct&& x) noexcept; + SimpleUnionStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x SimpleUnionStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleUnionStruct& x) const; + const SimpleUnionStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x SimpleUnionStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleUnionStruct& x) const; + const SimpleUnionStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const SimpleUnion& _my_union); + const SimpleUnion& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - SimpleUnion&& _my_union); + SimpleUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const SimpleUnion& my_union() const; + eProsima_user_DllExport const SimpleUnion& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport SimpleUnion& my_union(); + eProsima_user_DllExport SimpleUnion& my_union() + { + return m_my_union; + } + + private: @@ -3972,80 +6723,124 @@ class SimpleUnionStructEqual /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleUnionStructEqual(); + eProsima_user_DllExport SimpleUnionStructEqual() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleUnionStructEqual(); + eProsima_user_DllExport ~SimpleUnionStructEqual() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleUnionStructEqual that will be copied. */ eProsima_user_DllExport SimpleUnionStructEqual( - const SimpleUnionStructEqual& x); + const SimpleUnionStructEqual& x) + { + m_my_union_equal = x.m_my_union_equal; + + } /*! * @brief Move constructor. * @param x Reference to the object SimpleUnionStructEqual that will be copied. */ eProsima_user_DllExport SimpleUnionStructEqual( - SimpleUnionStructEqual&& x) noexcept; + SimpleUnionStructEqual&& x) noexcept + { + m_my_union_equal = std::move(x.m_my_union_equal); + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleUnionStructEqual that will be copied. */ eProsima_user_DllExport SimpleUnionStructEqual& operator =( - const SimpleUnionStructEqual& x); + const SimpleUnionStructEqual& x) + { + + m_my_union_equal = x.m_my_union_equal; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleUnionStructEqual that will be copied. */ eProsima_user_DllExport SimpleUnionStructEqual& operator =( - SimpleUnionStructEqual&& x) noexcept; + SimpleUnionStructEqual&& x) noexcept + { + + m_my_union_equal = std::move(x.m_my_union_equal); + return *this; + } /*! * @brief Comparison operator. * @param x SimpleUnionStructEqual object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleUnionStructEqual& x) const; + const SimpleUnionStructEqual& x) const + { + return (m_my_union_equal == x.m_my_union_equal); + } /*! * @brief Comparison operator. * @param x SimpleUnionStructEqual object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleUnionStructEqual& x) const; + const SimpleUnionStructEqual& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union_equal * @param _my_union_equal New value to be copied in member my_union_equal */ eProsima_user_DllExport void my_union_equal( - const SimpleUnion& _my_union_equal); + const SimpleUnion& _my_union_equal) + { + m_my_union_equal = _my_union_equal; + } /*! * @brief This function moves the value in member my_union_equal * @param _my_union_equal New value to be moved in member my_union_equal */ eProsima_user_DllExport void my_union_equal( - SimpleUnion&& _my_union_equal); + SimpleUnion&& _my_union_equal) + { + m_my_union_equal = std::move(_my_union_equal); + } /*! * @brief This function returns a constant reference to member my_union_equal * @return Constant reference to member my_union_equal */ - eProsima_user_DllExport const SimpleUnion& my_union_equal() const; + eProsima_user_DllExport const SimpleUnion& my_union_equal() const + { + return m_my_union_equal; + } /*! * @brief This function returns a reference to member my_union_equal * @return Reference to member my_union_equal */ - eProsima_user_DllExport SimpleUnion& my_union_equal(); + eProsima_user_DllExport SimpleUnion& my_union_equal() + { + return m_my_union_equal; + } + + private: @@ -4065,80 +6860,124 @@ class SimpleUnionNamesStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleUnionNamesStruct(); + eProsima_user_DllExport SimpleUnionNamesStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleUnionNamesStruct(); + eProsima_user_DllExport ~SimpleUnionNamesStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleUnionNamesStruct that will be copied. */ eProsima_user_DllExport SimpleUnionNamesStruct( - const SimpleUnionNamesStruct& x); + const SimpleUnionNamesStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object SimpleUnionNamesStruct that will be copied. */ eProsima_user_DllExport SimpleUnionNamesStruct( - SimpleUnionNamesStruct&& x) noexcept; + SimpleUnionNamesStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleUnionNamesStruct that will be copied. */ eProsima_user_DllExport SimpleUnionNamesStruct& operator =( - const SimpleUnionNamesStruct& x); + const SimpleUnionNamesStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleUnionNamesStruct that will be copied. */ eProsima_user_DllExport SimpleUnionNamesStruct& operator =( - SimpleUnionNamesStruct&& x) noexcept; + SimpleUnionNamesStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x SimpleUnionNamesStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleUnionNamesStruct& x) const; + const SimpleUnionNamesStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x SimpleUnionNamesStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleUnionNamesStruct& x) const; + const SimpleUnionNamesStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const SimpleUnionNames& _my_union); + const SimpleUnionNames& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - SimpleUnionNames&& _my_union); + SimpleUnionNames&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const SimpleUnionNames& my_union() const; + eProsima_user_DllExport const SimpleUnionNames& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport SimpleUnionNames& my_union(); + eProsima_user_DllExport SimpleUnionNames& my_union() + { + return m_my_union; + } + + private: @@ -4158,80 +6997,124 @@ class SimpleTypeUnionStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleTypeUnionStruct(); + eProsima_user_DllExport SimpleTypeUnionStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleTypeUnionStruct(); + eProsima_user_DllExport ~SimpleTypeUnionStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleTypeUnionStruct that will be copied. */ eProsima_user_DllExport SimpleTypeUnionStruct( - const SimpleTypeUnionStruct& x); + const SimpleTypeUnionStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object SimpleTypeUnionStruct that will be copied. */ eProsima_user_DllExport SimpleTypeUnionStruct( - SimpleTypeUnionStruct&& x) noexcept; + SimpleTypeUnionStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleTypeUnionStruct that will be copied. */ eProsima_user_DllExport SimpleTypeUnionStruct& operator =( - const SimpleTypeUnionStruct& x); + const SimpleTypeUnionStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleTypeUnionStruct that will be copied. */ eProsima_user_DllExport SimpleTypeUnionStruct& operator =( - SimpleTypeUnionStruct&& x) noexcept; + SimpleTypeUnionStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x SimpleTypeUnionStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleTypeUnionStruct& x) const; + const SimpleTypeUnionStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x SimpleTypeUnionStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleTypeUnionStruct& x) const; + const SimpleTypeUnionStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const SimpleTypeUnion& _my_union); + const SimpleTypeUnion& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - SimpleTypeUnion&& _my_union); + SimpleTypeUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const SimpleTypeUnion& my_union() const; + eProsima_user_DllExport const SimpleTypeUnion& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport SimpleTypeUnion& my_union(); + eProsima_user_DllExport SimpleTypeUnion& my_union() + { + return m_my_union; + } + + private: @@ -4251,80 +7134,124 @@ class SimpleBadUnionStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleBadUnionStruct(); + eProsima_user_DllExport SimpleBadUnionStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleBadUnionStruct(); + eProsima_user_DllExport ~SimpleBadUnionStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleBadUnionStruct that will be copied. */ eProsima_user_DllExport SimpleBadUnionStruct( - const SimpleBadUnionStruct& x); + const SimpleBadUnionStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object SimpleBadUnionStruct that will be copied. */ eProsima_user_DllExport SimpleBadUnionStruct( - SimpleBadUnionStruct&& x) noexcept; + SimpleBadUnionStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleBadUnionStruct that will be copied. */ eProsima_user_DllExport SimpleBadUnionStruct& operator =( - const SimpleBadUnionStruct& x); + const SimpleBadUnionStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleBadUnionStruct that will be copied. */ eProsima_user_DllExport SimpleBadUnionStruct& operator =( - SimpleBadUnionStruct&& x) noexcept; + SimpleBadUnionStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x SimpleBadUnionStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleBadUnionStruct& x) const; + const SimpleBadUnionStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x SimpleBadUnionStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleBadUnionStruct& x) const; + const SimpleBadUnionStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const SimpleBadUnion& _my_union); + const SimpleBadUnion& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - SimpleBadUnion&& _my_union); + SimpleBadUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const SimpleBadUnion& my_union() const; + eProsima_user_DllExport const SimpleBadUnion& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport SimpleBadUnion& my_union(); + eProsima_user_DllExport SimpleBadUnion& my_union() + { + return m_my_union; + } + + private: @@ -4344,80 +7271,124 @@ class SimplBadDiscUnionStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SimplBadDiscUnionStruct(); + eProsima_user_DllExport SimplBadDiscUnionStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimplBadDiscUnionStruct(); + eProsima_user_DllExport ~SimplBadDiscUnionStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. */ eProsima_user_DllExport SimplBadDiscUnionStruct( - const SimplBadDiscUnionStruct& x); + const SimplBadDiscUnionStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. */ eProsima_user_DllExport SimplBadDiscUnionStruct( - SimplBadDiscUnionStruct&& x) noexcept; + SimplBadDiscUnionStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. */ eProsima_user_DllExport SimplBadDiscUnionStruct& operator =( - const SimplBadDiscUnionStruct& x); + const SimplBadDiscUnionStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. */ eProsima_user_DllExport SimplBadDiscUnionStruct& operator =( - SimplBadDiscUnionStruct&& x) noexcept; + SimplBadDiscUnionStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x SimplBadDiscUnionStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SimplBadDiscUnionStruct& x) const; + const SimplBadDiscUnionStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x SimplBadDiscUnionStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SimplBadDiscUnionStruct& x) const; + const SimplBadDiscUnionStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const SimpleBadDiscUnion& _my_union); + const SimpleBadDiscUnion& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - SimpleBadDiscUnion&& _my_union); + SimpleBadDiscUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const SimpleBadDiscUnion& my_union() const; + eProsima_user_DllExport const SimpleBadDiscUnion& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport SimpleBadDiscUnion& my_union(); + eProsima_user_DllExport SimpleBadDiscUnion& my_union() + { + return m_my_union; + } + + private: @@ -4425,8 +7396,6 @@ class SimplBadDiscUnionStruct }; -#endif // _FAST_DDS_GENERATED_TYPES_H_ - +#endif // _FAST_DDS_GENERATED_TYPES_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/unittest/xtypes/idl/TypesCdrAux.hpp b/test/unittest/xtypes/idl/TypesCdrAux.hpp index 14992724933..7e5d5f9409d 100644 --- a/test/unittest/xtypes/idl/TypesCdrAux.hpp +++ b/test/unittest/xtypes/idl/TypesCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_TYPESCDRAUX_HPP_ #define _FAST_DDS_GENERATED_TYPESCDRAUX_HPP_ -#include "Types.h" +#include "Types.hpp" constexpr uint32_t SimpleUnionStruct_max_cdr_typesize {24UL}; constexpr uint32_t SimpleUnionStruct_max_key_cdr_typesize {0UL}; @@ -253,52 +253,36 @@ eProsima_user_DllExport void serialize_key( - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceStruct& data); - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceStructEqual& data); - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceBadStruct& data); - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceBoundsStruct& data); - - - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceSequenceStruct& data); - - - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceSequenceBoundsStruct& data); @@ -348,7 +332,6 @@ eProsima_user_DllExport void serialize_key( - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const MapMapStruct& data); @@ -358,7 +341,6 @@ eProsima_user_DllExport void serialize_key( - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const MapMapBoundsStruct& data); @@ -372,16 +354,6 @@ eProsima_user_DllExport void serialize_key( - - - - - - - - - - diff --git a/test/unittest/xtypes/idl/TypesCdrAux.ipp b/test/unittest/xtypes/idl/TypesCdrAux.ipp index 837c42573bb..e9c85e3b75d 100644 --- a/test/unittest/xtypes/idl/TypesCdrAux.ipp +++ b/test/unittest/xtypes/idl/TypesCdrAux.ipp @@ -1476,8 +1476,6 @@ void serialize_key( - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1556,8 +1554,6 @@ void serialize_key( - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1636,8 +1632,6 @@ void serialize_key( - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1716,8 +1710,6 @@ void serialize_key( - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1796,10 +1788,6 @@ void serialize_key( - - - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1878,10 +1866,6 @@ void serialize_key( - - - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -2363,7 +2347,6 @@ void serialize_key( - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -2445,7 +2428,6 @@ void serialize_key( - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, diff --git a/test/unittest/xtypes/idl/TypesPubSubTypes.cxx b/test/unittest/xtypes/idl/TypesPubSubTypes.cxx index 0c0a8f0363e..7f56adaad22 100644 --- a/test/unittest/xtypes/idl/TypesPubSubTypes.cxx +++ b/test/unittest/xtypes/idl/TypesPubSubTypes.cxx @@ -3263,8 +3263,6 @@ bool ArraySizeStructPubSubType::getKey( - - SequenceStructPubSubType::SequenceStructPubSubType() { setName("SequenceStruct"); @@ -3455,8 +3453,6 @@ bool SequenceStructPubSubType::getKey( - - SequenceStructEqualPubSubType::SequenceStructEqualPubSubType() { setName("SequenceStructEqual"); @@ -3647,8 +3643,6 @@ bool SequenceStructEqualPubSubType::getKey( - - SequenceBadStructPubSubType::SequenceBadStructPubSubType() { setName("SequenceBadStruct"); @@ -3839,8 +3833,6 @@ bool SequenceBadStructPubSubType::getKey( - - SequenceBoundsStructPubSubType::SequenceBoundsStructPubSubType() { setName("SequenceBoundsStruct"); @@ -4031,10 +4023,6 @@ bool SequenceBoundsStructPubSubType::getKey( - - - - SequenceSequenceStructPubSubType::SequenceSequenceStructPubSubType() { setName("SequenceSequenceStruct"); @@ -4225,10 +4213,6 @@ bool SequenceSequenceStructPubSubType::getKey( - - - - SequenceSequenceBoundsStructPubSubType::SequenceSequenceBoundsStructPubSubType() { setName("SequenceSequenceBoundsStruct"); @@ -5382,7 +5366,6 @@ bool MapBoundsStructPubSubType::getKey( - MapMapStructPubSubType::MapMapStructPubSubType() { setName("MapMapStruct"); @@ -5576,7 +5559,6 @@ bool MapMapStructPubSubType::getKey( - MapMapBoundsStructPubSubType::MapMapBoundsStructPubSubType() { setName("MapMapBoundsStruct"); @@ -5774,16 +5756,6 @@ bool MapMapBoundsStructPubSubType::getKey( - - - - - - - - - - @@ -6925,3 +6897,6 @@ bool SimplBadDiscUnionStructPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "TypesCdrAux.ipp" diff --git a/test/unittest/xtypes/idl/TypesPubSubTypes.h b/test/unittest/xtypes/idl/TypesPubSubTypes.h index 6a934f82843..3d6833a9c7d 100644 --- a/test/unittest/xtypes/idl/TypesPubSubTypes.h +++ b/test/unittest/xtypes/idl/TypesPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "Types.h" +#include "Types.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -1571,8 +1571,6 @@ class ArraySizeStructPubSubType : public eprosima::fastdds::dds::TopicDataType - - /*! * @brief This class represents the TopicDataType of the type SequenceStruct defined by the user in the IDL file. * @ingroup Types @@ -1663,8 +1661,6 @@ class SequenceStructPubSubType : public eprosima::fastdds::dds::TopicDataType - - /*! * @brief This class represents the TopicDataType of the type SequenceStructEqual defined by the user in the IDL file. * @ingroup Types @@ -1755,8 +1751,6 @@ class SequenceStructEqualPubSubType : public eprosima::fastdds::dds::TopicDataTy - - /*! * @brief This class represents the TopicDataType of the type SequenceBadStruct defined by the user in the IDL file. * @ingroup Types @@ -1847,8 +1841,6 @@ class SequenceBadStructPubSubType : public eprosima::fastdds::dds::TopicDataType - - /*! * @brief This class represents the TopicDataType of the type SequenceBoundsStruct defined by the user in the IDL file. * @ingroup Types @@ -1939,10 +1931,6 @@ class SequenceBoundsStructPubSubType : public eprosima::fastdds::dds::TopicDataT - - - - /*! * @brief This class represents the TopicDataType of the type SequenceSequenceStruct defined by the user in the IDL file. * @ingroup Types @@ -2033,10 +2021,6 @@ class SequenceSequenceStructPubSubType : public eprosima::fastdds::dds::TopicDat - - - - /*! * @brief This class represents the TopicDataType of the type SequenceSequenceBoundsStruct defined by the user in the IDL file. * @ingroup Types @@ -2590,7 +2574,6 @@ class MapBoundsStructPubSubType : public eprosima::fastdds::dds::TopicDataType - /*! * @brief This class represents the TopicDataType of the type MapMapStruct defined by the user in the IDL file. * @ingroup Types @@ -2684,7 +2667,6 @@ class MapMapStructPubSubType : public eprosima::fastdds::dds::TopicDataType - /*! * @brief This class represents the TopicDataType of the type MapMapBoundsStruct defined by the user in the IDL file. * @ingroup Types @@ -2782,16 +2764,6 @@ class MapMapBoundsStructPubSubType : public eprosima::fastdds::dds::TopicDataTyp - - - - - - - - - - diff --git a/test/unittest/xtypes/idl/TypesTypeObject.cxx b/test/unittest/xtypes/idl/TypesTypeObject.cxx index bcefed47249..26033086852 100644 --- a/test/unittest/xtypes/idl/TypesTypeObject.cxx +++ b/test/unittest/xtypes/idl/TypesTypeObject.cxx @@ -24,7 +24,7 @@ namespace { char dummy; } #endif -#include "Types.h" +#include "Types.hpp" #include "TypesTypeObject.h" #include #include @@ -4425,8 +4425,6 @@ const TypeObject* GetCompleteArraySizeStructObject() - - const TypeIdentifier* GetSequenceStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceStruct", complete); @@ -4602,8 +4600,6 @@ const TypeObject* GetCompleteSequenceStructObject() - - const TypeIdentifier* GetSequenceStructEqualIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceStructEqual", complete); @@ -4779,8 +4775,6 @@ const TypeObject* GetCompleteSequenceStructEqualObject() - - const TypeIdentifier* GetSequenceBadStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceBadStruct", complete); @@ -4956,8 +4950,6 @@ const TypeObject* GetCompleteSequenceBadStructObject() - - const TypeIdentifier* GetSequenceBoundsStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceBoundsStruct", complete); @@ -5133,10 +5125,6 @@ const TypeObject* GetCompleteSequenceBoundsStructObject() - - - - const TypeIdentifier* GetSequenceSequenceStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceSequenceStruct", complete); @@ -5312,10 +5300,6 @@ const TypeObject* GetCompleteSequenceSequenceStructObject() - - - - const TypeIdentifier* GetSequenceSequenceBoundsStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceSequenceBoundsStruct", complete); @@ -6379,7 +6363,6 @@ const TypeObject* GetCompleteMapBoundsStructObject() - const TypeIdentifier* GetMapMapStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("MapMapStruct", complete); @@ -6558,7 +6541,6 @@ const TypeObject* GetCompleteMapMapStructObject() - const TypeIdentifier* GetMapMapBoundsStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("MapMapBoundsStruct", complete); diff --git a/test/unittest/xtypes/idl/TypesTypeObject.h b/test/unittest/xtypes/idl/TypesTypeObject.h index 2f615b62792..4ed19222804 100644 --- a/test/unittest/xtypes/idl/TypesTypeObject.h +++ b/test/unittest/xtypes/idl/TypesTypeObject.h @@ -190,8 +190,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteArraySizeStructObject(); - - eProsima_user_DllExport const TypeIdentifier* GetSequenceStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceStructObject(); @@ -199,8 +197,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteSequenceStructObject(); - - eProsima_user_DllExport const TypeIdentifier* GetSequenceStructEqualIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceStructEqualObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceStructEqualObject(); @@ -208,8 +204,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteSequenceStructEqualObject() - - eProsima_user_DllExport const TypeIdentifier* GetSequenceBadStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceBadStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceBadStructObject(); @@ -217,8 +211,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteSequenceBadStructObject(); - - eProsima_user_DllExport const TypeIdentifier* GetSequenceBoundsStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceBoundsStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceBoundsStructObject(); @@ -226,10 +218,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteSequenceBoundsStructObject( - - - - eProsima_user_DllExport const TypeIdentifier* GetSequenceSequenceStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceSequenceStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceSequenceStructObject(); @@ -237,10 +225,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteSequenceSequenceStructObjec - - - - eProsima_user_DllExport const TypeIdentifier* GetSequenceSequenceBoundsStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceSequenceBoundsStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceSequenceBoundsStructObject(); @@ -296,7 +280,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteMapBoundsStructObject(); - eProsima_user_DllExport const TypeIdentifier* GetMapMapStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetMapMapStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalMapMapStructObject(); @@ -307,7 +290,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteMapMapStructObject(); - eProsima_user_DllExport const TypeIdentifier* GetMapMapBoundsStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetMapMapBoundsStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalMapMapBoundsStructObject(); diff --git a/test/unittest/xtypes/idl/Typesv1.cxx b/test/unittest/xtypes/idl/Typesv1.cxx deleted file mode 100644 index 54b0d494ecc..00000000000 --- a/test/unittest/xtypes/idl/Typesv1.cxx +++ /dev/null @@ -1,8202 +0,0 @@ -// 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 Types.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Types.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include "TypesTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define SimpleUnionStruct_max_cdr_typesize 24ULL; -#define SequenceSequenceBoundsStruct_max_cdr_typesize 132ULL; - -#define MyAliasEnumStruct_max_cdr_typesize 8ULL; -#define ArrayBadStruct_max_cdr_typesize 6ULL; -#define MapBadKeyStruct_max_cdr_typesize 24ULL; -#define SimpleBadUnionStruct_max_cdr_typesize 24ULL; -#define MyEnumStruct_max_cdr_typesize 8ULL; - -#define ArrayStructEqual_max_cdr_typesize 12ULL; -#define LargeWStringStruct_max_cdr_typesize 167708ULL; - -#define WStringStruct_max_cdr_typesize 1028ULL; -#define SequenceStruct_max_cdr_typesize 16ULL; -#define SimpleTypeUnionStruct_max_cdr_typesize 24ULL; - -#define ArrayDimensionsStruct_max_cdr_typesize 20ULL; -#define SequenceSequenceStruct_max_cdr_typesize 48ULL; -#define MapBoundsStruct_max_cdr_typesize 40ULL; -#define SequenceStructEqual_max_cdr_typesize 16ULL; -#define MapStructEqual_max_cdr_typesize 24ULL; -#define BasicStruct_max_cdr_typesize 272ULL; -#define SequenceBoundsStruct_max_cdr_typesize 24ULL; -#define MapMapStruct_max_cdr_typesize 60ULL; -#define BasicWideStruct_max_cdr_typesize 536ULL; - -#define SimplBadDiscUnionStruct_max_cdr_typesize 24ULL; -#define MapStruct_max_cdr_typesize 24ULL; - -#define MyBadEnumStruct_max_cdr_typesize 8ULL; -#define SequenceBadStruct_max_cdr_typesize 10ULL; -#define SimpleUnionNamesStruct_max_cdr_typesize 24ULL; -#define LargeStringStruct_max_cdr_typesize 41934ULL; -#define ArrayStruct_max_cdr_typesize 12ULL; -#define BadBasicWideStruct_max_cdr_typesize 536ULL; -#define ArraySizeStruct_max_cdr_typesize 24ULL; - -#define MapBadElemStruct_max_cdr_typesize 40ULL; -#define SimpleUnionStructEqual_max_cdr_typesize 24ULL; -#define BasicBadStruct_max_cdr_typesize 272ULL; -#define BasicNamesStruct_max_cdr_typesize 272ULL; -#define StringStruct_max_cdr_typesize 264ULL; - -#define MapMapBoundsStruct_max_cdr_typesize 108ULL; - - - - -MyEnumStruct::MyEnumStruct() -{ - // MyEnum m_my_enum - m_my_enum = ::A; - - // Just to register all known types - registerTypesTypes(); -} - -MyEnumStruct::~MyEnumStruct() -{ -} - -MyEnumStruct::MyEnumStruct( - const MyEnumStruct& x) -{ - m_my_enum = x.m_my_enum; - -} - -MyEnumStruct::MyEnumStruct( - MyEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - -} - -MyEnumStruct& MyEnumStruct::operator =( - const MyEnumStruct& x) -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -MyEnumStruct& MyEnumStruct::operator =( - MyEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -bool MyEnumStruct::operator ==( - const MyEnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool MyEnumStruct::operator !=( - const MyEnumStruct& x) const -{ - return !(*this == x); -} - -size_t MyEnumStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MyEnumStruct_max_cdr_typesize; -} - -size_t MyEnumStruct::getCdrSerializedSize( - const MyEnumStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void MyEnumStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m_my_enum; - -} - -void MyEnumStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_my_enum = (MyEnum)enum_value; - } - - -} - - -bool MyEnumStruct::isKeyDefined() -{ - return false; -} - -void MyEnumStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void MyEnumStruct::my_enum( - MyEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyEnum MyEnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyEnum& MyEnumStruct::my_enum() -{ - return m_my_enum; -} - - - - - -MyBadEnumStruct::MyBadEnumStruct() -{ - // MyBadEnum m_my_enum - m_my_enum = ::A1; - - // Just to register all known types - registerTypesTypes(); -} - -MyBadEnumStruct::~MyBadEnumStruct() -{ -} - -MyBadEnumStruct::MyBadEnumStruct( - const MyBadEnumStruct& x) -{ - m_my_enum = x.m_my_enum; - -} - -MyBadEnumStruct::MyBadEnumStruct( - MyBadEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - -} - -MyBadEnumStruct& MyBadEnumStruct::operator =( - const MyBadEnumStruct& x) -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -MyBadEnumStruct& MyBadEnumStruct::operator =( - MyBadEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -bool MyBadEnumStruct::operator ==( - const MyBadEnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool MyBadEnumStruct::operator !=( - const MyBadEnumStruct& x) const -{ - return !(*this == x); -} - -size_t MyBadEnumStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MyBadEnumStruct_max_cdr_typesize; -} - -size_t MyBadEnumStruct::getCdrSerializedSize( - const MyBadEnumStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void MyBadEnumStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m_my_enum; - -} - -void MyBadEnumStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_my_enum = (MyBadEnum)enum_value; - } - - -} - - -bool MyBadEnumStruct::isKeyDefined() -{ - return false; -} - -void MyBadEnumStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void MyBadEnumStruct::my_enum( - MyBadEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyBadEnum MyBadEnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyBadEnum& MyBadEnumStruct::my_enum() -{ - return m_my_enum; -} - - - - - - -MyAliasEnumStruct::MyAliasEnumStruct() -{ - // MyAliasEnum m_my_enum - m_my_enum = ::A; - - // Just to register all known types - registerTypesTypes(); -} - -MyAliasEnumStruct::~MyAliasEnumStruct() -{ -} - -MyAliasEnumStruct::MyAliasEnumStruct( - const MyAliasEnumStruct& x) -{ - m_my_enum = x.m_my_enum; - -} - -MyAliasEnumStruct::MyAliasEnumStruct( - MyAliasEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - -} - -MyAliasEnumStruct& MyAliasEnumStruct::operator =( - const MyAliasEnumStruct& x) -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -MyAliasEnumStruct& MyAliasEnumStruct::operator =( - MyAliasEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -bool MyAliasEnumStruct::operator ==( - const MyAliasEnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool MyAliasEnumStruct::operator !=( - const MyAliasEnumStruct& x) const -{ - return !(*this == x); -} - -size_t MyAliasEnumStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MyAliasEnumStruct_max_cdr_typesize; -} - -size_t MyAliasEnumStruct::getCdrSerializedSize( - const MyAliasEnumStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void MyAliasEnumStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m_my_enum; - -} - -void MyAliasEnumStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_my_enum = (MyAliasEnum)enum_value; - } - - -} - - -bool MyAliasEnumStruct::isKeyDefined() -{ - return false; -} - -void MyAliasEnumStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void MyAliasEnumStruct::my_enum( - MyAliasEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyAliasEnum MyAliasEnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyAliasEnum& MyAliasEnumStruct::my_enum() -{ - return m_my_enum; -} - - - - - -BasicStruct::BasicStruct() -{ - // boolean m_my_bool - m_my_bool = false; - // long m_my_int32 - m_my_int32 = 0; - // /type_d() m_my_string - - - // Just to register all known types - registerTypesTypes(); -} - -BasicStruct::~BasicStruct() -{ -} - -BasicStruct::BasicStruct( - const BasicStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - -} - -BasicStruct::BasicStruct( - BasicStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - -} - -BasicStruct& BasicStruct::operator =( - const BasicStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - - return *this; -} - -BasicStruct& BasicStruct::operator =( - BasicStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - - return *this; -} - -bool BasicStruct::operator ==( - const BasicStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string); -} - -bool BasicStruct::operator !=( - const BasicStruct& x) const -{ - return !(*this == x); -} - -size_t BasicStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BasicStruct_max_cdr_typesize; -} - -size_t BasicStruct::getCdrSerializedSize( - const BasicStruct& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void BasicStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_bool; - - scdr << m_my_int32; - - scdr << m_my_string.c_str(); - -} - -void BasicStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_bool; - - - - dcdr >> m_my_int32; - - - - dcdr >> m_my_string; - - -} - - -bool BasicStruct::isKeyDefined() -{ - return false; -} - -void BasicStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BasicStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BasicStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicStruct::my_string() -{ - return m_my_string; -} - - - - - -BasicNamesStruct::BasicNamesStruct() -{ - // boolean m_my_bool_name - m_my_bool_name = false; - // long m_my_int32_name - m_my_int32_name = 0; - // /type_d() m_my_string_name - - - // Just to register all known types - registerTypesTypes(); -} - -BasicNamesStruct::~BasicNamesStruct() -{ -} - -BasicNamesStruct::BasicNamesStruct( - const BasicNamesStruct& x) -{ - m_my_bool_name = x.m_my_bool_name; - - - m_my_int32_name = x.m_my_int32_name; - - - m_my_string_name = x.m_my_string_name; - -} - -BasicNamesStruct::BasicNamesStruct( - BasicNamesStruct&& x) noexcept -{ - m_my_bool_name = x.m_my_bool_name; - - - m_my_int32_name = x.m_my_int32_name; - - - m_my_string_name = std::move(x.m_my_string_name); - -} - -BasicNamesStruct& BasicNamesStruct::operator =( - const BasicNamesStruct& x) -{ - m_my_bool_name = x.m_my_bool_name; - - - m_my_int32_name = x.m_my_int32_name; - - - m_my_string_name = x.m_my_string_name; - - return *this; -} - -BasicNamesStruct& BasicNamesStruct::operator =( - BasicNamesStruct&& x) noexcept -{ - m_my_bool_name = x.m_my_bool_name; - - - m_my_int32_name = x.m_my_int32_name; - - - m_my_string_name = std::move(x.m_my_string_name); - - return *this; -} - -bool BasicNamesStruct::operator ==( - const BasicNamesStruct& x) const -{ - return (m_my_bool_name == x.m_my_bool_name && - m_my_int32_name == x.m_my_int32_name && - m_my_string_name == x.m_my_string_name); -} - -bool BasicNamesStruct::operator !=( - const BasicNamesStruct& x) const -{ - return !(*this == x); -} - -size_t BasicNamesStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BasicNamesStruct_max_cdr_typesize; -} - -size_t BasicNamesStruct::getCdrSerializedSize( - const BasicNamesStruct& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string_name().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void BasicNamesStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_bool_name; - - scdr << m_my_int32_name; - - scdr << m_my_string_name.c_str(); - -} - -void BasicNamesStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_bool_name; - - - - dcdr >> m_my_int32_name; - - - - dcdr >> m_my_string_name; - - -} - - -bool BasicNamesStruct::isKeyDefined() -{ - return false; -} - -void BasicNamesStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_bool_name - * @param _my_bool_name New value for member my_bool_name - */ -void BasicNamesStruct::my_bool_name( - bool _my_bool_name) -{ - m_my_bool_name = _my_bool_name; -} - -/*! - * @brief This function returns the value of member my_bool_name - * @return Value of member my_bool_name - */ -bool BasicNamesStruct::my_bool_name() const -{ - return m_my_bool_name; -} - -/*! - * @brief This function returns a reference to member my_bool_name - * @return Reference to member my_bool_name - */ -bool& BasicNamesStruct::my_bool_name() -{ - return m_my_bool_name; -} - - -/*! - * @brief This function sets a value in member my_int32_name - * @param _my_int32_name New value for member my_int32_name - */ -void BasicNamesStruct::my_int32_name( - int32_t _my_int32_name) -{ - m_my_int32_name = _my_int32_name; -} - -/*! - * @brief This function returns the value of member my_int32_name - * @return Value of member my_int32_name - */ -int32_t BasicNamesStruct::my_int32_name() const -{ - return m_my_int32_name; -} - -/*! - * @brief This function returns a reference to member my_int32_name - * @return Reference to member my_int32_name - */ -int32_t& BasicNamesStruct::my_int32_name() -{ - return m_my_int32_name; -} - - -/*! - * @brief This function copies the value in member my_string_name - * @param _my_string_name New value to be copied in member my_string_name - */ -void BasicNamesStruct::my_string_name( - const std::string& _my_string_name) -{ - m_my_string_name = _my_string_name; -} - -/*! - * @brief This function moves the value in member my_string_name - * @param _my_string_name New value to be moved in member my_string_name - */ -void BasicNamesStruct::my_string_name( - std::string&& _my_string_name) -{ - m_my_string_name = std::move(_my_string_name); -} - -/*! - * @brief This function returns a constant reference to member my_string_name - * @return Constant reference to member my_string_name - */ -const std::string& BasicNamesStruct::my_string_name() const -{ - return m_my_string_name; -} - -/*! - * @brief This function returns a reference to member my_string_name - * @return Reference to member my_string_name - */ -std::string& BasicNamesStruct::my_string_name() -{ - return m_my_string_name; -} - - - - - -BasicBadStruct::BasicBadStruct() -{ - // octet m_my_bool - m_my_bool = 0; - // long m_my_int32 - m_my_int32 = 0; - // /type_d() m_my_string - - - // Just to register all known types - registerTypesTypes(); -} - -BasicBadStruct::~BasicBadStruct() -{ -} - -BasicBadStruct::BasicBadStruct( - const BasicBadStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - -} - -BasicBadStruct::BasicBadStruct( - BasicBadStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - -} - -BasicBadStruct& BasicBadStruct::operator =( - const BasicBadStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - - return *this; -} - -BasicBadStruct& BasicBadStruct::operator =( - BasicBadStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - - return *this; -} - -bool BasicBadStruct::operator ==( - const BasicBadStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string); -} - -bool BasicBadStruct::operator !=( - const BasicBadStruct& x) const -{ - return !(*this == x); -} - -size_t BasicBadStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BasicBadStruct_max_cdr_typesize; -} - -size_t BasicBadStruct::getCdrSerializedSize( - const BasicBadStruct& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void BasicBadStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_bool; - - scdr << m_my_int32; - - scdr << m_my_string.c_str(); - -} - -void BasicBadStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_bool; - - - - dcdr >> m_my_int32; - - - - dcdr >> m_my_string; - - -} - - -bool BasicBadStruct::isKeyDefined() -{ - return false; -} - -void BasicBadStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicBadStruct::my_bool( - uint8_t _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -uint8_t BasicBadStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -uint8_t& BasicBadStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicBadStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicBadStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicBadStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicBadStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicBadStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicBadStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicBadStruct::my_string() -{ - return m_my_string; -} - - - - - -BasicWideStruct::BasicWideStruct() -{ - // boolean m_my_bool - m_my_bool = false; - // long m_my_int32 - m_my_int32 = 0; - // /type_d() m_my_string - - // long m_new_int32 - m_new_int32 = 0; - // /type_d() m_new_string - - - // Just to register all known types - registerTypesTypes(); -} - -BasicWideStruct::~BasicWideStruct() -{ -} - -BasicWideStruct::BasicWideStruct( - const BasicWideStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - - - m_new_int32 = x.m_new_int32; - - - m_new_string = x.m_new_string; - -} - -BasicWideStruct::BasicWideStruct( - BasicWideStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - - - m_new_int32 = x.m_new_int32; - - - m_new_string = std::move(x.m_new_string); - -} - -BasicWideStruct& BasicWideStruct::operator =( - const BasicWideStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - - - m_new_int32 = x.m_new_int32; - - - m_new_string = x.m_new_string; - - return *this; -} - -BasicWideStruct& BasicWideStruct::operator =( - BasicWideStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - - - m_new_int32 = x.m_new_int32; - - - m_new_string = std::move(x.m_new_string); - - return *this; -} - -bool BasicWideStruct::operator ==( - const BasicWideStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string && - m_new_int32 == x.m_new_int32 && - m_new_string == x.m_new_string); -} - -bool BasicWideStruct::operator !=( - const BasicWideStruct& x) const -{ - return !(*this == x); -} - -size_t BasicWideStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BasicWideStruct_max_cdr_typesize; -} - -size_t BasicWideStruct::getCdrSerializedSize( - const BasicWideStruct& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string().size() + 1; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.new_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void BasicWideStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_bool; - - scdr << m_my_int32; - - scdr << m_my_string.c_str(); - - scdr << m_new_int32; - - scdr << m_new_string.c_str(); - -} - -void BasicWideStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_bool; - - - - dcdr >> m_my_int32; - - - - dcdr >> m_my_string; - - - - dcdr >> m_new_int32; - - - - dcdr >> m_new_string; - - -} - - -bool BasicWideStruct::isKeyDefined() -{ - return false; -} - -void BasicWideStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicWideStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BasicWideStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BasicWideStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicWideStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicWideStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicWideStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicWideStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicWideStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicWideStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicWideStruct::my_string() -{ - return m_my_string; -} - - -/*! - * @brief This function sets a value in member new_int32 - * @param _new_int32 New value for member new_int32 - */ -void BasicWideStruct::new_int32( - int32_t _new_int32) -{ - m_new_int32 = _new_int32; -} - -/*! - * @brief This function returns the value of member new_int32 - * @return Value of member new_int32 - */ -int32_t BasicWideStruct::new_int32() const -{ - return m_new_int32; -} - -/*! - * @brief This function returns a reference to member new_int32 - * @return Reference to member new_int32 - */ -int32_t& BasicWideStruct::new_int32() -{ - return m_new_int32; -} - - -/*! - * @brief This function copies the value in member new_string - * @param _new_string New value to be copied in member new_string - */ -void BasicWideStruct::new_string( - const std::string& _new_string) -{ - m_new_string = _new_string; -} - -/*! - * @brief This function moves the value in member new_string - * @param _new_string New value to be moved in member new_string - */ -void BasicWideStruct::new_string( - std::string&& _new_string) -{ - m_new_string = std::move(_new_string); -} - -/*! - * @brief This function returns a constant reference to member new_string - * @return Constant reference to member new_string - */ -const std::string& BasicWideStruct::new_string() const -{ - return m_new_string; -} - -/*! - * @brief This function returns a reference to member new_string - * @return Reference to member new_string - */ -std::string& BasicWideStruct::new_string() -{ - return m_new_string; -} - - - - - -BadBasicWideStruct::BadBasicWideStruct() -{ - // long m_new_int32 - m_new_int32 = 0; - // /type_d() m_new_string - - // boolean m_my_bool - m_my_bool = false; - // long m_my_int32 - m_my_int32 = 0; - // /type_d() m_my_string - - - // Just to register all known types - registerTypesTypes(); -} - -BadBasicWideStruct::~BadBasicWideStruct() -{ -} - -BadBasicWideStruct::BadBasicWideStruct( - const BadBasicWideStruct& x) -{ - m_new_int32 = x.m_new_int32; - - - m_new_string = x.m_new_string; - - - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - -} - -BadBasicWideStruct::BadBasicWideStruct( - BadBasicWideStruct&& x) noexcept -{ - m_new_int32 = x.m_new_int32; - - - m_new_string = std::move(x.m_new_string); - - - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - -} - -BadBasicWideStruct& BadBasicWideStruct::operator =( - const BadBasicWideStruct& x) -{ - m_new_int32 = x.m_new_int32; - - - m_new_string = x.m_new_string; - - - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - - return *this; -} - -BadBasicWideStruct& BadBasicWideStruct::operator =( - BadBasicWideStruct&& x) noexcept -{ - m_new_int32 = x.m_new_int32; - - - m_new_string = std::move(x.m_new_string); - - - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - - return *this; -} - -bool BadBasicWideStruct::operator ==( - const BadBasicWideStruct& x) const -{ - return (m_new_int32 == x.m_new_int32 && - m_new_string == x.m_new_string && - m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string); -} - -bool BadBasicWideStruct::operator !=( - const BadBasicWideStruct& x) const -{ - return !(*this == x); -} - -size_t BadBasicWideStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BadBasicWideStruct_max_cdr_typesize; -} - -size_t BadBasicWideStruct::getCdrSerializedSize( - const BadBasicWideStruct& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.new_string().size() + 1; - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void BadBasicWideStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_new_int32; - - scdr << m_new_string.c_str(); - - scdr << m_my_bool; - - scdr << m_my_int32; - - scdr << m_my_string.c_str(); - -} - -void BadBasicWideStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_new_int32; - - - - dcdr >> m_new_string; - - - - dcdr >> m_my_bool; - - - - dcdr >> m_my_int32; - - - - dcdr >> m_my_string; - - -} - - -bool BadBasicWideStruct::isKeyDefined() -{ - return false; -} - -void BadBasicWideStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member new_int32 - * @param _new_int32 New value for member new_int32 - */ -void BadBasicWideStruct::new_int32( - int32_t _new_int32) -{ - m_new_int32 = _new_int32; -} - -/*! - * @brief This function returns the value of member new_int32 - * @return Value of member new_int32 - */ -int32_t BadBasicWideStruct::new_int32() const -{ - return m_new_int32; -} - -/*! - * @brief This function returns a reference to member new_int32 - * @return Reference to member new_int32 - */ -int32_t& BadBasicWideStruct::new_int32() -{ - return m_new_int32; -} - - -/*! - * @brief This function copies the value in member new_string - * @param _new_string New value to be copied in member new_string - */ -void BadBasicWideStruct::new_string( - const std::string& _new_string) -{ - m_new_string = _new_string; -} - -/*! - * @brief This function moves the value in member new_string - * @param _new_string New value to be moved in member new_string - */ -void BadBasicWideStruct::new_string( - std::string&& _new_string) -{ - m_new_string = std::move(_new_string); -} - -/*! - * @brief This function returns a constant reference to member new_string - * @return Constant reference to member new_string - */ -const std::string& BadBasicWideStruct::new_string() const -{ - return m_new_string; -} - -/*! - * @brief This function returns a reference to member new_string - * @return Reference to member new_string - */ -std::string& BadBasicWideStruct::new_string() -{ - return m_new_string; -} - - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BadBasicWideStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BadBasicWideStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BadBasicWideStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BadBasicWideStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BadBasicWideStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BadBasicWideStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BadBasicWideStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BadBasicWideStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BadBasicWideStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BadBasicWideStruct::my_string() -{ - return m_my_string; -} - - - - - -StringStruct::StringStruct() -{ - // /type_d() m_my_string - - - // Just to register all known types - registerTypesTypes(); -} - -StringStruct::~StringStruct() -{ -} - -StringStruct::StringStruct( - const StringStruct& x) -{ - m_my_string = x.m_my_string; - -} - -StringStruct::StringStruct( - StringStruct&& x) noexcept -{ - m_my_string = std::move(x.m_my_string); - -} - -StringStruct& StringStruct::operator =( - const StringStruct& x) -{ - m_my_string = x.m_my_string; - - return *this; -} - -StringStruct& StringStruct::operator =( - StringStruct&& x) noexcept -{ - m_my_string = std::move(x.m_my_string); - - return *this; -} - -bool StringStruct::operator ==( - const StringStruct& x) const -{ - return (m_my_string == x.m_my_string); -} - -bool StringStruct::operator !=( - const StringStruct& x) const -{ - return !(*this == x); -} - -size_t StringStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return StringStruct_max_cdr_typesize; -} - -size_t StringStruct::getCdrSerializedSize( - const StringStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void StringStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_string.c_str(); - -} - -void StringStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_string; - - -} - - -bool StringStruct::isKeyDefined() -{ - return false; -} - -void StringStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void StringStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void StringStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& StringStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& StringStruct::my_string() -{ - return m_my_string; -} - - - - - -LargeStringStruct::LargeStringStruct() -{ - // /type_d() m_my_large_string - - - // Just to register all known types - registerTypesTypes(); -} - -LargeStringStruct::~LargeStringStruct() -{ -} - -LargeStringStruct::LargeStringStruct( - const LargeStringStruct& x) -{ - m_my_large_string = x.m_my_large_string; - -} - -LargeStringStruct::LargeStringStruct( - LargeStringStruct&& x) noexcept -{ - m_my_large_string = std::move(x.m_my_large_string); - -} - -LargeStringStruct& LargeStringStruct::operator =( - const LargeStringStruct& x) -{ - m_my_large_string = x.m_my_large_string; - - return *this; -} - -LargeStringStruct& LargeStringStruct::operator =( - LargeStringStruct&& x) noexcept -{ - m_my_large_string = std::move(x.m_my_large_string); - - return *this; -} - -bool LargeStringStruct::operator ==( - const LargeStringStruct& x) const -{ - return (m_my_large_string == x.m_my_large_string); -} - -bool LargeStringStruct::operator !=( - const LargeStringStruct& x) const -{ - return !(*this == x); -} - -size_t LargeStringStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return LargeStringStruct_max_cdr_typesize; -} - -size_t LargeStringStruct::getCdrSerializedSize( - const LargeStringStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_large_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void LargeStringStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_large_string.c_str(); - -} - -void LargeStringStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - std::string aux; - dcdr >> aux; - m_my_large_string = aux.c_str(); - } - - -} - - -bool LargeStringStruct::isKeyDefined() -{ - return false; -} - -void LargeStringStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_large_string - * @param _my_large_string New value to be copied in member my_large_string - */ -void LargeStringStruct::my_large_string( - const eprosima::fastrtps::fixed_string<41925>& _my_large_string) -{ - m_my_large_string = _my_large_string; -} - -/*! - * @brief This function moves the value in member my_large_string - * @param _my_large_string New value to be moved in member my_large_string - */ -void LargeStringStruct::my_large_string( - eprosima::fastrtps::fixed_string<41925>&& _my_large_string) -{ - m_my_large_string = std::move(_my_large_string); -} - -/*! - * @brief This function returns a constant reference to member my_large_string - * @return Constant reference to member my_large_string - */ -const eprosima::fastrtps::fixed_string<41925>& LargeStringStruct::my_large_string() const -{ - return m_my_large_string; -} - -/*! - * @brief This function returns a reference to member my_large_string - * @return Reference to member my_large_string - */ -eprosima::fastrtps::fixed_string<41925>& LargeStringStruct::my_large_string() -{ - return m_my_large_string; -} - - - - - -WStringStruct::WStringStruct() -{ - // /type_15() m_my_wstring - - - // Just to register all known types - registerTypesTypes(); -} - -WStringStruct::~WStringStruct() -{ -} - -WStringStruct::WStringStruct( - const WStringStruct& x) -{ - m_my_wstring = x.m_my_wstring; - -} - -WStringStruct::WStringStruct( - WStringStruct&& x) noexcept -{ - m_my_wstring = std::move(x.m_my_wstring); - -} - -WStringStruct& WStringStruct::operator =( - const WStringStruct& x) -{ - m_my_wstring = x.m_my_wstring; - - return *this; -} - -WStringStruct& WStringStruct::operator =( - WStringStruct&& x) noexcept -{ - m_my_wstring = std::move(x.m_my_wstring); - - return *this; -} - -bool WStringStruct::operator ==( - const WStringStruct& x) const -{ - return (m_my_wstring == x.m_my_wstring); -} - -bool WStringStruct::operator !=( - const WStringStruct& x) const -{ - return !(*this == x); -} - -size_t WStringStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return WStringStruct_max_cdr_typesize; -} - -size_t WStringStruct::getCdrSerializedSize( - const WStringStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + (data.my_wstring().size()) * 4; // 32 bits - - - return current_alignment - initial_alignment; -} - - -void WStringStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_wstring; - -} - -void WStringStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_wstring; - - -} - - -bool WStringStruct::isKeyDefined() -{ - return false; -} - -void WStringStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_wstring - * @param _my_wstring New value to be copied in member my_wstring - */ -void WStringStruct::my_wstring( - const std::wstring& _my_wstring) -{ - m_my_wstring = _my_wstring; -} - -/*! - * @brief This function moves the value in member my_wstring - * @param _my_wstring New value to be moved in member my_wstring - */ -void WStringStruct::my_wstring( - std::wstring&& _my_wstring) -{ - m_my_wstring = std::move(_my_wstring); -} - -/*! - * @brief This function returns a constant reference to member my_wstring - * @return Constant reference to member my_wstring - */ -const std::wstring& WStringStruct::my_wstring() const -{ - return m_my_wstring; -} - -/*! - * @brief This function returns a reference to member my_wstring - * @return Reference to member my_wstring - */ -std::wstring& WStringStruct::my_wstring() -{ - return m_my_wstring; -} - - - - - -LargeWStringStruct::LargeWStringStruct() -{ - // /type_15() m_my_large_wstring - - - // Just to register all known types - registerTypesTypes(); -} - -LargeWStringStruct::~LargeWStringStruct() -{ -} - -LargeWStringStruct::LargeWStringStruct( - const LargeWStringStruct& x) -{ - m_my_large_wstring = x.m_my_large_wstring; - -} - -LargeWStringStruct::LargeWStringStruct( - LargeWStringStruct&& x) noexcept -{ - m_my_large_wstring = std::move(x.m_my_large_wstring); - -} - -LargeWStringStruct& LargeWStringStruct::operator =( - const LargeWStringStruct& x) -{ - m_my_large_wstring = x.m_my_large_wstring; - - return *this; -} - -LargeWStringStruct& LargeWStringStruct::operator =( - LargeWStringStruct&& x) noexcept -{ - m_my_large_wstring = std::move(x.m_my_large_wstring); - - return *this; -} - -bool LargeWStringStruct::operator ==( - const LargeWStringStruct& x) const -{ - return (m_my_large_wstring == x.m_my_large_wstring); -} - -bool LargeWStringStruct::operator !=( - const LargeWStringStruct& x) const -{ - return !(*this == x); -} - -size_t LargeWStringStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return LargeWStringStruct_max_cdr_typesize; -} - -size_t LargeWStringStruct::getCdrSerializedSize( - const LargeWStringStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + (data.my_large_wstring().size()) * 4; // 32 bits - - - return current_alignment - initial_alignment; -} - - -void LargeWStringStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_large_wstring; - -} - -void LargeWStringStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_large_wstring; - - -} - - -bool LargeWStringStruct::isKeyDefined() -{ - return false; -} - -void LargeWStringStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_large_wstring - * @param _my_large_wstring New value to be copied in member my_large_wstring - */ -void LargeWStringStruct::my_large_wstring( - const std::wstring& _my_large_wstring) -{ - m_my_large_wstring = _my_large_wstring; -} - -/*! - * @brief This function moves the value in member my_large_wstring - * @param _my_large_wstring New value to be moved in member my_large_wstring - */ -void LargeWStringStruct::my_large_wstring( - std::wstring&& _my_large_wstring) -{ - m_my_large_wstring = std::move(_my_large_wstring); -} - -/*! - * @brief This function returns a constant reference to member my_large_wstring - * @return Constant reference to member my_large_wstring - */ -const std::wstring& LargeWStringStruct::my_large_wstring() const -{ - return m_my_large_wstring; -} - -/*! - * @brief This function returns a reference to member my_large_wstring - * @return Reference to member my_large_wstring - */ -std::wstring& LargeWStringStruct::my_large_wstring() -{ - return m_my_large_wstring; -} - - - - - -ArrayStruct::ArrayStruct() -{ - // long m_my_array - memset(&m_my_array, 0, ((2)) * 4); - - // Just to register all known types - registerTypesTypes(); -} - -ArrayStruct::~ArrayStruct() -{ -} - -ArrayStruct::ArrayStruct( - const ArrayStruct& x) -{ - m_my_array = x.m_my_array; - -} - -ArrayStruct::ArrayStruct( - ArrayStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - -} - -ArrayStruct& ArrayStruct::operator =( - const ArrayStruct& x) -{ - m_my_array = x.m_my_array; - - return *this; -} - -ArrayStruct& ArrayStruct::operator =( - ArrayStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - - return *this; -} - -bool ArrayStruct::operator ==( - const ArrayStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArrayStruct::operator !=( - const ArrayStruct& x) const -{ - return !(*this == x); -} - -size_t ArrayStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ArrayStruct_max_cdr_typesize; -} - -size_t ArrayStruct::getCdrSerializedSize( - const ArrayStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((2)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - return current_alignment - initial_alignment; -} - - -void ArrayStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_array; - - -} - -void ArrayStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_array; - - -} - - -bool ArrayStruct::isKeyDefined() -{ - return false; -} - -void ArrayStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArrayStruct::my_array( - const std::array& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArrayStruct::my_array( - std::array&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array& ArrayStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array& ArrayStruct::my_array() -{ - return m_my_array; -} - - - - - -ArrayStructEqual::ArrayStructEqual() -{ - // long m_my_array_equal - memset(&m_my_array_equal, 0, ((2)) * 4); - - // Just to register all known types - registerTypesTypes(); -} - -ArrayStructEqual::~ArrayStructEqual() -{ -} - -ArrayStructEqual::ArrayStructEqual( - const ArrayStructEqual& x) -{ - m_my_array_equal = x.m_my_array_equal; - -} - -ArrayStructEqual::ArrayStructEqual( - ArrayStructEqual&& x) noexcept -{ - m_my_array_equal = std::move(x.m_my_array_equal); - -} - -ArrayStructEqual& ArrayStructEqual::operator =( - const ArrayStructEqual& x) -{ - m_my_array_equal = x.m_my_array_equal; - - return *this; -} - -ArrayStructEqual& ArrayStructEqual::operator =( - ArrayStructEqual&& x) noexcept -{ - m_my_array_equal = std::move(x.m_my_array_equal); - - return *this; -} - -bool ArrayStructEqual::operator ==( - const ArrayStructEqual& x) const -{ - return (m_my_array_equal == x.m_my_array_equal); -} - -bool ArrayStructEqual::operator !=( - const ArrayStructEqual& x) const -{ - return !(*this == x); -} - -size_t ArrayStructEqual::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ArrayStructEqual_max_cdr_typesize; -} - -size_t ArrayStructEqual::getCdrSerializedSize( - const ArrayStructEqual& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((2)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - return current_alignment - initial_alignment; -} - - -void ArrayStructEqual::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_array_equal; - - -} - -void ArrayStructEqual::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_array_equal; - - -} - - -bool ArrayStructEqual::isKeyDefined() -{ - return false; -} - -void ArrayStructEqual::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_array_equal - * @param _my_array_equal New value to be copied in member my_array_equal - */ -void ArrayStructEqual::my_array_equal( - const std::array& _my_array_equal) -{ - m_my_array_equal = _my_array_equal; -} - -/*! - * @brief This function moves the value in member my_array_equal - * @param _my_array_equal New value to be moved in member my_array_equal - */ -void ArrayStructEqual::my_array_equal( - std::array&& _my_array_equal) -{ - m_my_array_equal = std::move(_my_array_equal); -} - -/*! - * @brief This function returns a constant reference to member my_array_equal - * @return Constant reference to member my_array_equal - */ -const std::array& ArrayStructEqual::my_array_equal() const -{ - return m_my_array_equal; -} - -/*! - * @brief This function returns a reference to member my_array_equal - * @return Reference to member my_array_equal - */ -std::array& ArrayStructEqual::my_array_equal() -{ - return m_my_array_equal; -} - - - - - -ArrayBadStruct::ArrayBadStruct() -{ - // octet m_my_array - memset(&m_my_array, 0, ((2)) * 1); - - // Just to register all known types - registerTypesTypes(); -} - -ArrayBadStruct::~ArrayBadStruct() -{ -} - -ArrayBadStruct::ArrayBadStruct( - const ArrayBadStruct& x) -{ - m_my_array = x.m_my_array; - -} - -ArrayBadStruct::ArrayBadStruct( - ArrayBadStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - -} - -ArrayBadStruct& ArrayBadStruct::operator =( - const ArrayBadStruct& x) -{ - m_my_array = x.m_my_array; - - return *this; -} - -ArrayBadStruct& ArrayBadStruct::operator =( - ArrayBadStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - - return *this; -} - -bool ArrayBadStruct::operator ==( - const ArrayBadStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArrayBadStruct::operator !=( - const ArrayBadStruct& x) const -{ - return !(*this == x); -} - -size_t ArrayBadStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ArrayBadStruct_max_cdr_typesize; -} - -size_t ArrayBadStruct::getCdrSerializedSize( - const ArrayBadStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((2)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void ArrayBadStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_array; - - -} - -void ArrayBadStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_array; - - -} - - -bool ArrayBadStruct::isKeyDefined() -{ - return false; -} - -void ArrayBadStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArrayBadStruct::my_array( - const std::array& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArrayBadStruct::my_array( - std::array&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array& ArrayBadStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array& ArrayBadStruct::my_array() -{ - return m_my_array; -} - - - - - -ArrayDimensionsStruct::ArrayDimensionsStruct() -{ - // long m_my_array - memset(&m_my_array, 0, ((2) * (2)) * 4); - - // Just to register all known types - registerTypesTypes(); -} - -ArrayDimensionsStruct::~ArrayDimensionsStruct() -{ -} - -ArrayDimensionsStruct::ArrayDimensionsStruct( - const ArrayDimensionsStruct& x) -{ - m_my_array = x.m_my_array; - -} - -ArrayDimensionsStruct::ArrayDimensionsStruct( - ArrayDimensionsStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - -} - -ArrayDimensionsStruct& ArrayDimensionsStruct::operator =( - const ArrayDimensionsStruct& x) -{ - m_my_array = x.m_my_array; - - return *this; -} - -ArrayDimensionsStruct& ArrayDimensionsStruct::operator =( - ArrayDimensionsStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - - return *this; -} - -bool ArrayDimensionsStruct::operator ==( - const ArrayDimensionsStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArrayDimensionsStruct::operator !=( - const ArrayDimensionsStruct& x) const -{ - return !(*this == x); -} - -size_t ArrayDimensionsStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ArrayDimensionsStruct_max_cdr_typesize; -} - -size_t ArrayDimensionsStruct::getCdrSerializedSize( - const ArrayDimensionsStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((2) * (2)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - return current_alignment - initial_alignment; -} - - -void ArrayDimensionsStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - for (uint32_t b = 0; b < m_my_array.size(); ++b) - { - scdr << m_my_array[b]; - - } - - - -} - -void ArrayDimensionsStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - for (uint32_t d = 0; d < m_my_array.size(); ++d) - { - dcdr >> m_my_array[d]; - - } - - - -} - - -bool ArrayDimensionsStruct::isKeyDefined() -{ - return false; -} - -void ArrayDimensionsStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArrayDimensionsStruct::my_array( - const std::array, 2>& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArrayDimensionsStruct::my_array( - std::array, 2>&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array, 2>& ArrayDimensionsStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array, 2>& ArrayDimensionsStruct::my_array() -{ - return m_my_array; -} - - - - - -ArraySizeStruct::ArraySizeStruct() -{ - // long m_my_array - memset(&m_my_array, 0, ((5)) * 4); - - // Just to register all known types - registerTypesTypes(); -} - -ArraySizeStruct::~ArraySizeStruct() -{ -} - -ArraySizeStruct::ArraySizeStruct( - const ArraySizeStruct& x) -{ - m_my_array = x.m_my_array; - -} - -ArraySizeStruct::ArraySizeStruct( - ArraySizeStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - -} - -ArraySizeStruct& ArraySizeStruct::operator =( - const ArraySizeStruct& x) -{ - m_my_array = x.m_my_array; - - return *this; -} - -ArraySizeStruct& ArraySizeStruct::operator =( - ArraySizeStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - - return *this; -} - -bool ArraySizeStruct::operator ==( - const ArraySizeStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArraySizeStruct::operator !=( - const ArraySizeStruct& x) const -{ - return !(*this == x); -} - -size_t ArraySizeStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ArraySizeStruct_max_cdr_typesize; -} - -size_t ArraySizeStruct::getCdrSerializedSize( - const ArraySizeStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((5)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - return current_alignment - initial_alignment; -} - - -void ArraySizeStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_array; - - -} - -void ArraySizeStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_array; - - -} - - -bool ArraySizeStruct::isKeyDefined() -{ - return false; -} - -void ArraySizeStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArraySizeStruct::my_array( - const std::array& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArraySizeStruct::my_array( - std::array&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array& ArraySizeStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array& ArraySizeStruct::my_array() -{ - return m_my_array; -} - - - - - - - -SequenceStruct::SequenceStruct() -{ - // sequence m_my_sequence - - - // Just to register all known types - registerTypesTypes(); -} - -SequenceStruct::~SequenceStruct() -{ -} - -SequenceStruct::SequenceStruct( - const SequenceStruct& x) -{ - m_my_sequence = x.m_my_sequence; - -} - -SequenceStruct::SequenceStruct( - SequenceStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - -} - -SequenceStruct& SequenceStruct::operator =( - const SequenceStruct& x) -{ - m_my_sequence = x.m_my_sequence; - - return *this; -} - -SequenceStruct& SequenceStruct::operator =( - SequenceStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - - return *this; -} - -bool SequenceStruct::operator ==( - const SequenceStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceStruct::operator !=( - const SequenceStruct& x) const -{ - return !(*this == x); -} - -size_t SequenceStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceStruct_max_cdr_typesize; -} - -size_t SequenceStruct::getCdrSerializedSize( - const SequenceStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence().size() > 0) - { - current_alignment += (data.my_sequence().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - - return current_alignment - initial_alignment; -} - - -void SequenceStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence; - - -} - -void SequenceStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence; - - -} - - -bool SequenceStruct::isKeyDefined() -{ - return false; -} - -void SequenceStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - - -SequenceStructEqual::SequenceStructEqual() -{ - // sequence m_my_sequence_equal - - - // Just to register all known types - registerTypesTypes(); -} - -SequenceStructEqual::~SequenceStructEqual() -{ -} - -SequenceStructEqual::SequenceStructEqual( - const SequenceStructEqual& x) -{ - m_my_sequence_equal = x.m_my_sequence_equal; - -} - -SequenceStructEqual::SequenceStructEqual( - SequenceStructEqual&& x) noexcept -{ - m_my_sequence_equal = std::move(x.m_my_sequence_equal); - -} - -SequenceStructEqual& SequenceStructEqual::operator =( - const SequenceStructEqual& x) -{ - m_my_sequence_equal = x.m_my_sequence_equal; - - return *this; -} - -SequenceStructEqual& SequenceStructEqual::operator =( - SequenceStructEqual&& x) noexcept -{ - m_my_sequence_equal = std::move(x.m_my_sequence_equal); - - return *this; -} - -bool SequenceStructEqual::operator ==( - const SequenceStructEqual& x) const -{ - return (m_my_sequence_equal == x.m_my_sequence_equal); -} - -bool SequenceStructEqual::operator !=( - const SequenceStructEqual& x) const -{ - return !(*this == x); -} - -size_t SequenceStructEqual::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceStructEqual_max_cdr_typesize; -} - -size_t SequenceStructEqual::getCdrSerializedSize( - const SequenceStructEqual& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence_equal().size() > 0) - { - current_alignment += (data.my_sequence_equal().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - - return current_alignment - initial_alignment; -} - - -void SequenceStructEqual::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence_equal; - - -} - -void SequenceStructEqual::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence_equal; - - -} - - -bool SequenceStructEqual::isKeyDefined() -{ - return false; -} - -void SequenceStructEqual::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence_equal - * @param _my_sequence_equal New value to be copied in member my_sequence_equal - */ -void SequenceStructEqual::my_sequence_equal( - const std::vector& _my_sequence_equal) -{ - m_my_sequence_equal = _my_sequence_equal; -} - -/*! - * @brief This function moves the value in member my_sequence_equal - * @param _my_sequence_equal New value to be moved in member my_sequence_equal - */ -void SequenceStructEqual::my_sequence_equal( - std::vector&& _my_sequence_equal) -{ - m_my_sequence_equal = std::move(_my_sequence_equal); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_equal - * @return Constant reference to member my_sequence_equal - */ -const std::vector& SequenceStructEqual::my_sequence_equal() const -{ - return m_my_sequence_equal; -} - -/*! - * @brief This function returns a reference to member my_sequence_equal - * @return Reference to member my_sequence_equal - */ -std::vector& SequenceStructEqual::my_sequence_equal() -{ - return m_my_sequence_equal; -} - - - - - - - -SequenceBadStruct::SequenceBadStruct() -{ - // sequence m_my_sequence - - - // Just to register all known types - registerTypesTypes(); -} - -SequenceBadStruct::~SequenceBadStruct() -{ -} - -SequenceBadStruct::SequenceBadStruct( - const SequenceBadStruct& x) -{ - m_my_sequence = x.m_my_sequence; - -} - -SequenceBadStruct::SequenceBadStruct( - SequenceBadStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - -} - -SequenceBadStruct& SequenceBadStruct::operator =( - const SequenceBadStruct& x) -{ - m_my_sequence = x.m_my_sequence; - - return *this; -} - -SequenceBadStruct& SequenceBadStruct::operator =( - SequenceBadStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - - return *this; -} - -bool SequenceBadStruct::operator ==( - const SequenceBadStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceBadStruct::operator !=( - const SequenceBadStruct& x) const -{ - return !(*this == x); -} - -size_t SequenceBadStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceBadStruct_max_cdr_typesize; -} - -size_t SequenceBadStruct::getCdrSerializedSize( - const SequenceBadStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence().size() > 0) - { - current_alignment += (data.my_sequence().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - - return current_alignment - initial_alignment; -} - - -void SequenceBadStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence; - - -} - -void SequenceBadStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence; - - -} - - -bool SequenceBadStruct::isKeyDefined() -{ - return false; -} - -void SequenceBadStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceBadStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceBadStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceBadStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceBadStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - - -SequenceBoundsStruct::SequenceBoundsStruct() -{ - // sequence m_my_sequence - - - // Just to register all known types - registerTypesTypes(); -} - -SequenceBoundsStruct::~SequenceBoundsStruct() -{ -} - -SequenceBoundsStruct::SequenceBoundsStruct( - const SequenceBoundsStruct& x) -{ - m_my_sequence = x.m_my_sequence; - -} - -SequenceBoundsStruct::SequenceBoundsStruct( - SequenceBoundsStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - -} - -SequenceBoundsStruct& SequenceBoundsStruct::operator =( - const SequenceBoundsStruct& x) -{ - m_my_sequence = x.m_my_sequence; - - return *this; -} - -SequenceBoundsStruct& SequenceBoundsStruct::operator =( - SequenceBoundsStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - - return *this; -} - -bool SequenceBoundsStruct::operator ==( - const SequenceBoundsStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceBoundsStruct::operator !=( - const SequenceBoundsStruct& x) const -{ - return !(*this == x); -} - -size_t SequenceBoundsStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceBoundsStruct_max_cdr_typesize; -} - -size_t SequenceBoundsStruct::getCdrSerializedSize( - const SequenceBoundsStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence().size() > 0) - { - current_alignment += (data.my_sequence().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - - return current_alignment - initial_alignment; -} - - -void SequenceBoundsStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence; - - -} - -void SequenceBoundsStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence; - - -} - - -bool SequenceBoundsStruct::isKeyDefined() -{ - return false; -} - -void SequenceBoundsStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceBoundsStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceBoundsStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceBoundsStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceBoundsStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - - - - -SequenceSequenceStruct::SequenceSequenceStruct() -{ - // sequence, 3> m_my_sequence_sequence - - - // Just to register all known types - registerTypesTypes(); -} - -SequenceSequenceStruct::~SequenceSequenceStruct() -{ -} - -SequenceSequenceStruct::SequenceSequenceStruct( - const SequenceSequenceStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; - -} - -SequenceSequenceStruct::SequenceSequenceStruct( - SequenceSequenceStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - -} - -SequenceSequenceStruct& SequenceSequenceStruct::operator =( - const SequenceSequenceStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; - - return *this; -} - -SequenceSequenceStruct& SequenceSequenceStruct::operator =( - SequenceSequenceStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - - return *this; -} - -bool SequenceSequenceStruct::operator ==( - const SequenceSequenceStruct& x) const -{ - return (m_my_sequence_sequence == x.m_my_sequence_sequence); -} - -bool SequenceSequenceStruct::operator !=( - const SequenceSequenceStruct& x) const -{ - return !(*this == x); -} - -size_t SequenceSequenceStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceSequenceStruct_max_cdr_typesize; -} - -size_t SequenceSequenceStruct::getCdrSerializedSize( - const SequenceSequenceStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.my_sequence_sequence().size(); ++a) - { - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence_sequence().at(a).size() > 0) - { - current_alignment += (data.my_sequence_sequence().at(a).size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - } - - - - return current_alignment - initial_alignment; -} - - -void SequenceSequenceStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence_sequence; - - -} - -void SequenceSequenceStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence_sequence; - - -} - - -bool SequenceSequenceStruct::isKeyDefined() -{ - return false; -} - -void SequenceSequenceStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ -void SequenceSequenceStruct::my_sequence_sequence( - const std::vector>& _my_sequence_sequence) -{ - m_my_sequence_sequence = _my_sequence_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ -void SequenceSequenceStruct::my_sequence_sequence( - std::vector>&& _my_sequence_sequence) -{ - m_my_sequence_sequence = std::move(_my_sequence_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ -const std::vector>& SequenceSequenceStruct::my_sequence_sequence() const -{ - return m_my_sequence_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ -std::vector>& SequenceSequenceStruct::my_sequence_sequence() -{ - return m_my_sequence_sequence; -} - - - - - - - - - -SequenceSequenceBoundsStruct::SequenceSequenceBoundsStruct() -{ - // sequence, 5> m_my_sequence_sequence - - - // Just to register all known types - registerTypesTypes(); -} - -SequenceSequenceBoundsStruct::~SequenceSequenceBoundsStruct() -{ -} - -SequenceSequenceBoundsStruct::SequenceSequenceBoundsStruct( - const SequenceSequenceBoundsStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; - -} - -SequenceSequenceBoundsStruct::SequenceSequenceBoundsStruct( - SequenceSequenceBoundsStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - -} - -SequenceSequenceBoundsStruct& SequenceSequenceBoundsStruct::operator =( - const SequenceSequenceBoundsStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; - - return *this; -} - -SequenceSequenceBoundsStruct& SequenceSequenceBoundsStruct::operator =( - SequenceSequenceBoundsStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - - return *this; -} - -bool SequenceSequenceBoundsStruct::operator ==( - const SequenceSequenceBoundsStruct& x) const -{ - return (m_my_sequence_sequence == x.m_my_sequence_sequence); -} - -bool SequenceSequenceBoundsStruct::operator !=( - const SequenceSequenceBoundsStruct& x) const -{ - return !(*this == x); -} - -size_t SequenceSequenceBoundsStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceSequenceBoundsStruct_max_cdr_typesize; -} - -size_t SequenceSequenceBoundsStruct::getCdrSerializedSize( - const SequenceSequenceBoundsStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.my_sequence_sequence().size(); ++a) - { - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence_sequence().at(a).size() > 0) - { - current_alignment += (data.my_sequence_sequence().at(a).size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - } - - - - return current_alignment - initial_alignment; -} - - -void SequenceSequenceBoundsStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence_sequence; - - -} - -void SequenceSequenceBoundsStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence_sequence; - - -} - - -bool SequenceSequenceBoundsStruct::isKeyDefined() -{ - return false; -} - -void SequenceSequenceBoundsStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ -void SequenceSequenceBoundsStruct::my_sequence_sequence( - const std::vector>& _my_sequence_sequence) -{ - m_my_sequence_sequence = _my_sequence_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ -void SequenceSequenceBoundsStruct::my_sequence_sequence( - std::vector>&& _my_sequence_sequence) -{ - m_my_sequence_sequence = std::move(_my_sequence_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ -const std::vector>& SequenceSequenceBoundsStruct::my_sequence_sequence() const -{ - return m_my_sequence_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ -std::vector>& SequenceSequenceBoundsStruct::my_sequence_sequence() -{ - return m_my_sequence_sequence; -} - - - - - - - -MapStruct::MapStruct() -{ - // map m_my_map - - - // Just to register all known types - registerTypesTypes(); -} - -MapStruct::~MapStruct() -{ -} - -MapStruct::MapStruct( - const MapStruct& x) -{ - m_my_map = x.m_my_map; - -} - -MapStruct::MapStruct( - MapStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - -} - -MapStruct& MapStruct::operator =( - const MapStruct& x) -{ - m_my_map = x.m_my_map; - - return *this; -} - -MapStruct& MapStruct::operator =( - MapStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - - return *this; -} - -bool MapStruct::operator ==( - const MapStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapStruct::operator !=( - const MapStruct& x) const -{ - return !(*this == x); -} - -size_t MapStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapStruct_max_cdr_typesize; -} - -size_t MapStruct::getCdrSerializedSize( - const MapStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map()) - { - (void)a; - - 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 MapStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map.size()); - for (const auto& pair : m_my_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map; - - -} - - -bool MapStruct::isKeyDefined() -{ - return false; -} - -void MapStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapStruct::my_map() -{ - return m_my_map; -} - - - - - - - -MapStructEqual::MapStructEqual() -{ - // map m_my_map_equal - - - // Just to register all known types - registerTypesTypes(); -} - -MapStructEqual::~MapStructEqual() -{ -} - -MapStructEqual::MapStructEqual( - const MapStructEqual& x) -{ - m_my_map_equal = x.m_my_map_equal; - -} - -MapStructEqual::MapStructEqual( - MapStructEqual&& x) noexcept -{ - m_my_map_equal = std::move(x.m_my_map_equal); - -} - -MapStructEqual& MapStructEqual::operator =( - const MapStructEqual& x) -{ - m_my_map_equal = x.m_my_map_equal; - - return *this; -} - -MapStructEqual& MapStructEqual::operator =( - MapStructEqual&& x) noexcept -{ - m_my_map_equal = std::move(x.m_my_map_equal); - - return *this; -} - -bool MapStructEqual::operator ==( - const MapStructEqual& x) const -{ - return (m_my_map_equal == x.m_my_map_equal); -} - -bool MapStructEqual::operator !=( - const MapStructEqual& x) const -{ - return !(*this == x); -} - -size_t MapStructEqual::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapStructEqual_max_cdr_typesize; -} - -size_t MapStructEqual::getCdrSerializedSize( - const MapStructEqual& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map_equal()) - { - (void)a; - - 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 MapStructEqual::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map_equal.size()); - for (const auto& pair : m_my_map_equal) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapStructEqual::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map_equal; - - -} - - -bool MapStructEqual::isKeyDefined() -{ - return false; -} - -void MapStructEqual::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map_equal - * @param _my_map_equal New value to be copied in member my_map_equal - */ -void MapStructEqual::my_map_equal( - const std::map& _my_map_equal) -{ - m_my_map_equal = _my_map_equal; -} - -/*! - * @brief This function moves the value in member my_map_equal - * @param _my_map_equal New value to be moved in member my_map_equal - */ -void MapStructEqual::my_map_equal( - std::map&& _my_map_equal) -{ - m_my_map_equal = std::move(_my_map_equal); -} - -/*! - * @brief This function returns a constant reference to member my_map_equal - * @return Constant reference to member my_map_equal - */ -const std::map& MapStructEqual::my_map_equal() const -{ - return m_my_map_equal; -} - -/*! - * @brief This function returns a reference to member my_map_equal - * @return Reference to member my_map_equal - */ -std::map& MapStructEqual::my_map_equal() -{ - return m_my_map_equal; -} - - - - - - - -MapBadKeyStruct::MapBadKeyStruct() -{ - // map m_my_map - - - // Just to register all known types - registerTypesTypes(); -} - -MapBadKeyStruct::~MapBadKeyStruct() -{ -} - -MapBadKeyStruct::MapBadKeyStruct( - const MapBadKeyStruct& x) -{ - m_my_map = x.m_my_map; - -} - -MapBadKeyStruct::MapBadKeyStruct( - MapBadKeyStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - -} - -MapBadKeyStruct& MapBadKeyStruct::operator =( - const MapBadKeyStruct& x) -{ - m_my_map = x.m_my_map; - - return *this; -} - -MapBadKeyStruct& MapBadKeyStruct::operator =( - MapBadKeyStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - - return *this; -} - -bool MapBadKeyStruct::operator ==( - const MapBadKeyStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapBadKeyStruct::operator !=( - const MapBadKeyStruct& x) const -{ - return !(*this == x); -} - -size_t MapBadKeyStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapBadKeyStruct_max_cdr_typesize; -} - -size_t MapBadKeyStruct::getCdrSerializedSize( - const MapBadKeyStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map()) - { - (void)a; - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - } - - - return current_alignment - initial_alignment; -} - - -void MapBadKeyStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map.size()); - for (const auto& pair : m_my_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapBadKeyStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map; - - -} - - -bool MapBadKeyStruct::isKeyDefined() -{ - return false; -} - -void MapBadKeyStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapBadKeyStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapBadKeyStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapBadKeyStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapBadKeyStruct::my_map() -{ - return m_my_map; -} - - - - - - - -MapBadElemStruct::MapBadElemStruct() -{ - // map m_my_map - - - // Just to register all known types - registerTypesTypes(); -} - -MapBadElemStruct::~MapBadElemStruct() -{ -} - -MapBadElemStruct::MapBadElemStruct( - const MapBadElemStruct& x) -{ - m_my_map = x.m_my_map; - -} - -MapBadElemStruct::MapBadElemStruct( - MapBadElemStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - -} - -MapBadElemStruct& MapBadElemStruct::operator =( - const MapBadElemStruct& x) -{ - m_my_map = x.m_my_map; - - return *this; -} - -MapBadElemStruct& MapBadElemStruct::operator =( - MapBadElemStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - - return *this; -} - -bool MapBadElemStruct::operator ==( - const MapBadElemStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapBadElemStruct::operator !=( - const MapBadElemStruct& x) const -{ - return !(*this == x); -} - -size_t MapBadElemStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapBadElemStruct_max_cdr_typesize; -} - -size_t MapBadElemStruct::getCdrSerializedSize( - const MapBadElemStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map()) - { - (void)a; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - } - - - return current_alignment - initial_alignment; -} - - -void MapBadElemStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map.size()); - for (const auto& pair : m_my_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapBadElemStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map; - - -} - - -bool MapBadElemStruct::isKeyDefined() -{ - return false; -} - -void MapBadElemStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapBadElemStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapBadElemStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapBadElemStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapBadElemStruct::my_map() -{ - return m_my_map; -} - - - - - - - -MapBoundsStruct::MapBoundsStruct() -{ - // map m_my_map - - - // Just to register all known types - registerTypesTypes(); -} - -MapBoundsStruct::~MapBoundsStruct() -{ -} - -MapBoundsStruct::MapBoundsStruct( - const MapBoundsStruct& x) -{ - m_my_map = x.m_my_map; - -} - -MapBoundsStruct::MapBoundsStruct( - MapBoundsStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - -} - -MapBoundsStruct& MapBoundsStruct::operator =( - const MapBoundsStruct& x) -{ - m_my_map = x.m_my_map; - - return *this; -} - -MapBoundsStruct& MapBoundsStruct::operator =( - MapBoundsStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - - return *this; -} - -bool MapBoundsStruct::operator ==( - const MapBoundsStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapBoundsStruct::operator !=( - const MapBoundsStruct& x) const -{ - return !(*this == x); -} - -size_t MapBoundsStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapBoundsStruct_max_cdr_typesize; -} - -size_t MapBoundsStruct::getCdrSerializedSize( - const MapBoundsStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map()) - { - (void)a; - - 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 MapBoundsStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map.size()); - for (const auto& pair : m_my_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapBoundsStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map; - - -} - - -bool MapBoundsStruct::isKeyDefined() -{ - return false; -} - -void MapBoundsStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapBoundsStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapBoundsStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapBoundsStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapBoundsStruct::my_map() -{ - return m_my_map; -} - - - - - - - - - -MapMapStruct::MapMapStruct() -{ - // map> m_my_map_map - - - // Just to register all known types - registerTypesTypes(); -} - -MapMapStruct::~MapMapStruct() -{ -} - -MapMapStruct::MapMapStruct( - const MapMapStruct& x) -{ - m_my_map_map = x.m_my_map_map; - -} - -MapMapStruct::MapMapStruct( - MapMapStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); - -} - -MapMapStruct& MapMapStruct::operator =( - const MapMapStruct& x) -{ - m_my_map_map = x.m_my_map_map; - - return *this; -} - -MapMapStruct& MapMapStruct::operator =( - MapMapStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); - - return *this; -} - -bool MapMapStruct::operator ==( - const MapMapStruct& x) const -{ - return (m_my_map_map == x.m_my_map_map); -} - -bool MapMapStruct::operator !=( - const MapMapStruct& x) const -{ - return !(*this == x); -} - -size_t MapMapStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapMapStruct_max_cdr_typesize; -} - -size_t MapMapStruct::getCdrSerializedSize( - const MapMapStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map_map()) - { - (void)a; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto b : a.second) - { - (void)b; - - 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 MapMapStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map_map.size()); - for (const auto& pair : m_my_map_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapMapStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map_map; - - -} - - -bool MapMapStruct::isKeyDefined() -{ - return false; -} - -void MapMapStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ -void MapMapStruct::my_map_map( - const std::map>& _my_map_map) -{ - m_my_map_map = _my_map_map; -} - -/*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ -void MapMapStruct::my_map_map( - std::map>&& _my_map_map) -{ - m_my_map_map = std::move(_my_map_map); -} - -/*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ -const std::map>& MapMapStruct::my_map_map() const -{ - return m_my_map_map; -} - -/*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ -std::map>& MapMapStruct::my_map_map() -{ - return m_my_map_map; -} - - - - - - - - - -MapMapBoundsStruct::MapMapBoundsStruct() -{ - // map> m_my_map_map - - - // Just to register all known types - registerTypesTypes(); -} - -MapMapBoundsStruct::~MapMapBoundsStruct() -{ -} - -MapMapBoundsStruct::MapMapBoundsStruct( - const MapMapBoundsStruct& x) -{ - m_my_map_map = x.m_my_map_map; - -} - -MapMapBoundsStruct::MapMapBoundsStruct( - MapMapBoundsStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); - -} - -MapMapBoundsStruct& MapMapBoundsStruct::operator =( - const MapMapBoundsStruct& x) -{ - m_my_map_map = x.m_my_map_map; - - return *this; -} - -MapMapBoundsStruct& MapMapBoundsStruct::operator =( - MapMapBoundsStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); - - return *this; -} - -bool MapMapBoundsStruct::operator ==( - const MapMapBoundsStruct& x) const -{ - return (m_my_map_map == x.m_my_map_map); -} - -bool MapMapBoundsStruct::operator !=( - const MapMapBoundsStruct& x) const -{ - return !(*this == x); -} - -size_t MapMapBoundsStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapMapBoundsStruct_max_cdr_typesize; -} - -size_t MapMapBoundsStruct::getCdrSerializedSize( - const MapMapBoundsStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map_map()) - { - (void)a; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto b : a.second) - { - (void)b; - - 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 MapMapBoundsStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map_map.size()); - for (const auto& pair : m_my_map_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapMapBoundsStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map_map; - - -} - - -bool MapMapBoundsStruct::isKeyDefined() -{ - return false; -} - -void MapMapBoundsStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ -void MapMapBoundsStruct::my_map_map( - const std::map>& _my_map_map) -{ - m_my_map_map = _my_map_map; -} - -/*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ -void MapMapBoundsStruct::my_map_map( - std::map>&& _my_map_map) -{ - m_my_map_map = std::move(_my_map_map); -} - -/*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ -const std::map>& MapMapBoundsStruct::my_map_map() const -{ - return m_my_map_map; -} - -/*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ -std::map>& MapMapBoundsStruct::my_map_map() -{ - return m_my_map_map; -} - - - - - -SimpleUnion::SimpleUnion() -{ - m__d = A; - // long m_first - m_first = 0; - // long long m_second - m_second = 0; -} - -SimpleUnion::~SimpleUnion() -{ -} - -SimpleUnion::SimpleUnion( - const SimpleUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleUnion::SimpleUnion( - SimpleUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleUnion& SimpleUnion::operator =( - const SimpleUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleUnion& SimpleUnion::operator =( - SimpleUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleUnion::operator ==( - const SimpleUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleUnion::operator !=( - const SimpleUnion& x) const -{ - return !(*this == x); -} - -void SimpleUnion::_d( - int32_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch(__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleUnion::_d() -{ - return m__d; -} - -void SimpleUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t SimpleUnion::first() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleUnion::first() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t SimpleUnion::second() const -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleUnion::second() -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -// TODO(Ricardo) Review -size_t SimpleUnion::getCdrSerializedSize( - const SimpleUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case A: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case B: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void SimpleUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_first; - - break; - - - case B: - scdr << m_second; - - break; - - default: - break; - } -} - -void SimpleUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_first; - - - break; - - - case B: - dcdr >> m_second; - - - break; - - default: - break; - } -} - - - - - -SimpleUnionNames::SimpleUnionNames() -{ - m__d = A; - // long m_first_case - m_first_case = 0; - // long long m_second_case - m_second_case = 0; -} - -SimpleUnionNames::~SimpleUnionNames() -{ -} - -SimpleUnionNames::SimpleUnionNames( - const SimpleUnionNames& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } -} - -SimpleUnionNames::SimpleUnionNames( - SimpleUnionNames&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } -} - -SimpleUnionNames& SimpleUnionNames::operator =( - const SimpleUnionNames& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } - - return *this; -} - -SimpleUnionNames& SimpleUnionNames::operator =( - SimpleUnionNames&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } - - return *this; -} - -bool SimpleUnionNames::operator ==( - const SimpleUnionNames& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_first_case == x.m_first_case); - break; - - - case B: - return (m_second_case == x.m_second_case); - break; - - default: - break; - } - return false; -} - -bool SimpleUnionNames::operator !=( - const SimpleUnionNames& x) const -{ - return !(*this == x); -} - -void SimpleUnionNames::_d( - int32_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch(__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleUnionNames::_d() const -{ - return m__d; -} - -int32_t& SimpleUnionNames::_d() -{ - return m__d; -} - -void SimpleUnionNames::first_case( - int32_t _first_case) -{ - m_first_case = _first_case; - m__d = A; - -} - -int32_t SimpleUnionNames::first_case() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first_case; -} - -int32_t& SimpleUnionNames::first_case() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first_case; -} - - -void SimpleUnionNames::second_case( - int64_t _second_case) -{ - m_second_case = _second_case; - m__d = B; - -} - -int64_t SimpleUnionNames::second_case() const -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second_case; -} - -int64_t& SimpleUnionNames::second_case() -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second_case; -} - - -// TODO(Ricardo) Review -size_t SimpleUnionNames::getCdrSerializedSize( - const SimpleUnionNames& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case A: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case B: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void SimpleUnionNames::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_first_case; - - break; - - - case B: - scdr << m_second_case; - - break; - - default: - break; - } -} - -void SimpleUnionNames::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_first_case; - - - break; - - - case B: - dcdr >> m_second_case; - - - break; - - default: - break; - } -} - - - - - -SimpleTypeUnion::SimpleTypeUnion() -{ - m__d = A; - // octet m_first - m_first = 0; - // long long m_second - m_second = 0; -} - -SimpleTypeUnion::~SimpleTypeUnion() -{ -} - -SimpleTypeUnion::SimpleTypeUnion( - const SimpleTypeUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleTypeUnion::SimpleTypeUnion( - SimpleTypeUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleTypeUnion& SimpleTypeUnion::operator =( - const SimpleTypeUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleTypeUnion& SimpleTypeUnion::operator =( - SimpleTypeUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleTypeUnion::operator ==( - const SimpleTypeUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleTypeUnion::operator !=( - const SimpleTypeUnion& x) const -{ - return !(*this == x); -} - -void SimpleTypeUnion::_d( - int32_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch(__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleTypeUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleTypeUnion::_d() -{ - return m__d; -} - -void SimpleTypeUnion::first( - uint8_t _first) -{ - m_first = _first; - m__d = A; - -} - -uint8_t SimpleTypeUnion::first() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -uint8_t& SimpleTypeUnion::first() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleTypeUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t SimpleTypeUnion::second() const -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleTypeUnion::second() -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -// TODO(Ricardo) Review -size_t SimpleTypeUnion::getCdrSerializedSize( - const SimpleTypeUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case A: - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - break; - - - case B: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void SimpleTypeUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_first; - - break; - - - case B: - scdr << m_second; - - break; - - default: - break; - } -} - -void SimpleTypeUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_first; - - - break; - - - case B: - dcdr >> m_second; - - - break; - - default: - break; - } -} - - - - - -SimpleBadUnion::SimpleBadUnion() -{ - m__d = A; - // long m_first - m_first = 0; - // long long m_second - m_second = 0; -} - -SimpleBadUnion::~SimpleBadUnion() -{ -} - -SimpleBadUnion::SimpleBadUnion( - const SimpleBadUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadUnion::SimpleBadUnion( - SimpleBadUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadUnion& SimpleBadUnion::operator =( - const SimpleBadUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleBadUnion& SimpleBadUnion::operator =( - SimpleBadUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleBadUnion::operator ==( - const SimpleBadUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case C: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleBadUnion::operator !=( - const SimpleBadUnion& x) const -{ - return !(*this == x); -} - -void SimpleBadUnion::_d( - int32_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case C: - switch(__d) - { - case C: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleBadUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleBadUnion::_d() -{ - return m__d; -} - -void SimpleBadUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t SimpleBadUnion::first() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleBadUnion::first() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleBadUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = C; - -} - -int64_t SimpleBadUnion::second() const -{ - bool b = false; - - switch(m__d) - { - case C: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleBadUnion::second() -{ - bool b = false; - - switch(m__d) - { - case C: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -// TODO(Ricardo) Review -size_t SimpleBadUnion::getCdrSerializedSize( - const SimpleBadUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case A: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case C: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void SimpleBadUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_first; - - break; - - - case C: - scdr << m_second; - - break; - - default: - break; - } -} - -void SimpleBadUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_first; - - - break; - - - case C: - dcdr >> m_second; - - - break; - - default: - break; - } -} - - - - - -SimpleBadDiscUnion::SimpleBadDiscUnion() -{ - m__d = 0; - // long m_first - m_first = 0; - // long long m_second - m_second = 0; -} - -SimpleBadDiscUnion::~SimpleBadDiscUnion() -{ -} - -SimpleBadDiscUnion::SimpleBadDiscUnion( - const SimpleBadDiscUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadDiscUnion::SimpleBadDiscUnion( - SimpleBadDiscUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadDiscUnion& SimpleBadDiscUnion::operator =( - const SimpleBadDiscUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleBadDiscUnion& SimpleBadDiscUnion::operator =( - SimpleBadDiscUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleBadDiscUnion::operator ==( - const SimpleBadDiscUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case 0: - return (m_first == x.m_first); - break; - - - case 1: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleBadDiscUnion::operator !=( - const SimpleBadDiscUnion& x) const -{ - return !(*this == x); -} - -void SimpleBadDiscUnion::_d( - uint8_t __d) -{ - bool b = false; - - switch(m__d) - { - case 0: - switch(__d) - { - case 0: - b = true; - break; - default: - break; - } - break; - - - case 1: - switch(__d) - { - case 1: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -uint8_t SimpleBadDiscUnion::_d() const -{ - return m__d; -} - -uint8_t& SimpleBadDiscUnion::_d() -{ - return m__d; -} - -void SimpleBadDiscUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = 0; - -} - -int32_t SimpleBadDiscUnion::first() const -{ - bool b = false; - - switch(m__d) - { - case 0: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleBadDiscUnion::first() -{ - bool b = false; - - switch(m__d) - { - case 0: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleBadDiscUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = 1; - -} - -int64_t SimpleBadDiscUnion::second() const -{ - bool b = false; - - switch(m__d) - { - case 1: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleBadDiscUnion::second() -{ - bool b = false; - - switch(m__d) - { - case 1: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -// TODO(Ricardo) Review -size_t SimpleBadDiscUnion::getCdrSerializedSize( - const SimpleBadDiscUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - switch(data.m__d) - { - case 0: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case 1: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void SimpleBadDiscUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case 0: - scdr << m_first; - - break; - - - case 1: - scdr << m_second; - - break; - - default: - break; - } -} - -void SimpleBadDiscUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case 0: - dcdr >> m_first; - - - break; - - - case 1: - dcdr >> m_second; - - - break; - - default: - break; - } -} - - - - - -SimpleUnionStruct::SimpleUnionStruct() -{ - // SimpleUnion m_my_union - - - // Just to register all known types - registerTypesTypes(); -} - -SimpleUnionStruct::~SimpleUnionStruct() -{ -} - -SimpleUnionStruct::SimpleUnionStruct( - const SimpleUnionStruct& x) -{ - m_my_union = x.m_my_union; - -} - -SimpleUnionStruct::SimpleUnionStruct( - SimpleUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -SimpleUnionStruct& SimpleUnionStruct::operator =( - const SimpleUnionStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -SimpleUnionStruct& SimpleUnionStruct::operator =( - SimpleUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool SimpleUnionStruct::operator ==( - const SimpleUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleUnionStruct::operator !=( - const SimpleUnionStruct& x) const -{ - return !(*this == x); -} - -size_t SimpleUnionStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimpleUnionStruct_max_cdr_typesize; -} - -size_t SimpleUnionStruct::getCdrSerializedSize( - const SimpleUnionStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimpleUnionStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void SimpleUnionStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool SimpleUnionStruct::isKeyDefined() -{ - return false; -} - -void SimpleUnionStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleUnionStruct::my_union( - const SimpleUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleUnionStruct::my_union( - SimpleUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleUnion& SimpleUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleUnion& SimpleUnionStruct::my_union() -{ - return m_my_union; -} - - - - - -SimpleUnionStructEqual::SimpleUnionStructEqual() -{ - // SimpleUnion m_my_union_equal - - - // Just to register all known types - registerTypesTypes(); -} - -SimpleUnionStructEqual::~SimpleUnionStructEqual() -{ -} - -SimpleUnionStructEqual::SimpleUnionStructEqual( - const SimpleUnionStructEqual& x) -{ - m_my_union_equal = x.m_my_union_equal; - -} - -SimpleUnionStructEqual::SimpleUnionStructEqual( - SimpleUnionStructEqual&& x) noexcept -{ - m_my_union_equal = std::move(x.m_my_union_equal); - -} - -SimpleUnionStructEqual& SimpleUnionStructEqual::operator =( - const SimpleUnionStructEqual& x) -{ - m_my_union_equal = x.m_my_union_equal; - - return *this; -} - -SimpleUnionStructEqual& SimpleUnionStructEqual::operator =( - SimpleUnionStructEqual&& x) noexcept -{ - m_my_union_equal = std::move(x.m_my_union_equal); - - return *this; -} - -bool SimpleUnionStructEqual::operator ==( - const SimpleUnionStructEqual& x) const -{ - return (m_my_union_equal == x.m_my_union_equal); -} - -bool SimpleUnionStructEqual::operator !=( - const SimpleUnionStructEqual& x) const -{ - return !(*this == x); -} - -size_t SimpleUnionStructEqual::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimpleUnionStructEqual_max_cdr_typesize; -} - -size_t SimpleUnionStructEqual::getCdrSerializedSize( - const SimpleUnionStructEqual& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleUnion::getCdrSerializedSize(data.my_union_equal(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimpleUnionStructEqual::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union_equal; - -} - -void SimpleUnionStructEqual::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union_equal; - - -} - - -bool SimpleUnionStructEqual::isKeyDefined() -{ - return false; -} - -void SimpleUnionStructEqual::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union_equal - * @param _my_union_equal New value to be copied in member my_union_equal - */ -void SimpleUnionStructEqual::my_union_equal( - const SimpleUnion& _my_union_equal) -{ - m_my_union_equal = _my_union_equal; -} - -/*! - * @brief This function moves the value in member my_union_equal - * @param _my_union_equal New value to be moved in member my_union_equal - */ -void SimpleUnionStructEqual::my_union_equal( - SimpleUnion&& _my_union_equal) -{ - m_my_union_equal = std::move(_my_union_equal); -} - -/*! - * @brief This function returns a constant reference to member my_union_equal - * @return Constant reference to member my_union_equal - */ -const SimpleUnion& SimpleUnionStructEqual::my_union_equal() const -{ - return m_my_union_equal; -} - -/*! - * @brief This function returns a reference to member my_union_equal - * @return Reference to member my_union_equal - */ -SimpleUnion& SimpleUnionStructEqual::my_union_equal() -{ - return m_my_union_equal; -} - - - - - -SimpleUnionNamesStruct::SimpleUnionNamesStruct() -{ - // SimpleUnionNames m_my_union - - - // Just to register all known types - registerTypesTypes(); -} - -SimpleUnionNamesStruct::~SimpleUnionNamesStruct() -{ -} - -SimpleUnionNamesStruct::SimpleUnionNamesStruct( - const SimpleUnionNamesStruct& x) -{ - m_my_union = x.m_my_union; - -} - -SimpleUnionNamesStruct::SimpleUnionNamesStruct( - SimpleUnionNamesStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -SimpleUnionNamesStruct& SimpleUnionNamesStruct::operator =( - const SimpleUnionNamesStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -SimpleUnionNamesStruct& SimpleUnionNamesStruct::operator =( - SimpleUnionNamesStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool SimpleUnionNamesStruct::operator ==( - const SimpleUnionNamesStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleUnionNamesStruct::operator !=( - const SimpleUnionNamesStruct& x) const -{ - return !(*this == x); -} - -size_t SimpleUnionNamesStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimpleUnionNamesStruct_max_cdr_typesize; -} - -size_t SimpleUnionNamesStruct::getCdrSerializedSize( - const SimpleUnionNamesStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleUnionNames::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimpleUnionNamesStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void SimpleUnionNamesStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool SimpleUnionNamesStruct::isKeyDefined() -{ - return false; -} - -void SimpleUnionNamesStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleUnionNamesStruct::my_union( - const SimpleUnionNames& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleUnionNamesStruct::my_union( - SimpleUnionNames&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleUnionNames& SimpleUnionNamesStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleUnionNames& SimpleUnionNamesStruct::my_union() -{ - return m_my_union; -} - - - - - -SimpleTypeUnionStruct::SimpleTypeUnionStruct() -{ - // SimpleTypeUnion m_my_union - - - // Just to register all known types - registerTypesTypes(); -} - -SimpleTypeUnionStruct::~SimpleTypeUnionStruct() -{ -} - -SimpleTypeUnionStruct::SimpleTypeUnionStruct( - const SimpleTypeUnionStruct& x) -{ - m_my_union = x.m_my_union; - -} - -SimpleTypeUnionStruct::SimpleTypeUnionStruct( - SimpleTypeUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -SimpleTypeUnionStruct& SimpleTypeUnionStruct::operator =( - const SimpleTypeUnionStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -SimpleTypeUnionStruct& SimpleTypeUnionStruct::operator =( - SimpleTypeUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool SimpleTypeUnionStruct::operator ==( - const SimpleTypeUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleTypeUnionStruct::operator !=( - const SimpleTypeUnionStruct& x) const -{ - return !(*this == x); -} - -size_t SimpleTypeUnionStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimpleTypeUnionStruct_max_cdr_typesize; -} - -size_t SimpleTypeUnionStruct::getCdrSerializedSize( - const SimpleTypeUnionStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleTypeUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimpleTypeUnionStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void SimpleTypeUnionStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool SimpleTypeUnionStruct::isKeyDefined() -{ - return false; -} - -void SimpleTypeUnionStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleTypeUnionStruct::my_union( - const SimpleTypeUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleTypeUnionStruct::my_union( - SimpleTypeUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleTypeUnion& SimpleTypeUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleTypeUnion& SimpleTypeUnionStruct::my_union() -{ - return m_my_union; -} - - - - - -SimpleBadUnionStruct::SimpleBadUnionStruct() -{ - // SimpleBadUnion m_my_union - - - // Just to register all known types - registerTypesTypes(); -} - -SimpleBadUnionStruct::~SimpleBadUnionStruct() -{ -} - -SimpleBadUnionStruct::SimpleBadUnionStruct( - const SimpleBadUnionStruct& x) -{ - m_my_union = x.m_my_union; - -} - -SimpleBadUnionStruct::SimpleBadUnionStruct( - SimpleBadUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -SimpleBadUnionStruct& SimpleBadUnionStruct::operator =( - const SimpleBadUnionStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -SimpleBadUnionStruct& SimpleBadUnionStruct::operator =( - SimpleBadUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool SimpleBadUnionStruct::operator ==( - const SimpleBadUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleBadUnionStruct::operator !=( - const SimpleBadUnionStruct& x) const -{ - return !(*this == x); -} - -size_t SimpleBadUnionStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimpleBadUnionStruct_max_cdr_typesize; -} - -size_t SimpleBadUnionStruct::getCdrSerializedSize( - const SimpleBadUnionStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleBadUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimpleBadUnionStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void SimpleBadUnionStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool SimpleBadUnionStruct::isKeyDefined() -{ - return false; -} - -void SimpleBadUnionStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleBadUnionStruct::my_union( - const SimpleBadUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleBadUnionStruct::my_union( - SimpleBadUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleBadUnion& SimpleBadUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleBadUnion& SimpleBadUnionStruct::my_union() -{ - return m_my_union; -} - - - - - -SimplBadDiscUnionStruct::SimplBadDiscUnionStruct() -{ - // SimpleBadDiscUnion m_my_union - - - // Just to register all known types - registerTypesTypes(); -} - -SimplBadDiscUnionStruct::~SimplBadDiscUnionStruct() -{ -} - -SimplBadDiscUnionStruct::SimplBadDiscUnionStruct( - const SimplBadDiscUnionStruct& x) -{ - m_my_union = x.m_my_union; - -} - -SimplBadDiscUnionStruct::SimplBadDiscUnionStruct( - SimplBadDiscUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -SimplBadDiscUnionStruct& SimplBadDiscUnionStruct::operator =( - const SimplBadDiscUnionStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -SimplBadDiscUnionStruct& SimplBadDiscUnionStruct::operator =( - SimplBadDiscUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool SimplBadDiscUnionStruct::operator ==( - const SimplBadDiscUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimplBadDiscUnionStruct::operator !=( - const SimplBadDiscUnionStruct& x) const -{ - return !(*this == x); -} - -size_t SimplBadDiscUnionStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimplBadDiscUnionStruct_max_cdr_typesize; -} - -size_t SimplBadDiscUnionStruct::getCdrSerializedSize( - const SimplBadDiscUnionStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleBadDiscUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimplBadDiscUnionStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void SimplBadDiscUnionStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool SimplBadDiscUnionStruct::isKeyDefined() -{ - return false; -} - -void SimplBadDiscUnionStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimplBadDiscUnionStruct::my_union( - const SimpleBadDiscUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimplBadDiscUnionStruct::my_union( - SimpleBadDiscUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleBadDiscUnion& SimplBadDiscUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleBadDiscUnion& SimplBadDiscUnionStruct::my_union() -{ - return m_my_union; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/unittest/xtypes/idl/Typesv1.h b/test/unittest/xtypes/idl/Typesv1.h deleted file mode 100644 index 9cf664ae223..00000000000 --- a/test/unittest/xtypes/idl/Typesv1.h +++ /dev/null @@ -1,6495 +0,0 @@ -// 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 Types.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_TYPES_H_ -#define _FAST_DDS_GENERATED_TYPES_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(TYPES_SOURCE) -#define TYPES_DllAPI __declspec( dllexport ) -#else -#define TYPES_DllAPI __declspec( dllimport ) -#endif // TYPES_SOURCE -#else -#define TYPES_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define TYPES_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - -/*! - * @brief This class represents the enumeration MyEnum defined by the user in the IDL file. - * @ingroup Types - */ -enum MyEnum : uint32_t -{ - A, - B, - C -}; -/*! - * @brief This class represents the enumeration MyBadEnum defined by the user in the IDL file. - * @ingroup Types - */ -enum MyBadEnum : uint32_t -{ - A1, - B1, - C1 -}; - - -/*! - * @brief This class represents the structure MyEnumStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MyEnumStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyEnumStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyEnumStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MyEnumStruct that will be copied. - */ - eProsima_user_DllExport MyEnumStruct( - const MyEnumStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MyEnumStruct that will be copied. - */ - eProsima_user_DllExport MyEnumStruct( - MyEnumStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MyEnumStruct that will be copied. - */ - eProsima_user_DllExport MyEnumStruct& operator =( - const MyEnumStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MyEnumStruct that will be copied. - */ - eProsima_user_DllExport MyEnumStruct& operator =( - MyEnumStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MyEnumStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyEnumStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MyEnumStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyEnumStruct& x) const; - - /*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ - eProsima_user_DllExport void my_enum( - MyEnum _my_enum); - - /*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ - eProsima_user_DllExport MyEnum my_enum() const; - - /*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ - eProsima_user_DllExport MyEnum& my_enum(); - - - /*! - * @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 MyEnumStruct& 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 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: - - MyEnum m_my_enum; - -}; - - - -/*! - * @brief This class represents the structure MyBadEnumStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MyBadEnumStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyBadEnumStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyBadEnumStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MyBadEnumStruct that will be copied. - */ - eProsima_user_DllExport MyBadEnumStruct( - const MyBadEnumStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MyBadEnumStruct that will be copied. - */ - eProsima_user_DllExport MyBadEnumStruct( - MyBadEnumStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MyBadEnumStruct that will be copied. - */ - eProsima_user_DllExport MyBadEnumStruct& operator =( - const MyBadEnumStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MyBadEnumStruct that will be copied. - */ - eProsima_user_DllExport MyBadEnumStruct& operator =( - MyBadEnumStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MyBadEnumStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyBadEnumStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MyBadEnumStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyBadEnumStruct& x) const; - - /*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ - eProsima_user_DllExport void my_enum( - MyBadEnum _my_enum); - - /*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ - eProsima_user_DllExport MyBadEnum my_enum() const; - - /*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ - eProsima_user_DllExport MyBadEnum& my_enum(); - - - /*! - * @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 MyBadEnumStruct& 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 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: - - MyBadEnum m_my_enum; - -}; - -typedef MyEnum MyAliasEnum; - - - -/*! - * @brief This class represents the structure MyAliasEnumStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MyAliasEnumStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyAliasEnumStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyAliasEnumStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MyAliasEnumStruct that will be copied. - */ - eProsima_user_DllExport MyAliasEnumStruct( - const MyAliasEnumStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MyAliasEnumStruct that will be copied. - */ - eProsima_user_DllExport MyAliasEnumStruct( - MyAliasEnumStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MyAliasEnumStruct that will be copied. - */ - eProsima_user_DllExport MyAliasEnumStruct& operator =( - const MyAliasEnumStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MyAliasEnumStruct that will be copied. - */ - eProsima_user_DllExport MyAliasEnumStruct& operator =( - MyAliasEnumStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MyAliasEnumStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyAliasEnumStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MyAliasEnumStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyAliasEnumStruct& x) const; - - /*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ - eProsima_user_DllExport void my_enum( - MyAliasEnum _my_enum); - - /*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ - eProsima_user_DllExport MyAliasEnum my_enum() const; - - /*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ - eProsima_user_DllExport MyAliasEnum& my_enum(); - - - /*! - * @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 MyAliasEnumStruct& 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 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: - - MyAliasEnum m_my_enum; - -}; - - - -/*! - * @brief This class represents the structure BasicStruct defined by the user in the IDL file. - * @ingroup Types - */ -class BasicStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BasicStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BasicStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BasicStruct that will be copied. - */ - eProsima_user_DllExport BasicStruct( - const BasicStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BasicStruct that will be copied. - */ - eProsima_user_DllExport BasicStruct( - BasicStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BasicStruct that will be copied. - */ - eProsima_user_DllExport BasicStruct& operator =( - const BasicStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BasicStruct that will be copied. - */ - eProsima_user_DllExport BasicStruct& operator =( - BasicStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BasicStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BasicStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BasicStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BasicStruct& x) const; - - /*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ - eProsima_user_DllExport void my_bool( - bool _my_bool); - - /*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ - eProsima_user_DllExport bool my_bool() const; - - /*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ - eProsima_user_DllExport bool& my_bool(); - - - /*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ - eProsima_user_DllExport void my_int32( - int32_t _my_int32); - - /*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ - eProsima_user_DllExport int32_t my_int32() const; - - /*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ - eProsima_user_DllExport int32_t& my_int32(); - - - /*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ - eProsima_user_DllExport void my_string( - const std::string& _my_string); - - /*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ - eProsima_user_DllExport void my_string( - std::string&& _my_string); - - /*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ - eProsima_user_DllExport const std::string& my_string() const; - - /*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ - eProsima_user_DllExport std::string& my_string(); - - - /*! - * @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 BasicStruct& 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 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: - - bool m_my_bool; - int32_t m_my_int32; - std::string m_my_string; - -}; - - - -/*! - * @brief This class represents the structure BasicNamesStruct defined by the user in the IDL file. - * @ingroup Types - */ -class BasicNamesStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BasicNamesStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BasicNamesStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BasicNamesStruct that will be copied. - */ - eProsima_user_DllExport BasicNamesStruct( - const BasicNamesStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BasicNamesStruct that will be copied. - */ - eProsima_user_DllExport BasicNamesStruct( - BasicNamesStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BasicNamesStruct that will be copied. - */ - eProsima_user_DllExport BasicNamesStruct& operator =( - const BasicNamesStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BasicNamesStruct that will be copied. - */ - eProsima_user_DllExport BasicNamesStruct& operator =( - BasicNamesStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BasicNamesStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BasicNamesStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BasicNamesStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BasicNamesStruct& x) const; - - /*! - * @brief This function sets a value in member my_bool_name - * @param _my_bool_name New value for member my_bool_name - */ - eProsima_user_DllExport void my_bool_name( - bool _my_bool_name); - - /*! - * @brief This function returns the value of member my_bool_name - * @return Value of member my_bool_name - */ - eProsima_user_DllExport bool my_bool_name() const; - - /*! - * @brief This function returns a reference to member my_bool_name - * @return Reference to member my_bool_name - */ - eProsima_user_DllExport bool& my_bool_name(); - - - /*! - * @brief This function sets a value in member my_int32_name - * @param _my_int32_name New value for member my_int32_name - */ - eProsima_user_DllExport void my_int32_name( - int32_t _my_int32_name); - - /*! - * @brief This function returns the value of member my_int32_name - * @return Value of member my_int32_name - */ - eProsima_user_DllExport int32_t my_int32_name() const; - - /*! - * @brief This function returns a reference to member my_int32_name - * @return Reference to member my_int32_name - */ - eProsima_user_DllExport int32_t& my_int32_name(); - - - /*! - * @brief This function copies the value in member my_string_name - * @param _my_string_name New value to be copied in member my_string_name - */ - eProsima_user_DllExport void my_string_name( - const std::string& _my_string_name); - - /*! - * @brief This function moves the value in member my_string_name - * @param _my_string_name New value to be moved in member my_string_name - */ - eProsima_user_DllExport void my_string_name( - std::string&& _my_string_name); - - /*! - * @brief This function returns a constant reference to member my_string_name - * @return Constant reference to member my_string_name - */ - eProsima_user_DllExport const std::string& my_string_name() const; - - /*! - * @brief This function returns a reference to member my_string_name - * @return Reference to member my_string_name - */ - eProsima_user_DllExport std::string& my_string_name(); - - - /*! - * @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 BasicNamesStruct& 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 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: - - bool m_my_bool_name; - int32_t m_my_int32_name; - std::string m_my_string_name; - -}; - - - -/*! - * @brief This class represents the structure BasicBadStruct defined by the user in the IDL file. - * @ingroup Types - */ -class BasicBadStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BasicBadStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BasicBadStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BasicBadStruct that will be copied. - */ - eProsima_user_DllExport BasicBadStruct( - const BasicBadStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BasicBadStruct that will be copied. - */ - eProsima_user_DllExport BasicBadStruct( - BasicBadStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BasicBadStruct that will be copied. - */ - eProsima_user_DllExport BasicBadStruct& operator =( - const BasicBadStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BasicBadStruct that will be copied. - */ - eProsima_user_DllExport BasicBadStruct& operator =( - BasicBadStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BasicBadStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BasicBadStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BasicBadStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BasicBadStruct& x) const; - - /*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ - eProsima_user_DllExport void my_bool( - uint8_t _my_bool); - - /*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ - eProsima_user_DllExport uint8_t my_bool() const; - - /*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ - eProsima_user_DllExport uint8_t& my_bool(); - - - /*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ - eProsima_user_DllExport void my_int32( - int32_t _my_int32); - - /*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ - eProsima_user_DllExport int32_t my_int32() const; - - /*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ - eProsima_user_DllExport int32_t& my_int32(); - - - /*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ - eProsima_user_DllExport void my_string( - const std::string& _my_string); - - /*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ - eProsima_user_DllExport void my_string( - std::string&& _my_string); - - /*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ - eProsima_user_DllExport const std::string& my_string() const; - - /*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ - eProsima_user_DllExport std::string& my_string(); - - - /*! - * @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 BasicBadStruct& 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 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: - - uint8_t m_my_bool; - int32_t m_my_int32; - std::string m_my_string; - -}; - - - -/*! - * @brief This class represents the structure BasicWideStruct defined by the user in the IDL file. - * @ingroup Types - */ -class BasicWideStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BasicWideStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BasicWideStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BasicWideStruct that will be copied. - */ - eProsima_user_DllExport BasicWideStruct( - const BasicWideStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BasicWideStruct that will be copied. - */ - eProsima_user_DllExport BasicWideStruct( - BasicWideStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BasicWideStruct that will be copied. - */ - eProsima_user_DllExport BasicWideStruct& operator =( - const BasicWideStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BasicWideStruct that will be copied. - */ - eProsima_user_DllExport BasicWideStruct& operator =( - BasicWideStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BasicWideStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BasicWideStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BasicWideStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BasicWideStruct& x) const; - - /*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ - eProsima_user_DllExport void my_bool( - bool _my_bool); - - /*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ - eProsima_user_DllExport bool my_bool() const; - - /*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ - eProsima_user_DllExport bool& my_bool(); - - - /*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ - eProsima_user_DllExport void my_int32( - int32_t _my_int32); - - /*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ - eProsima_user_DllExport int32_t my_int32() const; - - /*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ - eProsima_user_DllExport int32_t& my_int32(); - - - /*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ - eProsima_user_DllExport void my_string( - const std::string& _my_string); - - /*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ - eProsima_user_DllExport void my_string( - std::string&& _my_string); - - /*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ - eProsima_user_DllExport const std::string& my_string() const; - - /*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ - eProsima_user_DllExport std::string& my_string(); - - - /*! - * @brief This function sets a value in member new_int32 - * @param _new_int32 New value for member new_int32 - */ - eProsima_user_DllExport void new_int32( - int32_t _new_int32); - - /*! - * @brief This function returns the value of member new_int32 - * @return Value of member new_int32 - */ - eProsima_user_DllExport int32_t new_int32() const; - - /*! - * @brief This function returns a reference to member new_int32 - * @return Reference to member new_int32 - */ - eProsima_user_DllExport int32_t& new_int32(); - - - /*! - * @brief This function copies the value in member new_string - * @param _new_string New value to be copied in member new_string - */ - eProsima_user_DllExport void new_string( - const std::string& _new_string); - - /*! - * @brief This function moves the value in member new_string - * @param _new_string New value to be moved in member new_string - */ - eProsima_user_DllExport void new_string( - std::string&& _new_string); - - /*! - * @brief This function returns a constant reference to member new_string - * @return Constant reference to member new_string - */ - eProsima_user_DllExport const std::string& new_string() const; - - /*! - * @brief This function returns a reference to member new_string - * @return Reference to member new_string - */ - eProsima_user_DllExport std::string& new_string(); - - - /*! - * @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 BasicWideStruct& 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 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: - - bool m_my_bool; - int32_t m_my_int32; - std::string m_my_string; - int32_t m_new_int32; - std::string m_new_string; - -}; - - - -/*! - * @brief This class represents the structure BadBasicWideStruct defined by the user in the IDL file. - * @ingroup Types - */ -class BadBasicWideStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BadBasicWideStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BadBasicWideStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BadBasicWideStruct that will be copied. - */ - eProsima_user_DllExport BadBasicWideStruct( - const BadBasicWideStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BadBasicWideStruct that will be copied. - */ - eProsima_user_DllExport BadBasicWideStruct( - BadBasicWideStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BadBasicWideStruct that will be copied. - */ - eProsima_user_DllExport BadBasicWideStruct& operator =( - const BadBasicWideStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BadBasicWideStruct that will be copied. - */ - eProsima_user_DllExport BadBasicWideStruct& operator =( - BadBasicWideStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BadBasicWideStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BadBasicWideStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BadBasicWideStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BadBasicWideStruct& x) const; - - /*! - * @brief This function sets a value in member new_int32 - * @param _new_int32 New value for member new_int32 - */ - eProsima_user_DllExport void new_int32( - int32_t _new_int32); - - /*! - * @brief This function returns the value of member new_int32 - * @return Value of member new_int32 - */ - eProsima_user_DllExport int32_t new_int32() const; - - /*! - * @brief This function returns a reference to member new_int32 - * @return Reference to member new_int32 - */ - eProsima_user_DllExport int32_t& new_int32(); - - - /*! - * @brief This function copies the value in member new_string - * @param _new_string New value to be copied in member new_string - */ - eProsima_user_DllExport void new_string( - const std::string& _new_string); - - /*! - * @brief This function moves the value in member new_string - * @param _new_string New value to be moved in member new_string - */ - eProsima_user_DllExport void new_string( - std::string&& _new_string); - - /*! - * @brief This function returns a constant reference to member new_string - * @return Constant reference to member new_string - */ - eProsima_user_DllExport const std::string& new_string() const; - - /*! - * @brief This function returns a reference to member new_string - * @return Reference to member new_string - */ - eProsima_user_DllExport std::string& new_string(); - - - /*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ - eProsima_user_DllExport void my_bool( - bool _my_bool); - - /*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ - eProsima_user_DllExport bool my_bool() const; - - /*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ - eProsima_user_DllExport bool& my_bool(); - - - /*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ - eProsima_user_DllExport void my_int32( - int32_t _my_int32); - - /*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ - eProsima_user_DllExport int32_t my_int32() const; - - /*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ - eProsima_user_DllExport int32_t& my_int32(); - - - /*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ - eProsima_user_DllExport void my_string( - const std::string& _my_string); - - /*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ - eProsima_user_DllExport void my_string( - std::string&& _my_string); - - /*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ - eProsima_user_DllExport const std::string& my_string() const; - - /*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ - eProsima_user_DllExport std::string& my_string(); - - - /*! - * @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 BadBasicWideStruct& 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 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_new_int32; - std::string m_new_string; - bool m_my_bool; - int32_t m_my_int32; - std::string m_my_string; - -}; - - - -/*! - * @brief This class represents the structure StringStruct defined by the user in the IDL file. - * @ingroup Types - */ -class StringStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport StringStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~StringStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object StringStruct that will be copied. - */ - eProsima_user_DllExport StringStruct( - const StringStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object StringStruct that will be copied. - */ - eProsima_user_DllExport StringStruct( - StringStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object StringStruct that will be copied. - */ - eProsima_user_DllExport StringStruct& operator =( - const StringStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object StringStruct that will be copied. - */ - eProsima_user_DllExport StringStruct& operator =( - StringStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x StringStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const StringStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x StringStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const StringStruct& x) const; - - /*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ - eProsima_user_DllExport void my_string( - const std::string& _my_string); - - /*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ - eProsima_user_DllExport void my_string( - std::string&& _my_string); - - /*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ - eProsima_user_DllExport const std::string& my_string() const; - - /*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ - eProsima_user_DllExport std::string& my_string(); - - - /*! - * @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 StringStruct& 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 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: - - std::string m_my_string; - -}; - - - -/*! - * @brief This class represents the structure LargeStringStruct defined by the user in the IDL file. - * @ingroup Types - */ -class LargeStringStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport LargeStringStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~LargeStringStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object LargeStringStruct that will be copied. - */ - eProsima_user_DllExport LargeStringStruct( - const LargeStringStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object LargeStringStruct that will be copied. - */ - eProsima_user_DllExport LargeStringStruct( - LargeStringStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object LargeStringStruct that will be copied. - */ - eProsima_user_DllExport LargeStringStruct& operator =( - const LargeStringStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object LargeStringStruct that will be copied. - */ - eProsima_user_DllExport LargeStringStruct& operator =( - LargeStringStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x LargeStringStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const LargeStringStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x LargeStringStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const LargeStringStruct& x) const; - - /*! - * @brief This function copies the value in member my_large_string - * @param _my_large_string New value to be copied in member my_large_string - */ - eProsima_user_DllExport void my_large_string( - const eprosima::fastrtps::fixed_string<41925>& _my_large_string); - - /*! - * @brief This function moves the value in member my_large_string - * @param _my_large_string New value to be moved in member my_large_string - */ - eProsima_user_DllExport void my_large_string( - eprosima::fastrtps::fixed_string<41925>&& _my_large_string); - - /*! - * @brief This function returns a constant reference to member my_large_string - * @return Constant reference to member my_large_string - */ - eProsima_user_DllExport const eprosima::fastrtps::fixed_string<41925>& my_large_string() const; - - /*! - * @brief This function returns a reference to member my_large_string - * @return Reference to member my_large_string - */ - eProsima_user_DllExport eprosima::fastrtps::fixed_string<41925>& my_large_string(); - - - /*! - * @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 LargeStringStruct& 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 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: - - eprosima::fastrtps::fixed_string<41925> m_my_large_string; - -}; - - - -/*! - * @brief This class represents the structure WStringStruct defined by the user in the IDL file. - * @ingroup Types - */ -class WStringStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport WStringStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~WStringStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object WStringStruct that will be copied. - */ - eProsima_user_DllExport WStringStruct( - const WStringStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object WStringStruct that will be copied. - */ - eProsima_user_DllExport WStringStruct( - WStringStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object WStringStruct that will be copied. - */ - eProsima_user_DllExport WStringStruct& operator =( - const WStringStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object WStringStruct that will be copied. - */ - eProsima_user_DllExport WStringStruct& operator =( - WStringStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x WStringStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const WStringStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x WStringStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const WStringStruct& x) const; - - /*! - * @brief This function copies the value in member my_wstring - * @param _my_wstring New value to be copied in member my_wstring - */ - eProsima_user_DllExport void my_wstring( - const std::wstring& _my_wstring); - - /*! - * @brief This function moves the value in member my_wstring - * @param _my_wstring New value to be moved in member my_wstring - */ - eProsima_user_DllExport void my_wstring( - std::wstring&& _my_wstring); - - /*! - * @brief This function returns a constant reference to member my_wstring - * @return Constant reference to member my_wstring - */ - eProsima_user_DllExport const std::wstring& my_wstring() const; - - /*! - * @brief This function returns a reference to member my_wstring - * @return Reference to member my_wstring - */ - eProsima_user_DllExport std::wstring& my_wstring(); - - - /*! - * @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 WStringStruct& 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 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: - - std::wstring m_my_wstring; - -}; - - - -/*! - * @brief This class represents the structure LargeWStringStruct defined by the user in the IDL file. - * @ingroup Types - */ -class LargeWStringStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport LargeWStringStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~LargeWStringStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object LargeWStringStruct that will be copied. - */ - eProsima_user_DllExport LargeWStringStruct( - const LargeWStringStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object LargeWStringStruct that will be copied. - */ - eProsima_user_DllExport LargeWStringStruct( - LargeWStringStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object LargeWStringStruct that will be copied. - */ - eProsima_user_DllExport LargeWStringStruct& operator =( - const LargeWStringStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object LargeWStringStruct that will be copied. - */ - eProsima_user_DllExport LargeWStringStruct& operator =( - LargeWStringStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x LargeWStringStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const LargeWStringStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x LargeWStringStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const LargeWStringStruct& x) const; - - /*! - * @brief This function copies the value in member my_large_wstring - * @param _my_large_wstring New value to be copied in member my_large_wstring - */ - eProsima_user_DllExport void my_large_wstring( - const std::wstring& _my_large_wstring); - - /*! - * @brief This function moves the value in member my_large_wstring - * @param _my_large_wstring New value to be moved in member my_large_wstring - */ - eProsima_user_DllExport void my_large_wstring( - std::wstring&& _my_large_wstring); - - /*! - * @brief This function returns a constant reference to member my_large_wstring - * @return Constant reference to member my_large_wstring - */ - eProsima_user_DllExport const std::wstring& my_large_wstring() const; - - /*! - * @brief This function returns a reference to member my_large_wstring - * @return Reference to member my_large_wstring - */ - eProsima_user_DllExport std::wstring& my_large_wstring(); - - - /*! - * @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 LargeWStringStruct& 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 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: - - std::wstring m_my_large_wstring; - -}; - - - -/*! - * @brief This class represents the structure ArrayStruct defined by the user in the IDL file. - * @ingroup Types - */ -class ArrayStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ArrayStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ArrayStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ArrayStruct that will be copied. - */ - eProsima_user_DllExport ArrayStruct( - const ArrayStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ArrayStruct that will be copied. - */ - eProsima_user_DllExport ArrayStruct( - ArrayStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ArrayStruct that will be copied. - */ - eProsima_user_DllExport ArrayStruct& operator =( - const ArrayStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ArrayStruct that will be copied. - */ - eProsima_user_DllExport ArrayStruct& operator =( - ArrayStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ArrayStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ArrayStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ArrayStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ArrayStruct& x) const; - - /*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ - eProsima_user_DllExport void my_array( - const std::array& _my_array); - - /*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ - eProsima_user_DllExport void my_array( - std::array&& _my_array); - - /*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ - eProsima_user_DllExport const std::array& my_array() const; - - /*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ - eProsima_user_DllExport std::array& my_array(); - - - /*! - * @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 ArrayStruct& 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 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: - - std::array m_my_array; - -}; - - - -/*! - * @brief This class represents the structure ArrayStructEqual defined by the user in the IDL file. - * @ingroup Types - */ -class ArrayStructEqual -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ArrayStructEqual(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ArrayStructEqual(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ArrayStructEqual that will be copied. - */ - eProsima_user_DllExport ArrayStructEqual( - const ArrayStructEqual& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ArrayStructEqual that will be copied. - */ - eProsima_user_DllExport ArrayStructEqual( - ArrayStructEqual&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ArrayStructEqual that will be copied. - */ - eProsima_user_DllExport ArrayStructEqual& operator =( - const ArrayStructEqual& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ArrayStructEqual that will be copied. - */ - eProsima_user_DllExport ArrayStructEqual& operator =( - ArrayStructEqual&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ArrayStructEqual object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ArrayStructEqual& x) const; - - /*! - * @brief Comparison operator. - * @param x ArrayStructEqual object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ArrayStructEqual& x) const; - - /*! - * @brief This function copies the value in member my_array_equal - * @param _my_array_equal New value to be copied in member my_array_equal - */ - eProsima_user_DllExport void my_array_equal( - const std::array& _my_array_equal); - - /*! - * @brief This function moves the value in member my_array_equal - * @param _my_array_equal New value to be moved in member my_array_equal - */ - eProsima_user_DllExport void my_array_equal( - std::array&& _my_array_equal); - - /*! - * @brief This function returns a constant reference to member my_array_equal - * @return Constant reference to member my_array_equal - */ - eProsima_user_DllExport const std::array& my_array_equal() const; - - /*! - * @brief This function returns a reference to member my_array_equal - * @return Reference to member my_array_equal - */ - eProsima_user_DllExport std::array& my_array_equal(); - - - /*! - * @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 ArrayStructEqual& 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 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: - - std::array m_my_array_equal; - -}; - - - -/*! - * @brief This class represents the structure ArrayBadStruct defined by the user in the IDL file. - * @ingroup Types - */ -class ArrayBadStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ArrayBadStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ArrayBadStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ArrayBadStruct that will be copied. - */ - eProsima_user_DllExport ArrayBadStruct( - const ArrayBadStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ArrayBadStruct that will be copied. - */ - eProsima_user_DllExport ArrayBadStruct( - ArrayBadStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ArrayBadStruct that will be copied. - */ - eProsima_user_DllExport ArrayBadStruct& operator =( - const ArrayBadStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ArrayBadStruct that will be copied. - */ - eProsima_user_DllExport ArrayBadStruct& operator =( - ArrayBadStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ArrayBadStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ArrayBadStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ArrayBadStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ArrayBadStruct& x) const; - - /*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ - eProsima_user_DllExport void my_array( - const std::array& _my_array); - - /*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ - eProsima_user_DllExport void my_array( - std::array&& _my_array); - - /*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ - eProsima_user_DllExport const std::array& my_array() const; - - /*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ - eProsima_user_DllExport std::array& my_array(); - - - /*! - * @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 ArrayBadStruct& 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 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: - - std::array m_my_array; - -}; - - - -/*! - * @brief This class represents the structure ArrayDimensionsStruct defined by the user in the IDL file. - * @ingroup Types - */ -class ArrayDimensionsStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ArrayDimensionsStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ArrayDimensionsStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ArrayDimensionsStruct that will be copied. - */ - eProsima_user_DllExport ArrayDimensionsStruct( - const ArrayDimensionsStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ArrayDimensionsStruct that will be copied. - */ - eProsima_user_DllExport ArrayDimensionsStruct( - ArrayDimensionsStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ArrayDimensionsStruct that will be copied. - */ - eProsima_user_DllExport ArrayDimensionsStruct& operator =( - const ArrayDimensionsStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ArrayDimensionsStruct that will be copied. - */ - eProsima_user_DllExport ArrayDimensionsStruct& operator =( - ArrayDimensionsStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ArrayDimensionsStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ArrayDimensionsStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ArrayDimensionsStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ArrayDimensionsStruct& x) const; - - /*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ - eProsima_user_DllExport void my_array( - const std::array, 2>& _my_array); - - /*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ - eProsima_user_DllExport void my_array( - std::array, 2>&& _my_array); - - /*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ - eProsima_user_DllExport const std::array, 2>& my_array() const; - - /*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ - eProsima_user_DllExport std::array, 2>& my_array(); - - - /*! - * @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 ArrayDimensionsStruct& 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 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: - - std::array, 2> m_my_array; - -}; - - - -/*! - * @brief This class represents the structure ArraySizeStruct defined by the user in the IDL file. - * @ingroup Types - */ -class ArraySizeStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ArraySizeStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ArraySizeStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ArraySizeStruct that will be copied. - */ - eProsima_user_DllExport ArraySizeStruct( - const ArraySizeStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ArraySizeStruct that will be copied. - */ - eProsima_user_DllExport ArraySizeStruct( - ArraySizeStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ArraySizeStruct that will be copied. - */ - eProsima_user_DllExport ArraySizeStruct& operator =( - const ArraySizeStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ArraySizeStruct that will be copied. - */ - eProsima_user_DllExport ArraySizeStruct& operator =( - ArraySizeStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ArraySizeStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ArraySizeStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ArraySizeStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ArraySizeStruct& x) const; - - /*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ - eProsima_user_DllExport void my_array( - const std::array& _my_array); - - /*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ - eProsima_user_DllExport void my_array( - std::array&& _my_array); - - /*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ - eProsima_user_DllExport const std::array& my_array() const; - - /*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ - eProsima_user_DllExport std::array& my_array(); - - - /*! - * @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 ArraySizeStruct& 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 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: - - std::array m_my_array; - -}; - - - - - -/*! - * @brief This class represents the structure SequenceStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SequenceStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceStruct( - const SequenceStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceStruct( - SequenceStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceStruct& operator =( - const SequenceStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceStruct& operator =( - SequenceStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceStruct& x) const; - - /*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); - - /*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); - - /*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ - eProsima_user_DllExport const std::vector& my_sequence() const; - - /*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ - eProsima_user_DllExport std::vector& my_sequence(); - - - /*! - * @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 SequenceStruct& 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 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: - - std::vector m_my_sequence; - -}; - - - - - -/*! - * @brief This class represents the structure SequenceStructEqual defined by the user in the IDL file. - * @ingroup Types - */ -class SequenceStructEqual -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceStructEqual(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceStructEqual(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceStructEqual that will be copied. - */ - eProsima_user_DllExport SequenceStructEqual( - const SequenceStructEqual& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceStructEqual that will be copied. - */ - eProsima_user_DllExport SequenceStructEqual( - SequenceStructEqual&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceStructEqual that will be copied. - */ - eProsima_user_DllExport SequenceStructEqual& operator =( - const SequenceStructEqual& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceStructEqual that will be copied. - */ - eProsima_user_DllExport SequenceStructEqual& operator =( - SequenceStructEqual&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceStructEqual object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceStructEqual& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceStructEqual object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceStructEqual& x) const; - - /*! - * @brief This function copies the value in member my_sequence_equal - * @param _my_sequence_equal New value to be copied in member my_sequence_equal - */ - eProsima_user_DllExport void my_sequence_equal( - const std::vector& _my_sequence_equal); - - /*! - * @brief This function moves the value in member my_sequence_equal - * @param _my_sequence_equal New value to be moved in member my_sequence_equal - */ - eProsima_user_DllExport void my_sequence_equal( - std::vector&& _my_sequence_equal); - - /*! - * @brief This function returns a constant reference to member my_sequence_equal - * @return Constant reference to member my_sequence_equal - */ - eProsima_user_DllExport const std::vector& my_sequence_equal() const; - - /*! - * @brief This function returns a reference to member my_sequence_equal - * @return Reference to member my_sequence_equal - */ - eProsima_user_DllExport std::vector& my_sequence_equal(); - - - /*! - * @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 SequenceStructEqual& 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 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: - - std::vector m_my_sequence_equal; - -}; - - - - - -/*! - * @brief This class represents the structure SequenceBadStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SequenceBadStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceBadStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceBadStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceBadStruct that will be copied. - */ - eProsima_user_DllExport SequenceBadStruct( - const SequenceBadStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceBadStruct that will be copied. - */ - eProsima_user_DllExport SequenceBadStruct( - SequenceBadStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceBadStruct that will be copied. - */ - eProsima_user_DllExport SequenceBadStruct& operator =( - const SequenceBadStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceBadStruct that will be copied. - */ - eProsima_user_DllExport SequenceBadStruct& operator =( - SequenceBadStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceBadStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceBadStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceBadStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceBadStruct& x) const; - - /*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); - - /*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); - - /*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ - eProsima_user_DllExport const std::vector& my_sequence() const; - - /*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ - eProsima_user_DllExport std::vector& my_sequence(); - - - /*! - * @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 SequenceBadStruct& 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 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: - - std::vector m_my_sequence; - -}; - - - - - -/*! - * @brief This class represents the structure SequenceBoundsStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SequenceBoundsStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceBoundsStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceBoundsStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceBoundsStruct( - const SequenceBoundsStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceBoundsStruct( - SequenceBoundsStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceBoundsStruct& operator =( - const SequenceBoundsStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceBoundsStruct& operator =( - SequenceBoundsStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceBoundsStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceBoundsStruct& x) const; - - /*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); - - /*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); - - /*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ - eProsima_user_DllExport const std::vector& my_sequence() const; - - /*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ - eProsima_user_DllExport std::vector& my_sequence(); - - - /*! - * @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 SequenceBoundsStruct& 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 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: - - std::vector m_my_sequence; - -}; - - - - - - - -/*! - * @brief This class represents the structure SequenceSequenceStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SequenceSequenceStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceSequenceStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceSequenceStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceSequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceStruct( - const SequenceSequenceStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceSequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceStruct( - SequenceSequenceStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceSequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceStruct& operator =( - const SequenceSequenceStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceSequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceStruct& operator =( - SequenceSequenceStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceSequenceStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceSequenceStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceSequenceStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceSequenceStruct& x) const; - - /*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ - eProsima_user_DllExport void my_sequence_sequence( - const std::vector>& _my_sequence_sequence); - - /*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ - eProsima_user_DllExport void my_sequence_sequence( - std::vector>&& _my_sequence_sequence); - - /*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ - eProsima_user_DllExport const std::vector>& my_sequence_sequence() const; - - /*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ - eProsima_user_DllExport std::vector>& my_sequence_sequence(); - - - /*! - * @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 SequenceSequenceStruct& 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 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: - - std::vector> m_my_sequence_sequence; - -}; - - - - - - - -/*! - * @brief This class represents the structure SequenceSequenceBoundsStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SequenceSequenceBoundsStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceSequenceBoundsStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceSequenceBoundsStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceBoundsStruct( - const SequenceSequenceBoundsStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceBoundsStruct( - SequenceSequenceBoundsStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceBoundsStruct& operator =( - const SequenceSequenceBoundsStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceBoundsStruct& operator =( - SequenceSequenceBoundsStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceSequenceBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceSequenceBoundsStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceSequenceBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceSequenceBoundsStruct& x) const; - - /*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ - eProsima_user_DllExport void my_sequence_sequence( - const std::vector>& _my_sequence_sequence); - - /*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ - eProsima_user_DllExport void my_sequence_sequence( - std::vector>&& _my_sequence_sequence); - - /*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ - eProsima_user_DllExport const std::vector>& my_sequence_sequence() const; - - /*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ - eProsima_user_DllExport std::vector>& my_sequence_sequence(); - - - /*! - * @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 SequenceSequenceBoundsStruct& 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 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: - - std::vector> m_my_sequence_sequence; - -}; - - - - - -/*! - * @brief This class represents the structure MapStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MapStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapStruct that will be copied. - */ - eProsima_user_DllExport MapStruct( - const MapStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapStruct that will be copied. - */ - eProsima_user_DllExport MapStruct( - MapStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapStruct that will be copied. - */ - eProsima_user_DllExport MapStruct& operator =( - const MapStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapStruct that will be copied. - */ - eProsima_user_DllExport MapStruct& operator =( - MapStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapStruct& x) const; - - /*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ - eProsima_user_DllExport void my_map( - const std::map& _my_map); - - /*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ - eProsima_user_DllExport void my_map( - std::map&& _my_map); - - /*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ - eProsima_user_DllExport const std::map& my_map() const; - - /*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ - eProsima_user_DllExport std::map& my_map(); - - - /*! - * @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 MapStruct& 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 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: - - std::map m_my_map; - -}; - - - - - -/*! - * @brief This class represents the structure MapStructEqual defined by the user in the IDL file. - * @ingroup Types - */ -class MapStructEqual -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapStructEqual(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapStructEqual(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapStructEqual that will be copied. - */ - eProsima_user_DllExport MapStructEqual( - const MapStructEqual& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapStructEqual that will be copied. - */ - eProsima_user_DllExport MapStructEqual( - MapStructEqual&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapStructEqual that will be copied. - */ - eProsima_user_DllExport MapStructEqual& operator =( - const MapStructEqual& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapStructEqual that will be copied. - */ - eProsima_user_DllExport MapStructEqual& operator =( - MapStructEqual&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapStructEqual object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapStructEqual& x) const; - - /*! - * @brief Comparison operator. - * @param x MapStructEqual object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapStructEqual& x) const; - - /*! - * @brief This function copies the value in member my_map_equal - * @param _my_map_equal New value to be copied in member my_map_equal - */ - eProsima_user_DllExport void my_map_equal( - const std::map& _my_map_equal); - - /*! - * @brief This function moves the value in member my_map_equal - * @param _my_map_equal New value to be moved in member my_map_equal - */ - eProsima_user_DllExport void my_map_equal( - std::map&& _my_map_equal); - - /*! - * @brief This function returns a constant reference to member my_map_equal - * @return Constant reference to member my_map_equal - */ - eProsima_user_DllExport const std::map& my_map_equal() const; - - /*! - * @brief This function returns a reference to member my_map_equal - * @return Reference to member my_map_equal - */ - eProsima_user_DllExport std::map& my_map_equal(); - - - /*! - * @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 MapStructEqual& 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 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: - - std::map m_my_map_equal; - -}; - - - - - -/*! - * @brief This class represents the structure MapBadKeyStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MapBadKeyStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapBadKeyStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapBadKeyStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapBadKeyStruct that will be copied. - */ - eProsima_user_DllExport MapBadKeyStruct( - const MapBadKeyStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapBadKeyStruct that will be copied. - */ - eProsima_user_DllExport MapBadKeyStruct( - MapBadKeyStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapBadKeyStruct that will be copied. - */ - eProsima_user_DllExport MapBadKeyStruct& operator =( - const MapBadKeyStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapBadKeyStruct that will be copied. - */ - eProsima_user_DllExport MapBadKeyStruct& operator =( - MapBadKeyStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapBadKeyStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapBadKeyStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapBadKeyStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapBadKeyStruct& x) const; - - /*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ - eProsima_user_DllExport void my_map( - const std::map& _my_map); - - /*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ - eProsima_user_DllExport void my_map( - std::map&& _my_map); - - /*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ - eProsima_user_DllExport const std::map& my_map() const; - - /*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ - eProsima_user_DllExport std::map& my_map(); - - - /*! - * @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 MapBadKeyStruct& 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 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: - - std::map m_my_map; - -}; - - - - - -/*! - * @brief This class represents the structure MapBadElemStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MapBadElemStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapBadElemStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapBadElemStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapBadElemStruct that will be copied. - */ - eProsima_user_DllExport MapBadElemStruct( - const MapBadElemStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapBadElemStruct that will be copied. - */ - eProsima_user_DllExport MapBadElemStruct( - MapBadElemStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapBadElemStruct that will be copied. - */ - eProsima_user_DllExport MapBadElemStruct& operator =( - const MapBadElemStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapBadElemStruct that will be copied. - */ - eProsima_user_DllExport MapBadElemStruct& operator =( - MapBadElemStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapBadElemStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapBadElemStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapBadElemStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapBadElemStruct& x) const; - - /*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ - eProsima_user_DllExport void my_map( - const std::map& _my_map); - - /*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ - eProsima_user_DllExport void my_map( - std::map&& _my_map); - - /*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ - eProsima_user_DllExport const std::map& my_map() const; - - /*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ - eProsima_user_DllExport std::map& my_map(); - - - /*! - * @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 MapBadElemStruct& 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 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: - - std::map m_my_map; - -}; - - - - - -/*! - * @brief This class represents the structure MapBoundsStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MapBoundsStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapBoundsStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapBoundsStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapBoundsStruct( - const MapBoundsStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapBoundsStruct( - MapBoundsStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapBoundsStruct& operator =( - const MapBoundsStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapBoundsStruct& operator =( - MapBoundsStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapBoundsStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapBoundsStruct& x) const; - - /*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ - eProsima_user_DllExport void my_map( - const std::map& _my_map); - - /*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ - eProsima_user_DllExport void my_map( - std::map&& _my_map); - - /*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ - eProsima_user_DllExport const std::map& my_map() const; - - /*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ - eProsima_user_DllExport std::map& my_map(); - - - /*! - * @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 MapBoundsStruct& 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 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: - - std::map m_my_map; - -}; - - - - - - - -/*! - * @brief This class represents the structure MapMapStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MapMapStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapMapStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapMapStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapMapStruct that will be copied. - */ - eProsima_user_DllExport MapMapStruct( - const MapMapStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapMapStruct that will be copied. - */ - eProsima_user_DllExport MapMapStruct( - MapMapStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapMapStruct that will be copied. - */ - eProsima_user_DllExport MapMapStruct& operator =( - const MapMapStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapMapStruct that will be copied. - */ - eProsima_user_DllExport MapMapStruct& operator =( - MapMapStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapMapStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapMapStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapMapStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapMapStruct& x) const; - - /*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ - eProsima_user_DllExport void my_map_map( - const std::map>& _my_map_map); - - /*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ - eProsima_user_DllExport void my_map_map( - std::map>&& _my_map_map); - - /*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ - eProsima_user_DllExport const std::map>& my_map_map() const; - - /*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ - eProsima_user_DllExport std::map>& my_map_map(); - - - /*! - * @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 MapMapStruct& 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 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: - - std::map> m_my_map_map; - -}; - - - - - - - -/*! - * @brief This class represents the structure MapMapBoundsStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MapMapBoundsStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapMapBoundsStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapMapBoundsStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapMapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapMapBoundsStruct( - const MapMapBoundsStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapMapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapMapBoundsStruct( - MapMapBoundsStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapMapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapMapBoundsStruct& operator =( - const MapMapBoundsStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapMapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapMapBoundsStruct& operator =( - MapMapBoundsStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapMapBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapMapBoundsStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapMapBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapMapBoundsStruct& x) const; - - /*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ - eProsima_user_DllExport void my_map_map( - const std::map>& _my_map_map); - - /*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ - eProsima_user_DllExport void my_map_map( - std::map>&& _my_map_map); - - /*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ - eProsima_user_DllExport const std::map>& my_map_map() const; - - /*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ - eProsima_user_DllExport std::map>& my_map_map(); - - - /*! - * @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 MapMapBoundsStruct& 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 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: - - std::map> m_my_map_map; - -}; - - - -/*! - * @brief This class represents the union SimpleUnion defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleUnion that will be copied. - */ - eProsima_user_DllExport SimpleUnion( - const SimpleUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleUnion that will be copied. - */ - eProsima_user_DllExport SimpleUnion( - SimpleUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleUnion that will be copied. - */ - eProsima_user_DllExport SimpleUnion& operator =( - const SimpleUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleUnion that will be copied. - */ - eProsima_user_DllExport SimpleUnion& operator =( - SimpleUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int32_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int32_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int32_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - int32_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first(); - - - /*! - * @brief This function sets a value in member second - * @param _second New value for member second - */ - eProsima_user_DllExport void second( - int64_t _second); - - /*! - * @brief This function returns the value of member second - * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second(); - - - /*! - * @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 SimpleUnion& 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); - - - - - -private: - - int32_t m__d; - - int32_t m_first; - int64_t m_second; -}; - - - -/*! - * @brief This class represents the union SimpleUnionNames defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleUnionNames -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleUnionNames(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleUnionNames(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleUnionNames that will be copied. - */ - eProsima_user_DllExport SimpleUnionNames( - const SimpleUnionNames& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleUnionNames that will be copied. - */ - eProsima_user_DllExport SimpleUnionNames( - SimpleUnionNames&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleUnionNames that will be copied. - */ - eProsima_user_DllExport SimpleUnionNames& operator =( - const SimpleUnionNames& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleUnionNames that will be copied. - */ - eProsima_user_DllExport SimpleUnionNames& operator =( - SimpleUnionNames&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionNames object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleUnionNames& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionNames object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleUnionNames& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int32_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int32_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int32_t& _d(); - - /*! - * @brief This function sets a value in member first_case - * @param _first_case New value for member first_case - */ - eProsima_user_DllExport void first_case( - int32_t _first_case); - - /*! - * @brief This function returns the value of member first_case - * @return Value of member first_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first_case() const; - - /*! - * @brief This function returns a reference to member first_case - * @return Reference to member first_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first_case(); - - - /*! - * @brief This function sets a value in member second_case - * @param _second_case New value for member second_case - */ - eProsima_user_DllExport void second_case( - int64_t _second_case); - - /*! - * @brief This function returns the value of member second_case - * @return Value of member second_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second_case() const; - - /*! - * @brief This function returns a reference to member second_case - * @return Reference to member second_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second_case(); - - - /*! - * @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 SimpleUnionNames& 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); - - - - - -private: - - int32_t m__d; - - int32_t m_first_case; - int64_t m_second_case; -}; - - - -/*! - * @brief This class represents the union SimpleTypeUnion defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleTypeUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleTypeUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleTypeUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleTypeUnion that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnion( - const SimpleTypeUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleTypeUnion that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnion( - SimpleTypeUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleTypeUnion that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnion& operator =( - const SimpleTypeUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleTypeUnion that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnion& operator =( - SimpleTypeUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleTypeUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleTypeUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleTypeUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleTypeUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int32_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int32_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int32_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - uint8_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport uint8_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport uint8_t& first(); - - - /*! - * @brief This function sets a value in member second - * @param _second New value for member second - */ - eProsima_user_DllExport void second( - int64_t _second); - - /*! - * @brief This function returns the value of member second - * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second(); - - - /*! - * @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 SimpleTypeUnion& 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); - - - - - -private: - - int32_t m__d; - - uint8_t m_first; - int64_t m_second; -}; - - - -/*! - * @brief This class represents the union SimpleBadUnion defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleBadUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleBadUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleBadUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleBadUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadUnion( - const SimpleBadUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleBadUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadUnion( - SimpleBadUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleBadUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadUnion& operator =( - const SimpleBadUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleBadUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadUnion& operator =( - SimpleBadUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleBadUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleBadUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleBadUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleBadUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int32_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int32_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int32_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - int32_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first(); - - - /*! - * @brief This function sets a value in member second - * @param _second New value for member second - */ - eProsima_user_DllExport void second( - int64_t _second); - - /*! - * @brief This function returns the value of member second - * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second(); - - - /*! - * @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 SimpleBadUnion& 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); - - - - - -private: - - int32_t m__d; - - int32_t m_first; - int64_t m_second; -}; - - - -/*! - * @brief This class represents the union SimpleBadDiscUnion defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleBadDiscUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleBadDiscUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleBadDiscUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleBadDiscUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadDiscUnion( - const SimpleBadDiscUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleBadDiscUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadDiscUnion( - SimpleBadDiscUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleBadDiscUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadDiscUnion& operator =( - const SimpleBadDiscUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleBadDiscUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadDiscUnion& operator =( - SimpleBadDiscUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleBadDiscUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleBadDiscUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleBadDiscUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleBadDiscUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - uint8_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport uint8_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport uint8_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - int32_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first(); - - - /*! - * @brief This function sets a value in member second - * @param _second New value for member second - */ - eProsima_user_DllExport void second( - int64_t _second); - - /*! - * @brief This function returns the value of member second - * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second(); - - - /*! - * @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 SimpleBadDiscUnion& 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); - - - - - -private: - - uint8_t m__d; - - int32_t m_first; - int64_t m_second; -}; - - - -/*! - * @brief This class represents the structure SimpleUnionStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionStruct( - const SimpleUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionStruct( - SimpleUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionStruct& operator =( - const SimpleUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionStruct& operator =( - SimpleUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleUnion& my_union(); - - - /*! - * @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 SimpleUnionStruct& 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 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: - - SimpleUnion m_my_union; - -}; - - - -/*! - * @brief This class represents the structure SimpleUnionStructEqual defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleUnionStructEqual -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleUnionStructEqual(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleUnionStructEqual(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleUnionStructEqual that will be copied. - */ - eProsima_user_DllExport SimpleUnionStructEqual( - const SimpleUnionStructEqual& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleUnionStructEqual that will be copied. - */ - eProsima_user_DllExport SimpleUnionStructEqual( - SimpleUnionStructEqual&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleUnionStructEqual that will be copied. - */ - eProsima_user_DllExport SimpleUnionStructEqual& operator =( - const SimpleUnionStructEqual& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleUnionStructEqual that will be copied. - */ - eProsima_user_DllExport SimpleUnionStructEqual& operator =( - SimpleUnionStructEqual&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionStructEqual object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleUnionStructEqual& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionStructEqual object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleUnionStructEqual& x) const; - - /*! - * @brief This function copies the value in member my_union_equal - * @param _my_union_equal New value to be copied in member my_union_equal - */ - eProsima_user_DllExport void my_union_equal( - const SimpleUnion& _my_union_equal); - - /*! - * @brief This function moves the value in member my_union_equal - * @param _my_union_equal New value to be moved in member my_union_equal - */ - eProsima_user_DllExport void my_union_equal( - SimpleUnion&& _my_union_equal); - - /*! - * @brief This function returns a constant reference to member my_union_equal - * @return Constant reference to member my_union_equal - */ - eProsima_user_DllExport const SimpleUnion& my_union_equal() const; - - /*! - * @brief This function returns a reference to member my_union_equal - * @return Reference to member my_union_equal - */ - eProsima_user_DllExport SimpleUnion& my_union_equal(); - - - /*! - * @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 SimpleUnionStructEqual& 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 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: - - SimpleUnion m_my_union_equal; - -}; - - - -/*! - * @brief This class represents the structure SimpleUnionNamesStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleUnionNamesStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleUnionNamesStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleUnionNamesStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleUnionNamesStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionNamesStruct( - const SimpleUnionNamesStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleUnionNamesStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionNamesStruct( - SimpleUnionNamesStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleUnionNamesStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionNamesStruct& operator =( - const SimpleUnionNamesStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleUnionNamesStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionNamesStruct& operator =( - SimpleUnionNamesStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionNamesStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleUnionNamesStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionNamesStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleUnionNamesStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleUnionNames& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleUnionNames&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleUnionNames& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleUnionNames& my_union(); - - - /*! - * @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 SimpleUnionNamesStruct& 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 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: - - SimpleUnionNames m_my_union; - -}; - - - -/*! - * @brief This class represents the structure SimpleTypeUnionStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleTypeUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleTypeUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleTypeUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleTypeUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnionStruct( - const SimpleTypeUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleTypeUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnionStruct( - SimpleTypeUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleTypeUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnionStruct& operator =( - const SimpleTypeUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleTypeUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnionStruct& operator =( - SimpleTypeUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleTypeUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleTypeUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleTypeUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleTypeUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleTypeUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleTypeUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleTypeUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleTypeUnion& my_union(); - - - /*! - * @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 SimpleTypeUnionStruct& 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 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: - - SimpleTypeUnion m_my_union; - -}; - - - -/*! - * @brief This class represents the structure SimpleBadUnionStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleBadUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleBadUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleBadUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleBadUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleBadUnionStruct( - const SimpleBadUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleBadUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleBadUnionStruct( - SimpleBadUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleBadUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleBadUnionStruct& operator =( - const SimpleBadUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleBadUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleBadUnionStruct& operator =( - SimpleBadUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleBadUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleBadUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleBadUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleBadUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleBadUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleBadUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleBadUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleBadUnion& my_union(); - - - /*! - * @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 SimpleBadUnionStruct& 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 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: - - SimpleBadUnion m_my_union; - -}; - - - -/*! - * @brief This class represents the structure SimplBadDiscUnionStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SimplBadDiscUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimplBadDiscUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimplBadDiscUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. - */ - eProsima_user_DllExport SimplBadDiscUnionStruct( - const SimplBadDiscUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. - */ - eProsima_user_DllExport SimplBadDiscUnionStruct( - SimplBadDiscUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. - */ - eProsima_user_DllExport SimplBadDiscUnionStruct& operator =( - const SimplBadDiscUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. - */ - eProsima_user_DllExport SimplBadDiscUnionStruct& operator =( - SimplBadDiscUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimplBadDiscUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimplBadDiscUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimplBadDiscUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimplBadDiscUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleBadDiscUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleBadDiscUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleBadDiscUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleBadDiscUnion& my_union(); - - - /*! - * @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 SimplBadDiscUnionStruct& 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 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: - - SimpleBadDiscUnion m_my_union; - -}; - - -#endif // _FAST_DDS_GENERATED_TYPES_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/unittest/xtypes/idl/WideEnum.cxx b/test/unittest/xtypes/idl/WideEnum.cxx deleted file mode 100644 index 504b70b0b4a..00000000000 --- a/test/unittest/xtypes/idl/WideEnum.cxx +++ /dev/null @@ -1,591 +0,0 @@ -// 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 WideEnum.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "WideEnum.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include "WideEnumTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -MyEnumWideStruct::MyEnumWideStruct() -{ - // Just to register all known types - registerWideEnumTypes(); -} - -MyEnumWideStruct::~MyEnumWideStruct() -{ -} - -MyEnumWideStruct::MyEnumWideStruct( - const MyEnumWideStruct& x) -{ - m_my_enum_wide = x.m_my_enum_wide; -} - -MyEnumWideStruct::MyEnumWideStruct( - MyEnumWideStruct&& x) noexcept -{ - m_my_enum_wide = x.m_my_enum_wide; -} - -MyEnumWideStruct& MyEnumWideStruct::operator =( - const MyEnumWideStruct& x) -{ - - m_my_enum_wide = x.m_my_enum_wide; - return *this; -} - -MyEnumWideStruct& MyEnumWideStruct::operator =( - MyEnumWideStruct&& x) noexcept -{ - - m_my_enum_wide = x.m_my_enum_wide; - return *this; -} - -bool MyEnumWideStruct::operator ==( - const MyEnumWideStruct& x) const -{ - return (m_my_enum_wide == x.m_my_enum_wide); -} - -bool MyEnumWideStruct::operator !=( - const MyEnumWideStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_enum_wide - * @param _my_enum_wide New value for member my_enum_wide - */ -void MyEnumWideStruct::my_enum_wide( - MyEnumWide _my_enum_wide) -{ - m_my_enum_wide = _my_enum_wide; -} - -/*! - * @brief This function returns the value of member my_enum_wide - * @return Value of member my_enum_wide - */ -MyEnumWide MyEnumWideStruct::my_enum_wide() const -{ - return m_my_enum_wide; -} - -/*! - * @brief This function returns a reference to member my_enum_wide - * @return Reference to member my_enum_wide - */ -MyEnumWide& MyEnumWideStruct::my_enum_wide() -{ - return m_my_enum_wide; -} - - - - -SimpleWideUnion::SimpleWideUnion() -{ - m__d = A; -} - -SimpleWideUnion::~SimpleWideUnion() -{ -} - -SimpleWideUnion::SimpleWideUnion( - const SimpleWideUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - - case D: - m_third = x.m_third; - break; - - default: - break; - } -} - -SimpleWideUnion::SimpleWideUnion( - SimpleWideUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - - case D: - m_third = x.m_third; - break; - - default: - break; - } -} - -SimpleWideUnion& SimpleWideUnion::operator =( - const SimpleWideUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - - case D: - m_third = x.m_third; - break; - - default: - break; - } - - return *this; -} - -SimpleWideUnion& SimpleWideUnion::operator =( - SimpleWideUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - - case D: - m_third = x.m_third; - break; - - default: - break; - } - - return *this; -} - -bool SimpleWideUnion::operator ==( - const SimpleWideUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - - case D: - return (m_third == x.m_third); - break; - - default: - break; - } - return false; -} - -bool SimpleWideUnion::operator !=( - const SimpleWideUnion& x) const -{ - return !(*this == x); -} - -void SimpleWideUnion::_d( - int32_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch (__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - - case D: - switch (__d) - { - case D: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleWideUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleWideUnion::_d() -{ - return m__d; -} - -void SimpleWideUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t SimpleWideUnion::first() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleWideUnion::first() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleWideUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t SimpleWideUnion::second() const -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleWideUnion::second() -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -void SimpleWideUnion::third( - uint8_t _third) -{ - m_third = _third; - m__d = D; - -} - -uint8_t SimpleWideUnion::third() const -{ - bool b = false; - - switch (m__d) - { - case D: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_third; -} - -uint8_t& SimpleWideUnion::third() -{ - bool b = false; - - switch (m__d) - { - case D: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_third; -} - - - - -SimpleWideUnionStruct::SimpleWideUnionStruct() -{ - // Just to register all known types - registerWideEnumTypes(); -} - -SimpleWideUnionStruct::~SimpleWideUnionStruct() -{ -} - -SimpleWideUnionStruct::SimpleWideUnionStruct( - const SimpleWideUnionStruct& x) -{ - m_my_union = x.m_my_union; -} - -SimpleWideUnionStruct::SimpleWideUnionStruct( - SimpleWideUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -SimpleWideUnionStruct& SimpleWideUnionStruct::operator =( - const SimpleWideUnionStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -SimpleWideUnionStruct& SimpleWideUnionStruct::operator =( - SimpleWideUnionStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool SimpleWideUnionStruct::operator ==( - const SimpleWideUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleWideUnionStruct::operator !=( - const SimpleWideUnionStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleWideUnionStruct::my_union( - const SimpleWideUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleWideUnionStruct::my_union( - SimpleWideUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleWideUnion& SimpleWideUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleWideUnion& SimpleWideUnionStruct::my_union() -{ - return m_my_union; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "WideEnumCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/unittest/xtypes/idl/WideEnum.h b/test/unittest/xtypes/idl/WideEnum.h deleted file mode 100644 index 3a731aeb935..00000000000 --- a/test/unittest/xtypes/idl/WideEnum.h +++ /dev/null @@ -1,426 +0,0 @@ -// 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 WideEnum.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include -#include "WideEnumv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_WIDEENUM_H_ -#define _FAST_DDS_GENERATED_WIDEENUM_H_ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(WIDEENUM_SOURCE) -#define WIDEENUM_DllAPI __declspec( dllexport ) -#else -#define WIDEENUM_DllAPI __declspec( dllimport ) -#endif // WIDEENUM_SOURCE -#else -#define WIDEENUM_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define WIDEENUM_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - -/*! - * @brief This class represents the enumeration MyEnumWide defined by the user in the IDL file. - * @ingroup WideEnum - */ -enum MyEnumWide : uint32_t -{ - A, - B, - C, - D -}; - - -/*! - * @brief This class represents the structure MyEnumWideStruct defined by the user in the IDL file. - * @ingroup WideEnum - */ -class MyEnumWideStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyEnumWideStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyEnumWideStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MyEnumWideStruct that will be copied. - */ - eProsima_user_DllExport MyEnumWideStruct( - const MyEnumWideStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MyEnumWideStruct that will be copied. - */ - eProsima_user_DllExport MyEnumWideStruct( - MyEnumWideStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MyEnumWideStruct that will be copied. - */ - eProsima_user_DllExport MyEnumWideStruct& operator =( - const MyEnumWideStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MyEnumWideStruct that will be copied. - */ - eProsima_user_DllExport MyEnumWideStruct& operator =( - MyEnumWideStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MyEnumWideStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyEnumWideStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MyEnumWideStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyEnumWideStruct& x) const; - - /*! - * @brief This function sets a value in member my_enum_wide - * @param _my_enum_wide New value for member my_enum_wide - */ - eProsima_user_DllExport void my_enum_wide( - MyEnumWide _my_enum_wide); - - /*! - * @brief This function returns the value of member my_enum_wide - * @return Value of member my_enum_wide - */ - eProsima_user_DllExport MyEnumWide my_enum_wide() const; - - /*! - * @brief This function returns a reference to member my_enum_wide - * @return Reference to member my_enum_wide - */ - eProsima_user_DllExport MyEnumWide& my_enum_wide(); - -private: - - MyEnumWide m_my_enum_wide{::A}; - -}; - - -/*! - * @brief This class represents the union SimpleWideUnion defined by the user in the IDL file. - * @ingroup WideEnum - */ -class SimpleWideUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleWideUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleWideUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleWideUnion that will be copied. - */ - eProsima_user_DllExport SimpleWideUnion( - const SimpleWideUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleWideUnion that will be copied. - */ - eProsima_user_DllExport SimpleWideUnion( - SimpleWideUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleWideUnion that will be copied. - */ - eProsima_user_DllExport SimpleWideUnion& operator =( - const SimpleWideUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleWideUnion that will be copied. - */ - eProsima_user_DllExport SimpleWideUnion& operator =( - SimpleWideUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleWideUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleWideUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleWideUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleWideUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int32_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int32_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int32_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - int32_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first(); - - - /*! - * @brief This function sets a value in member second - * @param _second New value for member second - */ - eProsima_user_DllExport void second( - int64_t _second); - - /*! - * @brief This function returns the value of member second - * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second(); - - - /*! - * @brief This function sets a value in member third - * @param _third New value for member third - */ - eProsima_user_DllExport void third( - uint8_t _third); - - /*! - * @brief This function returns the value of member third - * @return Value of member third - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport uint8_t third() const; - - /*! - * @brief This function returns a reference to member third - * @return Reference to member third - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport uint8_t& third(); - -private: - - int32_t m__d; - - int32_t m_first{0}; - int64_t m_second{0}; - uint8_t m_third{0}; -}; - - -/*! - * @brief This class represents the structure SimpleWideUnionStruct defined by the user in the IDL file. - * @ingroup WideEnum - */ -class SimpleWideUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleWideUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleWideUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleWideUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleWideUnionStruct( - const SimpleWideUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleWideUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleWideUnionStruct( - SimpleWideUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleWideUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleWideUnionStruct& operator =( - const SimpleWideUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleWideUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleWideUnionStruct& operator =( - SimpleWideUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleWideUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleWideUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleWideUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleWideUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleWideUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleWideUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleWideUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleWideUnion& my_union(); - -private: - - SimpleWideUnion m_my_union; - -}; - -#endif // _FAST_DDS_GENERATED_WIDEENUM_H_ - - - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/unittest/xtypes/idl/WideEnum.hpp b/test/unittest/xtypes/idl/WideEnum.hpp new file mode 100644 index 00000000000..8bec8d151a3 --- /dev/null +++ b/test/unittest/xtypes/idl/WideEnum.hpp @@ -0,0 +1,817 @@ +// 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 WideEnum.hpp + * This header file contains the declaration of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_WIDEENUM_HPP_ +#define _FAST_DDS_GENERATED_WIDEENUM_HPP_ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +#include "WideEnumTypeObject.h" + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#define eProsima_user_DllExport __declspec( dllexport ) +#else +#define eProsima_user_DllExport +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define eProsima_user_DllExport +#endif // _WIN32 + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#if defined(WIDEENUM_SOURCE) +#define WIDEENUM_DllAPI __declspec( dllexport ) +#else +#define WIDEENUM_DllAPI __declspec( dllimport ) +#endif // WIDEENUM_SOURCE +#else +#define WIDEENUM_DllAPI +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define WIDEENUM_DllAPI +#endif // _WIN32 + +/*! + * @brief This class represents the enumeration MyEnumWide defined by the user in the IDL file. + * @ingroup WideEnum + */ +enum MyEnumWide : uint32_t +{ + A, + B, + C, + D +}; + + +/*! + * @brief This class represents the structure MyEnumWideStruct defined by the user in the IDL file. + * @ingroup WideEnum + */ +class MyEnumWideStruct +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport MyEnumWideStruct() + { + // Just to register all known types + registerWideEnumTypes(); + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~MyEnumWideStruct() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object MyEnumWideStruct that will be copied. + */ + eProsima_user_DllExport MyEnumWideStruct( + const MyEnumWideStruct& x) + { + m_my_enum_wide = x.m_my_enum_wide; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object MyEnumWideStruct that will be copied. + */ + eProsima_user_DllExport MyEnumWideStruct( + MyEnumWideStruct&& x) noexcept + { + m_my_enum_wide = x.m_my_enum_wide; + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object MyEnumWideStruct that will be copied. + */ + eProsima_user_DllExport MyEnumWideStruct& operator =( + const MyEnumWideStruct& x) + { + + m_my_enum_wide = x.m_my_enum_wide; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object MyEnumWideStruct that will be copied. + */ + eProsima_user_DllExport MyEnumWideStruct& operator =( + MyEnumWideStruct&& x) noexcept + { + + m_my_enum_wide = x.m_my_enum_wide; + return *this; + } + + /*! + * @brief Comparison operator. + * @param x MyEnumWideStruct object to compare. + */ + eProsima_user_DllExport bool operator ==( + const MyEnumWideStruct& x) const + { + return (m_my_enum_wide == x.m_my_enum_wide); + } + + /*! + * @brief Comparison operator. + * @param x MyEnumWideStruct object to compare. + */ + eProsima_user_DllExport bool operator !=( + const MyEnumWideStruct& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets a value in member my_enum_wide + * @param _my_enum_wide New value for member my_enum_wide + */ + eProsima_user_DllExport void my_enum_wide( + MyEnumWide _my_enum_wide) + { + m_my_enum_wide = _my_enum_wide; + } + + /*! + * @brief This function returns the value of member my_enum_wide + * @return Value of member my_enum_wide + */ + eProsima_user_DllExport MyEnumWide my_enum_wide() const + { + return m_my_enum_wide; + } + + /*! + * @brief This function returns a reference to member my_enum_wide + * @return Reference to member my_enum_wide + */ + eProsima_user_DllExport MyEnumWide& my_enum_wide() + { + return m_my_enum_wide; + } + + + +private: + + MyEnumWide m_my_enum_wide{::A}; + +}; + + +/*! + * @brief This class represents the union SimpleWideUnion defined by the user in the IDL file. + * @ingroup WideEnum + */ +class SimpleWideUnion +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport SimpleWideUnion() + { + m__d = A; + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~SimpleWideUnion() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object SimpleWideUnion that will be copied. + */ + eProsima_user_DllExport SimpleWideUnion( + const SimpleWideUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + + case D: + m_third = x.m_third; + break; + + default: + break; + } + } + + /*! + * @brief Move constructor. + * @param x Reference to the object SimpleWideUnion that will be copied. + */ + eProsima_user_DllExport SimpleWideUnion( + SimpleWideUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + + case D: + m_third = x.m_third; + break; + + default: + break; + } + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object SimpleWideUnion that will be copied. + */ + eProsima_user_DllExport SimpleWideUnion& operator =( + const SimpleWideUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + + case D: + m_third = x.m_third; + break; + + default: + break; + } + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object SimpleWideUnion that will be copied. + */ + eProsima_user_DllExport SimpleWideUnion& operator =( + SimpleWideUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + + case D: + m_third = x.m_third; + break; + + default: + break; + } + + return *this; + } + + /*! + * @brief Comparison operator. + * @param x SimpleWideUnion object to compare. + */ + eProsima_user_DllExport bool operator ==( + const SimpleWideUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_first == x.m_first); + break; + + + case B: + return (m_second == x.m_second); + break; + + + case D: + return (m_third == x.m_third); + break; + + default: + break; + } + return false; + } + + /*! + * @brief Comparison operator. + * @param x SimpleWideUnion object to compare. + */ + eProsima_user_DllExport bool operator !=( + const SimpleWideUnion& x) const + { + return !(*this == x); + } + + /*! + * @brief This function sets the discriminator value. + * @param __d New value for the discriminator. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + */ + eProsima_user_DllExport void _d( + int32_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case B: + switch (__d) + { + case B: + b = true; + break; + default: + break; + } + break; + + + case D: + switch (__d) + { + case D: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } + + /*! + * @brief This function returns the value of the discriminator. + * @return Value of the discriminator + */ + eProsima_user_DllExport int32_t _d() const + { + return m__d; + } + + /*! + * @brief This function returns a reference to the discriminator. + * @return Reference to the discriminator. + */ + eProsima_user_DllExport int32_t& _d() + { + return m__d; + } + + /*! + * @brief This function sets a value in member first + * @param _first New value for member first + */ + eProsima_user_DllExport void first( + int32_t _first) + { + m_first = _first; + m__d = A; + + } + + /*! + * @brief This function returns the value of member first + * @return Value of member first + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t first() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } + + /*! + * @brief This function returns a reference to member first + * @return Reference to member first + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int32_t& first() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } + + + /*! + * @brief This function sets a value in member second + * @param _second New value for member second + */ + eProsima_user_DllExport void second( + int64_t _second) + { + m_second = _second; + m__d = B; + + } + + /*! + * @brief This function returns the value of member second + * @return Value of member second + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int64_t second() const + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + /*! + * @brief This function returns a reference to member second + * @return Reference to member second + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport int64_t& second() + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + + /*! + * @brief This function sets a value in member third + * @param _third New value for member third + */ + eProsima_user_DllExport void third( + uint8_t _third) + { + m_third = _third; + m__d = D; + + } + + /*! + * @brief This function returns the value of member third + * @return Value of member third + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport uint8_t third() const + { + bool b = false; + + switch (m__d) + { + case D: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_third; + } + + /*! + * @brief This function returns a reference to member third + * @return Reference to member third + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. + */ + eProsima_user_DllExport uint8_t& third() + { + bool b = false; + + switch (m__d) + { + case D: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_third; + } + + + +private: + + int32_t m__d; + + int32_t m_first{0}; + int64_t m_second{0}; + uint8_t m_third{0}; +}; + + +/*! + * @brief This class represents the structure SimpleWideUnionStruct defined by the user in the IDL file. + * @ingroup WideEnum + */ +class SimpleWideUnionStruct +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport SimpleWideUnionStruct() + { + // Just to register all known types + registerWideEnumTypes(); + } + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~SimpleWideUnionStruct() + { + } + + /*! + * @brief Copy constructor. + * @param x Reference to the object SimpleWideUnionStruct that will be copied. + */ + eProsima_user_DllExport SimpleWideUnionStruct( + const SimpleWideUnionStruct& x) + { + m_my_union = x.m_my_union; + + } + + /*! + * @brief Move constructor. + * @param x Reference to the object SimpleWideUnionStruct that will be copied. + */ + eProsima_user_DllExport SimpleWideUnionStruct( + SimpleWideUnionStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } + + /*! + * @brief Copy assignment. + * @param x Reference to the object SimpleWideUnionStruct that will be copied. + */ + eProsima_user_DllExport SimpleWideUnionStruct& operator =( + const SimpleWideUnionStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } + + /*! + * @brief Move assignment. + * @param x Reference to the object SimpleWideUnionStruct that will be copied. + */ + eProsima_user_DllExport SimpleWideUnionStruct& operator =( + SimpleWideUnionStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } + + /*! + * @brief Comparison operator. + * @param x SimpleWideUnionStruct object to compare. + */ + eProsima_user_DllExport bool operator ==( + const SimpleWideUnionStruct& x) const + { + return (m_my_union == x.m_my_union); + } + + /*! + * @brief Comparison operator. + * @param x SimpleWideUnionStruct object to compare. + */ + eProsima_user_DllExport bool operator !=( + const SimpleWideUnionStruct& x) const + { + return !(*this == x); + } + + /*! + * @brief This function copies the value in member my_union + * @param _my_union New value to be copied in member my_union + */ + eProsima_user_DllExport void my_union( + const SimpleWideUnion& _my_union) + { + m_my_union = _my_union; + } + + /*! + * @brief This function moves the value in member my_union + * @param _my_union New value to be moved in member my_union + */ + eProsima_user_DllExport void my_union( + SimpleWideUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } + + /*! + * @brief This function returns a constant reference to member my_union + * @return Constant reference to member my_union + */ + eProsima_user_DllExport const SimpleWideUnion& my_union() const + { + return m_my_union; + } + + /*! + * @brief This function returns a reference to member my_union + * @return Reference to member my_union + */ + eProsima_user_DllExport SimpleWideUnion& my_union() + { + return m_my_union; + } + + + +private: + + SimpleWideUnion m_my_union; + +}; + +#endif // _FAST_DDS_GENERATED_WIDEENUM_HPP_ + + diff --git a/test/unittest/xtypes/idl/WideEnumCdrAux.hpp b/test/unittest/xtypes/idl/WideEnumCdrAux.hpp index 34c5600fbef..a5c4b8055f1 100644 --- a/test/unittest/xtypes/idl/WideEnumCdrAux.hpp +++ b/test/unittest/xtypes/idl/WideEnumCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_WIDEENUMCDRAUX_HPP_ #define _FAST_DDS_GENERATED_WIDEENUMCDRAUX_HPP_ -#include "WideEnum.h" +#include "WideEnum.hpp" constexpr uint32_t MyEnumWideStruct_max_cdr_typesize {8UL}; constexpr uint32_t MyEnumWideStruct_max_key_cdr_typesize {0UL}; @@ -49,8 +49,6 @@ eProsima_user_DllExport void serialize_key( - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SimpleWideUnionStruct& data); diff --git a/test/unittest/xtypes/idl/WideEnumPubSubTypes.cxx b/test/unittest/xtypes/idl/WideEnumPubSubTypes.cxx index 3e60c0cd922..92fc4e3f3d9 100644 --- a/test/unittest/xtypes/idl/WideEnumPubSubTypes.cxx +++ b/test/unittest/xtypes/idl/WideEnumPubSubTypes.cxx @@ -223,8 +223,6 @@ bool MyEnumWideStructPubSubType::getKey( - - SimpleWideUnionStructPubSubType::SimpleWideUnionStructPubSubType() { setName("SimpleWideUnionStruct"); @@ -413,3 +411,6 @@ bool SimpleWideUnionStructPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "WideEnumCdrAux.ipp" diff --git a/test/unittest/xtypes/idl/WideEnumPubSubTypes.h b/test/unittest/xtypes/idl/WideEnumPubSubTypes.h index 8119ba12ac2..e2aa7f91bf2 100644 --- a/test/unittest/xtypes/idl/WideEnumPubSubTypes.h +++ b/test/unittest/xtypes/idl/WideEnumPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "WideEnum.h" +#include "WideEnum.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -132,8 +132,6 @@ class MyEnumWideStructPubSubType : public eprosima::fastdds::dds::TopicDataType - - /*! * @brief This class represents the TopicDataType of the type SimpleWideUnionStruct defined by the user in the IDL file. * @ingroup WideEnum diff --git a/test/unittest/xtypes/idl/WideEnumTypeObject.cxx b/test/unittest/xtypes/idl/WideEnumTypeObject.cxx index 0ae2ba7138b..6830b414d52 100644 --- a/test/unittest/xtypes/idl/WideEnumTypeObject.cxx +++ b/test/unittest/xtypes/idl/WideEnumTypeObject.cxx @@ -24,7 +24,7 @@ namespace { char dummy; } #endif -#include "WideEnum.h" +#include "WideEnum.hpp" #include "WideEnumTypeObject.h" #include #include diff --git a/test/unittest/xtypes/idl/WideEnumv1.cxx b/test/unittest/xtypes/idl/WideEnumv1.cxx deleted file mode 100644 index a49be8dfc84..00000000000 --- a/test/unittest/xtypes/idl/WideEnumv1.cxx +++ /dev/null @@ -1,858 +0,0 @@ -// 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 WideEnum.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "WideEnum.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include "WideEnumTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define MyEnumWideStruct_max_cdr_typesize 8ULL; - -#define SimpleWideUnionStruct_max_cdr_typesize 24ULL; - - - - - -MyEnumWideStruct::MyEnumWideStruct() -{ - // MyEnumWide m_my_enum_wide - m_my_enum_wide = ::A; - - // Just to register all known types - registerWideEnumTypes(); -} - -MyEnumWideStruct::~MyEnumWideStruct() -{ -} - -MyEnumWideStruct::MyEnumWideStruct( - const MyEnumWideStruct& x) -{ - m_my_enum_wide = x.m_my_enum_wide; - -} - -MyEnumWideStruct::MyEnumWideStruct( - MyEnumWideStruct&& x) noexcept -{ - m_my_enum_wide = x.m_my_enum_wide; - -} - -MyEnumWideStruct& MyEnumWideStruct::operator =( - const MyEnumWideStruct& x) -{ - m_my_enum_wide = x.m_my_enum_wide; - - return *this; -} - -MyEnumWideStruct& MyEnumWideStruct::operator =( - MyEnumWideStruct&& x) noexcept -{ - m_my_enum_wide = x.m_my_enum_wide; - - return *this; -} - -bool MyEnumWideStruct::operator ==( - const MyEnumWideStruct& x) const -{ - return (m_my_enum_wide == x.m_my_enum_wide); -} - -bool MyEnumWideStruct::operator !=( - const MyEnumWideStruct& x) const -{ - return !(*this == x); -} - -size_t MyEnumWideStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MyEnumWideStruct_max_cdr_typesize; -} - -size_t MyEnumWideStruct::getCdrSerializedSize( - const MyEnumWideStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void MyEnumWideStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m_my_enum_wide; - -} - -void MyEnumWideStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_my_enum_wide = (MyEnumWide)enum_value; - } - - -} - - -bool MyEnumWideStruct::isKeyDefined() -{ - return false; -} - -void MyEnumWideStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_enum_wide - * @param _my_enum_wide New value for member my_enum_wide - */ -void MyEnumWideStruct::my_enum_wide( - MyEnumWide _my_enum_wide) -{ - m_my_enum_wide = _my_enum_wide; -} - -/*! - * @brief This function returns the value of member my_enum_wide - * @return Value of member my_enum_wide - */ -MyEnumWide MyEnumWideStruct::my_enum_wide() const -{ - return m_my_enum_wide; -} - -/*! - * @brief This function returns a reference to member my_enum_wide - * @return Reference to member my_enum_wide - */ -MyEnumWide& MyEnumWideStruct::my_enum_wide() -{ - return m_my_enum_wide; -} - - - - - -SimpleWideUnion::SimpleWideUnion() -{ - m__d = A; - // long m_first - m_first = 0; - // long long m_second - m_second = 0; - // octet m_third - m_third = 0; -} - -SimpleWideUnion::~SimpleWideUnion() -{ -} - -SimpleWideUnion::SimpleWideUnion( - const SimpleWideUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - - case D: - m_third = x.m_third; - break; - - default: - break; - } -} - -SimpleWideUnion::SimpleWideUnion( - SimpleWideUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - - case D: - m_third = x.m_third; - break; - - default: - break; - } -} - -SimpleWideUnion& SimpleWideUnion::operator =( - const SimpleWideUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - - case D: - m_third = x.m_third; - break; - - default: - break; - } - - return *this; -} - -SimpleWideUnion& SimpleWideUnion::operator =( - SimpleWideUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - - case D: - m_third = x.m_third; - break; - - default: - break; - } - - return *this; -} - -bool SimpleWideUnion::operator ==( - const SimpleWideUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - - case D: - return (m_third == x.m_third); - break; - - default: - break; - } - return false; -} - -bool SimpleWideUnion::operator !=( - const SimpleWideUnion& x) const -{ - return !(*this == x); -} - -void SimpleWideUnion::_d( - int32_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch(__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - - case D: - switch(__d) - { - case D: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleWideUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleWideUnion::_d() -{ - return m__d; -} - -void SimpleWideUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t SimpleWideUnion::first() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleWideUnion::first() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleWideUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t SimpleWideUnion::second() const -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleWideUnion::second() -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -void SimpleWideUnion::third( - uint8_t _third) -{ - m_third = _third; - m__d = D; - -} - -uint8_t SimpleWideUnion::third() const -{ - bool b = false; - - switch(m__d) - { - case D: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_third; -} - -uint8_t& SimpleWideUnion::third() -{ - bool b = false; - - switch(m__d) - { - case D: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_third; -} - - -// TODO(Ricardo) Review -size_t SimpleWideUnion::getCdrSerializedSize( - const SimpleWideUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case A: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case B: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - - case D: - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void SimpleWideUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_first; - - break; - - - case B: - scdr << m_second; - - break; - - - case D: - scdr << m_third; - - break; - - default: - break; - } -} - -void SimpleWideUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_first; - - - break; - - - case B: - dcdr >> m_second; - - - break; - - - case D: - dcdr >> m_third; - - - break; - - default: - break; - } -} - - - - - -SimpleWideUnionStruct::SimpleWideUnionStruct() -{ - // SimpleWideUnion m_my_union - - - // Just to register all known types - registerWideEnumTypes(); -} - -SimpleWideUnionStruct::~SimpleWideUnionStruct() -{ -} - -SimpleWideUnionStruct::SimpleWideUnionStruct( - const SimpleWideUnionStruct& x) -{ - m_my_union = x.m_my_union; - -} - -SimpleWideUnionStruct::SimpleWideUnionStruct( - SimpleWideUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -SimpleWideUnionStruct& SimpleWideUnionStruct::operator =( - const SimpleWideUnionStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -SimpleWideUnionStruct& SimpleWideUnionStruct::operator =( - SimpleWideUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool SimpleWideUnionStruct::operator ==( - const SimpleWideUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleWideUnionStruct::operator !=( - const SimpleWideUnionStruct& x) const -{ - return !(*this == x); -} - -size_t SimpleWideUnionStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimpleWideUnionStruct_max_cdr_typesize; -} - -size_t SimpleWideUnionStruct::getCdrSerializedSize( - const SimpleWideUnionStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleWideUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimpleWideUnionStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void SimpleWideUnionStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool SimpleWideUnionStruct::isKeyDefined() -{ - return false; -} - -void SimpleWideUnionStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleWideUnionStruct::my_union( - const SimpleWideUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleWideUnionStruct::my_union( - SimpleWideUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleWideUnion& SimpleWideUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleWideUnion& SimpleWideUnionStruct::my_union() -{ - return m_my_union; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/unittest/xtypes/idl/WideEnumv1.h b/test/unittest/xtypes/idl/WideEnumv1.h deleted file mode 100644 index 99c17bd53b0..00000000000 --- a/test/unittest/xtypes/idl/WideEnumv1.h +++ /dev/null @@ -1,559 +0,0 @@ -// 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 WideEnum.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_WIDEENUM_H_ -#define _FAST_DDS_GENERATED_WIDEENUM_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(WIDEENUM_SOURCE) -#define WIDEENUM_DllAPI __declspec( dllexport ) -#else -#define WIDEENUM_DllAPI __declspec( dllimport ) -#endif // WIDEENUM_SOURCE -#else -#define WIDEENUM_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define WIDEENUM_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - -/*! - * @brief This class represents the enumeration MyEnumWide defined by the user in the IDL file. - * @ingroup WideEnum - */ -enum MyEnumWide : uint32_t -{ - A, - B, - C, - D -}; - - -/*! - * @brief This class represents the structure MyEnumWideStruct defined by the user in the IDL file. - * @ingroup WideEnum - */ -class MyEnumWideStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyEnumWideStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyEnumWideStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MyEnumWideStruct that will be copied. - */ - eProsima_user_DllExport MyEnumWideStruct( - const MyEnumWideStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MyEnumWideStruct that will be copied. - */ - eProsima_user_DllExport MyEnumWideStruct( - MyEnumWideStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MyEnumWideStruct that will be copied. - */ - eProsima_user_DllExport MyEnumWideStruct& operator =( - const MyEnumWideStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MyEnumWideStruct that will be copied. - */ - eProsima_user_DllExport MyEnumWideStruct& operator =( - MyEnumWideStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MyEnumWideStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyEnumWideStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MyEnumWideStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyEnumWideStruct& x) const; - - /*! - * @brief This function sets a value in member my_enum_wide - * @param _my_enum_wide New value for member my_enum_wide - */ - eProsima_user_DllExport void my_enum_wide( - MyEnumWide _my_enum_wide); - - /*! - * @brief This function returns the value of member my_enum_wide - * @return Value of member my_enum_wide - */ - eProsima_user_DllExport MyEnumWide my_enum_wide() const; - - /*! - * @brief This function returns a reference to member my_enum_wide - * @return Reference to member my_enum_wide - */ - eProsima_user_DllExport MyEnumWide& my_enum_wide(); - - - /*! - * @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 MyEnumWideStruct& 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 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: - - MyEnumWide m_my_enum_wide; - -}; - - - -/*! - * @brief This class represents the union SimpleWideUnion defined by the user in the IDL file. - * @ingroup WideEnum - */ -class SimpleWideUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleWideUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleWideUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleWideUnion that will be copied. - */ - eProsima_user_DllExport SimpleWideUnion( - const SimpleWideUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleWideUnion that will be copied. - */ - eProsima_user_DllExport SimpleWideUnion( - SimpleWideUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleWideUnion that will be copied. - */ - eProsima_user_DllExport SimpleWideUnion& operator =( - const SimpleWideUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleWideUnion that will be copied. - */ - eProsima_user_DllExport SimpleWideUnion& operator =( - SimpleWideUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleWideUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleWideUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleWideUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleWideUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int32_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int32_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int32_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - int32_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first(); - - - /*! - * @brief This function sets a value in member second - * @param _second New value for member second - */ - eProsima_user_DllExport void second( - int64_t _second); - - /*! - * @brief This function returns the value of member second - * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second(); - - - /*! - * @brief This function sets a value in member third - * @param _third New value for member third - */ - eProsima_user_DllExport void third( - uint8_t _third); - - /*! - * @brief This function returns the value of member third - * @return Value of member third - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport uint8_t third() const; - - /*! - * @brief This function returns a reference to member third - * @return Reference to member third - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport uint8_t& third(); - - - /*! - * @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 SimpleWideUnion& 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); - - - - - -private: - - int32_t m__d; - - int32_t m_first; - int64_t m_second; - uint8_t m_third; -}; - - - -/*! - * @brief This class represents the structure SimpleWideUnionStruct defined by the user in the IDL file. - * @ingroup WideEnum - */ -class SimpleWideUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleWideUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleWideUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleWideUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleWideUnionStruct( - const SimpleWideUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleWideUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleWideUnionStruct( - SimpleWideUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleWideUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleWideUnionStruct& operator =( - const SimpleWideUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleWideUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleWideUnionStruct& operator =( - SimpleWideUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleWideUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleWideUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleWideUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleWideUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleWideUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleWideUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleWideUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleWideUnion& my_union(); - - - /*! - * @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 SimpleWideUnionStruct& 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 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: - - SimpleWideUnion m_my_union; - -}; - - -#endif // _FAST_DDS_GENERATED_WIDEENUM_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/xtypes/CMakeLists.txt b/test/xtypes/CMakeLists.txt index 1719a3fdead..8e3d6a84c11 100644 --- a/test/xtypes/CMakeLists.txt +++ b/test/xtypes/CMakeLists.txt @@ -22,8 +22,6 @@ endif() # Unit tests ############################################################################### set(XTYPES_TESTS_SOURCE XTypesTests.cpp - idl/Types.cxx - idl/Typesv1.cxx idl/TypesPubSubTypes.cxx idl/TypesTypeObject.cxx TestPublisher.cpp diff --git a/test/xtypes/idl/Types.cxx b/test/xtypes/idl/Types.cxx deleted file mode 100644 index d0ee9153b8d..00000000000 --- a/test/xtypes/idl/Types.cxx +++ /dev/null @@ -1,5244 +0,0 @@ -// 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 Types.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Types.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#include "TypesTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - - - - -MyEnumStruct::MyEnumStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MyEnumStruct::~MyEnumStruct() -{ -} - -MyEnumStruct::MyEnumStruct( - const MyEnumStruct& x) -{ - m_my_enum = x.m_my_enum; -} - -MyEnumStruct::MyEnumStruct( - MyEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; -} - -MyEnumStruct& MyEnumStruct::operator =( - const MyEnumStruct& x) -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -MyEnumStruct& MyEnumStruct::operator =( - MyEnumStruct&& x) noexcept -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -bool MyEnumStruct::operator ==( - const MyEnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool MyEnumStruct::operator !=( - const MyEnumStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void MyEnumStruct::my_enum( - MyEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyEnum MyEnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyEnum& MyEnumStruct::my_enum() -{ - return m_my_enum; -} - - - - -MyBadEnumStruct::MyBadEnumStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MyBadEnumStruct::~MyBadEnumStruct() -{ -} - -MyBadEnumStruct::MyBadEnumStruct( - const MyBadEnumStruct& x) -{ - m_my_enum = x.m_my_enum; -} - -MyBadEnumStruct::MyBadEnumStruct( - MyBadEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; -} - -MyBadEnumStruct& MyBadEnumStruct::operator =( - const MyBadEnumStruct& x) -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -MyBadEnumStruct& MyBadEnumStruct::operator =( - MyBadEnumStruct&& x) noexcept -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -bool MyBadEnumStruct::operator ==( - const MyBadEnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool MyBadEnumStruct::operator !=( - const MyBadEnumStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void MyBadEnumStruct::my_enum( - MyBadEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyBadEnum MyBadEnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyBadEnum& MyBadEnumStruct::my_enum() -{ - return m_my_enum; -} - - - - - -MyAliasEnumStruct::MyAliasEnumStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MyAliasEnumStruct::~MyAliasEnumStruct() -{ -} - -MyAliasEnumStruct::MyAliasEnumStruct( - const MyAliasEnumStruct& x) -{ - m_my_enum = x.m_my_enum; -} - -MyAliasEnumStruct::MyAliasEnumStruct( - MyAliasEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; -} - -MyAliasEnumStruct& MyAliasEnumStruct::operator =( - const MyAliasEnumStruct& x) -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -MyAliasEnumStruct& MyAliasEnumStruct::operator =( - MyAliasEnumStruct&& x) noexcept -{ - - m_my_enum = x.m_my_enum; - return *this; -} - -bool MyAliasEnumStruct::operator ==( - const MyAliasEnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool MyAliasEnumStruct::operator !=( - const MyAliasEnumStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void MyAliasEnumStruct::my_enum( - MyAliasEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyAliasEnum MyAliasEnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyAliasEnum& MyAliasEnumStruct::my_enum() -{ - return m_my_enum; -} - - - - -BasicStruct::BasicStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -BasicStruct::~BasicStruct() -{ -} - -BasicStruct::BasicStruct( - const BasicStruct& x) -{ - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; -} - -BasicStruct::BasicStruct( - BasicStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); -} - -BasicStruct& BasicStruct::operator =( - const BasicStruct& x) -{ - - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; - return *this; -} - -BasicStruct& BasicStruct::operator =( - BasicStruct&& x) noexcept -{ - - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); - return *this; -} - -bool BasicStruct::operator ==( - const BasicStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string); -} - -bool BasicStruct::operator !=( - const BasicStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BasicStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BasicStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicStruct::my_string() -{ - return m_my_string; -} - - - - -BasicNamesStruct::BasicNamesStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -BasicNamesStruct::~BasicNamesStruct() -{ -} - -BasicNamesStruct::BasicNamesStruct( - const BasicNamesStruct& x) -{ - m_my_bool_name = x.m_my_bool_name; - m_my_int32_name = x.m_my_int32_name; - m_my_string_name = x.m_my_string_name; -} - -BasicNamesStruct::BasicNamesStruct( - BasicNamesStruct&& x) noexcept -{ - m_my_bool_name = x.m_my_bool_name; - m_my_int32_name = x.m_my_int32_name; - m_my_string_name = std::move(x.m_my_string_name); -} - -BasicNamesStruct& BasicNamesStruct::operator =( - const BasicNamesStruct& x) -{ - - m_my_bool_name = x.m_my_bool_name; - m_my_int32_name = x.m_my_int32_name; - m_my_string_name = x.m_my_string_name; - return *this; -} - -BasicNamesStruct& BasicNamesStruct::operator =( - BasicNamesStruct&& x) noexcept -{ - - m_my_bool_name = x.m_my_bool_name; - m_my_int32_name = x.m_my_int32_name; - m_my_string_name = std::move(x.m_my_string_name); - return *this; -} - -bool BasicNamesStruct::operator ==( - const BasicNamesStruct& x) const -{ - return (m_my_bool_name == x.m_my_bool_name && - m_my_int32_name == x.m_my_int32_name && - m_my_string_name == x.m_my_string_name); -} - -bool BasicNamesStruct::operator !=( - const BasicNamesStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_bool_name - * @param _my_bool_name New value for member my_bool_name - */ -void BasicNamesStruct::my_bool_name( - bool _my_bool_name) -{ - m_my_bool_name = _my_bool_name; -} - -/*! - * @brief This function returns the value of member my_bool_name - * @return Value of member my_bool_name - */ -bool BasicNamesStruct::my_bool_name() const -{ - return m_my_bool_name; -} - -/*! - * @brief This function returns a reference to member my_bool_name - * @return Reference to member my_bool_name - */ -bool& BasicNamesStruct::my_bool_name() -{ - return m_my_bool_name; -} - - -/*! - * @brief This function sets a value in member my_int32_name - * @param _my_int32_name New value for member my_int32_name - */ -void BasicNamesStruct::my_int32_name( - int32_t _my_int32_name) -{ - m_my_int32_name = _my_int32_name; -} - -/*! - * @brief This function returns the value of member my_int32_name - * @return Value of member my_int32_name - */ -int32_t BasicNamesStruct::my_int32_name() const -{ - return m_my_int32_name; -} - -/*! - * @brief This function returns a reference to member my_int32_name - * @return Reference to member my_int32_name - */ -int32_t& BasicNamesStruct::my_int32_name() -{ - return m_my_int32_name; -} - - -/*! - * @brief This function copies the value in member my_string_name - * @param _my_string_name New value to be copied in member my_string_name - */ -void BasicNamesStruct::my_string_name( - const std::string& _my_string_name) -{ - m_my_string_name = _my_string_name; -} - -/*! - * @brief This function moves the value in member my_string_name - * @param _my_string_name New value to be moved in member my_string_name - */ -void BasicNamesStruct::my_string_name( - std::string&& _my_string_name) -{ - m_my_string_name = std::move(_my_string_name); -} - -/*! - * @brief This function returns a constant reference to member my_string_name - * @return Constant reference to member my_string_name - */ -const std::string& BasicNamesStruct::my_string_name() const -{ - return m_my_string_name; -} - -/*! - * @brief This function returns a reference to member my_string_name - * @return Reference to member my_string_name - */ -std::string& BasicNamesStruct::my_string_name() -{ - return m_my_string_name; -} - - - - -BasicBadStruct::BasicBadStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -BasicBadStruct::~BasicBadStruct() -{ -} - -BasicBadStruct::BasicBadStruct( - const BasicBadStruct& x) -{ - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; -} - -BasicBadStruct::BasicBadStruct( - BasicBadStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); -} - -BasicBadStruct& BasicBadStruct::operator =( - const BasicBadStruct& x) -{ - - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; - return *this; -} - -BasicBadStruct& BasicBadStruct::operator =( - BasicBadStruct&& x) noexcept -{ - - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); - return *this; -} - -bool BasicBadStruct::operator ==( - const BasicBadStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string); -} - -bool BasicBadStruct::operator !=( - const BasicBadStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicBadStruct::my_bool( - uint8_t _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -uint8_t BasicBadStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -uint8_t& BasicBadStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicBadStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicBadStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicBadStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicBadStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicBadStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicBadStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicBadStruct::my_string() -{ - return m_my_string; -} - - - - -BasicWideStruct::BasicWideStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -BasicWideStruct::~BasicWideStruct() -{ -} - -BasicWideStruct::BasicWideStruct( - const BasicWideStruct& x) -{ - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; - m_new_int32 = x.m_new_int32; - m_new_string = x.m_new_string; -} - -BasicWideStruct::BasicWideStruct( - BasicWideStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); - m_new_int32 = x.m_new_int32; - m_new_string = std::move(x.m_new_string); -} - -BasicWideStruct& BasicWideStruct::operator =( - const BasicWideStruct& x) -{ - - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; - m_new_int32 = x.m_new_int32; - m_new_string = x.m_new_string; - return *this; -} - -BasicWideStruct& BasicWideStruct::operator =( - BasicWideStruct&& x) noexcept -{ - - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); - m_new_int32 = x.m_new_int32; - m_new_string = std::move(x.m_new_string); - return *this; -} - -bool BasicWideStruct::operator ==( - const BasicWideStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string && - m_new_int32 == x.m_new_int32 && - m_new_string == x.m_new_string); -} - -bool BasicWideStruct::operator !=( - const BasicWideStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicWideStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BasicWideStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BasicWideStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicWideStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicWideStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicWideStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicWideStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicWideStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicWideStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicWideStruct::my_string() -{ - return m_my_string; -} - - -/*! - * @brief This function sets a value in member new_int32 - * @param _new_int32 New value for member new_int32 - */ -void BasicWideStruct::new_int32( - int32_t _new_int32) -{ - m_new_int32 = _new_int32; -} - -/*! - * @brief This function returns the value of member new_int32 - * @return Value of member new_int32 - */ -int32_t BasicWideStruct::new_int32() const -{ - return m_new_int32; -} - -/*! - * @brief This function returns a reference to member new_int32 - * @return Reference to member new_int32 - */ -int32_t& BasicWideStruct::new_int32() -{ - return m_new_int32; -} - - -/*! - * @brief This function copies the value in member new_string - * @param _new_string New value to be copied in member new_string - */ -void BasicWideStruct::new_string( - const std::string& _new_string) -{ - m_new_string = _new_string; -} - -/*! - * @brief This function moves the value in member new_string - * @param _new_string New value to be moved in member new_string - */ -void BasicWideStruct::new_string( - std::string&& _new_string) -{ - m_new_string = std::move(_new_string); -} - -/*! - * @brief This function returns a constant reference to member new_string - * @return Constant reference to member new_string - */ -const std::string& BasicWideStruct::new_string() const -{ - return m_new_string; -} - -/*! - * @brief This function returns a reference to member new_string - * @return Reference to member new_string - */ -std::string& BasicWideStruct::new_string() -{ - return m_new_string; -} - - - - -BadBasicWideStruct::BadBasicWideStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -BadBasicWideStruct::~BadBasicWideStruct() -{ -} - -BadBasicWideStruct::BadBasicWideStruct( - const BadBasicWideStruct& x) -{ - m_new_int32 = x.m_new_int32; - m_new_string = x.m_new_string; - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; -} - -BadBasicWideStruct::BadBasicWideStruct( - BadBasicWideStruct&& x) noexcept -{ - m_new_int32 = x.m_new_int32; - m_new_string = std::move(x.m_new_string); - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); -} - -BadBasicWideStruct& BadBasicWideStruct::operator =( - const BadBasicWideStruct& x) -{ - - m_new_int32 = x.m_new_int32; - m_new_string = x.m_new_string; - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = x.m_my_string; - return *this; -} - -BadBasicWideStruct& BadBasicWideStruct::operator =( - BadBasicWideStruct&& x) noexcept -{ - - m_new_int32 = x.m_new_int32; - m_new_string = std::move(x.m_new_string); - m_my_bool = x.m_my_bool; - m_my_int32 = x.m_my_int32; - m_my_string = std::move(x.m_my_string); - return *this; -} - -bool BadBasicWideStruct::operator ==( - const BadBasicWideStruct& x) const -{ - return (m_new_int32 == x.m_new_int32 && - m_new_string == x.m_new_string && - m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string); -} - -bool BadBasicWideStruct::operator !=( - const BadBasicWideStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function sets a value in member new_int32 - * @param _new_int32 New value for member new_int32 - */ -void BadBasicWideStruct::new_int32( - int32_t _new_int32) -{ - m_new_int32 = _new_int32; -} - -/*! - * @brief This function returns the value of member new_int32 - * @return Value of member new_int32 - */ -int32_t BadBasicWideStruct::new_int32() const -{ - return m_new_int32; -} - -/*! - * @brief This function returns a reference to member new_int32 - * @return Reference to member new_int32 - */ -int32_t& BadBasicWideStruct::new_int32() -{ - return m_new_int32; -} - - -/*! - * @brief This function copies the value in member new_string - * @param _new_string New value to be copied in member new_string - */ -void BadBasicWideStruct::new_string( - const std::string& _new_string) -{ - m_new_string = _new_string; -} - -/*! - * @brief This function moves the value in member new_string - * @param _new_string New value to be moved in member new_string - */ -void BadBasicWideStruct::new_string( - std::string&& _new_string) -{ - m_new_string = std::move(_new_string); -} - -/*! - * @brief This function returns a constant reference to member new_string - * @return Constant reference to member new_string - */ -const std::string& BadBasicWideStruct::new_string() const -{ - return m_new_string; -} - -/*! - * @brief This function returns a reference to member new_string - * @return Reference to member new_string - */ -std::string& BadBasicWideStruct::new_string() -{ - return m_new_string; -} - - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BadBasicWideStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BadBasicWideStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BadBasicWideStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BadBasicWideStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BadBasicWideStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BadBasicWideStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BadBasicWideStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BadBasicWideStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BadBasicWideStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BadBasicWideStruct::my_string() -{ - return m_my_string; -} - - - - -StringStruct::StringStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -StringStruct::~StringStruct() -{ -} - -StringStruct::StringStruct( - const StringStruct& x) -{ - m_my_string = x.m_my_string; -} - -StringStruct::StringStruct( - StringStruct&& x) noexcept -{ - m_my_string = std::move(x.m_my_string); -} - -StringStruct& StringStruct::operator =( - const StringStruct& x) -{ - - m_my_string = x.m_my_string; - return *this; -} - -StringStruct& StringStruct::operator =( - StringStruct&& x) noexcept -{ - - m_my_string = std::move(x.m_my_string); - return *this; -} - -bool StringStruct::operator ==( - const StringStruct& x) const -{ - return (m_my_string == x.m_my_string); -} - -bool StringStruct::operator !=( - const StringStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void StringStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void StringStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& StringStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& StringStruct::my_string() -{ - return m_my_string; -} - - - - -LargeStringStruct::LargeStringStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -LargeStringStruct::~LargeStringStruct() -{ -} - -LargeStringStruct::LargeStringStruct( - const LargeStringStruct& x) -{ - m_my_large_string = x.m_my_large_string; -} - -LargeStringStruct::LargeStringStruct( - LargeStringStruct&& x) noexcept -{ - m_my_large_string = std::move(x.m_my_large_string); -} - -LargeStringStruct& LargeStringStruct::operator =( - const LargeStringStruct& x) -{ - - m_my_large_string = x.m_my_large_string; - return *this; -} - -LargeStringStruct& LargeStringStruct::operator =( - LargeStringStruct&& x) noexcept -{ - - m_my_large_string = std::move(x.m_my_large_string); - return *this; -} - -bool LargeStringStruct::operator ==( - const LargeStringStruct& x) const -{ - return (m_my_large_string == x.m_my_large_string); -} - -bool LargeStringStruct::operator !=( - const LargeStringStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_large_string - * @param _my_large_string New value to be copied in member my_large_string - */ -void LargeStringStruct::my_large_string( - const eprosima::fastcdr::fixed_string<41925>& _my_large_string) -{ - m_my_large_string = _my_large_string; -} - -/*! - * @brief This function moves the value in member my_large_string - * @param _my_large_string New value to be moved in member my_large_string - */ -void LargeStringStruct::my_large_string( - eprosima::fastcdr::fixed_string<41925>&& _my_large_string) -{ - m_my_large_string = std::move(_my_large_string); -} - -/*! - * @brief This function returns a constant reference to member my_large_string - * @return Constant reference to member my_large_string - */ -const eprosima::fastcdr::fixed_string<41925>& LargeStringStruct::my_large_string() const -{ - return m_my_large_string; -} - -/*! - * @brief This function returns a reference to member my_large_string - * @return Reference to member my_large_string - */ -eprosima::fastcdr::fixed_string<41925>& LargeStringStruct::my_large_string() -{ - return m_my_large_string; -} - - - - -WStringStruct::WStringStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -WStringStruct::~WStringStruct() -{ -} - -WStringStruct::WStringStruct( - const WStringStruct& x) -{ - m_my_wstring = x.m_my_wstring; -} - -WStringStruct::WStringStruct( - WStringStruct&& x) noexcept -{ - m_my_wstring = std::move(x.m_my_wstring); -} - -WStringStruct& WStringStruct::operator =( - const WStringStruct& x) -{ - - m_my_wstring = x.m_my_wstring; - return *this; -} - -WStringStruct& WStringStruct::operator =( - WStringStruct&& x) noexcept -{ - - m_my_wstring = std::move(x.m_my_wstring); - return *this; -} - -bool WStringStruct::operator ==( - const WStringStruct& x) const -{ - return (m_my_wstring == x.m_my_wstring); -} - -bool WStringStruct::operator !=( - const WStringStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_wstring - * @param _my_wstring New value to be copied in member my_wstring - */ -void WStringStruct::my_wstring( - const std::wstring& _my_wstring) -{ - m_my_wstring = _my_wstring; -} - -/*! - * @brief This function moves the value in member my_wstring - * @param _my_wstring New value to be moved in member my_wstring - */ -void WStringStruct::my_wstring( - std::wstring&& _my_wstring) -{ - m_my_wstring = std::move(_my_wstring); -} - -/*! - * @brief This function returns a constant reference to member my_wstring - * @return Constant reference to member my_wstring - */ -const std::wstring& WStringStruct::my_wstring() const -{ - return m_my_wstring; -} - -/*! - * @brief This function returns a reference to member my_wstring - * @return Reference to member my_wstring - */ -std::wstring& WStringStruct::my_wstring() -{ - return m_my_wstring; -} - - - - -LargeWStringStruct::LargeWStringStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -LargeWStringStruct::~LargeWStringStruct() -{ -} - -LargeWStringStruct::LargeWStringStruct( - const LargeWStringStruct& x) -{ - m_my_large_wstring = x.m_my_large_wstring; -} - -LargeWStringStruct::LargeWStringStruct( - LargeWStringStruct&& x) noexcept -{ - m_my_large_wstring = std::move(x.m_my_large_wstring); -} - -LargeWStringStruct& LargeWStringStruct::operator =( - const LargeWStringStruct& x) -{ - - m_my_large_wstring = x.m_my_large_wstring; - return *this; -} - -LargeWStringStruct& LargeWStringStruct::operator =( - LargeWStringStruct&& x) noexcept -{ - - m_my_large_wstring = std::move(x.m_my_large_wstring); - return *this; -} - -bool LargeWStringStruct::operator ==( - const LargeWStringStruct& x) const -{ - return (m_my_large_wstring == x.m_my_large_wstring); -} - -bool LargeWStringStruct::operator !=( - const LargeWStringStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_large_wstring - * @param _my_large_wstring New value to be copied in member my_large_wstring - */ -void LargeWStringStruct::my_large_wstring( - const std::wstring& _my_large_wstring) -{ - m_my_large_wstring = _my_large_wstring; -} - -/*! - * @brief This function moves the value in member my_large_wstring - * @param _my_large_wstring New value to be moved in member my_large_wstring - */ -void LargeWStringStruct::my_large_wstring( - std::wstring&& _my_large_wstring) -{ - m_my_large_wstring = std::move(_my_large_wstring); -} - -/*! - * @brief This function returns a constant reference to member my_large_wstring - * @return Constant reference to member my_large_wstring - */ -const std::wstring& LargeWStringStruct::my_large_wstring() const -{ - return m_my_large_wstring; -} - -/*! - * @brief This function returns a reference to member my_large_wstring - * @return Reference to member my_large_wstring - */ -std::wstring& LargeWStringStruct::my_large_wstring() -{ - return m_my_large_wstring; -} - - - - -ArrayStruct::ArrayStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -ArrayStruct::~ArrayStruct() -{ -} - -ArrayStruct::ArrayStruct( - const ArrayStruct& x) -{ - m_my_array = x.m_my_array; -} - -ArrayStruct::ArrayStruct( - ArrayStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); -} - -ArrayStruct& ArrayStruct::operator =( - const ArrayStruct& x) -{ - - m_my_array = x.m_my_array; - return *this; -} - -ArrayStruct& ArrayStruct::operator =( - ArrayStruct&& x) noexcept -{ - - m_my_array = std::move(x.m_my_array); - return *this; -} - -bool ArrayStruct::operator ==( - const ArrayStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArrayStruct::operator !=( - const ArrayStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArrayStruct::my_array( - const std::array& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArrayStruct::my_array( - std::array&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array& ArrayStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array& ArrayStruct::my_array() -{ - return m_my_array; -} - - - - -ArrayStructEqual::ArrayStructEqual() -{ - // Just to register all known types - registerTypesTypes(); -} - -ArrayStructEqual::~ArrayStructEqual() -{ -} - -ArrayStructEqual::ArrayStructEqual( - const ArrayStructEqual& x) -{ - m_my_array_equal = x.m_my_array_equal; -} - -ArrayStructEqual::ArrayStructEqual( - ArrayStructEqual&& x) noexcept -{ - m_my_array_equal = std::move(x.m_my_array_equal); -} - -ArrayStructEqual& ArrayStructEqual::operator =( - const ArrayStructEqual& x) -{ - - m_my_array_equal = x.m_my_array_equal; - return *this; -} - -ArrayStructEqual& ArrayStructEqual::operator =( - ArrayStructEqual&& x) noexcept -{ - - m_my_array_equal = std::move(x.m_my_array_equal); - return *this; -} - -bool ArrayStructEqual::operator ==( - const ArrayStructEqual& x) const -{ - return (m_my_array_equal == x.m_my_array_equal); -} - -bool ArrayStructEqual::operator !=( - const ArrayStructEqual& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_array_equal - * @param _my_array_equal New value to be copied in member my_array_equal - */ -void ArrayStructEqual::my_array_equal( - const std::array& _my_array_equal) -{ - m_my_array_equal = _my_array_equal; -} - -/*! - * @brief This function moves the value in member my_array_equal - * @param _my_array_equal New value to be moved in member my_array_equal - */ -void ArrayStructEqual::my_array_equal( - std::array&& _my_array_equal) -{ - m_my_array_equal = std::move(_my_array_equal); -} - -/*! - * @brief This function returns a constant reference to member my_array_equal - * @return Constant reference to member my_array_equal - */ -const std::array& ArrayStructEqual::my_array_equal() const -{ - return m_my_array_equal; -} - -/*! - * @brief This function returns a reference to member my_array_equal - * @return Reference to member my_array_equal - */ -std::array& ArrayStructEqual::my_array_equal() -{ - return m_my_array_equal; -} - - - - -ArrayBadStruct::ArrayBadStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -ArrayBadStruct::~ArrayBadStruct() -{ -} - -ArrayBadStruct::ArrayBadStruct( - const ArrayBadStruct& x) -{ - m_my_array = x.m_my_array; -} - -ArrayBadStruct::ArrayBadStruct( - ArrayBadStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); -} - -ArrayBadStruct& ArrayBadStruct::operator =( - const ArrayBadStruct& x) -{ - - m_my_array = x.m_my_array; - return *this; -} - -ArrayBadStruct& ArrayBadStruct::operator =( - ArrayBadStruct&& x) noexcept -{ - - m_my_array = std::move(x.m_my_array); - return *this; -} - -bool ArrayBadStruct::operator ==( - const ArrayBadStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArrayBadStruct::operator !=( - const ArrayBadStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArrayBadStruct::my_array( - const std::array& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArrayBadStruct::my_array( - std::array&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array& ArrayBadStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array& ArrayBadStruct::my_array() -{ - return m_my_array; -} - - - - -ArrayDimensionsStruct::ArrayDimensionsStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -ArrayDimensionsStruct::~ArrayDimensionsStruct() -{ -} - -ArrayDimensionsStruct::ArrayDimensionsStruct( - const ArrayDimensionsStruct& x) -{ - m_my_array = x.m_my_array; -} - -ArrayDimensionsStruct::ArrayDimensionsStruct( - ArrayDimensionsStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); -} - -ArrayDimensionsStruct& ArrayDimensionsStruct::operator =( - const ArrayDimensionsStruct& x) -{ - - m_my_array = x.m_my_array; - return *this; -} - -ArrayDimensionsStruct& ArrayDimensionsStruct::operator =( - ArrayDimensionsStruct&& x) noexcept -{ - - m_my_array = std::move(x.m_my_array); - return *this; -} - -bool ArrayDimensionsStruct::operator ==( - const ArrayDimensionsStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArrayDimensionsStruct::operator !=( - const ArrayDimensionsStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArrayDimensionsStruct::my_array( - const std::array, 2>& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArrayDimensionsStruct::my_array( - std::array, 2>&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array, 2>& ArrayDimensionsStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array, 2>& ArrayDimensionsStruct::my_array() -{ - return m_my_array; -} - - - - -ArraySizeStruct::ArraySizeStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -ArraySizeStruct::~ArraySizeStruct() -{ -} - -ArraySizeStruct::ArraySizeStruct( - const ArraySizeStruct& x) -{ - m_my_array = x.m_my_array; -} - -ArraySizeStruct::ArraySizeStruct( - ArraySizeStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); -} - -ArraySizeStruct& ArraySizeStruct::operator =( - const ArraySizeStruct& x) -{ - - m_my_array = x.m_my_array; - return *this; -} - -ArraySizeStruct& ArraySizeStruct::operator =( - ArraySizeStruct&& x) noexcept -{ - - m_my_array = std::move(x.m_my_array); - return *this; -} - -bool ArraySizeStruct::operator ==( - const ArraySizeStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArraySizeStruct::operator !=( - const ArraySizeStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArraySizeStruct::my_array( - const std::array& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArraySizeStruct::my_array( - std::array&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array& ArraySizeStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array& ArraySizeStruct::my_array() -{ - return m_my_array; -} - - - - - - -SequenceStruct::SequenceStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SequenceStruct::~SequenceStruct() -{ -} - -SequenceStruct::SequenceStruct( - const SequenceStruct& x) -{ - m_my_sequence = x.m_my_sequence; -} - -SequenceStruct::SequenceStruct( - SequenceStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); -} - -SequenceStruct& SequenceStruct::operator =( - const SequenceStruct& x) -{ - - m_my_sequence = x.m_my_sequence; - return *this; -} - -SequenceStruct& SequenceStruct::operator =( - SequenceStruct&& x) noexcept -{ - - m_my_sequence = std::move(x.m_my_sequence); - return *this; -} - -bool SequenceStruct::operator ==( - const SequenceStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceStruct::operator !=( - const SequenceStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - -SequenceStructEqual::SequenceStructEqual() -{ - // Just to register all known types - registerTypesTypes(); -} - -SequenceStructEqual::~SequenceStructEqual() -{ -} - -SequenceStructEqual::SequenceStructEqual( - const SequenceStructEqual& x) -{ - m_my_sequence_equal = x.m_my_sequence_equal; -} - -SequenceStructEqual::SequenceStructEqual( - SequenceStructEqual&& x) noexcept -{ - m_my_sequence_equal = std::move(x.m_my_sequence_equal); -} - -SequenceStructEqual& SequenceStructEqual::operator =( - const SequenceStructEqual& x) -{ - - m_my_sequence_equal = x.m_my_sequence_equal; - return *this; -} - -SequenceStructEqual& SequenceStructEqual::operator =( - SequenceStructEqual&& x) noexcept -{ - - m_my_sequence_equal = std::move(x.m_my_sequence_equal); - return *this; -} - -bool SequenceStructEqual::operator ==( - const SequenceStructEqual& x) const -{ - return (m_my_sequence_equal == x.m_my_sequence_equal); -} - -bool SequenceStructEqual::operator !=( - const SequenceStructEqual& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence_equal - * @param _my_sequence_equal New value to be copied in member my_sequence_equal - */ -void SequenceStructEqual::my_sequence_equal( - const std::vector& _my_sequence_equal) -{ - m_my_sequence_equal = _my_sequence_equal; -} - -/*! - * @brief This function moves the value in member my_sequence_equal - * @param _my_sequence_equal New value to be moved in member my_sequence_equal - */ -void SequenceStructEqual::my_sequence_equal( - std::vector&& _my_sequence_equal) -{ - m_my_sequence_equal = std::move(_my_sequence_equal); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_equal - * @return Constant reference to member my_sequence_equal - */ -const std::vector& SequenceStructEqual::my_sequence_equal() const -{ - return m_my_sequence_equal; -} - -/*! - * @brief This function returns a reference to member my_sequence_equal - * @return Reference to member my_sequence_equal - */ -std::vector& SequenceStructEqual::my_sequence_equal() -{ - return m_my_sequence_equal; -} - - - - - - -SequenceBadStruct::SequenceBadStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SequenceBadStruct::~SequenceBadStruct() -{ -} - -SequenceBadStruct::SequenceBadStruct( - const SequenceBadStruct& x) -{ - m_my_sequence = x.m_my_sequence; -} - -SequenceBadStruct::SequenceBadStruct( - SequenceBadStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); -} - -SequenceBadStruct& SequenceBadStruct::operator =( - const SequenceBadStruct& x) -{ - - m_my_sequence = x.m_my_sequence; - return *this; -} - -SequenceBadStruct& SequenceBadStruct::operator =( - SequenceBadStruct&& x) noexcept -{ - - m_my_sequence = std::move(x.m_my_sequence); - return *this; -} - -bool SequenceBadStruct::operator ==( - const SequenceBadStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceBadStruct::operator !=( - const SequenceBadStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceBadStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceBadStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceBadStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceBadStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - -SequenceBoundsStruct::SequenceBoundsStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SequenceBoundsStruct::~SequenceBoundsStruct() -{ -} - -SequenceBoundsStruct::SequenceBoundsStruct( - const SequenceBoundsStruct& x) -{ - m_my_sequence = x.m_my_sequence; -} - -SequenceBoundsStruct::SequenceBoundsStruct( - SequenceBoundsStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); -} - -SequenceBoundsStruct& SequenceBoundsStruct::operator =( - const SequenceBoundsStruct& x) -{ - - m_my_sequence = x.m_my_sequence; - return *this; -} - -SequenceBoundsStruct& SequenceBoundsStruct::operator =( - SequenceBoundsStruct&& x) noexcept -{ - - m_my_sequence = std::move(x.m_my_sequence); - return *this; -} - -bool SequenceBoundsStruct::operator ==( - const SequenceBoundsStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceBoundsStruct::operator !=( - const SequenceBoundsStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceBoundsStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceBoundsStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceBoundsStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceBoundsStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - - - -SequenceSequenceStruct::SequenceSequenceStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SequenceSequenceStruct::~SequenceSequenceStruct() -{ -} - -SequenceSequenceStruct::SequenceSequenceStruct( - const SequenceSequenceStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; -} - -SequenceSequenceStruct::SequenceSequenceStruct( - SequenceSequenceStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); -} - -SequenceSequenceStruct& SequenceSequenceStruct::operator =( - const SequenceSequenceStruct& x) -{ - - m_my_sequence_sequence = x.m_my_sequence_sequence; - return *this; -} - -SequenceSequenceStruct& SequenceSequenceStruct::operator =( - SequenceSequenceStruct&& x) noexcept -{ - - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - return *this; -} - -bool SequenceSequenceStruct::operator ==( - const SequenceSequenceStruct& x) const -{ - return (m_my_sequence_sequence == x.m_my_sequence_sequence); -} - -bool SequenceSequenceStruct::operator !=( - const SequenceSequenceStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ -void SequenceSequenceStruct::my_sequence_sequence( - const std::vector>& _my_sequence_sequence) -{ - m_my_sequence_sequence = _my_sequence_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ -void SequenceSequenceStruct::my_sequence_sequence( - std::vector>&& _my_sequence_sequence) -{ - m_my_sequence_sequence = std::move(_my_sequence_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ -const std::vector>& SequenceSequenceStruct::my_sequence_sequence() const -{ - return m_my_sequence_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ -std::vector>& SequenceSequenceStruct::my_sequence_sequence() -{ - return m_my_sequence_sequence; -} - - - - - - - - -SequenceSequenceBoundsStruct::SequenceSequenceBoundsStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SequenceSequenceBoundsStruct::~SequenceSequenceBoundsStruct() -{ -} - -SequenceSequenceBoundsStruct::SequenceSequenceBoundsStruct( - const SequenceSequenceBoundsStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; -} - -SequenceSequenceBoundsStruct::SequenceSequenceBoundsStruct( - SequenceSequenceBoundsStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); -} - -SequenceSequenceBoundsStruct& SequenceSequenceBoundsStruct::operator =( - const SequenceSequenceBoundsStruct& x) -{ - - m_my_sequence_sequence = x.m_my_sequence_sequence; - return *this; -} - -SequenceSequenceBoundsStruct& SequenceSequenceBoundsStruct::operator =( - SequenceSequenceBoundsStruct&& x) noexcept -{ - - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - return *this; -} - -bool SequenceSequenceBoundsStruct::operator ==( - const SequenceSequenceBoundsStruct& x) const -{ - return (m_my_sequence_sequence == x.m_my_sequence_sequence); -} - -bool SequenceSequenceBoundsStruct::operator !=( - const SequenceSequenceBoundsStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ -void SequenceSequenceBoundsStruct::my_sequence_sequence( - const std::vector>& _my_sequence_sequence) -{ - m_my_sequence_sequence = _my_sequence_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ -void SequenceSequenceBoundsStruct::my_sequence_sequence( - std::vector>&& _my_sequence_sequence) -{ - m_my_sequence_sequence = std::move(_my_sequence_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ -const std::vector>& SequenceSequenceBoundsStruct::my_sequence_sequence() const -{ - return m_my_sequence_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ -std::vector>& SequenceSequenceBoundsStruct::my_sequence_sequence() -{ - return m_my_sequence_sequence; -} - - - - - - -MapStruct::MapStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapStruct::~MapStruct() -{ -} - -MapStruct::MapStruct( - const MapStruct& x) -{ - m_my_map = x.m_my_map; -} - -MapStruct::MapStruct( - MapStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); -} - -MapStruct& MapStruct::operator =( - const MapStruct& x) -{ - - m_my_map = x.m_my_map; - return *this; -} - -MapStruct& MapStruct::operator =( - MapStruct&& x) noexcept -{ - - m_my_map = std::move(x.m_my_map); - return *this; -} - -bool MapStruct::operator ==( - const MapStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapStruct::operator !=( - const MapStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapStruct::my_map() -{ - return m_my_map; -} - - - - - - -MapStructEqual::MapStructEqual() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapStructEqual::~MapStructEqual() -{ -} - -MapStructEqual::MapStructEqual( - const MapStructEqual& x) -{ - m_my_map_equal = x.m_my_map_equal; -} - -MapStructEqual::MapStructEqual( - MapStructEqual&& x) noexcept -{ - m_my_map_equal = std::move(x.m_my_map_equal); -} - -MapStructEqual& MapStructEqual::operator =( - const MapStructEqual& x) -{ - - m_my_map_equal = x.m_my_map_equal; - return *this; -} - -MapStructEqual& MapStructEqual::operator =( - MapStructEqual&& x) noexcept -{ - - m_my_map_equal = std::move(x.m_my_map_equal); - return *this; -} - -bool MapStructEqual::operator ==( - const MapStructEqual& x) const -{ - return (m_my_map_equal == x.m_my_map_equal); -} - -bool MapStructEqual::operator !=( - const MapStructEqual& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map_equal - * @param _my_map_equal New value to be copied in member my_map_equal - */ -void MapStructEqual::my_map_equal( - const std::map& _my_map_equal) -{ - m_my_map_equal = _my_map_equal; -} - -/*! - * @brief This function moves the value in member my_map_equal - * @param _my_map_equal New value to be moved in member my_map_equal - */ -void MapStructEqual::my_map_equal( - std::map&& _my_map_equal) -{ - m_my_map_equal = std::move(_my_map_equal); -} - -/*! - * @brief This function returns a constant reference to member my_map_equal - * @return Constant reference to member my_map_equal - */ -const std::map& MapStructEqual::my_map_equal() const -{ - return m_my_map_equal; -} - -/*! - * @brief This function returns a reference to member my_map_equal - * @return Reference to member my_map_equal - */ -std::map& MapStructEqual::my_map_equal() -{ - return m_my_map_equal; -} - - - - - - -MapBadKeyStruct::MapBadKeyStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapBadKeyStruct::~MapBadKeyStruct() -{ -} - -MapBadKeyStruct::MapBadKeyStruct( - const MapBadKeyStruct& x) -{ - m_my_map = x.m_my_map; -} - -MapBadKeyStruct::MapBadKeyStruct( - MapBadKeyStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); -} - -MapBadKeyStruct& MapBadKeyStruct::operator =( - const MapBadKeyStruct& x) -{ - - m_my_map = x.m_my_map; - return *this; -} - -MapBadKeyStruct& MapBadKeyStruct::operator =( - MapBadKeyStruct&& x) noexcept -{ - - m_my_map = std::move(x.m_my_map); - return *this; -} - -bool MapBadKeyStruct::operator ==( - const MapBadKeyStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapBadKeyStruct::operator !=( - const MapBadKeyStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapBadKeyStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapBadKeyStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapBadKeyStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapBadKeyStruct::my_map() -{ - return m_my_map; -} - - - - - - -MapBadElemStruct::MapBadElemStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapBadElemStruct::~MapBadElemStruct() -{ -} - -MapBadElemStruct::MapBadElemStruct( - const MapBadElemStruct& x) -{ - m_my_map = x.m_my_map; -} - -MapBadElemStruct::MapBadElemStruct( - MapBadElemStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); -} - -MapBadElemStruct& MapBadElemStruct::operator =( - const MapBadElemStruct& x) -{ - - m_my_map = x.m_my_map; - return *this; -} - -MapBadElemStruct& MapBadElemStruct::operator =( - MapBadElemStruct&& x) noexcept -{ - - m_my_map = std::move(x.m_my_map); - return *this; -} - -bool MapBadElemStruct::operator ==( - const MapBadElemStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapBadElemStruct::operator !=( - const MapBadElemStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapBadElemStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapBadElemStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapBadElemStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapBadElemStruct::my_map() -{ - return m_my_map; -} - - - - - - -MapBoundsStruct::MapBoundsStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapBoundsStruct::~MapBoundsStruct() -{ -} - -MapBoundsStruct::MapBoundsStruct( - const MapBoundsStruct& x) -{ - m_my_map = x.m_my_map; -} - -MapBoundsStruct::MapBoundsStruct( - MapBoundsStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); -} - -MapBoundsStruct& MapBoundsStruct::operator =( - const MapBoundsStruct& x) -{ - - m_my_map = x.m_my_map; - return *this; -} - -MapBoundsStruct& MapBoundsStruct::operator =( - MapBoundsStruct&& x) noexcept -{ - - m_my_map = std::move(x.m_my_map); - return *this; -} - -bool MapBoundsStruct::operator ==( - const MapBoundsStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapBoundsStruct::operator !=( - const MapBoundsStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapBoundsStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapBoundsStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapBoundsStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapBoundsStruct::my_map() -{ - return m_my_map; -} - - - - - - - - -MapMapStruct::MapMapStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapMapStruct::~MapMapStruct() -{ -} - -MapMapStruct::MapMapStruct( - const MapMapStruct& x) -{ - m_my_map_map = x.m_my_map_map; -} - -MapMapStruct::MapMapStruct( - MapMapStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); -} - -MapMapStruct& MapMapStruct::operator =( - const MapMapStruct& x) -{ - - m_my_map_map = x.m_my_map_map; - return *this; -} - -MapMapStruct& MapMapStruct::operator =( - MapMapStruct&& x) noexcept -{ - - m_my_map_map = std::move(x.m_my_map_map); - return *this; -} - -bool MapMapStruct::operator ==( - const MapMapStruct& x) const -{ - return (m_my_map_map == x.m_my_map_map); -} - -bool MapMapStruct::operator !=( - const MapMapStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ -void MapMapStruct::my_map_map( - const std::map>& _my_map_map) -{ - m_my_map_map = _my_map_map; -} - -/*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ -void MapMapStruct::my_map_map( - std::map>&& _my_map_map) -{ - m_my_map_map = std::move(_my_map_map); -} - -/*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ -const std::map>& MapMapStruct::my_map_map() const -{ - return m_my_map_map; -} - -/*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ -std::map>& MapMapStruct::my_map_map() -{ - return m_my_map_map; -} - - - - - - - - -MapMapBoundsStruct::MapMapBoundsStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -MapMapBoundsStruct::~MapMapBoundsStruct() -{ -} - -MapMapBoundsStruct::MapMapBoundsStruct( - const MapMapBoundsStruct& x) -{ - m_my_map_map = x.m_my_map_map; -} - -MapMapBoundsStruct::MapMapBoundsStruct( - MapMapBoundsStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); -} - -MapMapBoundsStruct& MapMapBoundsStruct::operator =( - const MapMapBoundsStruct& x) -{ - - m_my_map_map = x.m_my_map_map; - return *this; -} - -MapMapBoundsStruct& MapMapBoundsStruct::operator =( - MapMapBoundsStruct&& x) noexcept -{ - - m_my_map_map = std::move(x.m_my_map_map); - return *this; -} - -bool MapMapBoundsStruct::operator ==( - const MapMapBoundsStruct& x) const -{ - return (m_my_map_map == x.m_my_map_map); -} - -bool MapMapBoundsStruct::operator !=( - const MapMapBoundsStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ -void MapMapBoundsStruct::my_map_map( - const std::map>& _my_map_map) -{ - m_my_map_map = _my_map_map; -} - -/*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ -void MapMapBoundsStruct::my_map_map( - std::map>&& _my_map_map) -{ - m_my_map_map = std::move(_my_map_map); -} - -/*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ -const std::map>& MapMapBoundsStruct::my_map_map() const -{ - return m_my_map_map; -} - -/*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ -std::map>& MapMapBoundsStruct::my_map_map() -{ - return m_my_map_map; -} - - - - -SimpleUnion::SimpleUnion() -{ - m__d = A; -} - -SimpleUnion::~SimpleUnion() -{ -} - -SimpleUnion::SimpleUnion( - const SimpleUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleUnion::SimpleUnion( - SimpleUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleUnion& SimpleUnion::operator =( - const SimpleUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleUnion& SimpleUnion::operator =( - SimpleUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleUnion::operator ==( - const SimpleUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleUnion::operator !=( - const SimpleUnion& x) const -{ - return !(*this == x); -} - -void SimpleUnion::_d( - int32_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch (__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleUnion::_d() -{ - return m__d; -} - -void SimpleUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t SimpleUnion::first() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleUnion::first() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t SimpleUnion::second() const -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleUnion::second() -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - - - -SimpleUnionNames::SimpleUnionNames() -{ - m__d = A; -} - -SimpleUnionNames::~SimpleUnionNames() -{ -} - -SimpleUnionNames::SimpleUnionNames( - const SimpleUnionNames& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } -} - -SimpleUnionNames::SimpleUnionNames( - SimpleUnionNames&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } -} - -SimpleUnionNames& SimpleUnionNames::operator =( - const SimpleUnionNames& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } - - return *this; -} - -SimpleUnionNames& SimpleUnionNames::operator =( - SimpleUnionNames&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } - - return *this; -} - -bool SimpleUnionNames::operator ==( - const SimpleUnionNames& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_first_case == x.m_first_case); - break; - - - case B: - return (m_second_case == x.m_second_case); - break; - - default: - break; - } - return false; -} - -bool SimpleUnionNames::operator !=( - const SimpleUnionNames& x) const -{ - return !(*this == x); -} - -void SimpleUnionNames::_d( - int32_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch (__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleUnionNames::_d() const -{ - return m__d; -} - -int32_t& SimpleUnionNames::_d() -{ - return m__d; -} - -void SimpleUnionNames::first_case( - int32_t _first_case) -{ - m_first_case = _first_case; - m__d = A; - -} - -int32_t SimpleUnionNames::first_case() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first_case; -} - -int32_t& SimpleUnionNames::first_case() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first_case; -} - - -void SimpleUnionNames::second_case( - int64_t _second_case) -{ - m_second_case = _second_case; - m__d = B; - -} - -int64_t SimpleUnionNames::second_case() const -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second_case; -} - -int64_t& SimpleUnionNames::second_case() -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second_case; -} - - - - -SimpleTypeUnion::SimpleTypeUnion() -{ - m__d = A; -} - -SimpleTypeUnion::~SimpleTypeUnion() -{ -} - -SimpleTypeUnion::SimpleTypeUnion( - const SimpleTypeUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleTypeUnion::SimpleTypeUnion( - SimpleTypeUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleTypeUnion& SimpleTypeUnion::operator =( - const SimpleTypeUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleTypeUnion& SimpleTypeUnion::operator =( - SimpleTypeUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleTypeUnion::operator ==( - const SimpleTypeUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleTypeUnion::operator !=( - const SimpleTypeUnion& x) const -{ - return !(*this == x); -} - -void SimpleTypeUnion::_d( - int32_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch (__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleTypeUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleTypeUnion::_d() -{ - return m__d; -} - -void SimpleTypeUnion::first( - uint8_t _first) -{ - m_first = _first; - m__d = A; - -} - -uint8_t SimpleTypeUnion::first() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -uint8_t& SimpleTypeUnion::first() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleTypeUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t SimpleTypeUnion::second() const -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleTypeUnion::second() -{ - bool b = false; - - switch (m__d) - { - case B: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - - - -SimpleBadUnion::SimpleBadUnion() -{ - m__d = A; -} - -SimpleBadUnion::~SimpleBadUnion() -{ -} - -SimpleBadUnion::SimpleBadUnion( - const SimpleBadUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadUnion::SimpleBadUnion( - SimpleBadUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadUnion& SimpleBadUnion::operator =( - const SimpleBadUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleBadUnion& SimpleBadUnion::operator =( - SimpleBadUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleBadUnion::operator ==( - const SimpleBadUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case C: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleBadUnion::operator !=( - const SimpleBadUnion& x) const -{ - return !(*this == x); -} - -void SimpleBadUnion::_d( - int32_t __d) -{ - bool b = false; - - switch (m__d) - { - case A: - switch (__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case C: - switch (__d) - { - case C: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleBadUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleBadUnion::_d() -{ - return m__d; -} - -void SimpleBadUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t SimpleBadUnion::first() const -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleBadUnion::first() -{ - bool b = false; - - switch (m__d) - { - case A: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleBadUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = C; - -} - -int64_t SimpleBadUnion::second() const -{ - bool b = false; - - switch (m__d) - { - case C: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleBadUnion::second() -{ - bool b = false; - - switch (m__d) - { - case C: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - - - -SimpleBadDiscUnion::SimpleBadDiscUnion() -{ - m__d = 0; -} - -SimpleBadDiscUnion::~SimpleBadDiscUnion() -{ -} - -SimpleBadDiscUnion::SimpleBadDiscUnion( - const SimpleBadDiscUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadDiscUnion::SimpleBadDiscUnion( - SimpleBadDiscUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadDiscUnion& SimpleBadDiscUnion::operator =( - const SimpleBadDiscUnion& x) -{ - m__d = x.m__d; - - switch (m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleBadDiscUnion& SimpleBadDiscUnion::operator =( - SimpleBadDiscUnion&& x) noexcept -{ - m__d = x.m__d; - - switch (m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleBadDiscUnion::operator ==( - const SimpleBadDiscUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch (m__d) - { - case 0: - return (m_first == x.m_first); - break; - - - case 1: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleBadDiscUnion::operator !=( - const SimpleBadDiscUnion& x) const -{ - return !(*this == x); -} - -void SimpleBadDiscUnion::_d( - uint8_t __d) -{ - bool b = false; - - switch (m__d) - { - case 0: - switch (__d) - { - case 0: - b = true; - break; - default: - break; - } - break; - - - case 1: - switch (__d) - { - case 1: - b = true; - break; - default: - break; - } - break; - - default: - break; - } - - if (!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -uint8_t SimpleBadDiscUnion::_d() const -{ - return m__d; -} - -uint8_t& SimpleBadDiscUnion::_d() -{ - return m__d; -} - -void SimpleBadDiscUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = 0; - -} - -int32_t SimpleBadDiscUnion::first() const -{ - bool b = false; - - switch (m__d) - { - case 0: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleBadDiscUnion::first() -{ - bool b = false; - - switch (m__d) - { - case 0: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleBadDiscUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = 1; - -} - -int64_t SimpleBadDiscUnion::second() const -{ - bool b = false; - - switch (m__d) - { - case 1: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleBadDiscUnion::second() -{ - bool b = false; - - switch (m__d) - { - case 1: - b = true; - break; - default: - break; - } - - if (!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - - - -SimpleUnionStruct::SimpleUnionStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SimpleUnionStruct::~SimpleUnionStruct() -{ -} - -SimpleUnionStruct::SimpleUnionStruct( - const SimpleUnionStruct& x) -{ - m_my_union = x.m_my_union; -} - -SimpleUnionStruct::SimpleUnionStruct( - SimpleUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -SimpleUnionStruct& SimpleUnionStruct::operator =( - const SimpleUnionStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -SimpleUnionStruct& SimpleUnionStruct::operator =( - SimpleUnionStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool SimpleUnionStruct::operator ==( - const SimpleUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleUnionStruct::operator !=( - const SimpleUnionStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleUnionStruct::my_union( - const SimpleUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleUnionStruct::my_union( - SimpleUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleUnion& SimpleUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleUnion& SimpleUnionStruct::my_union() -{ - return m_my_union; -} - - - - -SimpleUnionStructEqual::SimpleUnionStructEqual() -{ - // Just to register all known types - registerTypesTypes(); -} - -SimpleUnionStructEqual::~SimpleUnionStructEqual() -{ -} - -SimpleUnionStructEqual::SimpleUnionStructEqual( - const SimpleUnionStructEqual& x) -{ - m_my_union_equal = x.m_my_union_equal; -} - -SimpleUnionStructEqual::SimpleUnionStructEqual( - SimpleUnionStructEqual&& x) noexcept -{ - m_my_union_equal = std::move(x.m_my_union_equal); -} - -SimpleUnionStructEqual& SimpleUnionStructEqual::operator =( - const SimpleUnionStructEqual& x) -{ - - m_my_union_equal = x.m_my_union_equal; - return *this; -} - -SimpleUnionStructEqual& SimpleUnionStructEqual::operator =( - SimpleUnionStructEqual&& x) noexcept -{ - - m_my_union_equal = std::move(x.m_my_union_equal); - return *this; -} - -bool SimpleUnionStructEqual::operator ==( - const SimpleUnionStructEqual& x) const -{ - return (m_my_union_equal == x.m_my_union_equal); -} - -bool SimpleUnionStructEqual::operator !=( - const SimpleUnionStructEqual& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union_equal - * @param _my_union_equal New value to be copied in member my_union_equal - */ -void SimpleUnionStructEqual::my_union_equal( - const SimpleUnion& _my_union_equal) -{ - m_my_union_equal = _my_union_equal; -} - -/*! - * @brief This function moves the value in member my_union_equal - * @param _my_union_equal New value to be moved in member my_union_equal - */ -void SimpleUnionStructEqual::my_union_equal( - SimpleUnion&& _my_union_equal) -{ - m_my_union_equal = std::move(_my_union_equal); -} - -/*! - * @brief This function returns a constant reference to member my_union_equal - * @return Constant reference to member my_union_equal - */ -const SimpleUnion& SimpleUnionStructEqual::my_union_equal() const -{ - return m_my_union_equal; -} - -/*! - * @brief This function returns a reference to member my_union_equal - * @return Reference to member my_union_equal - */ -SimpleUnion& SimpleUnionStructEqual::my_union_equal() -{ - return m_my_union_equal; -} - - - - -SimpleUnionNamesStruct::SimpleUnionNamesStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SimpleUnionNamesStruct::~SimpleUnionNamesStruct() -{ -} - -SimpleUnionNamesStruct::SimpleUnionNamesStruct( - const SimpleUnionNamesStruct& x) -{ - m_my_union = x.m_my_union; -} - -SimpleUnionNamesStruct::SimpleUnionNamesStruct( - SimpleUnionNamesStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -SimpleUnionNamesStruct& SimpleUnionNamesStruct::operator =( - const SimpleUnionNamesStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -SimpleUnionNamesStruct& SimpleUnionNamesStruct::operator =( - SimpleUnionNamesStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool SimpleUnionNamesStruct::operator ==( - const SimpleUnionNamesStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleUnionNamesStruct::operator !=( - const SimpleUnionNamesStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleUnionNamesStruct::my_union( - const SimpleUnionNames& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleUnionNamesStruct::my_union( - SimpleUnionNames&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleUnionNames& SimpleUnionNamesStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleUnionNames& SimpleUnionNamesStruct::my_union() -{ - return m_my_union; -} - - - - -SimpleTypeUnionStruct::SimpleTypeUnionStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SimpleTypeUnionStruct::~SimpleTypeUnionStruct() -{ -} - -SimpleTypeUnionStruct::SimpleTypeUnionStruct( - const SimpleTypeUnionStruct& x) -{ - m_my_union = x.m_my_union; -} - -SimpleTypeUnionStruct::SimpleTypeUnionStruct( - SimpleTypeUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -SimpleTypeUnionStruct& SimpleTypeUnionStruct::operator =( - const SimpleTypeUnionStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -SimpleTypeUnionStruct& SimpleTypeUnionStruct::operator =( - SimpleTypeUnionStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool SimpleTypeUnionStruct::operator ==( - const SimpleTypeUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleTypeUnionStruct::operator !=( - const SimpleTypeUnionStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleTypeUnionStruct::my_union( - const SimpleTypeUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleTypeUnionStruct::my_union( - SimpleTypeUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleTypeUnion& SimpleTypeUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleTypeUnion& SimpleTypeUnionStruct::my_union() -{ - return m_my_union; -} - - - - -SimpleBadUnionStruct::SimpleBadUnionStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SimpleBadUnionStruct::~SimpleBadUnionStruct() -{ -} - -SimpleBadUnionStruct::SimpleBadUnionStruct( - const SimpleBadUnionStruct& x) -{ - m_my_union = x.m_my_union; -} - -SimpleBadUnionStruct::SimpleBadUnionStruct( - SimpleBadUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -SimpleBadUnionStruct& SimpleBadUnionStruct::operator =( - const SimpleBadUnionStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -SimpleBadUnionStruct& SimpleBadUnionStruct::operator =( - SimpleBadUnionStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool SimpleBadUnionStruct::operator ==( - const SimpleBadUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleBadUnionStruct::operator !=( - const SimpleBadUnionStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleBadUnionStruct::my_union( - const SimpleBadUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleBadUnionStruct::my_union( - SimpleBadUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleBadUnion& SimpleBadUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleBadUnion& SimpleBadUnionStruct::my_union() -{ - return m_my_union; -} - - - - -SimplBadDiscUnionStruct::SimplBadDiscUnionStruct() -{ - // Just to register all known types - registerTypesTypes(); -} - -SimplBadDiscUnionStruct::~SimplBadDiscUnionStruct() -{ -} - -SimplBadDiscUnionStruct::SimplBadDiscUnionStruct( - const SimplBadDiscUnionStruct& x) -{ - m_my_union = x.m_my_union; -} - -SimplBadDiscUnionStruct::SimplBadDiscUnionStruct( - SimplBadDiscUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); -} - -SimplBadDiscUnionStruct& SimplBadDiscUnionStruct::operator =( - const SimplBadDiscUnionStruct& x) -{ - - m_my_union = x.m_my_union; - return *this; -} - -SimplBadDiscUnionStruct& SimplBadDiscUnionStruct::operator =( - SimplBadDiscUnionStruct&& x) noexcept -{ - - m_my_union = std::move(x.m_my_union); - return *this; -} - -bool SimplBadDiscUnionStruct::operator ==( - const SimplBadDiscUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimplBadDiscUnionStruct::operator !=( - const SimplBadDiscUnionStruct& x) const -{ - return !(*this == x); -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimplBadDiscUnionStruct::my_union( - const SimpleBadDiscUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimplBadDiscUnionStruct::my_union( - SimpleBadDiscUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleBadDiscUnion& SimplBadDiscUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleBadDiscUnion& SimplBadDiscUnionStruct::my_union() -{ - return m_my_union; -} - - -// Include auxiliary functions like for serializing/deserializing. -#include "TypesCdrAux.ipp" - -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/unittest/xtypes/idl/Types.h b/test/xtypes/idl/Types.hpp similarity index 55% rename from test/unittest/xtypes/idl/Types.h rename to test/xtypes/idl/Types.hpp index e482676e515..22c35fe7713 100644 --- a/test/unittest/xtypes/idl/Types.h +++ b/test/xtypes/idl/Types.hpp @@ -13,32 +13,30 @@ // limitations under the License. /*! - * @file Types.h + * @file Types.hpp * This header file contains the declaration of the described types in the IDL file. * * This file was generated by the tool fastddsgen. */ -#include -#include "Typesv1.h" - -#if FASTCDR_VERSION_MAJOR > 1 - -#ifndef _FAST_DDS_GENERATED_TYPES_H_ -#define _FAST_DDS_GENERATED_TYPES_H_ +#ifndef _FAST_DDS_GENERATED_TYPES_HPP_ +#define _FAST_DDS_GENERATED_TYPES_HPP_ #include #include #include #include #include +#include #include #include #include #include +#include +#include "TypesTypeObject.h" #if defined(_WIN32) #if defined(EPROSIMA_USER_DLL_EXPORT) @@ -64,15 +62,6 @@ #define TYPES_DllAPI #endif // _WIN32 -namespace eprosima { -namespace fastcdr { -class Cdr; -class CdrSizeCalculator; -} // namespace fastcdr -} // namespace eprosima - - - /*! * @brief This class represents the enumeration MyEnum defined by the user in the IDL file. * @ingroup Types @@ -106,73 +95,114 @@ class MyEnumStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MyEnumStruct(); + eProsima_user_DllExport MyEnumStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MyEnumStruct(); + eProsima_user_DllExport ~MyEnumStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MyEnumStruct that will be copied. */ eProsima_user_DllExport MyEnumStruct( - const MyEnumStruct& x); + const MyEnumStruct& x) + { + m_my_enum = x.m_my_enum; + + } /*! * @brief Move constructor. * @param x Reference to the object MyEnumStruct that will be copied. */ eProsima_user_DllExport MyEnumStruct( - MyEnumStruct&& x) noexcept; + MyEnumStruct&& x) noexcept + { + m_my_enum = x.m_my_enum; + } /*! * @brief Copy assignment. * @param x Reference to the object MyEnumStruct that will be copied. */ eProsima_user_DllExport MyEnumStruct& operator =( - const MyEnumStruct& x); + const MyEnumStruct& x) + { + + m_my_enum = x.m_my_enum; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MyEnumStruct that will be copied. */ eProsima_user_DllExport MyEnumStruct& operator =( - MyEnumStruct&& x) noexcept; + MyEnumStruct&& x) noexcept + { + + m_my_enum = x.m_my_enum; + return *this; + } /*! * @brief Comparison operator. * @param x MyEnumStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MyEnumStruct& x) const; + const MyEnumStruct& x) const + { + return (m_my_enum == x.m_my_enum); + } /*! * @brief Comparison operator. * @param x MyEnumStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MyEnumStruct& x) const; + const MyEnumStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_enum * @param _my_enum New value for member my_enum */ eProsima_user_DllExport void my_enum( - MyEnum _my_enum); + MyEnum _my_enum) + { + m_my_enum = _my_enum; + } /*! * @brief This function returns the value of member my_enum * @return Value of member my_enum */ - eProsima_user_DllExport MyEnum my_enum() const; + eProsima_user_DllExport MyEnum my_enum() const + { + return m_my_enum; + } /*! * @brief This function returns a reference to member my_enum * @return Reference to member my_enum */ - eProsima_user_DllExport MyEnum& my_enum(); + eProsima_user_DllExport MyEnum& my_enum() + { + return m_my_enum; + } + + private: @@ -192,73 +222,114 @@ class MyBadEnumStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MyBadEnumStruct(); + eProsima_user_DllExport MyBadEnumStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MyBadEnumStruct(); + eProsima_user_DllExport ~MyBadEnumStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MyBadEnumStruct that will be copied. */ eProsima_user_DllExport MyBadEnumStruct( - const MyBadEnumStruct& x); + const MyBadEnumStruct& x) + { + m_my_enum = x.m_my_enum; + + } /*! * @brief Move constructor. * @param x Reference to the object MyBadEnumStruct that will be copied. */ eProsima_user_DllExport MyBadEnumStruct( - MyBadEnumStruct&& x) noexcept; + MyBadEnumStruct&& x) noexcept + { + m_my_enum = x.m_my_enum; + } /*! * @brief Copy assignment. * @param x Reference to the object MyBadEnumStruct that will be copied. */ eProsima_user_DllExport MyBadEnumStruct& operator =( - const MyBadEnumStruct& x); + const MyBadEnumStruct& x) + { + + m_my_enum = x.m_my_enum; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MyBadEnumStruct that will be copied. */ eProsima_user_DllExport MyBadEnumStruct& operator =( - MyBadEnumStruct&& x) noexcept; + MyBadEnumStruct&& x) noexcept + { + + m_my_enum = x.m_my_enum; + return *this; + } /*! * @brief Comparison operator. * @param x MyBadEnumStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MyBadEnumStruct& x) const; + const MyBadEnumStruct& x) const + { + return (m_my_enum == x.m_my_enum); + } /*! * @brief Comparison operator. * @param x MyBadEnumStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MyBadEnumStruct& x) const; + const MyBadEnumStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_enum * @param _my_enum New value for member my_enum */ eProsima_user_DllExport void my_enum( - MyBadEnum _my_enum); + MyBadEnum _my_enum) + { + m_my_enum = _my_enum; + } /*! * @brief This function returns the value of member my_enum * @return Value of member my_enum */ - eProsima_user_DllExport MyBadEnum my_enum() const; + eProsima_user_DllExport MyBadEnum my_enum() const + { + return m_my_enum; + } /*! * @brief This function returns a reference to member my_enum * @return Reference to member my_enum */ - eProsima_user_DllExport MyBadEnum& my_enum(); + eProsima_user_DllExport MyBadEnum& my_enum() + { + return m_my_enum; + } + + private: @@ -280,73 +351,114 @@ class MyAliasEnumStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MyAliasEnumStruct(); + eProsima_user_DllExport MyAliasEnumStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MyAliasEnumStruct(); + eProsima_user_DllExport ~MyAliasEnumStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MyAliasEnumStruct that will be copied. */ eProsima_user_DllExport MyAliasEnumStruct( - const MyAliasEnumStruct& x); + const MyAliasEnumStruct& x) + { + m_my_enum = x.m_my_enum; + + } /*! * @brief Move constructor. * @param x Reference to the object MyAliasEnumStruct that will be copied. */ eProsima_user_DllExport MyAliasEnumStruct( - MyAliasEnumStruct&& x) noexcept; + MyAliasEnumStruct&& x) noexcept + { + m_my_enum = x.m_my_enum; + } /*! * @brief Copy assignment. * @param x Reference to the object MyAliasEnumStruct that will be copied. */ eProsima_user_DllExport MyAliasEnumStruct& operator =( - const MyAliasEnumStruct& x); + const MyAliasEnumStruct& x) + { + + m_my_enum = x.m_my_enum; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MyAliasEnumStruct that will be copied. */ eProsima_user_DllExport MyAliasEnumStruct& operator =( - MyAliasEnumStruct&& x) noexcept; + MyAliasEnumStruct&& x) noexcept + { + + m_my_enum = x.m_my_enum; + return *this; + } /*! * @brief Comparison operator. * @param x MyAliasEnumStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MyAliasEnumStruct& x) const; + const MyAliasEnumStruct& x) const + { + return (m_my_enum == x.m_my_enum); + } /*! * @brief Comparison operator. * @param x MyAliasEnumStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MyAliasEnumStruct& x) const; + const MyAliasEnumStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_enum * @param _my_enum New value for member my_enum */ eProsima_user_DllExport void my_enum( - MyAliasEnum _my_enum); + MyAliasEnum _my_enum) + { + m_my_enum = _my_enum; + } /*! * @brief This function returns the value of member my_enum * @return Value of member my_enum */ - eProsima_user_DllExport MyAliasEnum my_enum() const; + eProsima_user_DllExport MyAliasEnum my_enum() const + { + return m_my_enum; + } /*! * @brief This function returns a reference to member my_enum * @return Reference to member my_enum */ - eProsima_user_DllExport MyAliasEnum& my_enum(); + eProsima_user_DllExport MyAliasEnum& my_enum() + { + return m_my_enum; + } + + private: @@ -366,73 +478,126 @@ class BasicStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BasicStruct(); + eProsima_user_DllExport BasicStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BasicStruct(); + eProsima_user_DllExport ~BasicStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BasicStruct that will be copied. */ eProsima_user_DllExport BasicStruct( - const BasicStruct& x); + const BasicStruct& x) + { + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + } /*! * @brief Move constructor. * @param x Reference to the object BasicStruct that will be copied. */ eProsima_user_DllExport BasicStruct( - BasicStruct&& x) noexcept; + BasicStruct&& x) noexcept + { + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + } /*! * @brief Copy assignment. * @param x Reference to the object BasicStruct that will be copied. */ eProsima_user_DllExport BasicStruct& operator =( - const BasicStruct& x); + const BasicStruct& x) + { + + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BasicStruct that will be copied. */ eProsima_user_DllExport BasicStruct& operator =( - BasicStruct&& x) noexcept; + BasicStruct&& x) noexcept + { + + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + return *this; + } /*! * @brief Comparison operator. * @param x BasicStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BasicStruct& x) const; + const BasicStruct& x) const + { + return (m_my_bool == x.m_my_bool && + m_my_int32 == x.m_my_int32 && + m_my_string == x.m_my_string); + } /*! * @brief Comparison operator. * @param x BasicStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BasicStruct& x) const; + const BasicStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_bool * @param _my_bool New value for member my_bool */ eProsima_user_DllExport void my_bool( - bool _my_bool); + bool _my_bool) + { + m_my_bool = _my_bool; + } /*! * @brief This function returns the value of member my_bool * @return Value of member my_bool */ - eProsima_user_DllExport bool my_bool() const; + eProsima_user_DllExport bool my_bool() const + { + return m_my_bool; + } /*! * @brief This function returns a reference to member my_bool * @return Reference to member my_bool */ - eProsima_user_DllExport bool& my_bool(); + eProsima_user_DllExport bool& my_bool() + { + return m_my_bool; + } /*! @@ -440,19 +605,28 @@ class BasicStruct * @param _my_int32 New value for member my_int32 */ eProsima_user_DllExport void my_int32( - int32_t _my_int32); + int32_t _my_int32) + { + m_my_int32 = _my_int32; + } /*! * @brief This function returns the value of member my_int32 * @return Value of member my_int32 */ - eProsima_user_DllExport int32_t my_int32() const; + eProsima_user_DllExport int32_t my_int32() const + { + return m_my_int32; + } /*! * @brief This function returns a reference to member my_int32 * @return Reference to member my_int32 */ - eProsima_user_DllExport int32_t& my_int32(); + eProsima_user_DllExport int32_t& my_int32() + { + return m_my_int32; + } /*! @@ -460,26 +634,40 @@ class BasicStruct * @param _my_string New value to be copied in member my_string */ eProsima_user_DllExport void my_string( - const std::string& _my_string); + const std::string& _my_string) + { + m_my_string = _my_string; + } /*! * @brief This function moves the value in member my_string * @param _my_string New value to be moved in member my_string */ eProsima_user_DllExport void my_string( - std::string&& _my_string); + std::string&& _my_string) + { + m_my_string = std::move(_my_string); + } /*! * @brief This function returns a constant reference to member my_string * @return Constant reference to member my_string */ - eProsima_user_DllExport const std::string& my_string() const; + eProsima_user_DllExport const std::string& my_string() const + { + return m_my_string; + } /*! * @brief This function returns a reference to member my_string * @return Reference to member my_string */ - eProsima_user_DllExport std::string& my_string(); + eProsima_user_DllExport std::string& my_string() + { + return m_my_string; + } + + private: @@ -501,73 +689,126 @@ class BasicNamesStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BasicNamesStruct(); + eProsima_user_DllExport BasicNamesStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BasicNamesStruct(); + eProsima_user_DllExport ~BasicNamesStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BasicNamesStruct that will be copied. */ eProsima_user_DllExport BasicNamesStruct( - const BasicNamesStruct& x); + const BasicNamesStruct& x) + { + m_my_bool_name = x.m_my_bool_name; + + m_my_int32_name = x.m_my_int32_name; + + m_my_string_name = x.m_my_string_name; + + } /*! * @brief Move constructor. * @param x Reference to the object BasicNamesStruct that will be copied. */ eProsima_user_DllExport BasicNamesStruct( - BasicNamesStruct&& x) noexcept; + BasicNamesStruct&& x) noexcept + { + m_my_bool_name = x.m_my_bool_name; + m_my_int32_name = x.m_my_int32_name; + m_my_string_name = std::move(x.m_my_string_name); + } /*! * @brief Copy assignment. * @param x Reference to the object BasicNamesStruct that will be copied. */ eProsima_user_DllExport BasicNamesStruct& operator =( - const BasicNamesStruct& x); + const BasicNamesStruct& x) + { + + m_my_bool_name = x.m_my_bool_name; + + m_my_int32_name = x.m_my_int32_name; + + m_my_string_name = x.m_my_string_name; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BasicNamesStruct that will be copied. */ eProsima_user_DllExport BasicNamesStruct& operator =( - BasicNamesStruct&& x) noexcept; + BasicNamesStruct&& x) noexcept + { + + m_my_bool_name = x.m_my_bool_name; + m_my_int32_name = x.m_my_int32_name; + m_my_string_name = std::move(x.m_my_string_name); + return *this; + } /*! * @brief Comparison operator. * @param x BasicNamesStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BasicNamesStruct& x) const; + const BasicNamesStruct& x) const + { + return (m_my_bool_name == x.m_my_bool_name && + m_my_int32_name == x.m_my_int32_name && + m_my_string_name == x.m_my_string_name); + } /*! * @brief Comparison operator. * @param x BasicNamesStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BasicNamesStruct& x) const; + const BasicNamesStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_bool_name * @param _my_bool_name New value for member my_bool_name */ eProsima_user_DllExport void my_bool_name( - bool _my_bool_name); + bool _my_bool_name) + { + m_my_bool_name = _my_bool_name; + } /*! * @brief This function returns the value of member my_bool_name * @return Value of member my_bool_name */ - eProsima_user_DllExport bool my_bool_name() const; + eProsima_user_DllExport bool my_bool_name() const + { + return m_my_bool_name; + } /*! * @brief This function returns a reference to member my_bool_name * @return Reference to member my_bool_name */ - eProsima_user_DllExport bool& my_bool_name(); + eProsima_user_DllExport bool& my_bool_name() + { + return m_my_bool_name; + } /*! @@ -575,19 +816,28 @@ class BasicNamesStruct * @param _my_int32_name New value for member my_int32_name */ eProsima_user_DllExport void my_int32_name( - int32_t _my_int32_name); + int32_t _my_int32_name) + { + m_my_int32_name = _my_int32_name; + } /*! * @brief This function returns the value of member my_int32_name * @return Value of member my_int32_name */ - eProsima_user_DllExport int32_t my_int32_name() const; + eProsima_user_DllExport int32_t my_int32_name() const + { + return m_my_int32_name; + } /*! * @brief This function returns a reference to member my_int32_name * @return Reference to member my_int32_name */ - eProsima_user_DllExport int32_t& my_int32_name(); + eProsima_user_DllExport int32_t& my_int32_name() + { + return m_my_int32_name; + } /*! @@ -595,26 +845,40 @@ class BasicNamesStruct * @param _my_string_name New value to be copied in member my_string_name */ eProsima_user_DllExport void my_string_name( - const std::string& _my_string_name); + const std::string& _my_string_name) + { + m_my_string_name = _my_string_name; + } /*! * @brief This function moves the value in member my_string_name * @param _my_string_name New value to be moved in member my_string_name */ eProsima_user_DllExport void my_string_name( - std::string&& _my_string_name); + std::string&& _my_string_name) + { + m_my_string_name = std::move(_my_string_name); + } /*! * @brief This function returns a constant reference to member my_string_name * @return Constant reference to member my_string_name */ - eProsima_user_DllExport const std::string& my_string_name() const; + eProsima_user_DllExport const std::string& my_string_name() const + { + return m_my_string_name; + } /*! * @brief This function returns a reference to member my_string_name * @return Reference to member my_string_name */ - eProsima_user_DllExport std::string& my_string_name(); + eProsima_user_DllExport std::string& my_string_name() + { + return m_my_string_name; + } + + private: @@ -636,73 +900,126 @@ class BasicBadStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BasicBadStruct(); + eProsima_user_DllExport BasicBadStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BasicBadStruct(); + eProsima_user_DllExport ~BasicBadStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BasicBadStruct that will be copied. */ eProsima_user_DllExport BasicBadStruct( - const BasicBadStruct& x); + const BasicBadStruct& x) + { + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + } /*! * @brief Move constructor. * @param x Reference to the object BasicBadStruct that will be copied. */ eProsima_user_DllExport BasicBadStruct( - BasicBadStruct&& x) noexcept; + BasicBadStruct&& x) noexcept + { + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + } /*! * @brief Copy assignment. * @param x Reference to the object BasicBadStruct that will be copied. */ eProsima_user_DllExport BasicBadStruct& operator =( - const BasicBadStruct& x); + const BasicBadStruct& x) + { + + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BasicBadStruct that will be copied. */ eProsima_user_DllExport BasicBadStruct& operator =( - BasicBadStruct&& x) noexcept; + BasicBadStruct&& x) noexcept + { + + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + return *this; + } /*! * @brief Comparison operator. * @param x BasicBadStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BasicBadStruct& x) const; + const BasicBadStruct& x) const + { + return (m_my_bool == x.m_my_bool && + m_my_int32 == x.m_my_int32 && + m_my_string == x.m_my_string); + } /*! * @brief Comparison operator. * @param x BasicBadStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BasicBadStruct& x) const; + const BasicBadStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_bool * @param _my_bool New value for member my_bool */ eProsima_user_DllExport void my_bool( - uint8_t _my_bool); + uint8_t _my_bool) + { + m_my_bool = _my_bool; + } /*! * @brief This function returns the value of member my_bool * @return Value of member my_bool */ - eProsima_user_DllExport uint8_t my_bool() const; + eProsima_user_DllExport uint8_t my_bool() const + { + return m_my_bool; + } /*! * @brief This function returns a reference to member my_bool * @return Reference to member my_bool */ - eProsima_user_DllExport uint8_t& my_bool(); + eProsima_user_DllExport uint8_t& my_bool() + { + return m_my_bool; + } /*! @@ -710,19 +1027,28 @@ class BasicBadStruct * @param _my_int32 New value for member my_int32 */ eProsima_user_DllExport void my_int32( - int32_t _my_int32); + int32_t _my_int32) + { + m_my_int32 = _my_int32; + } /*! * @brief This function returns the value of member my_int32 * @return Value of member my_int32 */ - eProsima_user_DllExport int32_t my_int32() const; + eProsima_user_DllExport int32_t my_int32() const + { + return m_my_int32; + } /*! * @brief This function returns a reference to member my_int32 * @return Reference to member my_int32 */ - eProsima_user_DllExport int32_t& my_int32(); + eProsima_user_DllExport int32_t& my_int32() + { + return m_my_int32; + } /*! @@ -730,26 +1056,40 @@ class BasicBadStruct * @param _my_string New value to be copied in member my_string */ eProsima_user_DllExport void my_string( - const std::string& _my_string); + const std::string& _my_string) + { + m_my_string = _my_string; + } /*! * @brief This function moves the value in member my_string * @param _my_string New value to be moved in member my_string */ eProsima_user_DllExport void my_string( - std::string&& _my_string); + std::string&& _my_string) + { + m_my_string = std::move(_my_string); + } /*! * @brief This function returns a constant reference to member my_string * @return Constant reference to member my_string */ - eProsima_user_DllExport const std::string& my_string() const; + eProsima_user_DllExport const std::string& my_string() const + { + return m_my_string; + } /*! * @brief This function returns a reference to member my_string * @return Reference to member my_string */ - eProsima_user_DllExport std::string& my_string(); + eProsima_user_DllExport std::string& my_string() + { + return m_my_string; + } + + private: @@ -771,73 +1111,140 @@ class BasicWideStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BasicWideStruct(); + eProsima_user_DllExport BasicWideStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BasicWideStruct(); + eProsima_user_DllExport ~BasicWideStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BasicWideStruct that will be copied. */ eProsima_user_DllExport BasicWideStruct( - const BasicWideStruct& x); + const BasicWideStruct& x) + { + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + m_new_int32 = x.m_new_int32; + + m_new_string = x.m_new_string; + + } /*! * @brief Move constructor. * @param x Reference to the object BasicWideStruct that will be copied. */ eProsima_user_DllExport BasicWideStruct( - BasicWideStruct&& x) noexcept; + BasicWideStruct&& x) noexcept + { + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + m_new_int32 = x.m_new_int32; + m_new_string = std::move(x.m_new_string); + } /*! * @brief Copy assignment. * @param x Reference to the object BasicWideStruct that will be copied. */ eProsima_user_DllExport BasicWideStruct& operator =( - const BasicWideStruct& x); + const BasicWideStruct& x) + { + + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + m_new_int32 = x.m_new_int32; + + m_new_string = x.m_new_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BasicWideStruct that will be copied. */ eProsima_user_DllExport BasicWideStruct& operator =( - BasicWideStruct&& x) noexcept; + BasicWideStruct&& x) noexcept + { + + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + m_new_int32 = x.m_new_int32; + m_new_string = std::move(x.m_new_string); + return *this; + } /*! * @brief Comparison operator. * @param x BasicWideStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BasicWideStruct& x) const; + const BasicWideStruct& x) const + { + return (m_my_bool == x.m_my_bool && + m_my_int32 == x.m_my_int32 && + m_my_string == x.m_my_string && + m_new_int32 == x.m_new_int32 && + m_new_string == x.m_new_string); + } /*! * @brief Comparison operator. * @param x BasicWideStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BasicWideStruct& x) const; + const BasicWideStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member my_bool * @param _my_bool New value for member my_bool */ eProsima_user_DllExport void my_bool( - bool _my_bool); + bool _my_bool) + { + m_my_bool = _my_bool; + } /*! * @brief This function returns the value of member my_bool * @return Value of member my_bool */ - eProsima_user_DllExport bool my_bool() const; + eProsima_user_DllExport bool my_bool() const + { + return m_my_bool; + } /*! * @brief This function returns a reference to member my_bool * @return Reference to member my_bool */ - eProsima_user_DllExport bool& my_bool(); + eProsima_user_DllExport bool& my_bool() + { + return m_my_bool; + } /*! @@ -845,19 +1252,28 @@ class BasicWideStruct * @param _my_int32 New value for member my_int32 */ eProsima_user_DllExport void my_int32( - int32_t _my_int32); + int32_t _my_int32) + { + m_my_int32 = _my_int32; + } /*! * @brief This function returns the value of member my_int32 * @return Value of member my_int32 */ - eProsima_user_DllExport int32_t my_int32() const; + eProsima_user_DllExport int32_t my_int32() const + { + return m_my_int32; + } /*! * @brief This function returns a reference to member my_int32 * @return Reference to member my_int32 */ - eProsima_user_DllExport int32_t& my_int32(); + eProsima_user_DllExport int32_t& my_int32() + { + return m_my_int32; + } /*! @@ -865,26 +1281,38 @@ class BasicWideStruct * @param _my_string New value to be copied in member my_string */ eProsima_user_DllExport void my_string( - const std::string& _my_string); + const std::string& _my_string) + { + m_my_string = _my_string; + } /*! * @brief This function moves the value in member my_string * @param _my_string New value to be moved in member my_string */ eProsima_user_DllExport void my_string( - std::string&& _my_string); + std::string&& _my_string) + { + m_my_string = std::move(_my_string); + } /*! * @brief This function returns a constant reference to member my_string * @return Constant reference to member my_string */ - eProsima_user_DllExport const std::string& my_string() const; + eProsima_user_DllExport const std::string& my_string() const + { + return m_my_string; + } /*! * @brief This function returns a reference to member my_string * @return Reference to member my_string */ - eProsima_user_DllExport std::string& my_string(); + eProsima_user_DllExport std::string& my_string() + { + return m_my_string; + } /*! @@ -892,19 +1320,28 @@ class BasicWideStruct * @param _new_int32 New value for member new_int32 */ eProsima_user_DllExport void new_int32( - int32_t _new_int32); + int32_t _new_int32) + { + m_new_int32 = _new_int32; + } /*! * @brief This function returns the value of member new_int32 * @return Value of member new_int32 */ - eProsima_user_DllExport int32_t new_int32() const; + eProsima_user_DllExport int32_t new_int32() const + { + return m_new_int32; + } /*! * @brief This function returns a reference to member new_int32 * @return Reference to member new_int32 */ - eProsima_user_DllExport int32_t& new_int32(); + eProsima_user_DllExport int32_t& new_int32() + { + return m_new_int32; + } /*! @@ -912,26 +1349,40 @@ class BasicWideStruct * @param _new_string New value to be copied in member new_string */ eProsima_user_DllExport void new_string( - const std::string& _new_string); + const std::string& _new_string) + { + m_new_string = _new_string; + } /*! * @brief This function moves the value in member new_string * @param _new_string New value to be moved in member new_string */ eProsima_user_DllExport void new_string( - std::string&& _new_string); + std::string&& _new_string) + { + m_new_string = std::move(_new_string); + } /*! * @brief This function returns a constant reference to member new_string * @return Constant reference to member new_string */ - eProsima_user_DllExport const std::string& new_string() const; + eProsima_user_DllExport const std::string& new_string() const + { + return m_new_string; + } /*! * @brief This function returns a reference to member new_string * @return Reference to member new_string */ - eProsima_user_DllExport std::string& new_string(); + eProsima_user_DllExport std::string& new_string() + { + return m_new_string; + } + + private: @@ -955,73 +1406,140 @@ class BadBasicWideStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport BadBasicWideStruct(); + eProsima_user_DllExport BadBasicWideStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~BadBasicWideStruct(); + eProsima_user_DllExport ~BadBasicWideStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object BadBasicWideStruct that will be copied. */ eProsima_user_DllExport BadBasicWideStruct( - const BadBasicWideStruct& x); + const BadBasicWideStruct& x) + { + m_new_int32 = x.m_new_int32; + + m_new_string = x.m_new_string; + + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + } /*! * @brief Move constructor. * @param x Reference to the object BadBasicWideStruct that will be copied. */ eProsima_user_DllExport BadBasicWideStruct( - BadBasicWideStruct&& x) noexcept; + BadBasicWideStruct&& x) noexcept + { + m_new_int32 = x.m_new_int32; + m_new_string = std::move(x.m_new_string); + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + } /*! * @brief Copy assignment. * @param x Reference to the object BadBasicWideStruct that will be copied. */ eProsima_user_DllExport BadBasicWideStruct& operator =( - const BadBasicWideStruct& x); + const BadBasicWideStruct& x) + { + + m_new_int32 = x.m_new_int32; + + m_new_string = x.m_new_string; + + m_my_bool = x.m_my_bool; + + m_my_int32 = x.m_my_int32; + + m_my_string = x.m_my_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object BadBasicWideStruct that will be copied. */ eProsima_user_DllExport BadBasicWideStruct& operator =( - BadBasicWideStruct&& x) noexcept; + BadBasicWideStruct&& x) noexcept + { + + m_new_int32 = x.m_new_int32; + m_new_string = std::move(x.m_new_string); + m_my_bool = x.m_my_bool; + m_my_int32 = x.m_my_int32; + m_my_string = std::move(x.m_my_string); + return *this; + } /*! * @brief Comparison operator. * @param x BadBasicWideStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const BadBasicWideStruct& x) const; + const BadBasicWideStruct& x) const + { + return (m_new_int32 == x.m_new_int32 && + m_new_string == x.m_new_string && + m_my_bool == x.m_my_bool && + m_my_int32 == x.m_my_int32 && + m_my_string == x.m_my_string); + } /*! * @brief Comparison operator. * @param x BadBasicWideStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const BadBasicWideStruct& x) const; + const BadBasicWideStruct& x) const + { + return !(*this == x); + } /*! * @brief This function sets a value in member new_int32 * @param _new_int32 New value for member new_int32 */ eProsima_user_DllExport void new_int32( - int32_t _new_int32); + int32_t _new_int32) + { + m_new_int32 = _new_int32; + } /*! * @brief This function returns the value of member new_int32 * @return Value of member new_int32 */ - eProsima_user_DllExport int32_t new_int32() const; + eProsima_user_DllExport int32_t new_int32() const + { + return m_new_int32; + } /*! * @brief This function returns a reference to member new_int32 * @return Reference to member new_int32 */ - eProsima_user_DllExport int32_t& new_int32(); + eProsima_user_DllExport int32_t& new_int32() + { + return m_new_int32; + } /*! @@ -1029,26 +1547,38 @@ class BadBasicWideStruct * @param _new_string New value to be copied in member new_string */ eProsima_user_DllExport void new_string( - const std::string& _new_string); + const std::string& _new_string) + { + m_new_string = _new_string; + } /*! * @brief This function moves the value in member new_string * @param _new_string New value to be moved in member new_string */ eProsima_user_DllExport void new_string( - std::string&& _new_string); + std::string&& _new_string) + { + m_new_string = std::move(_new_string); + } /*! * @brief This function returns a constant reference to member new_string * @return Constant reference to member new_string */ - eProsima_user_DllExport const std::string& new_string() const; + eProsima_user_DllExport const std::string& new_string() const + { + return m_new_string; + } /*! * @brief This function returns a reference to member new_string * @return Reference to member new_string */ - eProsima_user_DllExport std::string& new_string(); + eProsima_user_DllExport std::string& new_string() + { + return m_new_string; + } /*! @@ -1056,19 +1586,28 @@ class BadBasicWideStruct * @param _my_bool New value for member my_bool */ eProsima_user_DllExport void my_bool( - bool _my_bool); + bool _my_bool) + { + m_my_bool = _my_bool; + } /*! * @brief This function returns the value of member my_bool * @return Value of member my_bool */ - eProsima_user_DllExport bool my_bool() const; + eProsima_user_DllExport bool my_bool() const + { + return m_my_bool; + } /*! * @brief This function returns a reference to member my_bool * @return Reference to member my_bool */ - eProsima_user_DllExport bool& my_bool(); + eProsima_user_DllExport bool& my_bool() + { + return m_my_bool; + } /*! @@ -1076,19 +1615,28 @@ class BadBasicWideStruct * @param _my_int32 New value for member my_int32 */ eProsima_user_DllExport void my_int32( - int32_t _my_int32); + int32_t _my_int32) + { + m_my_int32 = _my_int32; + } /*! * @brief This function returns the value of member my_int32 * @return Value of member my_int32 */ - eProsima_user_DllExport int32_t my_int32() const; + eProsima_user_DllExport int32_t my_int32() const + { + return m_my_int32; + } /*! * @brief This function returns a reference to member my_int32 * @return Reference to member my_int32 */ - eProsima_user_DllExport int32_t& my_int32(); + eProsima_user_DllExport int32_t& my_int32() + { + return m_my_int32; + } /*! @@ -1096,26 +1644,40 @@ class BadBasicWideStruct * @param _my_string New value to be copied in member my_string */ eProsima_user_DllExport void my_string( - const std::string& _my_string); + const std::string& _my_string) + { + m_my_string = _my_string; + } /*! * @brief This function moves the value in member my_string * @param _my_string New value to be moved in member my_string */ eProsima_user_DllExport void my_string( - std::string&& _my_string); + std::string&& _my_string) + { + m_my_string = std::move(_my_string); + } /*! * @brief This function returns a constant reference to member my_string * @return Constant reference to member my_string */ - eProsima_user_DllExport const std::string& my_string() const; + eProsima_user_DllExport const std::string& my_string() const + { + return m_my_string; + } /*! * @brief This function returns a reference to member my_string * @return Reference to member my_string */ - eProsima_user_DllExport std::string& my_string(); + eProsima_user_DllExport std::string& my_string() + { + return m_my_string; + } + + private: @@ -1139,80 +1701,124 @@ class StringStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport StringStruct(); + eProsima_user_DllExport StringStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~StringStruct(); + eProsima_user_DllExport ~StringStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object StringStruct that will be copied. */ eProsima_user_DllExport StringStruct( - const StringStruct& x); + const StringStruct& x) + { + m_my_string = x.m_my_string; + + } /*! * @brief Move constructor. * @param x Reference to the object StringStruct that will be copied. */ eProsima_user_DllExport StringStruct( - StringStruct&& x) noexcept; + StringStruct&& x) noexcept + { + m_my_string = std::move(x.m_my_string); + } /*! * @brief Copy assignment. * @param x Reference to the object StringStruct that will be copied. */ eProsima_user_DllExport StringStruct& operator =( - const StringStruct& x); + const StringStruct& x) + { + + m_my_string = x.m_my_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object StringStruct that will be copied. */ eProsima_user_DllExport StringStruct& operator =( - StringStruct&& x) noexcept; + StringStruct&& x) noexcept + { + + m_my_string = std::move(x.m_my_string); + return *this; + } /*! * @brief Comparison operator. * @param x StringStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const StringStruct& x) const; + const StringStruct& x) const + { + return (m_my_string == x.m_my_string); + } /*! * @brief Comparison operator. * @param x StringStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const StringStruct& x) const; + const StringStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_string * @param _my_string New value to be copied in member my_string */ eProsima_user_DllExport void my_string( - const std::string& _my_string); + const std::string& _my_string) + { + m_my_string = _my_string; + } /*! * @brief This function moves the value in member my_string * @param _my_string New value to be moved in member my_string */ eProsima_user_DllExport void my_string( - std::string&& _my_string); + std::string&& _my_string) + { + m_my_string = std::move(_my_string); + } /*! * @brief This function returns a constant reference to member my_string * @return Constant reference to member my_string */ - eProsima_user_DllExport const std::string& my_string() const; + eProsima_user_DllExport const std::string& my_string() const + { + return m_my_string; + } /*! * @brief This function returns a reference to member my_string * @return Reference to member my_string */ - eProsima_user_DllExport std::string& my_string(); + eProsima_user_DllExport std::string& my_string() + { + return m_my_string; + } + + private: @@ -1232,80 +1838,124 @@ class LargeStringStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport LargeStringStruct(); + eProsima_user_DllExport LargeStringStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~LargeStringStruct(); + eProsima_user_DllExport ~LargeStringStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object LargeStringStruct that will be copied. */ eProsima_user_DllExport LargeStringStruct( - const LargeStringStruct& x); + const LargeStringStruct& x) + { + m_my_large_string = x.m_my_large_string; + + } /*! * @brief Move constructor. * @param x Reference to the object LargeStringStruct that will be copied. */ eProsima_user_DllExport LargeStringStruct( - LargeStringStruct&& x) noexcept; + LargeStringStruct&& x) noexcept + { + m_my_large_string = std::move(x.m_my_large_string); + } /*! * @brief Copy assignment. * @param x Reference to the object LargeStringStruct that will be copied. */ eProsima_user_DllExport LargeStringStruct& operator =( - const LargeStringStruct& x); + const LargeStringStruct& x) + { + + m_my_large_string = x.m_my_large_string; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object LargeStringStruct that will be copied. */ eProsima_user_DllExport LargeStringStruct& operator =( - LargeStringStruct&& x) noexcept; + LargeStringStruct&& x) noexcept + { + + m_my_large_string = std::move(x.m_my_large_string); + return *this; + } /*! * @brief Comparison operator. * @param x LargeStringStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const LargeStringStruct& x) const; + const LargeStringStruct& x) const + { + return (m_my_large_string == x.m_my_large_string); + } /*! * @brief Comparison operator. * @param x LargeStringStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const LargeStringStruct& x) const; + const LargeStringStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_large_string * @param _my_large_string New value to be copied in member my_large_string */ eProsima_user_DllExport void my_large_string( - const eprosima::fastcdr::fixed_string<41925>& _my_large_string); + const eprosima::fastcdr::fixed_string<41925>& _my_large_string) + { + m_my_large_string = _my_large_string; + } /*! * @brief This function moves the value in member my_large_string * @param _my_large_string New value to be moved in member my_large_string */ eProsima_user_DllExport void my_large_string( - eprosima::fastcdr::fixed_string<41925>&& _my_large_string); + eprosima::fastcdr::fixed_string<41925>&& _my_large_string) + { + m_my_large_string = std::move(_my_large_string); + } /*! * @brief This function returns a constant reference to member my_large_string * @return Constant reference to member my_large_string */ - eProsima_user_DllExport const eprosima::fastcdr::fixed_string<41925>& my_large_string() const; + eProsima_user_DllExport const eprosima::fastcdr::fixed_string<41925>& my_large_string() const + { + return m_my_large_string; + } /*! * @brief This function returns a reference to member my_large_string * @return Reference to member my_large_string */ - eProsima_user_DllExport eprosima::fastcdr::fixed_string<41925>& my_large_string(); + eProsima_user_DllExport eprosima::fastcdr::fixed_string<41925>& my_large_string() + { + return m_my_large_string; + } + + private: @@ -1325,80 +1975,124 @@ class WStringStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport WStringStruct(); + eProsima_user_DllExport WStringStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~WStringStruct(); + eProsima_user_DllExport ~WStringStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object WStringStruct that will be copied. */ eProsima_user_DllExport WStringStruct( - const WStringStruct& x); + const WStringStruct& x) + { + m_my_wstring = x.m_my_wstring; + + } /*! * @brief Move constructor. * @param x Reference to the object WStringStruct that will be copied. */ eProsima_user_DllExport WStringStruct( - WStringStruct&& x) noexcept; + WStringStruct&& x) noexcept + { + m_my_wstring = std::move(x.m_my_wstring); + } /*! * @brief Copy assignment. * @param x Reference to the object WStringStruct that will be copied. */ eProsima_user_DllExport WStringStruct& operator =( - const WStringStruct& x); + const WStringStruct& x) + { + + m_my_wstring = x.m_my_wstring; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object WStringStruct that will be copied. */ eProsima_user_DllExport WStringStruct& operator =( - WStringStruct&& x) noexcept; + WStringStruct&& x) noexcept + { + + m_my_wstring = std::move(x.m_my_wstring); + return *this; + } /*! * @brief Comparison operator. * @param x WStringStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const WStringStruct& x) const; + const WStringStruct& x) const + { + return (m_my_wstring == x.m_my_wstring); + } /*! * @brief Comparison operator. * @param x WStringStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const WStringStruct& x) const; + const WStringStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_wstring * @param _my_wstring New value to be copied in member my_wstring */ eProsima_user_DllExport void my_wstring( - const std::wstring& _my_wstring); + const std::wstring& _my_wstring) + { + m_my_wstring = _my_wstring; + } /*! * @brief This function moves the value in member my_wstring * @param _my_wstring New value to be moved in member my_wstring */ eProsima_user_DllExport void my_wstring( - std::wstring&& _my_wstring); + std::wstring&& _my_wstring) + { + m_my_wstring = std::move(_my_wstring); + } /*! * @brief This function returns a constant reference to member my_wstring * @return Constant reference to member my_wstring */ - eProsima_user_DllExport const std::wstring& my_wstring() const; + eProsima_user_DllExport const std::wstring& my_wstring() const + { + return m_my_wstring; + } /*! * @brief This function returns a reference to member my_wstring * @return Reference to member my_wstring */ - eProsima_user_DllExport std::wstring& my_wstring(); + eProsima_user_DllExport std::wstring& my_wstring() + { + return m_my_wstring; + } + + private: @@ -1418,80 +2112,124 @@ class LargeWStringStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport LargeWStringStruct(); + eProsima_user_DllExport LargeWStringStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~LargeWStringStruct(); + eProsima_user_DllExport ~LargeWStringStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object LargeWStringStruct that will be copied. */ eProsima_user_DllExport LargeWStringStruct( - const LargeWStringStruct& x); + const LargeWStringStruct& x) + { + m_my_large_wstring = x.m_my_large_wstring; + + } /*! * @brief Move constructor. * @param x Reference to the object LargeWStringStruct that will be copied. */ eProsima_user_DllExport LargeWStringStruct( - LargeWStringStruct&& x) noexcept; + LargeWStringStruct&& x) noexcept + { + m_my_large_wstring = std::move(x.m_my_large_wstring); + } /*! * @brief Copy assignment. * @param x Reference to the object LargeWStringStruct that will be copied. */ eProsima_user_DllExport LargeWStringStruct& operator =( - const LargeWStringStruct& x); + const LargeWStringStruct& x) + { + + m_my_large_wstring = x.m_my_large_wstring; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object LargeWStringStruct that will be copied. */ eProsima_user_DllExport LargeWStringStruct& operator =( - LargeWStringStruct&& x) noexcept; + LargeWStringStruct&& x) noexcept + { + + m_my_large_wstring = std::move(x.m_my_large_wstring); + return *this; + } /*! * @brief Comparison operator. * @param x LargeWStringStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const LargeWStringStruct& x) const; + const LargeWStringStruct& x) const + { + return (m_my_large_wstring == x.m_my_large_wstring); + } /*! * @brief Comparison operator. * @param x LargeWStringStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const LargeWStringStruct& x) const; + const LargeWStringStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_large_wstring * @param _my_large_wstring New value to be copied in member my_large_wstring */ eProsima_user_DllExport void my_large_wstring( - const std::wstring& _my_large_wstring); + const std::wstring& _my_large_wstring) + { + m_my_large_wstring = _my_large_wstring; + } /*! * @brief This function moves the value in member my_large_wstring * @param _my_large_wstring New value to be moved in member my_large_wstring */ eProsima_user_DllExport void my_large_wstring( - std::wstring&& _my_large_wstring); + std::wstring&& _my_large_wstring) + { + m_my_large_wstring = std::move(_my_large_wstring); + } /*! * @brief This function returns a constant reference to member my_large_wstring * @return Constant reference to member my_large_wstring */ - eProsima_user_DllExport const std::wstring& my_large_wstring() const; + eProsima_user_DllExport const std::wstring& my_large_wstring() const + { + return m_my_large_wstring; + } /*! * @brief This function returns a reference to member my_large_wstring * @return Reference to member my_large_wstring */ - eProsima_user_DllExport std::wstring& my_large_wstring(); + eProsima_user_DllExport std::wstring& my_large_wstring() + { + return m_my_large_wstring; + } + + private: @@ -1511,80 +2249,124 @@ class ArrayStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ArrayStruct(); + eProsima_user_DllExport ArrayStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ArrayStruct(); + eProsima_user_DllExport ~ArrayStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ArrayStruct that will be copied. */ eProsima_user_DllExport ArrayStruct( - const ArrayStruct& x); + const ArrayStruct& x) + { + m_my_array = x.m_my_array; + + } /*! * @brief Move constructor. * @param x Reference to the object ArrayStruct that will be copied. */ eProsima_user_DllExport ArrayStruct( - ArrayStruct&& x) noexcept; + ArrayStruct&& x) noexcept + { + m_my_array = std::move(x.m_my_array); + } /*! * @brief Copy assignment. * @param x Reference to the object ArrayStruct that will be copied. */ eProsima_user_DllExport ArrayStruct& operator =( - const ArrayStruct& x); + const ArrayStruct& x) + { + + m_my_array = x.m_my_array; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ArrayStruct that will be copied. */ eProsima_user_DllExport ArrayStruct& operator =( - ArrayStruct&& x) noexcept; + ArrayStruct&& x) noexcept + { + + m_my_array = std::move(x.m_my_array); + return *this; + } /*! * @brief Comparison operator. * @param x ArrayStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ArrayStruct& x) const; + const ArrayStruct& x) const + { + return (m_my_array == x.m_my_array); + } /*! * @brief Comparison operator. * @param x ArrayStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ArrayStruct& x) const; + const ArrayStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_array * @param _my_array New value to be copied in member my_array */ eProsima_user_DllExport void my_array( - const std::array& _my_array); + const std::array& _my_array) + { + m_my_array = _my_array; + } /*! * @brief This function moves the value in member my_array * @param _my_array New value to be moved in member my_array */ eProsima_user_DllExport void my_array( - std::array&& _my_array); + std::array&& _my_array) + { + m_my_array = std::move(_my_array); + } /*! * @brief This function returns a constant reference to member my_array * @return Constant reference to member my_array */ - eProsima_user_DllExport const std::array& my_array() const; + eProsima_user_DllExport const std::array& my_array() const + { + return m_my_array; + } /*! * @brief This function returns a reference to member my_array * @return Reference to member my_array */ - eProsima_user_DllExport std::array& my_array(); + eProsima_user_DllExport std::array& my_array() + { + return m_my_array; + } + + private: @@ -1604,80 +2386,124 @@ class ArrayStructEqual /*! * @brief Default constructor. */ - eProsima_user_DllExport ArrayStructEqual(); + eProsima_user_DllExport ArrayStructEqual() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ArrayStructEqual(); + eProsima_user_DllExport ~ArrayStructEqual() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ArrayStructEqual that will be copied. */ eProsima_user_DllExport ArrayStructEqual( - const ArrayStructEqual& x); + const ArrayStructEqual& x) + { + m_my_array_equal = x.m_my_array_equal; + + } /*! * @brief Move constructor. * @param x Reference to the object ArrayStructEqual that will be copied. */ eProsima_user_DllExport ArrayStructEqual( - ArrayStructEqual&& x) noexcept; + ArrayStructEqual&& x) noexcept + { + m_my_array_equal = std::move(x.m_my_array_equal); + } /*! * @brief Copy assignment. * @param x Reference to the object ArrayStructEqual that will be copied. */ eProsima_user_DllExport ArrayStructEqual& operator =( - const ArrayStructEqual& x); + const ArrayStructEqual& x) + { + + m_my_array_equal = x.m_my_array_equal; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ArrayStructEqual that will be copied. */ eProsima_user_DllExport ArrayStructEqual& operator =( - ArrayStructEqual&& x) noexcept; + ArrayStructEqual&& x) noexcept + { + + m_my_array_equal = std::move(x.m_my_array_equal); + return *this; + } /*! * @brief Comparison operator. * @param x ArrayStructEqual object to compare. */ eProsima_user_DllExport bool operator ==( - const ArrayStructEqual& x) const; + const ArrayStructEqual& x) const + { + return (m_my_array_equal == x.m_my_array_equal); + } /*! * @brief Comparison operator. * @param x ArrayStructEqual object to compare. */ eProsima_user_DllExport bool operator !=( - const ArrayStructEqual& x) const; + const ArrayStructEqual& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_array_equal * @param _my_array_equal New value to be copied in member my_array_equal */ eProsima_user_DllExport void my_array_equal( - const std::array& _my_array_equal); + const std::array& _my_array_equal) + { + m_my_array_equal = _my_array_equal; + } /*! * @brief This function moves the value in member my_array_equal * @param _my_array_equal New value to be moved in member my_array_equal */ eProsima_user_DllExport void my_array_equal( - std::array&& _my_array_equal); + std::array&& _my_array_equal) + { + m_my_array_equal = std::move(_my_array_equal); + } /*! * @brief This function returns a constant reference to member my_array_equal * @return Constant reference to member my_array_equal */ - eProsima_user_DllExport const std::array& my_array_equal() const; + eProsima_user_DllExport const std::array& my_array_equal() const + { + return m_my_array_equal; + } /*! * @brief This function returns a reference to member my_array_equal * @return Reference to member my_array_equal */ - eProsima_user_DllExport std::array& my_array_equal(); + eProsima_user_DllExport std::array& my_array_equal() + { + return m_my_array_equal; + } + + private: @@ -1697,80 +2523,124 @@ class ArrayBadStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ArrayBadStruct(); + eProsima_user_DllExport ArrayBadStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ArrayBadStruct(); + eProsima_user_DllExport ~ArrayBadStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ArrayBadStruct that will be copied. */ eProsima_user_DllExport ArrayBadStruct( - const ArrayBadStruct& x); + const ArrayBadStruct& x) + { + m_my_array = x.m_my_array; + + } /*! * @brief Move constructor. * @param x Reference to the object ArrayBadStruct that will be copied. */ eProsima_user_DllExport ArrayBadStruct( - ArrayBadStruct&& x) noexcept; + ArrayBadStruct&& x) noexcept + { + m_my_array = std::move(x.m_my_array); + } /*! * @brief Copy assignment. * @param x Reference to the object ArrayBadStruct that will be copied. */ eProsima_user_DllExport ArrayBadStruct& operator =( - const ArrayBadStruct& x); + const ArrayBadStruct& x) + { + + m_my_array = x.m_my_array; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ArrayBadStruct that will be copied. */ eProsima_user_DllExport ArrayBadStruct& operator =( - ArrayBadStruct&& x) noexcept; + ArrayBadStruct&& x) noexcept + { + + m_my_array = std::move(x.m_my_array); + return *this; + } /*! * @brief Comparison operator. * @param x ArrayBadStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ArrayBadStruct& x) const; + const ArrayBadStruct& x) const + { + return (m_my_array == x.m_my_array); + } /*! * @brief Comparison operator. * @param x ArrayBadStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ArrayBadStruct& x) const; + const ArrayBadStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_array * @param _my_array New value to be copied in member my_array */ eProsima_user_DllExport void my_array( - const std::array& _my_array); + const std::array& _my_array) + { + m_my_array = _my_array; + } /*! * @brief This function moves the value in member my_array * @param _my_array New value to be moved in member my_array */ eProsima_user_DllExport void my_array( - std::array&& _my_array); + std::array&& _my_array) + { + m_my_array = std::move(_my_array); + } /*! * @brief This function returns a constant reference to member my_array * @return Constant reference to member my_array */ - eProsima_user_DllExport const std::array& my_array() const; + eProsima_user_DllExport const std::array& my_array() const + { + return m_my_array; + } /*! * @brief This function returns a reference to member my_array * @return Reference to member my_array */ - eProsima_user_DllExport std::array& my_array(); + eProsima_user_DllExport std::array& my_array() + { + return m_my_array; + } + + private: @@ -1790,80 +2660,124 @@ class ArrayDimensionsStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ArrayDimensionsStruct(); + eProsima_user_DllExport ArrayDimensionsStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ArrayDimensionsStruct(); + eProsima_user_DllExport ~ArrayDimensionsStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ArrayDimensionsStruct that will be copied. */ eProsima_user_DllExport ArrayDimensionsStruct( - const ArrayDimensionsStruct& x); + const ArrayDimensionsStruct& x) + { + m_my_array = x.m_my_array; + + } /*! * @brief Move constructor. * @param x Reference to the object ArrayDimensionsStruct that will be copied. */ eProsima_user_DllExport ArrayDimensionsStruct( - ArrayDimensionsStruct&& x) noexcept; + ArrayDimensionsStruct&& x) noexcept + { + m_my_array = std::move(x.m_my_array); + } /*! * @brief Copy assignment. * @param x Reference to the object ArrayDimensionsStruct that will be copied. */ eProsima_user_DllExport ArrayDimensionsStruct& operator =( - const ArrayDimensionsStruct& x); + const ArrayDimensionsStruct& x) + { + + m_my_array = x.m_my_array; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ArrayDimensionsStruct that will be copied. */ eProsima_user_DllExport ArrayDimensionsStruct& operator =( - ArrayDimensionsStruct&& x) noexcept; + ArrayDimensionsStruct&& x) noexcept + { + + m_my_array = std::move(x.m_my_array); + return *this; + } /*! * @brief Comparison operator. * @param x ArrayDimensionsStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ArrayDimensionsStruct& x) const; + const ArrayDimensionsStruct& x) const + { + return (m_my_array == x.m_my_array); + } /*! * @brief Comparison operator. * @param x ArrayDimensionsStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ArrayDimensionsStruct& x) const; + const ArrayDimensionsStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_array * @param _my_array New value to be copied in member my_array */ eProsima_user_DllExport void my_array( - const std::array, 2>& _my_array); + const std::array, 2>& _my_array) + { + m_my_array = _my_array; + } /*! * @brief This function moves the value in member my_array * @param _my_array New value to be moved in member my_array */ eProsima_user_DllExport void my_array( - std::array, 2>&& _my_array); + std::array, 2>&& _my_array) + { + m_my_array = std::move(_my_array); + } /*! * @brief This function returns a constant reference to member my_array * @return Constant reference to member my_array */ - eProsima_user_DllExport const std::array, 2>& my_array() const; + eProsima_user_DllExport const std::array, 2>& my_array() const + { + return m_my_array; + } /*! * @brief This function returns a reference to member my_array * @return Reference to member my_array */ - eProsima_user_DllExport std::array, 2>& my_array(); + eProsima_user_DllExport std::array, 2>& my_array() + { + return m_my_array; + } + + private: @@ -1883,80 +2797,124 @@ class ArraySizeStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport ArraySizeStruct(); + eProsima_user_DllExport ArraySizeStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~ArraySizeStruct(); + eProsima_user_DllExport ~ArraySizeStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object ArraySizeStruct that will be copied. */ eProsima_user_DllExport ArraySizeStruct( - const ArraySizeStruct& x); + const ArraySizeStruct& x) + { + m_my_array = x.m_my_array; + + } /*! * @brief Move constructor. * @param x Reference to the object ArraySizeStruct that will be copied. */ eProsima_user_DllExport ArraySizeStruct( - ArraySizeStruct&& x) noexcept; + ArraySizeStruct&& x) noexcept + { + m_my_array = std::move(x.m_my_array); + } /*! * @brief Copy assignment. * @param x Reference to the object ArraySizeStruct that will be copied. */ eProsima_user_DllExport ArraySizeStruct& operator =( - const ArraySizeStruct& x); + const ArraySizeStruct& x) + { + + m_my_array = x.m_my_array; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object ArraySizeStruct that will be copied. */ eProsima_user_DllExport ArraySizeStruct& operator =( - ArraySizeStruct&& x) noexcept; + ArraySizeStruct&& x) noexcept + { + + m_my_array = std::move(x.m_my_array); + return *this; + } /*! * @brief Comparison operator. * @param x ArraySizeStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const ArraySizeStruct& x) const; + const ArraySizeStruct& x) const + { + return (m_my_array == x.m_my_array); + } /*! * @brief Comparison operator. * @param x ArraySizeStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const ArraySizeStruct& x) const; + const ArraySizeStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_array * @param _my_array New value to be copied in member my_array */ eProsima_user_DllExport void my_array( - const std::array& _my_array); + const std::array& _my_array) + { + m_my_array = _my_array; + } /*! * @brief This function moves the value in member my_array * @param _my_array New value to be moved in member my_array */ eProsima_user_DllExport void my_array( - std::array&& _my_array); + std::array&& _my_array) + { + m_my_array = std::move(_my_array); + } /*! * @brief This function returns a constant reference to member my_array * @return Constant reference to member my_array */ - eProsima_user_DllExport const std::array& my_array() const; + eProsima_user_DllExport const std::array& my_array() const + { + return m_my_array; + } /*! * @brief This function returns a reference to member my_array * @return Reference to member my_array */ - eProsima_user_DllExport std::array& my_array(); + eProsima_user_DllExport std::array& my_array() + { + return m_my_array; + } + + private: @@ -1965,8 +2923,6 @@ class ArraySizeStruct }; - - /*! * @brief This class represents the structure SequenceStruct defined by the user in the IDL file. * @ingroup Types @@ -1978,80 +2934,124 @@ class SequenceStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceStruct(); + eProsima_user_DllExport SequenceStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceStruct(); + eProsima_user_DllExport ~SequenceStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceStruct that will be copied. */ eProsima_user_DllExport SequenceStruct( - const SequenceStruct& x); + const SequenceStruct& x) + { + m_my_sequence = x.m_my_sequence; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceStruct that will be copied. */ eProsima_user_DllExport SequenceStruct( - SequenceStruct&& x) noexcept; + SequenceStruct&& x) noexcept + { + m_my_sequence = std::move(x.m_my_sequence); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceStruct that will be copied. */ eProsima_user_DllExport SequenceStruct& operator =( - const SequenceStruct& x); + const SequenceStruct& x) + { + + m_my_sequence = x.m_my_sequence; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceStruct that will be copied. */ eProsima_user_DllExport SequenceStruct& operator =( - SequenceStruct&& x) noexcept; + SequenceStruct&& x) noexcept + { + + m_my_sequence = std::move(x.m_my_sequence); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceStruct& x) const; + const SequenceStruct& x) const + { + return (m_my_sequence == x.m_my_sequence); + } /*! * @brief Comparison operator. * @param x SequenceStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceStruct& x) const; + const SequenceStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence * @param _my_sequence New value to be copied in member my_sequence */ eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); + const std::vector& _my_sequence) + { + m_my_sequence = _my_sequence; + } /*! * @brief This function moves the value in member my_sequence * @param _my_sequence New value to be moved in member my_sequence */ eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); + std::vector&& _my_sequence) + { + m_my_sequence = std::move(_my_sequence); + } /*! * @brief This function returns a constant reference to member my_sequence * @return Constant reference to member my_sequence */ - eProsima_user_DllExport const std::vector& my_sequence() const; + eProsima_user_DllExport const std::vector& my_sequence() const + { + return m_my_sequence; + } /*! * @brief This function returns a reference to member my_sequence * @return Reference to member my_sequence */ - eProsima_user_DllExport std::vector& my_sequence(); + eProsima_user_DllExport std::vector& my_sequence() + { + return m_my_sequence; + } + + private: @@ -2060,8 +3060,6 @@ class SequenceStruct }; - - /*! * @brief This class represents the structure SequenceStructEqual defined by the user in the IDL file. * @ingroup Types @@ -2073,80 +3071,124 @@ class SequenceStructEqual /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceStructEqual(); + eProsima_user_DllExport SequenceStructEqual() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceStructEqual(); + eProsima_user_DllExport ~SequenceStructEqual() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceStructEqual that will be copied. */ eProsima_user_DllExport SequenceStructEqual( - const SequenceStructEqual& x); + const SequenceStructEqual& x) + { + m_my_sequence_equal = x.m_my_sequence_equal; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceStructEqual that will be copied. */ eProsima_user_DllExport SequenceStructEqual( - SequenceStructEqual&& x) noexcept; + SequenceStructEqual&& x) noexcept + { + m_my_sequence_equal = std::move(x.m_my_sequence_equal); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceStructEqual that will be copied. */ eProsima_user_DllExport SequenceStructEqual& operator =( - const SequenceStructEqual& x); + const SequenceStructEqual& x) + { + + m_my_sequence_equal = x.m_my_sequence_equal; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceStructEqual that will be copied. */ eProsima_user_DllExport SequenceStructEqual& operator =( - SequenceStructEqual&& x) noexcept; + SequenceStructEqual&& x) noexcept + { + + m_my_sequence_equal = std::move(x.m_my_sequence_equal); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceStructEqual object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceStructEqual& x) const; + const SequenceStructEqual& x) const + { + return (m_my_sequence_equal == x.m_my_sequence_equal); + } /*! * @brief Comparison operator. * @param x SequenceStructEqual object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceStructEqual& x) const; + const SequenceStructEqual& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence_equal * @param _my_sequence_equal New value to be copied in member my_sequence_equal */ eProsima_user_DllExport void my_sequence_equal( - const std::vector& _my_sequence_equal); + const std::vector& _my_sequence_equal) + { + m_my_sequence_equal = _my_sequence_equal; + } /*! * @brief This function moves the value in member my_sequence_equal * @param _my_sequence_equal New value to be moved in member my_sequence_equal */ eProsima_user_DllExport void my_sequence_equal( - std::vector&& _my_sequence_equal); + std::vector&& _my_sequence_equal) + { + m_my_sequence_equal = std::move(_my_sequence_equal); + } /*! * @brief This function returns a constant reference to member my_sequence_equal * @return Constant reference to member my_sequence_equal */ - eProsima_user_DllExport const std::vector& my_sequence_equal() const; + eProsima_user_DllExport const std::vector& my_sequence_equal() const + { + return m_my_sequence_equal; + } /*! * @brief This function returns a reference to member my_sequence_equal * @return Reference to member my_sequence_equal */ - eProsima_user_DllExport std::vector& my_sequence_equal(); + eProsima_user_DllExport std::vector& my_sequence_equal() + { + return m_my_sequence_equal; + } + + private: @@ -2155,8 +3197,6 @@ class SequenceStructEqual }; - - /*! * @brief This class represents the structure SequenceBadStruct defined by the user in the IDL file. * @ingroup Types @@ -2168,80 +3208,124 @@ class SequenceBadStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceBadStruct(); + eProsima_user_DllExport SequenceBadStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceBadStruct(); + eProsima_user_DllExport ~SequenceBadStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceBadStruct that will be copied. */ eProsima_user_DllExport SequenceBadStruct( - const SequenceBadStruct& x); + const SequenceBadStruct& x) + { + m_my_sequence = x.m_my_sequence; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceBadStruct that will be copied. */ eProsima_user_DllExport SequenceBadStruct( - SequenceBadStruct&& x) noexcept; + SequenceBadStruct&& x) noexcept + { + m_my_sequence = std::move(x.m_my_sequence); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceBadStruct that will be copied. */ eProsima_user_DllExport SequenceBadStruct& operator =( - const SequenceBadStruct& x); + const SequenceBadStruct& x) + { + + m_my_sequence = x.m_my_sequence; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceBadStruct that will be copied. */ eProsima_user_DllExport SequenceBadStruct& operator =( - SequenceBadStruct&& x) noexcept; + SequenceBadStruct&& x) noexcept + { + + m_my_sequence = std::move(x.m_my_sequence); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceBadStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceBadStruct& x) const; + const SequenceBadStruct& x) const + { + return (m_my_sequence == x.m_my_sequence); + } /*! * @brief Comparison operator. * @param x SequenceBadStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceBadStruct& x) const; + const SequenceBadStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence * @param _my_sequence New value to be copied in member my_sequence */ eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); + const std::vector& _my_sequence) + { + m_my_sequence = _my_sequence; + } /*! * @brief This function moves the value in member my_sequence * @param _my_sequence New value to be moved in member my_sequence */ eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); + std::vector&& _my_sequence) + { + m_my_sequence = std::move(_my_sequence); + } /*! * @brief This function returns a constant reference to member my_sequence * @return Constant reference to member my_sequence */ - eProsima_user_DllExport const std::vector& my_sequence() const; + eProsima_user_DllExport const std::vector& my_sequence() const + { + return m_my_sequence; + } /*! * @brief This function returns a reference to member my_sequence * @return Reference to member my_sequence */ - eProsima_user_DllExport std::vector& my_sequence(); + eProsima_user_DllExport std::vector& my_sequence() + { + return m_my_sequence; + } + + private: @@ -2250,8 +3334,6 @@ class SequenceBadStruct }; - - /*! * @brief This class represents the structure SequenceBoundsStruct defined by the user in the IDL file. * @ingroup Types @@ -2263,80 +3345,124 @@ class SequenceBoundsStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceBoundsStruct(); + eProsima_user_DllExport SequenceBoundsStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceBoundsStruct(); + eProsima_user_DllExport ~SequenceBoundsStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceBoundsStruct( - const SequenceBoundsStruct& x); + const SequenceBoundsStruct& x) + { + m_my_sequence = x.m_my_sequence; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceBoundsStruct( - SequenceBoundsStruct&& x) noexcept; + SequenceBoundsStruct&& x) noexcept + { + m_my_sequence = std::move(x.m_my_sequence); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceBoundsStruct& operator =( - const SequenceBoundsStruct& x); + const SequenceBoundsStruct& x) + { + + m_my_sequence = x.m_my_sequence; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceBoundsStruct& operator =( - SequenceBoundsStruct&& x) noexcept; + SequenceBoundsStruct&& x) noexcept + { + + m_my_sequence = std::move(x.m_my_sequence); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceBoundsStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceBoundsStruct& x) const; + const SequenceBoundsStruct& x) const + { + return (m_my_sequence == x.m_my_sequence); + } /*! * @brief Comparison operator. * @param x SequenceBoundsStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceBoundsStruct& x) const; + const SequenceBoundsStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence * @param _my_sequence New value to be copied in member my_sequence */ eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); + const std::vector& _my_sequence) + { + m_my_sequence = _my_sequence; + } /*! * @brief This function moves the value in member my_sequence * @param _my_sequence New value to be moved in member my_sequence */ eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); + std::vector&& _my_sequence) + { + m_my_sequence = std::move(_my_sequence); + } /*! * @brief This function returns a constant reference to member my_sequence * @return Constant reference to member my_sequence */ - eProsima_user_DllExport const std::vector& my_sequence() const; + eProsima_user_DllExport const std::vector& my_sequence() const + { + return m_my_sequence; + } /*! * @brief This function returns a reference to member my_sequence * @return Reference to member my_sequence */ - eProsima_user_DllExport std::vector& my_sequence(); + eProsima_user_DllExport std::vector& my_sequence() + { + return m_my_sequence; + } + + private: @@ -2345,10 +3471,6 @@ class SequenceBoundsStruct }; - - - - /*! * @brief This class represents the structure SequenceSequenceStruct defined by the user in the IDL file. * @ingroup Types @@ -2360,80 +3482,124 @@ class SequenceSequenceStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceSequenceStruct(); + eProsima_user_DllExport SequenceSequenceStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceSequenceStruct(); + eProsima_user_DllExport ~SequenceSequenceStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceSequenceStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceStruct( - const SequenceSequenceStruct& x); + const SequenceSequenceStruct& x) + { + m_my_sequence_sequence = x.m_my_sequence_sequence; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceSequenceStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceStruct( - SequenceSequenceStruct&& x) noexcept; + SequenceSequenceStruct&& x) noexcept + { + m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceSequenceStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceStruct& operator =( - const SequenceSequenceStruct& x); + const SequenceSequenceStruct& x) + { + + m_my_sequence_sequence = x.m_my_sequence_sequence; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceSequenceStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceStruct& operator =( - SequenceSequenceStruct&& x) noexcept; + SequenceSequenceStruct&& x) noexcept + { + + m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceSequenceStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceSequenceStruct& x) const; + const SequenceSequenceStruct& x) const + { + return (m_my_sequence_sequence == x.m_my_sequence_sequence); + } /*! * @brief Comparison operator. * @param x SequenceSequenceStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceSequenceStruct& x) const; + const SequenceSequenceStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence_sequence * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence */ eProsima_user_DllExport void my_sequence_sequence( - const std::vector>& _my_sequence_sequence); + const std::vector>& _my_sequence_sequence) + { + m_my_sequence_sequence = _my_sequence_sequence; + } /*! * @brief This function moves the value in member my_sequence_sequence * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence */ eProsima_user_DllExport void my_sequence_sequence( - std::vector>&& _my_sequence_sequence); + std::vector>&& _my_sequence_sequence) + { + m_my_sequence_sequence = std::move(_my_sequence_sequence); + } /*! * @brief This function returns a constant reference to member my_sequence_sequence * @return Constant reference to member my_sequence_sequence */ - eProsima_user_DllExport const std::vector>& my_sequence_sequence() const; + eProsima_user_DllExport const std::vector>& my_sequence_sequence() const + { + return m_my_sequence_sequence; + } /*! * @brief This function returns a reference to member my_sequence_sequence * @return Reference to member my_sequence_sequence */ - eProsima_user_DllExport std::vector>& my_sequence_sequence(); + eProsima_user_DllExport std::vector>& my_sequence_sequence() + { + return m_my_sequence_sequence; + } + + private: @@ -2442,10 +3608,6 @@ class SequenceSequenceStruct }; - - - - /*! * @brief This class represents the structure SequenceSequenceBoundsStruct defined by the user in the IDL file. * @ingroup Types @@ -2457,80 +3619,124 @@ class SequenceSequenceBoundsStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SequenceSequenceBoundsStruct(); + eProsima_user_DllExport SequenceSequenceBoundsStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SequenceSequenceBoundsStruct(); + eProsima_user_DllExport ~SequenceSequenceBoundsStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceBoundsStruct( - const SequenceSequenceBoundsStruct& x); + const SequenceSequenceBoundsStruct& x) + { + m_my_sequence_sequence = x.m_my_sequence_sequence; + + } /*! * @brief Move constructor. * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceBoundsStruct( - SequenceSequenceBoundsStruct&& x) noexcept; + SequenceSequenceBoundsStruct&& x) noexcept + { + m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); + } /*! * @brief Copy assignment. * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceBoundsStruct& operator =( - const SequenceSequenceBoundsStruct& x); + const SequenceSequenceBoundsStruct& x) + { + + m_my_sequence_sequence = x.m_my_sequence_sequence; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. */ eProsima_user_DllExport SequenceSequenceBoundsStruct& operator =( - SequenceSequenceBoundsStruct&& x) noexcept; + SequenceSequenceBoundsStruct&& x) noexcept + { + + m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); + return *this; + } /*! * @brief Comparison operator. * @param x SequenceSequenceBoundsStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SequenceSequenceBoundsStruct& x) const; + const SequenceSequenceBoundsStruct& x) const + { + return (m_my_sequence_sequence == x.m_my_sequence_sequence); + } /*! * @brief Comparison operator. * @param x SequenceSequenceBoundsStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SequenceSequenceBoundsStruct& x) const; + const SequenceSequenceBoundsStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_sequence_sequence * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence */ eProsima_user_DllExport void my_sequence_sequence( - const std::vector>& _my_sequence_sequence); + const std::vector>& _my_sequence_sequence) + { + m_my_sequence_sequence = _my_sequence_sequence; + } /*! * @brief This function moves the value in member my_sequence_sequence * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence */ eProsima_user_DllExport void my_sequence_sequence( - std::vector>&& _my_sequence_sequence); + std::vector>&& _my_sequence_sequence) + { + m_my_sequence_sequence = std::move(_my_sequence_sequence); + } /*! * @brief This function returns a constant reference to member my_sequence_sequence * @return Constant reference to member my_sequence_sequence */ - eProsima_user_DllExport const std::vector>& my_sequence_sequence() const; + eProsima_user_DllExport const std::vector>& my_sequence_sequence() const + { + return m_my_sequence_sequence; + } /*! * @brief This function returns a reference to member my_sequence_sequence * @return Reference to member my_sequence_sequence */ - eProsima_user_DllExport std::vector>& my_sequence_sequence(); + eProsima_user_DllExport std::vector>& my_sequence_sequence() + { + return m_my_sequence_sequence; + } + + private: @@ -2552,80 +3758,124 @@ class MapStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapStruct(); + eProsima_user_DllExport MapStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapStruct(); + eProsima_user_DllExport ~MapStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapStruct that will be copied. */ eProsima_user_DllExport MapStruct( - const MapStruct& x); + const MapStruct& x) + { + m_my_map = x.m_my_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapStruct that will be copied. */ eProsima_user_DllExport MapStruct( - MapStruct&& x) noexcept; + MapStruct&& x) noexcept + { + m_my_map = std::move(x.m_my_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapStruct that will be copied. */ eProsima_user_DllExport MapStruct& operator =( - const MapStruct& x); + const MapStruct& x) + { + + m_my_map = x.m_my_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapStruct that will be copied. */ eProsima_user_DllExport MapStruct& operator =( - MapStruct&& x) noexcept; + MapStruct&& x) noexcept + { + + m_my_map = std::move(x.m_my_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapStruct& x) const; + const MapStruct& x) const + { + return (m_my_map == x.m_my_map); + } /*! * @brief Comparison operator. * @param x MapStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapStruct& x) const; + const MapStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map * @param _my_map New value to be copied in member my_map */ eProsima_user_DllExport void my_map( - const std::map& _my_map); + const std::map& _my_map) + { + m_my_map = _my_map; + } /*! * @brief This function moves the value in member my_map * @param _my_map New value to be moved in member my_map */ eProsima_user_DllExport void my_map( - std::map&& _my_map); + std::map&& _my_map) + { + m_my_map = std::move(_my_map); + } /*! * @brief This function returns a constant reference to member my_map * @return Constant reference to member my_map */ - eProsima_user_DllExport const std::map& my_map() const; + eProsima_user_DllExport const std::map& my_map() const + { + return m_my_map; + } /*! * @brief This function returns a reference to member my_map * @return Reference to member my_map */ - eProsima_user_DllExport std::map& my_map(); + eProsima_user_DllExport std::map& my_map() + { + return m_my_map; + } + + private: @@ -2647,80 +3897,124 @@ class MapStructEqual /*! * @brief Default constructor. */ - eProsima_user_DllExport MapStructEqual(); + eProsima_user_DllExport MapStructEqual() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapStructEqual(); + eProsima_user_DllExport ~MapStructEqual() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapStructEqual that will be copied. */ eProsima_user_DllExport MapStructEqual( - const MapStructEqual& x); + const MapStructEqual& x) + { + m_my_map_equal = x.m_my_map_equal; + + } /*! * @brief Move constructor. * @param x Reference to the object MapStructEqual that will be copied. */ eProsima_user_DllExport MapStructEqual( - MapStructEqual&& x) noexcept; + MapStructEqual&& x) noexcept + { + m_my_map_equal = std::move(x.m_my_map_equal); + } /*! * @brief Copy assignment. * @param x Reference to the object MapStructEqual that will be copied. */ eProsima_user_DllExport MapStructEqual& operator =( - const MapStructEqual& x); + const MapStructEqual& x) + { + + m_my_map_equal = x.m_my_map_equal; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapStructEqual that will be copied. */ eProsima_user_DllExport MapStructEqual& operator =( - MapStructEqual&& x) noexcept; + MapStructEqual&& x) noexcept + { + + m_my_map_equal = std::move(x.m_my_map_equal); + return *this; + } /*! * @brief Comparison operator. * @param x MapStructEqual object to compare. */ eProsima_user_DllExport bool operator ==( - const MapStructEqual& x) const; + const MapStructEqual& x) const + { + return (m_my_map_equal == x.m_my_map_equal); + } /*! * @brief Comparison operator. * @param x MapStructEqual object to compare. */ eProsima_user_DllExport bool operator !=( - const MapStructEqual& x) const; + const MapStructEqual& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map_equal * @param _my_map_equal New value to be copied in member my_map_equal */ eProsima_user_DllExport void my_map_equal( - const std::map& _my_map_equal); + const std::map& _my_map_equal) + { + m_my_map_equal = _my_map_equal; + } /*! * @brief This function moves the value in member my_map_equal * @param _my_map_equal New value to be moved in member my_map_equal */ eProsima_user_DllExport void my_map_equal( - std::map&& _my_map_equal); + std::map&& _my_map_equal) + { + m_my_map_equal = std::move(_my_map_equal); + } /*! * @brief This function returns a constant reference to member my_map_equal * @return Constant reference to member my_map_equal */ - eProsima_user_DllExport const std::map& my_map_equal() const; + eProsima_user_DllExport const std::map& my_map_equal() const + { + return m_my_map_equal; + } /*! * @brief This function returns a reference to member my_map_equal * @return Reference to member my_map_equal */ - eProsima_user_DllExport std::map& my_map_equal(); + eProsima_user_DllExport std::map& my_map_equal() + { + return m_my_map_equal; + } + + private: @@ -2742,80 +4036,124 @@ class MapBadKeyStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapBadKeyStruct(); + eProsima_user_DllExport MapBadKeyStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapBadKeyStruct(); + eProsima_user_DllExport ~MapBadKeyStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapBadKeyStruct that will be copied. */ eProsima_user_DllExport MapBadKeyStruct( - const MapBadKeyStruct& x); + const MapBadKeyStruct& x) + { + m_my_map = x.m_my_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapBadKeyStruct that will be copied. */ eProsima_user_DllExport MapBadKeyStruct( - MapBadKeyStruct&& x) noexcept; + MapBadKeyStruct&& x) noexcept + { + m_my_map = std::move(x.m_my_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapBadKeyStruct that will be copied. */ eProsima_user_DllExport MapBadKeyStruct& operator =( - const MapBadKeyStruct& x); + const MapBadKeyStruct& x) + { + + m_my_map = x.m_my_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapBadKeyStruct that will be copied. */ eProsima_user_DllExport MapBadKeyStruct& operator =( - MapBadKeyStruct&& x) noexcept; + MapBadKeyStruct&& x) noexcept + { + + m_my_map = std::move(x.m_my_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapBadKeyStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapBadKeyStruct& x) const; + const MapBadKeyStruct& x) const + { + return (m_my_map == x.m_my_map); + } /*! * @brief Comparison operator. * @param x MapBadKeyStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapBadKeyStruct& x) const; + const MapBadKeyStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map * @param _my_map New value to be copied in member my_map */ eProsima_user_DllExport void my_map( - const std::map& _my_map); + const std::map& _my_map) + { + m_my_map = _my_map; + } /*! * @brief This function moves the value in member my_map * @param _my_map New value to be moved in member my_map */ eProsima_user_DllExport void my_map( - std::map&& _my_map); + std::map&& _my_map) + { + m_my_map = std::move(_my_map); + } /*! * @brief This function returns a constant reference to member my_map * @return Constant reference to member my_map */ - eProsima_user_DllExport const std::map& my_map() const; + eProsima_user_DllExport const std::map& my_map() const + { + return m_my_map; + } /*! * @brief This function returns a reference to member my_map * @return Reference to member my_map */ - eProsima_user_DllExport std::map& my_map(); + eProsima_user_DllExport std::map& my_map() + { + return m_my_map; + } + + private: @@ -2837,80 +4175,124 @@ class MapBadElemStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapBadElemStruct(); + eProsima_user_DllExport MapBadElemStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapBadElemStruct(); + eProsima_user_DllExport ~MapBadElemStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapBadElemStruct that will be copied. */ eProsima_user_DllExport MapBadElemStruct( - const MapBadElemStruct& x); + const MapBadElemStruct& x) + { + m_my_map = x.m_my_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapBadElemStruct that will be copied. */ eProsima_user_DllExport MapBadElemStruct( - MapBadElemStruct&& x) noexcept; + MapBadElemStruct&& x) noexcept + { + m_my_map = std::move(x.m_my_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapBadElemStruct that will be copied. */ eProsima_user_DllExport MapBadElemStruct& operator =( - const MapBadElemStruct& x); + const MapBadElemStruct& x) + { + + m_my_map = x.m_my_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapBadElemStruct that will be copied. */ eProsima_user_DllExport MapBadElemStruct& operator =( - MapBadElemStruct&& x) noexcept; + MapBadElemStruct&& x) noexcept + { + + m_my_map = std::move(x.m_my_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapBadElemStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapBadElemStruct& x) const; + const MapBadElemStruct& x) const + { + return (m_my_map == x.m_my_map); + } /*! * @brief Comparison operator. * @param x MapBadElemStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapBadElemStruct& x) const; + const MapBadElemStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map * @param _my_map New value to be copied in member my_map */ eProsima_user_DllExport void my_map( - const std::map& _my_map); + const std::map& _my_map) + { + m_my_map = _my_map; + } /*! * @brief This function moves the value in member my_map * @param _my_map New value to be moved in member my_map */ eProsima_user_DllExport void my_map( - std::map&& _my_map); + std::map&& _my_map) + { + m_my_map = std::move(_my_map); + } /*! * @brief This function returns a constant reference to member my_map * @return Constant reference to member my_map */ - eProsima_user_DllExport const std::map& my_map() const; + eProsima_user_DllExport const std::map& my_map() const + { + return m_my_map; + } /*! * @brief This function returns a reference to member my_map * @return Reference to member my_map */ - eProsima_user_DllExport std::map& my_map(); + eProsima_user_DllExport std::map& my_map() + { + return m_my_map; + } + + private: @@ -2932,80 +4314,124 @@ class MapBoundsStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapBoundsStruct(); + eProsima_user_DllExport MapBoundsStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapBoundsStruct(); + eProsima_user_DllExport ~MapBoundsStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapBoundsStruct that will be copied. */ eProsima_user_DllExport MapBoundsStruct( - const MapBoundsStruct& x); + const MapBoundsStruct& x) + { + m_my_map = x.m_my_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapBoundsStruct that will be copied. */ eProsima_user_DllExport MapBoundsStruct( - MapBoundsStruct&& x) noexcept; + MapBoundsStruct&& x) noexcept + { + m_my_map = std::move(x.m_my_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapBoundsStruct that will be copied. */ eProsima_user_DllExport MapBoundsStruct& operator =( - const MapBoundsStruct& x); + const MapBoundsStruct& x) + { + + m_my_map = x.m_my_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapBoundsStruct that will be copied. */ eProsima_user_DllExport MapBoundsStruct& operator =( - MapBoundsStruct&& x) noexcept; + MapBoundsStruct&& x) noexcept + { + + m_my_map = std::move(x.m_my_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapBoundsStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapBoundsStruct& x) const; + const MapBoundsStruct& x) const + { + return (m_my_map == x.m_my_map); + } /*! * @brief Comparison operator. * @param x MapBoundsStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapBoundsStruct& x) const; + const MapBoundsStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map * @param _my_map New value to be copied in member my_map */ eProsima_user_DllExport void my_map( - const std::map& _my_map); + const std::map& _my_map) + { + m_my_map = _my_map; + } /*! * @brief This function moves the value in member my_map * @param _my_map New value to be moved in member my_map */ eProsima_user_DllExport void my_map( - std::map&& _my_map); + std::map&& _my_map) + { + m_my_map = std::move(_my_map); + } /*! * @brief This function returns a constant reference to member my_map * @return Constant reference to member my_map */ - eProsima_user_DllExport const std::map& my_map() const; + eProsima_user_DllExport const std::map& my_map() const + { + return m_my_map; + } /*! * @brief This function returns a reference to member my_map * @return Reference to member my_map */ - eProsima_user_DllExport std::map& my_map(); + eProsima_user_DllExport std::map& my_map() + { + return m_my_map; + } + + private: @@ -3017,7 +4443,6 @@ class MapBoundsStruct - /*! * @brief This class represents the structure MapMapStruct defined by the user in the IDL file. * @ingroup Types @@ -3029,80 +4454,124 @@ class MapMapStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapMapStruct(); + eProsima_user_DllExport MapMapStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapMapStruct(); + eProsima_user_DllExport ~MapMapStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapMapStruct that will be copied. */ eProsima_user_DllExport MapMapStruct( - const MapMapStruct& x); + const MapMapStruct& x) + { + m_my_map_map = x.m_my_map_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapMapStruct that will be copied. */ eProsima_user_DllExport MapMapStruct( - MapMapStruct&& x) noexcept; + MapMapStruct&& x) noexcept + { + m_my_map_map = std::move(x.m_my_map_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapMapStruct that will be copied. */ eProsima_user_DllExport MapMapStruct& operator =( - const MapMapStruct& x); + const MapMapStruct& x) + { + + m_my_map_map = x.m_my_map_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapMapStruct that will be copied. */ eProsima_user_DllExport MapMapStruct& operator =( - MapMapStruct&& x) noexcept; + MapMapStruct&& x) noexcept + { + + m_my_map_map = std::move(x.m_my_map_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapMapStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapMapStruct& x) const; + const MapMapStruct& x) const + { + return (m_my_map_map == x.m_my_map_map); + } /*! * @brief Comparison operator. * @param x MapMapStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapMapStruct& x) const; + const MapMapStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map_map * @param _my_map_map New value to be copied in member my_map_map */ eProsima_user_DllExport void my_map_map( - const std::map>& _my_map_map); + const std::map>& _my_map_map) + { + m_my_map_map = _my_map_map; + } /*! * @brief This function moves the value in member my_map_map * @param _my_map_map New value to be moved in member my_map_map */ eProsima_user_DllExport void my_map_map( - std::map>&& _my_map_map); + std::map>&& _my_map_map) + { + m_my_map_map = std::move(_my_map_map); + } /*! * @brief This function returns a constant reference to member my_map_map * @return Constant reference to member my_map_map */ - eProsima_user_DllExport const std::map>& my_map_map() const; + eProsima_user_DllExport const std::map>& my_map_map() const + { + return m_my_map_map; + } /*! * @brief This function returns a reference to member my_map_map * @return Reference to member my_map_map */ - eProsima_user_DllExport std::map>& my_map_map(); + eProsima_user_DllExport std::map>& my_map_map() + { + return m_my_map_map; + } + + private: @@ -3114,7 +4583,6 @@ class MapMapStruct - /*! * @brief This class represents the structure MapMapBoundsStruct defined by the user in the IDL file. * @ingroup Types @@ -3126,80 +4594,124 @@ class MapMapBoundsStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport MapMapBoundsStruct(); + eProsima_user_DllExport MapMapBoundsStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~MapMapBoundsStruct(); + eProsima_user_DllExport ~MapMapBoundsStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object MapMapBoundsStruct that will be copied. */ eProsima_user_DllExport MapMapBoundsStruct( - const MapMapBoundsStruct& x); + const MapMapBoundsStruct& x) + { + m_my_map_map = x.m_my_map_map; + + } /*! * @brief Move constructor. * @param x Reference to the object MapMapBoundsStruct that will be copied. */ eProsima_user_DllExport MapMapBoundsStruct( - MapMapBoundsStruct&& x) noexcept; + MapMapBoundsStruct&& x) noexcept + { + m_my_map_map = std::move(x.m_my_map_map); + } /*! * @brief Copy assignment. * @param x Reference to the object MapMapBoundsStruct that will be copied. */ eProsima_user_DllExport MapMapBoundsStruct& operator =( - const MapMapBoundsStruct& x); + const MapMapBoundsStruct& x) + { + + m_my_map_map = x.m_my_map_map; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object MapMapBoundsStruct that will be copied. */ eProsima_user_DllExport MapMapBoundsStruct& operator =( - MapMapBoundsStruct&& x) noexcept; + MapMapBoundsStruct&& x) noexcept + { + + m_my_map_map = std::move(x.m_my_map_map); + return *this; + } /*! * @brief Comparison operator. * @param x MapMapBoundsStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const MapMapBoundsStruct& x) const; + const MapMapBoundsStruct& x) const + { + return (m_my_map_map == x.m_my_map_map); + } /*! * @brief Comparison operator. * @param x MapMapBoundsStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const MapMapBoundsStruct& x) const; + const MapMapBoundsStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_map_map * @param _my_map_map New value to be copied in member my_map_map */ eProsima_user_DllExport void my_map_map( - const std::map>& _my_map_map); + const std::map>& _my_map_map) + { + m_my_map_map = _my_map_map; + } /*! * @brief This function moves the value in member my_map_map * @param _my_map_map New value to be moved in member my_map_map */ eProsima_user_DllExport void my_map_map( - std::map>&& _my_map_map); + std::map>&& _my_map_map) + { + m_my_map_map = std::move(_my_map_map); + } /*! * @brief This function returns a constant reference to member my_map_map * @return Constant reference to member my_map_map */ - eProsima_user_DllExport const std::map>& my_map_map() const; + eProsima_user_DllExport const std::map>& my_map_map() const + { + return m_my_map_map; + } /*! * @brief This function returns a reference to member my_map_map * @return Reference to member my_map_map */ - eProsima_user_DllExport std::map>& my_map_map(); + eProsima_user_DllExport std::map>& my_map_map() + { + return m_my_map_map; + } + + private: @@ -3219,95 +4731,289 @@ class SimpleUnion /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleUnion(); + eProsima_user_DllExport SimpleUnion() + { + m__d = A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleUnion(); + eProsima_user_DllExport ~SimpleUnion() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleUnion that will be copied. */ eProsima_user_DllExport SimpleUnion( - const SimpleUnion& x); + const SimpleUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object SimpleUnion that will be copied. */ eProsima_user_DllExport SimpleUnion( - SimpleUnion&& x) noexcept; + SimpleUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleUnion that will be copied. */ eProsima_user_DllExport SimpleUnion& operator =( - const SimpleUnion& x); + const SimpleUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleUnion that will be copied. */ eProsima_user_DllExport SimpleUnion& operator =( - SimpleUnion&& x) noexcept; + SimpleUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x SimpleUnion object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleUnion& x) const; + const SimpleUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_first == x.m_first); + break; + + + case B: + return (m_second == x.m_second); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x SimpleUnion object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleUnion& x) const; + const SimpleUnion& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - int32_t __d); + int32_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case B: + switch (__d) + { + case B: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport int32_t _d() const; + eProsima_user_DllExport int32_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport int32_t& _d(); + eProsima_user_DllExport int32_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first * @param _first New value for member first */ eProsima_user_DllExport void first( - int32_t _first); + int32_t _first) + { + m_first = _first; + m__d = A; + + } /*! * @brief This function returns the value of member first * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t first() const; + eProsima_user_DllExport int32_t first() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! * @brief This function returns a reference to member first * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& first(); + eProsima_user_DllExport int32_t& first() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! @@ -3315,21 +5021,66 @@ class SimpleUnion * @param _second New value for member second */ eProsima_user_DllExport void second( - int64_t _second); + int64_t _second) + { + m_second = _second; + m__d = B; + + } /*! * @brief This function returns the value of member second * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t second() const; + eProsima_user_DllExport int64_t second() const + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } /*! * @brief This function returns a reference to member second * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t& second(); + eProsima_user_DllExport int64_t& second() + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + private: @@ -3351,95 +5102,289 @@ class SimpleUnionNames /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleUnionNames(); + eProsima_user_DllExport SimpleUnionNames() + { + m__d = A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleUnionNames(); + eProsima_user_DllExport ~SimpleUnionNames() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleUnionNames that will be copied. */ eProsima_user_DllExport SimpleUnionNames( - const SimpleUnionNames& x); + const SimpleUnionNames& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first_case = x.m_first_case; + break; + + + case B: + m_second_case = x.m_second_case; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object SimpleUnionNames that will be copied. */ eProsima_user_DllExport SimpleUnionNames( - SimpleUnionNames&& x) noexcept; + SimpleUnionNames&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first_case = x.m_first_case; + break; + + + case B: + m_second_case = x.m_second_case; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleUnionNames that will be copied. */ eProsima_user_DllExport SimpleUnionNames& operator =( - const SimpleUnionNames& x); + const SimpleUnionNames& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first_case = x.m_first_case; + break; + + + case B: + m_second_case = x.m_second_case; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleUnionNames that will be copied. */ eProsima_user_DllExport SimpleUnionNames& operator =( - SimpleUnionNames&& x) noexcept; + SimpleUnionNames&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first_case = x.m_first_case; + break; + + + case B: + m_second_case = x.m_second_case; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x SimpleUnionNames object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleUnionNames& x) const; + const SimpleUnionNames& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_first_case == x.m_first_case); + break; + + + case B: + return (m_second_case == x.m_second_case); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x SimpleUnionNames object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleUnionNames& x) const; + const SimpleUnionNames& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - int32_t __d); + int32_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case B: + switch (__d) + { + case B: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport int32_t _d() const; + eProsima_user_DllExport int32_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport int32_t& _d(); + eProsima_user_DllExport int32_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first_case * @param _first_case New value for member first_case */ eProsima_user_DllExport void first_case( - int32_t _first_case); + int32_t _first_case) + { + m_first_case = _first_case; + m__d = A; + + } /*! * @brief This function returns the value of member first_case * @return Value of member first_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t first_case() const; + eProsima_user_DllExport int32_t first_case() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first_case; + } /*! * @brief This function returns a reference to member first_case * @return Reference to member first_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& first_case(); + eProsima_user_DllExport int32_t& first_case() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first_case; + } /*! @@ -3447,21 +5392,66 @@ class SimpleUnionNames * @param _second_case New value for member second_case */ eProsima_user_DllExport void second_case( - int64_t _second_case); + int64_t _second_case) + { + m_second_case = _second_case; + m__d = B; + + } /*! * @brief This function returns the value of member second_case * @return Value of member second_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t second_case() const; + eProsima_user_DllExport int64_t second_case() const + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second_case; + } /*! * @brief This function returns a reference to member second_case * @return Reference to member second_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t& second_case(); + eProsima_user_DllExport int64_t& second_case() + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second_case; + } + + private: @@ -3483,95 +5473,289 @@ class SimpleTypeUnion /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleTypeUnion(); + eProsima_user_DllExport SimpleTypeUnion() + { + m__d = A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleTypeUnion(); + eProsima_user_DllExport ~SimpleTypeUnion() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleTypeUnion that will be copied. */ eProsima_user_DllExport SimpleTypeUnion( - const SimpleTypeUnion& x); + const SimpleTypeUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object SimpleTypeUnion that will be copied. */ eProsima_user_DllExport SimpleTypeUnion( - SimpleTypeUnion&& x) noexcept; + SimpleTypeUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleTypeUnion that will be copied. */ eProsima_user_DllExport SimpleTypeUnion& operator =( - const SimpleTypeUnion& x); + const SimpleTypeUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleTypeUnion that will be copied. */ eProsima_user_DllExport SimpleTypeUnion& operator =( - SimpleTypeUnion&& x) noexcept; + SimpleTypeUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case B: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x SimpleTypeUnion object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleTypeUnion& x) const; + const SimpleTypeUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_first == x.m_first); + break; + + + case B: + return (m_second == x.m_second); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x SimpleTypeUnion object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleTypeUnion& x) const; + const SimpleTypeUnion& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - int32_t __d); + int32_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case B: + switch (__d) + { + case B: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport int32_t _d() const; + eProsima_user_DllExport int32_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport int32_t& _d(); + eProsima_user_DllExport int32_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first * @param _first New value for member first */ eProsima_user_DllExport void first( - uint8_t _first); + uint8_t _first) + { + m_first = _first; + m__d = A; + + } /*! * @brief This function returns the value of member first * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport uint8_t first() const; + eProsima_user_DllExport uint8_t first() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! * @brief This function returns a reference to member first * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport uint8_t& first(); + eProsima_user_DllExport uint8_t& first() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! @@ -3579,21 +5763,66 @@ class SimpleTypeUnion * @param _second New value for member second */ eProsima_user_DllExport void second( - int64_t _second); + int64_t _second) + { + m_second = _second; + m__d = B; + + } /*! * @brief This function returns the value of member second * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t second() const; + eProsima_user_DllExport int64_t second() const + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } /*! * @brief This function returns a reference to member second * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t& second(); + eProsima_user_DllExport int64_t& second() + { + bool b = false; + + switch (m__d) + { + case B: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + private: @@ -3615,95 +5844,289 @@ class SimpleBadUnion /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleBadUnion(); + eProsima_user_DllExport SimpleBadUnion() + { + m__d = A; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleBadUnion(); + eProsima_user_DllExport ~SimpleBadUnion() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleBadUnion that will be copied. */ eProsima_user_DllExport SimpleBadUnion( - const SimpleBadUnion& x); + const SimpleBadUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case C: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object SimpleBadUnion that will be copied. */ eProsima_user_DllExport SimpleBadUnion( - SimpleBadUnion&& x) noexcept; + SimpleBadUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case C: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleBadUnion that will be copied. */ eProsima_user_DllExport SimpleBadUnion& operator =( - const SimpleBadUnion& x); + const SimpleBadUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case C: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleBadUnion that will be copied. */ eProsima_user_DllExport SimpleBadUnion& operator =( - SimpleBadUnion&& x) noexcept; + SimpleBadUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case A: + m_first = x.m_first; + break; + + + case C: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x SimpleBadUnion object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleBadUnion& x) const; + const SimpleBadUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case A: + return (m_first == x.m_first); + break; + + + case C: + return (m_second == x.m_second); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x SimpleBadUnion object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleBadUnion& x) const; + const SimpleBadUnion& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - int32_t __d); + int32_t __d) + { + bool b = false; + + switch (m__d) + { + case A: + switch (__d) + { + case A: + b = true; + break; + default: + break; + } + break; + + + case C: + switch (__d) + { + case C: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport int32_t _d() const; + eProsima_user_DllExport int32_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport int32_t& _d(); + eProsima_user_DllExport int32_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first * @param _first New value for member first */ eProsima_user_DllExport void first( - int32_t _first); + int32_t _first) + { + m_first = _first; + m__d = A; + + } /*! * @brief This function returns the value of member first * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t first() const; + eProsima_user_DllExport int32_t first() const + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! * @brief This function returns a reference to member first * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& first(); + eProsima_user_DllExport int32_t& first() + { + bool b = false; + + switch (m__d) + { + case A: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! @@ -3711,21 +6134,66 @@ class SimpleBadUnion * @param _second New value for member second */ eProsima_user_DllExport void second( - int64_t _second); + int64_t _second) + { + m_second = _second; + m__d = C; + + } /*! * @brief This function returns the value of member second * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t second() const; + eProsima_user_DllExport int64_t second() const + { + bool b = false; + + switch (m__d) + { + case C: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } /*! * @brief This function returns a reference to member second * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t& second(); + eProsima_user_DllExport int64_t& second() + { + bool b = false; + + switch (m__d) + { + case C: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + private: @@ -3747,95 +6215,289 @@ class SimpleBadDiscUnion /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleBadDiscUnion(); + eProsima_user_DllExport SimpleBadDiscUnion() + { + m__d = 0; + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleBadDiscUnion(); + eProsima_user_DllExport ~SimpleBadDiscUnion() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleBadDiscUnion that will be copied. */ eProsima_user_DllExport SimpleBadDiscUnion( - const SimpleBadDiscUnion& x); + const SimpleBadDiscUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case 0: + m_first = x.m_first; + break; + + + case 1: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Move constructor. * @param x Reference to the object SimpleBadDiscUnion that will be copied. */ eProsima_user_DllExport SimpleBadDiscUnion( - SimpleBadDiscUnion&& x) noexcept; + SimpleBadDiscUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case 0: + m_first = x.m_first; + break; + + + case 1: + m_second = x.m_second; + break; + + default: + break; + } + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleBadDiscUnion that will be copied. */ eProsima_user_DllExport SimpleBadDiscUnion& operator =( - const SimpleBadDiscUnion& x); + const SimpleBadDiscUnion& x) + { + m__d = x.m__d; + + switch (m__d) + { + case 0: + m_first = x.m_first; + break; + + + case 1: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleBadDiscUnion that will be copied. */ eProsima_user_DllExport SimpleBadDiscUnion& operator =( - SimpleBadDiscUnion&& x) noexcept; + SimpleBadDiscUnion&& x) noexcept + { + m__d = x.m__d; + + switch (m__d) + { + case 0: + m_first = x.m_first; + break; + + + case 1: + m_second = x.m_second; + break; + + default: + break; + } + + return *this; + } /*! * @brief Comparison operator. * @param x SimpleBadDiscUnion object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleBadDiscUnion& x) const; + const SimpleBadDiscUnion& x) const + { + if (m__d != x.m__d) + { + return false; + } + + switch (m__d) + { + case 0: + return (m_first == x.m_first); + break; + + + case 1: + return (m_second == x.m_second); + break; + + default: + break; + } + return false; + } /*! * @brief Comparison operator. * @param x SimpleBadDiscUnion object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleBadDiscUnion& x) const; + const SimpleBadDiscUnion& x) const + { + return !(*this == x); + } /*! * @brief This function sets the discriminator value. * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ eProsima_user_DllExport void _d( - uint8_t __d); + uint8_t __d) + { + bool b = false; + + switch (m__d) + { + case 0: + switch (__d) + { + case 0: + b = true; + break; + default: + break; + } + break; + + + case 1: + switch (__d) + { + case 1: + b = true; + break; + default: + break; + } + break; + + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("Discriminator doesn't correspond with the selected union member"); + } + + m__d = __d; + } /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - eProsima_user_DllExport uint8_t _d() const; + eProsima_user_DllExport uint8_t _d() const + { + return m__d; + } /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - eProsima_user_DllExport uint8_t& _d(); + eProsima_user_DllExport uint8_t& _d() + { + return m__d; + } /*! * @brief This function sets a value in member first * @param _first New value for member first */ eProsima_user_DllExport void first( - int32_t _first); + int32_t _first) + { + m_first = _first; + m__d = 0; + + } /*! * @brief This function returns the value of member first * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t first() const; + eProsima_user_DllExport int32_t first() const + { + bool b = false; + + switch (m__d) + { + case 0: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! * @brief This function returns a reference to member first * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int32_t& first(); + eProsima_user_DllExport int32_t& first() + { + bool b = false; + + switch (m__d) + { + case 0: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_first; + } /*! @@ -3843,21 +6505,66 @@ class SimpleBadDiscUnion * @param _second New value for member second */ eProsima_user_DllExport void second( - int64_t _second); + int64_t _second) + { + m_second = _second; + m__d = 1; + + } /*! * @brief This function returns the value of member second * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t second() const; + eProsima_user_DllExport int64_t second() const + { + bool b = false; + + switch (m__d) + { + case 1: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } /*! * @brief This function returns a reference to member second * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. + * @exception eprosima::fastcdr::exception::BadParamException This exception is thrown if the requested union member is not the current selection. */ - eProsima_user_DllExport int64_t& second(); + eProsima_user_DllExport int64_t& second() + { + bool b = false; + + switch (m__d) + { + case 1: + b = true; + break; + default: + break; + } + + if (!b) + { + throw eprosima::fastcdr::exception::BadParamException("This member has not been selected"); + } + + return m_second; + } + + private: @@ -3879,80 +6586,124 @@ class SimpleUnionStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleUnionStruct(); + eProsima_user_DllExport SimpleUnionStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleUnionStruct(); + eProsima_user_DllExport ~SimpleUnionStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleUnionStruct that will be copied. */ eProsima_user_DllExport SimpleUnionStruct( - const SimpleUnionStruct& x); + const SimpleUnionStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object SimpleUnionStruct that will be copied. */ eProsima_user_DllExport SimpleUnionStruct( - SimpleUnionStruct&& x) noexcept; + SimpleUnionStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleUnionStruct that will be copied. */ eProsima_user_DllExport SimpleUnionStruct& operator =( - const SimpleUnionStruct& x); + const SimpleUnionStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleUnionStruct that will be copied. */ eProsima_user_DllExport SimpleUnionStruct& operator =( - SimpleUnionStruct&& x) noexcept; + SimpleUnionStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x SimpleUnionStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleUnionStruct& x) const; + const SimpleUnionStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x SimpleUnionStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleUnionStruct& x) const; + const SimpleUnionStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const SimpleUnion& _my_union); + const SimpleUnion& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - SimpleUnion&& _my_union); + SimpleUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const SimpleUnion& my_union() const; + eProsima_user_DllExport const SimpleUnion& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport SimpleUnion& my_union(); + eProsima_user_DllExport SimpleUnion& my_union() + { + return m_my_union; + } + + private: @@ -3972,80 +6723,124 @@ class SimpleUnionStructEqual /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleUnionStructEqual(); + eProsima_user_DllExport SimpleUnionStructEqual() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleUnionStructEqual(); + eProsima_user_DllExport ~SimpleUnionStructEqual() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleUnionStructEqual that will be copied. */ eProsima_user_DllExport SimpleUnionStructEqual( - const SimpleUnionStructEqual& x); + const SimpleUnionStructEqual& x) + { + m_my_union_equal = x.m_my_union_equal; + + } /*! * @brief Move constructor. * @param x Reference to the object SimpleUnionStructEqual that will be copied. */ eProsima_user_DllExport SimpleUnionStructEqual( - SimpleUnionStructEqual&& x) noexcept; + SimpleUnionStructEqual&& x) noexcept + { + m_my_union_equal = std::move(x.m_my_union_equal); + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleUnionStructEqual that will be copied. */ eProsima_user_DllExport SimpleUnionStructEqual& operator =( - const SimpleUnionStructEqual& x); + const SimpleUnionStructEqual& x) + { + + m_my_union_equal = x.m_my_union_equal; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleUnionStructEqual that will be copied. */ eProsima_user_DllExport SimpleUnionStructEqual& operator =( - SimpleUnionStructEqual&& x) noexcept; + SimpleUnionStructEqual&& x) noexcept + { + + m_my_union_equal = std::move(x.m_my_union_equal); + return *this; + } /*! * @brief Comparison operator. * @param x SimpleUnionStructEqual object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleUnionStructEqual& x) const; + const SimpleUnionStructEqual& x) const + { + return (m_my_union_equal == x.m_my_union_equal); + } /*! * @brief Comparison operator. * @param x SimpleUnionStructEqual object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleUnionStructEqual& x) const; + const SimpleUnionStructEqual& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union_equal * @param _my_union_equal New value to be copied in member my_union_equal */ eProsima_user_DllExport void my_union_equal( - const SimpleUnion& _my_union_equal); + const SimpleUnion& _my_union_equal) + { + m_my_union_equal = _my_union_equal; + } /*! * @brief This function moves the value in member my_union_equal * @param _my_union_equal New value to be moved in member my_union_equal */ eProsima_user_DllExport void my_union_equal( - SimpleUnion&& _my_union_equal); + SimpleUnion&& _my_union_equal) + { + m_my_union_equal = std::move(_my_union_equal); + } /*! * @brief This function returns a constant reference to member my_union_equal * @return Constant reference to member my_union_equal */ - eProsima_user_DllExport const SimpleUnion& my_union_equal() const; + eProsima_user_DllExport const SimpleUnion& my_union_equal() const + { + return m_my_union_equal; + } /*! * @brief This function returns a reference to member my_union_equal * @return Reference to member my_union_equal */ - eProsima_user_DllExport SimpleUnion& my_union_equal(); + eProsima_user_DllExport SimpleUnion& my_union_equal() + { + return m_my_union_equal; + } + + private: @@ -4065,80 +6860,124 @@ class SimpleUnionNamesStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleUnionNamesStruct(); + eProsima_user_DllExport SimpleUnionNamesStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleUnionNamesStruct(); + eProsima_user_DllExport ~SimpleUnionNamesStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleUnionNamesStruct that will be copied. */ eProsima_user_DllExport SimpleUnionNamesStruct( - const SimpleUnionNamesStruct& x); + const SimpleUnionNamesStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object SimpleUnionNamesStruct that will be copied. */ eProsima_user_DllExport SimpleUnionNamesStruct( - SimpleUnionNamesStruct&& x) noexcept; + SimpleUnionNamesStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleUnionNamesStruct that will be copied. */ eProsima_user_DllExport SimpleUnionNamesStruct& operator =( - const SimpleUnionNamesStruct& x); + const SimpleUnionNamesStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleUnionNamesStruct that will be copied. */ eProsima_user_DllExport SimpleUnionNamesStruct& operator =( - SimpleUnionNamesStruct&& x) noexcept; + SimpleUnionNamesStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x SimpleUnionNamesStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleUnionNamesStruct& x) const; + const SimpleUnionNamesStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x SimpleUnionNamesStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleUnionNamesStruct& x) const; + const SimpleUnionNamesStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const SimpleUnionNames& _my_union); + const SimpleUnionNames& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - SimpleUnionNames&& _my_union); + SimpleUnionNames&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const SimpleUnionNames& my_union() const; + eProsima_user_DllExport const SimpleUnionNames& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport SimpleUnionNames& my_union(); + eProsima_user_DllExport SimpleUnionNames& my_union() + { + return m_my_union; + } + + private: @@ -4158,80 +6997,124 @@ class SimpleTypeUnionStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleTypeUnionStruct(); + eProsima_user_DllExport SimpleTypeUnionStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleTypeUnionStruct(); + eProsima_user_DllExport ~SimpleTypeUnionStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleTypeUnionStruct that will be copied. */ eProsima_user_DllExport SimpleTypeUnionStruct( - const SimpleTypeUnionStruct& x); + const SimpleTypeUnionStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object SimpleTypeUnionStruct that will be copied. */ eProsima_user_DllExport SimpleTypeUnionStruct( - SimpleTypeUnionStruct&& x) noexcept; + SimpleTypeUnionStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleTypeUnionStruct that will be copied. */ eProsima_user_DllExport SimpleTypeUnionStruct& operator =( - const SimpleTypeUnionStruct& x); + const SimpleTypeUnionStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleTypeUnionStruct that will be copied. */ eProsima_user_DllExport SimpleTypeUnionStruct& operator =( - SimpleTypeUnionStruct&& x) noexcept; + SimpleTypeUnionStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x SimpleTypeUnionStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleTypeUnionStruct& x) const; + const SimpleTypeUnionStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x SimpleTypeUnionStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleTypeUnionStruct& x) const; + const SimpleTypeUnionStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const SimpleTypeUnion& _my_union); + const SimpleTypeUnion& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - SimpleTypeUnion&& _my_union); + SimpleTypeUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const SimpleTypeUnion& my_union() const; + eProsima_user_DllExport const SimpleTypeUnion& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport SimpleTypeUnion& my_union(); + eProsima_user_DllExport SimpleTypeUnion& my_union() + { + return m_my_union; + } + + private: @@ -4251,80 +7134,124 @@ class SimpleBadUnionStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SimpleBadUnionStruct(); + eProsima_user_DllExport SimpleBadUnionStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimpleBadUnionStruct(); + eProsima_user_DllExport ~SimpleBadUnionStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimpleBadUnionStruct that will be copied. */ eProsima_user_DllExport SimpleBadUnionStruct( - const SimpleBadUnionStruct& x); + const SimpleBadUnionStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object SimpleBadUnionStruct that will be copied. */ eProsima_user_DllExport SimpleBadUnionStruct( - SimpleBadUnionStruct&& x) noexcept; + SimpleBadUnionStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object SimpleBadUnionStruct that will be copied. */ eProsima_user_DllExport SimpleBadUnionStruct& operator =( - const SimpleBadUnionStruct& x); + const SimpleBadUnionStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimpleBadUnionStruct that will be copied. */ eProsima_user_DllExport SimpleBadUnionStruct& operator =( - SimpleBadUnionStruct&& x) noexcept; + SimpleBadUnionStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x SimpleBadUnionStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SimpleBadUnionStruct& x) const; + const SimpleBadUnionStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x SimpleBadUnionStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SimpleBadUnionStruct& x) const; + const SimpleBadUnionStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const SimpleBadUnion& _my_union); + const SimpleBadUnion& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - SimpleBadUnion&& _my_union); + SimpleBadUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const SimpleBadUnion& my_union() const; + eProsima_user_DllExport const SimpleBadUnion& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport SimpleBadUnion& my_union(); + eProsima_user_DllExport SimpleBadUnion& my_union() + { + return m_my_union; + } + + private: @@ -4344,80 +7271,124 @@ class SimplBadDiscUnionStruct /*! * @brief Default constructor. */ - eProsima_user_DllExport SimplBadDiscUnionStruct(); + eProsima_user_DllExport SimplBadDiscUnionStruct() + { + // Just to register all known types + registerTypesTypes(); + } /*! * @brief Default destructor. */ - eProsima_user_DllExport ~SimplBadDiscUnionStruct(); + eProsima_user_DllExport ~SimplBadDiscUnionStruct() + { + } /*! * @brief Copy constructor. * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. */ eProsima_user_DllExport SimplBadDiscUnionStruct( - const SimplBadDiscUnionStruct& x); + const SimplBadDiscUnionStruct& x) + { + m_my_union = x.m_my_union; + + } /*! * @brief Move constructor. * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. */ eProsima_user_DllExport SimplBadDiscUnionStruct( - SimplBadDiscUnionStruct&& x) noexcept; + SimplBadDiscUnionStruct&& x) noexcept + { + m_my_union = std::move(x.m_my_union); + } /*! * @brief Copy assignment. * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. */ eProsima_user_DllExport SimplBadDiscUnionStruct& operator =( - const SimplBadDiscUnionStruct& x); + const SimplBadDiscUnionStruct& x) + { + + m_my_union = x.m_my_union; + + return *this; + } /*! * @brief Move assignment. * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. */ eProsima_user_DllExport SimplBadDiscUnionStruct& operator =( - SimplBadDiscUnionStruct&& x) noexcept; + SimplBadDiscUnionStruct&& x) noexcept + { + + m_my_union = std::move(x.m_my_union); + return *this; + } /*! * @brief Comparison operator. * @param x SimplBadDiscUnionStruct object to compare. */ eProsima_user_DllExport bool operator ==( - const SimplBadDiscUnionStruct& x) const; + const SimplBadDiscUnionStruct& x) const + { + return (m_my_union == x.m_my_union); + } /*! * @brief Comparison operator. * @param x SimplBadDiscUnionStruct object to compare. */ eProsima_user_DllExport bool operator !=( - const SimplBadDiscUnionStruct& x) const; + const SimplBadDiscUnionStruct& x) const + { + return !(*this == x); + } /*! * @brief This function copies the value in member my_union * @param _my_union New value to be copied in member my_union */ eProsima_user_DllExport void my_union( - const SimpleBadDiscUnion& _my_union); + const SimpleBadDiscUnion& _my_union) + { + m_my_union = _my_union; + } /*! * @brief This function moves the value in member my_union * @param _my_union New value to be moved in member my_union */ eProsima_user_DllExport void my_union( - SimpleBadDiscUnion&& _my_union); + SimpleBadDiscUnion&& _my_union) + { + m_my_union = std::move(_my_union); + } /*! * @brief This function returns a constant reference to member my_union * @return Constant reference to member my_union */ - eProsima_user_DllExport const SimpleBadDiscUnion& my_union() const; + eProsima_user_DllExport const SimpleBadDiscUnion& my_union() const + { + return m_my_union; + } /*! * @brief This function returns a reference to member my_union * @return Reference to member my_union */ - eProsima_user_DllExport SimpleBadDiscUnion& my_union(); + eProsima_user_DllExport SimpleBadDiscUnion& my_union() + { + return m_my_union; + } + + private: @@ -4425,8 +7396,6 @@ class SimplBadDiscUnionStruct }; -#endif // _FAST_DDS_GENERATED_TYPES_H_ - +#endif // _FAST_DDS_GENERATED_TYPES_HPP_ -#endif // FASTCDR_VERSION_MAJOR > 1 diff --git a/test/xtypes/idl/TypesCdrAux.hpp b/test/xtypes/idl/TypesCdrAux.hpp index 14992724933..7e5d5f9409d 100644 --- a/test/xtypes/idl/TypesCdrAux.hpp +++ b/test/xtypes/idl/TypesCdrAux.hpp @@ -22,7 +22,7 @@ #ifndef _FAST_DDS_GENERATED_TYPESCDRAUX_HPP_ #define _FAST_DDS_GENERATED_TYPESCDRAUX_HPP_ -#include "Types.h" +#include "Types.hpp" constexpr uint32_t SimpleUnionStruct_max_cdr_typesize {24UL}; constexpr uint32_t SimpleUnionStruct_max_key_cdr_typesize {0UL}; @@ -253,52 +253,36 @@ eProsima_user_DllExport void serialize_key( - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceStruct& data); - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceStructEqual& data); - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceBadStruct& data); - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceBoundsStruct& data); - - - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceSequenceStruct& data); - - - - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const SequenceSequenceBoundsStruct& data); @@ -348,7 +332,6 @@ eProsima_user_DllExport void serialize_key( - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const MapMapStruct& data); @@ -358,7 +341,6 @@ eProsima_user_DllExport void serialize_key( - eProsima_user_DllExport void serialize_key( eprosima::fastcdr::Cdr& scdr, const MapMapBoundsStruct& data); @@ -372,16 +354,6 @@ eProsima_user_DllExport void serialize_key( - - - - - - - - - - diff --git a/test/xtypes/idl/TypesCdrAux.ipp b/test/xtypes/idl/TypesCdrAux.ipp index 837c42573bb..e9c85e3b75d 100644 --- a/test/xtypes/idl/TypesCdrAux.ipp +++ b/test/xtypes/idl/TypesCdrAux.ipp @@ -1476,8 +1476,6 @@ void serialize_key( - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1556,8 +1554,6 @@ void serialize_key( - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1636,8 +1632,6 @@ void serialize_key( - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1716,8 +1710,6 @@ void serialize_key( - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1796,10 +1788,6 @@ void serialize_key( - - - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -1878,10 +1866,6 @@ void serialize_key( - - - - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -2363,7 +2347,6 @@ void serialize_key( - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, @@ -2445,7 +2428,6 @@ void serialize_key( - template<> eProsima_user_DllExport size_t calculate_serialized_size( eprosima::fastcdr::CdrSizeCalculator& calculator, diff --git a/test/xtypes/idl/TypesPubSubTypes.cxx b/test/xtypes/idl/TypesPubSubTypes.cxx index 0c0a8f0363e..7f56adaad22 100644 --- a/test/xtypes/idl/TypesPubSubTypes.cxx +++ b/test/xtypes/idl/TypesPubSubTypes.cxx @@ -3263,8 +3263,6 @@ bool ArraySizeStructPubSubType::getKey( - - SequenceStructPubSubType::SequenceStructPubSubType() { setName("SequenceStruct"); @@ -3455,8 +3453,6 @@ bool SequenceStructPubSubType::getKey( - - SequenceStructEqualPubSubType::SequenceStructEqualPubSubType() { setName("SequenceStructEqual"); @@ -3647,8 +3643,6 @@ bool SequenceStructEqualPubSubType::getKey( - - SequenceBadStructPubSubType::SequenceBadStructPubSubType() { setName("SequenceBadStruct"); @@ -3839,8 +3833,6 @@ bool SequenceBadStructPubSubType::getKey( - - SequenceBoundsStructPubSubType::SequenceBoundsStructPubSubType() { setName("SequenceBoundsStruct"); @@ -4031,10 +4023,6 @@ bool SequenceBoundsStructPubSubType::getKey( - - - - SequenceSequenceStructPubSubType::SequenceSequenceStructPubSubType() { setName("SequenceSequenceStruct"); @@ -4225,10 +4213,6 @@ bool SequenceSequenceStructPubSubType::getKey( - - - - SequenceSequenceBoundsStructPubSubType::SequenceSequenceBoundsStructPubSubType() { setName("SequenceSequenceBoundsStruct"); @@ -5382,7 +5366,6 @@ bool MapBoundsStructPubSubType::getKey( - MapMapStructPubSubType::MapMapStructPubSubType() { setName("MapMapStruct"); @@ -5576,7 +5559,6 @@ bool MapMapStructPubSubType::getKey( - MapMapBoundsStructPubSubType::MapMapBoundsStructPubSubType() { setName("MapMapBoundsStruct"); @@ -5774,16 +5756,6 @@ bool MapMapBoundsStructPubSubType::getKey( - - - - - - - - - - @@ -6925,3 +6897,6 @@ bool SimplBadDiscUnionStructPubSubType::getKey( return true; } + +// Include auxiliary functions like for serializing/deserializing. +#include "TypesCdrAux.ipp" diff --git a/test/xtypes/idl/TypesPubSubTypes.h b/test/xtypes/idl/TypesPubSubTypes.h index 6a934f82843..3d6833a9c7d 100644 --- a/test/xtypes/idl/TypesPubSubTypes.h +++ b/test/xtypes/idl/TypesPubSubTypes.h @@ -29,7 +29,7 @@ #include #include -#include "Types.h" +#include "Types.hpp" #if !defined(GEN_API_VER) || (GEN_API_VER != 2) @@ -1571,8 +1571,6 @@ class ArraySizeStructPubSubType : public eprosima::fastdds::dds::TopicDataType - - /*! * @brief This class represents the TopicDataType of the type SequenceStruct defined by the user in the IDL file. * @ingroup Types @@ -1663,8 +1661,6 @@ class SequenceStructPubSubType : public eprosima::fastdds::dds::TopicDataType - - /*! * @brief This class represents the TopicDataType of the type SequenceStructEqual defined by the user in the IDL file. * @ingroup Types @@ -1755,8 +1751,6 @@ class SequenceStructEqualPubSubType : public eprosima::fastdds::dds::TopicDataTy - - /*! * @brief This class represents the TopicDataType of the type SequenceBadStruct defined by the user in the IDL file. * @ingroup Types @@ -1847,8 +1841,6 @@ class SequenceBadStructPubSubType : public eprosima::fastdds::dds::TopicDataType - - /*! * @brief This class represents the TopicDataType of the type SequenceBoundsStruct defined by the user in the IDL file. * @ingroup Types @@ -1939,10 +1931,6 @@ class SequenceBoundsStructPubSubType : public eprosima::fastdds::dds::TopicDataT - - - - /*! * @brief This class represents the TopicDataType of the type SequenceSequenceStruct defined by the user in the IDL file. * @ingroup Types @@ -2033,10 +2021,6 @@ class SequenceSequenceStructPubSubType : public eprosima::fastdds::dds::TopicDat - - - - /*! * @brief This class represents the TopicDataType of the type SequenceSequenceBoundsStruct defined by the user in the IDL file. * @ingroup Types @@ -2590,7 +2574,6 @@ class MapBoundsStructPubSubType : public eprosima::fastdds::dds::TopicDataType - /*! * @brief This class represents the TopicDataType of the type MapMapStruct defined by the user in the IDL file. * @ingroup Types @@ -2684,7 +2667,6 @@ class MapMapStructPubSubType : public eprosima::fastdds::dds::TopicDataType - /*! * @brief This class represents the TopicDataType of the type MapMapBoundsStruct defined by the user in the IDL file. * @ingroup Types @@ -2782,16 +2764,6 @@ class MapMapBoundsStructPubSubType : public eprosima::fastdds::dds::TopicDataTyp - - - - - - - - - - diff --git a/test/xtypes/idl/TypesTypeObject.cxx b/test/xtypes/idl/TypesTypeObject.cxx index bcefed47249..26033086852 100644 --- a/test/xtypes/idl/TypesTypeObject.cxx +++ b/test/xtypes/idl/TypesTypeObject.cxx @@ -24,7 +24,7 @@ namespace { char dummy; } #endif -#include "Types.h" +#include "Types.hpp" #include "TypesTypeObject.h" #include #include @@ -4425,8 +4425,6 @@ const TypeObject* GetCompleteArraySizeStructObject() - - const TypeIdentifier* GetSequenceStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceStruct", complete); @@ -4602,8 +4600,6 @@ const TypeObject* GetCompleteSequenceStructObject() - - const TypeIdentifier* GetSequenceStructEqualIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceStructEqual", complete); @@ -4779,8 +4775,6 @@ const TypeObject* GetCompleteSequenceStructEqualObject() - - const TypeIdentifier* GetSequenceBadStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceBadStruct", complete); @@ -4956,8 +4950,6 @@ const TypeObject* GetCompleteSequenceBadStructObject() - - const TypeIdentifier* GetSequenceBoundsStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceBoundsStruct", complete); @@ -5133,10 +5125,6 @@ const TypeObject* GetCompleteSequenceBoundsStructObject() - - - - const TypeIdentifier* GetSequenceSequenceStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceSequenceStruct", complete); @@ -5312,10 +5300,6 @@ const TypeObject* GetCompleteSequenceSequenceStructObject() - - - - const TypeIdentifier* GetSequenceSequenceBoundsStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("SequenceSequenceBoundsStruct", complete); @@ -6379,7 +6363,6 @@ const TypeObject* GetCompleteMapBoundsStructObject() - const TypeIdentifier* GetMapMapStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("MapMapStruct", complete); @@ -6558,7 +6541,6 @@ const TypeObject* GetCompleteMapMapStructObject() - const TypeIdentifier* GetMapMapBoundsStructIdentifier(bool complete) { const TypeIdentifier * c_identifier = TypeObjectFactory::get_instance()->get_type_identifier("MapMapBoundsStruct", complete); diff --git a/test/xtypes/idl/TypesTypeObject.h b/test/xtypes/idl/TypesTypeObject.h index 2f615b62792..4ed19222804 100644 --- a/test/xtypes/idl/TypesTypeObject.h +++ b/test/xtypes/idl/TypesTypeObject.h @@ -190,8 +190,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteArraySizeStructObject(); - - eProsima_user_DllExport const TypeIdentifier* GetSequenceStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceStructObject(); @@ -199,8 +197,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteSequenceStructObject(); - - eProsima_user_DllExport const TypeIdentifier* GetSequenceStructEqualIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceStructEqualObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceStructEqualObject(); @@ -208,8 +204,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteSequenceStructEqualObject() - - eProsima_user_DllExport const TypeIdentifier* GetSequenceBadStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceBadStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceBadStructObject(); @@ -217,8 +211,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteSequenceBadStructObject(); - - eProsima_user_DllExport const TypeIdentifier* GetSequenceBoundsStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceBoundsStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceBoundsStructObject(); @@ -226,10 +218,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteSequenceBoundsStructObject( - - - - eProsima_user_DllExport const TypeIdentifier* GetSequenceSequenceStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceSequenceStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceSequenceStructObject(); @@ -237,10 +225,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteSequenceSequenceStructObjec - - - - eProsima_user_DllExport const TypeIdentifier* GetSequenceSequenceBoundsStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetSequenceSequenceBoundsStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalSequenceSequenceBoundsStructObject(); @@ -296,7 +280,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteMapBoundsStructObject(); - eProsima_user_DllExport const TypeIdentifier* GetMapMapStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetMapMapStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalMapMapStructObject(); @@ -307,7 +290,6 @@ eProsima_user_DllExport const TypeObject* GetCompleteMapMapStructObject(); - eProsima_user_DllExport const TypeIdentifier* GetMapMapBoundsStructIdentifier(bool complete = false); eProsima_user_DllExport const TypeObject* GetMapMapBoundsStructObject(bool complete = false); eProsima_user_DllExport const TypeObject* GetMinimalMapMapBoundsStructObject(); diff --git a/test/xtypes/idl/Typesv1.cxx b/test/xtypes/idl/Typesv1.cxx deleted file mode 100644 index 54b0d494ecc..00000000000 --- a/test/xtypes/idl/Typesv1.cxx +++ /dev/null @@ -1,8202 +0,0 @@ -// 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 Types.cpp - * This source file contains the implementation of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#ifdef _WIN32 -// Remove linker warning LNK4221 on Visual Studio -namespace { -char dummy; -} // namespace -#endif // _WIN32 - -#include "Types.h" - -#if FASTCDR_VERSION_MAJOR == 1 - -#include "TypesTypeObject.h" - -#include - - -#include -using namespace eprosima::fastcdr::exception; - -#include - -namespace helper { namespace internal { - -enum class Size { - UInt8, - UInt16, - UInt32, - UInt64, -}; - -constexpr Size get_size(int s) { - return (s <= 8 ) ? Size::UInt8: - (s <= 16) ? Size::UInt16: - (s <= 32) ? Size::UInt32: Size::UInt64; -} - -template -struct FindTypeH; - -template<> -struct FindTypeH { - using type = std::uint8_t; -}; - -template<> -struct FindTypeH { - using type = std::uint16_t; -}; - -template<> -struct FindTypeH { - using type = std::uint32_t; -}; - -template<> -struct FindTypeH { - using type = std::uint64_t; -}; -} - -template -struct FindType { - using type = typename internal::FindTypeH::type; -}; -} - -#define SimpleUnionStruct_max_cdr_typesize 24ULL; -#define SequenceSequenceBoundsStruct_max_cdr_typesize 132ULL; - -#define MyAliasEnumStruct_max_cdr_typesize 8ULL; -#define ArrayBadStruct_max_cdr_typesize 6ULL; -#define MapBadKeyStruct_max_cdr_typesize 24ULL; -#define SimpleBadUnionStruct_max_cdr_typesize 24ULL; -#define MyEnumStruct_max_cdr_typesize 8ULL; - -#define ArrayStructEqual_max_cdr_typesize 12ULL; -#define LargeWStringStruct_max_cdr_typesize 167708ULL; - -#define WStringStruct_max_cdr_typesize 1028ULL; -#define SequenceStruct_max_cdr_typesize 16ULL; -#define SimpleTypeUnionStruct_max_cdr_typesize 24ULL; - -#define ArrayDimensionsStruct_max_cdr_typesize 20ULL; -#define SequenceSequenceStruct_max_cdr_typesize 48ULL; -#define MapBoundsStruct_max_cdr_typesize 40ULL; -#define SequenceStructEqual_max_cdr_typesize 16ULL; -#define MapStructEqual_max_cdr_typesize 24ULL; -#define BasicStruct_max_cdr_typesize 272ULL; -#define SequenceBoundsStruct_max_cdr_typesize 24ULL; -#define MapMapStruct_max_cdr_typesize 60ULL; -#define BasicWideStruct_max_cdr_typesize 536ULL; - -#define SimplBadDiscUnionStruct_max_cdr_typesize 24ULL; -#define MapStruct_max_cdr_typesize 24ULL; - -#define MyBadEnumStruct_max_cdr_typesize 8ULL; -#define SequenceBadStruct_max_cdr_typesize 10ULL; -#define SimpleUnionNamesStruct_max_cdr_typesize 24ULL; -#define LargeStringStruct_max_cdr_typesize 41934ULL; -#define ArrayStruct_max_cdr_typesize 12ULL; -#define BadBasicWideStruct_max_cdr_typesize 536ULL; -#define ArraySizeStruct_max_cdr_typesize 24ULL; - -#define MapBadElemStruct_max_cdr_typesize 40ULL; -#define SimpleUnionStructEqual_max_cdr_typesize 24ULL; -#define BasicBadStruct_max_cdr_typesize 272ULL; -#define BasicNamesStruct_max_cdr_typesize 272ULL; -#define StringStruct_max_cdr_typesize 264ULL; - -#define MapMapBoundsStruct_max_cdr_typesize 108ULL; - - - - -MyEnumStruct::MyEnumStruct() -{ - // MyEnum m_my_enum - m_my_enum = ::A; - - // Just to register all known types - registerTypesTypes(); -} - -MyEnumStruct::~MyEnumStruct() -{ -} - -MyEnumStruct::MyEnumStruct( - const MyEnumStruct& x) -{ - m_my_enum = x.m_my_enum; - -} - -MyEnumStruct::MyEnumStruct( - MyEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - -} - -MyEnumStruct& MyEnumStruct::operator =( - const MyEnumStruct& x) -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -MyEnumStruct& MyEnumStruct::operator =( - MyEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -bool MyEnumStruct::operator ==( - const MyEnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool MyEnumStruct::operator !=( - const MyEnumStruct& x) const -{ - return !(*this == x); -} - -size_t MyEnumStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MyEnumStruct_max_cdr_typesize; -} - -size_t MyEnumStruct::getCdrSerializedSize( - const MyEnumStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void MyEnumStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m_my_enum; - -} - -void MyEnumStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_my_enum = (MyEnum)enum_value; - } - - -} - - -bool MyEnumStruct::isKeyDefined() -{ - return false; -} - -void MyEnumStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void MyEnumStruct::my_enum( - MyEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyEnum MyEnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyEnum& MyEnumStruct::my_enum() -{ - return m_my_enum; -} - - - - - -MyBadEnumStruct::MyBadEnumStruct() -{ - // MyBadEnum m_my_enum - m_my_enum = ::A1; - - // Just to register all known types - registerTypesTypes(); -} - -MyBadEnumStruct::~MyBadEnumStruct() -{ -} - -MyBadEnumStruct::MyBadEnumStruct( - const MyBadEnumStruct& x) -{ - m_my_enum = x.m_my_enum; - -} - -MyBadEnumStruct::MyBadEnumStruct( - MyBadEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - -} - -MyBadEnumStruct& MyBadEnumStruct::operator =( - const MyBadEnumStruct& x) -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -MyBadEnumStruct& MyBadEnumStruct::operator =( - MyBadEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -bool MyBadEnumStruct::operator ==( - const MyBadEnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool MyBadEnumStruct::operator !=( - const MyBadEnumStruct& x) const -{ - return !(*this == x); -} - -size_t MyBadEnumStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MyBadEnumStruct_max_cdr_typesize; -} - -size_t MyBadEnumStruct::getCdrSerializedSize( - const MyBadEnumStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void MyBadEnumStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m_my_enum; - -} - -void MyBadEnumStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_my_enum = (MyBadEnum)enum_value; - } - - -} - - -bool MyBadEnumStruct::isKeyDefined() -{ - return false; -} - -void MyBadEnumStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void MyBadEnumStruct::my_enum( - MyBadEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyBadEnum MyBadEnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyBadEnum& MyBadEnumStruct::my_enum() -{ - return m_my_enum; -} - - - - - - -MyAliasEnumStruct::MyAliasEnumStruct() -{ - // MyAliasEnum m_my_enum - m_my_enum = ::A; - - // Just to register all known types - registerTypesTypes(); -} - -MyAliasEnumStruct::~MyAliasEnumStruct() -{ -} - -MyAliasEnumStruct::MyAliasEnumStruct( - const MyAliasEnumStruct& x) -{ - m_my_enum = x.m_my_enum; - -} - -MyAliasEnumStruct::MyAliasEnumStruct( - MyAliasEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - -} - -MyAliasEnumStruct& MyAliasEnumStruct::operator =( - const MyAliasEnumStruct& x) -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -MyAliasEnumStruct& MyAliasEnumStruct::operator =( - MyAliasEnumStruct&& x) noexcept -{ - m_my_enum = x.m_my_enum; - - return *this; -} - -bool MyAliasEnumStruct::operator ==( - const MyAliasEnumStruct& x) const -{ - return (m_my_enum == x.m_my_enum); -} - -bool MyAliasEnumStruct::operator !=( - const MyAliasEnumStruct& x) const -{ - return !(*this == x); -} - -size_t MyAliasEnumStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MyAliasEnumStruct_max_cdr_typesize; -} - -size_t MyAliasEnumStruct::getCdrSerializedSize( - const MyAliasEnumStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - return current_alignment - initial_alignment; -} - - -void MyAliasEnumStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << (uint32_t)m_my_enum; - -} - -void MyAliasEnumStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - uint32_t enum_value = 0; - dcdr >> enum_value; - m_my_enum = (MyAliasEnum)enum_value; - } - - -} - - -bool MyAliasEnumStruct::isKeyDefined() -{ - return false; -} - -void MyAliasEnumStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ -void MyAliasEnumStruct::my_enum( - MyAliasEnum _my_enum) -{ - m_my_enum = _my_enum; -} - -/*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ -MyAliasEnum MyAliasEnumStruct::my_enum() const -{ - return m_my_enum; -} - -/*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ -MyAliasEnum& MyAliasEnumStruct::my_enum() -{ - return m_my_enum; -} - - - - - -BasicStruct::BasicStruct() -{ - // boolean m_my_bool - m_my_bool = false; - // long m_my_int32 - m_my_int32 = 0; - // /type_d() m_my_string - - - // Just to register all known types - registerTypesTypes(); -} - -BasicStruct::~BasicStruct() -{ -} - -BasicStruct::BasicStruct( - const BasicStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - -} - -BasicStruct::BasicStruct( - BasicStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - -} - -BasicStruct& BasicStruct::operator =( - const BasicStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - - return *this; -} - -BasicStruct& BasicStruct::operator =( - BasicStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - - return *this; -} - -bool BasicStruct::operator ==( - const BasicStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string); -} - -bool BasicStruct::operator !=( - const BasicStruct& x) const -{ - return !(*this == x); -} - -size_t BasicStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BasicStruct_max_cdr_typesize; -} - -size_t BasicStruct::getCdrSerializedSize( - const BasicStruct& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void BasicStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_bool; - - scdr << m_my_int32; - - scdr << m_my_string.c_str(); - -} - -void BasicStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_bool; - - - - dcdr >> m_my_int32; - - - - dcdr >> m_my_string; - - -} - - -bool BasicStruct::isKeyDefined() -{ - return false; -} - -void BasicStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BasicStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BasicStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicStruct::my_string() -{ - return m_my_string; -} - - - - - -BasicNamesStruct::BasicNamesStruct() -{ - // boolean m_my_bool_name - m_my_bool_name = false; - // long m_my_int32_name - m_my_int32_name = 0; - // /type_d() m_my_string_name - - - // Just to register all known types - registerTypesTypes(); -} - -BasicNamesStruct::~BasicNamesStruct() -{ -} - -BasicNamesStruct::BasicNamesStruct( - const BasicNamesStruct& x) -{ - m_my_bool_name = x.m_my_bool_name; - - - m_my_int32_name = x.m_my_int32_name; - - - m_my_string_name = x.m_my_string_name; - -} - -BasicNamesStruct::BasicNamesStruct( - BasicNamesStruct&& x) noexcept -{ - m_my_bool_name = x.m_my_bool_name; - - - m_my_int32_name = x.m_my_int32_name; - - - m_my_string_name = std::move(x.m_my_string_name); - -} - -BasicNamesStruct& BasicNamesStruct::operator =( - const BasicNamesStruct& x) -{ - m_my_bool_name = x.m_my_bool_name; - - - m_my_int32_name = x.m_my_int32_name; - - - m_my_string_name = x.m_my_string_name; - - return *this; -} - -BasicNamesStruct& BasicNamesStruct::operator =( - BasicNamesStruct&& x) noexcept -{ - m_my_bool_name = x.m_my_bool_name; - - - m_my_int32_name = x.m_my_int32_name; - - - m_my_string_name = std::move(x.m_my_string_name); - - return *this; -} - -bool BasicNamesStruct::operator ==( - const BasicNamesStruct& x) const -{ - return (m_my_bool_name == x.m_my_bool_name && - m_my_int32_name == x.m_my_int32_name && - m_my_string_name == x.m_my_string_name); -} - -bool BasicNamesStruct::operator !=( - const BasicNamesStruct& x) const -{ - return !(*this == x); -} - -size_t BasicNamesStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BasicNamesStruct_max_cdr_typesize; -} - -size_t BasicNamesStruct::getCdrSerializedSize( - const BasicNamesStruct& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string_name().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void BasicNamesStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_bool_name; - - scdr << m_my_int32_name; - - scdr << m_my_string_name.c_str(); - -} - -void BasicNamesStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_bool_name; - - - - dcdr >> m_my_int32_name; - - - - dcdr >> m_my_string_name; - - -} - - -bool BasicNamesStruct::isKeyDefined() -{ - return false; -} - -void BasicNamesStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_bool_name - * @param _my_bool_name New value for member my_bool_name - */ -void BasicNamesStruct::my_bool_name( - bool _my_bool_name) -{ - m_my_bool_name = _my_bool_name; -} - -/*! - * @brief This function returns the value of member my_bool_name - * @return Value of member my_bool_name - */ -bool BasicNamesStruct::my_bool_name() const -{ - return m_my_bool_name; -} - -/*! - * @brief This function returns a reference to member my_bool_name - * @return Reference to member my_bool_name - */ -bool& BasicNamesStruct::my_bool_name() -{ - return m_my_bool_name; -} - - -/*! - * @brief This function sets a value in member my_int32_name - * @param _my_int32_name New value for member my_int32_name - */ -void BasicNamesStruct::my_int32_name( - int32_t _my_int32_name) -{ - m_my_int32_name = _my_int32_name; -} - -/*! - * @brief This function returns the value of member my_int32_name - * @return Value of member my_int32_name - */ -int32_t BasicNamesStruct::my_int32_name() const -{ - return m_my_int32_name; -} - -/*! - * @brief This function returns a reference to member my_int32_name - * @return Reference to member my_int32_name - */ -int32_t& BasicNamesStruct::my_int32_name() -{ - return m_my_int32_name; -} - - -/*! - * @brief This function copies the value in member my_string_name - * @param _my_string_name New value to be copied in member my_string_name - */ -void BasicNamesStruct::my_string_name( - const std::string& _my_string_name) -{ - m_my_string_name = _my_string_name; -} - -/*! - * @brief This function moves the value in member my_string_name - * @param _my_string_name New value to be moved in member my_string_name - */ -void BasicNamesStruct::my_string_name( - std::string&& _my_string_name) -{ - m_my_string_name = std::move(_my_string_name); -} - -/*! - * @brief This function returns a constant reference to member my_string_name - * @return Constant reference to member my_string_name - */ -const std::string& BasicNamesStruct::my_string_name() const -{ - return m_my_string_name; -} - -/*! - * @brief This function returns a reference to member my_string_name - * @return Reference to member my_string_name - */ -std::string& BasicNamesStruct::my_string_name() -{ - return m_my_string_name; -} - - - - - -BasicBadStruct::BasicBadStruct() -{ - // octet m_my_bool - m_my_bool = 0; - // long m_my_int32 - m_my_int32 = 0; - // /type_d() m_my_string - - - // Just to register all known types - registerTypesTypes(); -} - -BasicBadStruct::~BasicBadStruct() -{ -} - -BasicBadStruct::BasicBadStruct( - const BasicBadStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - -} - -BasicBadStruct::BasicBadStruct( - BasicBadStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - -} - -BasicBadStruct& BasicBadStruct::operator =( - const BasicBadStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - - return *this; -} - -BasicBadStruct& BasicBadStruct::operator =( - BasicBadStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - - return *this; -} - -bool BasicBadStruct::operator ==( - const BasicBadStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string); -} - -bool BasicBadStruct::operator !=( - const BasicBadStruct& x) const -{ - return !(*this == x); -} - -size_t BasicBadStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BasicBadStruct_max_cdr_typesize; -} - -size_t BasicBadStruct::getCdrSerializedSize( - const BasicBadStruct& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void BasicBadStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_bool; - - scdr << m_my_int32; - - scdr << m_my_string.c_str(); - -} - -void BasicBadStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_bool; - - - - dcdr >> m_my_int32; - - - - dcdr >> m_my_string; - - -} - - -bool BasicBadStruct::isKeyDefined() -{ - return false; -} - -void BasicBadStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicBadStruct::my_bool( - uint8_t _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -uint8_t BasicBadStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -uint8_t& BasicBadStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicBadStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicBadStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicBadStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicBadStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicBadStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicBadStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicBadStruct::my_string() -{ - return m_my_string; -} - - - - - -BasicWideStruct::BasicWideStruct() -{ - // boolean m_my_bool - m_my_bool = false; - // long m_my_int32 - m_my_int32 = 0; - // /type_d() m_my_string - - // long m_new_int32 - m_new_int32 = 0; - // /type_d() m_new_string - - - // Just to register all known types - registerTypesTypes(); -} - -BasicWideStruct::~BasicWideStruct() -{ -} - -BasicWideStruct::BasicWideStruct( - const BasicWideStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - - - m_new_int32 = x.m_new_int32; - - - m_new_string = x.m_new_string; - -} - -BasicWideStruct::BasicWideStruct( - BasicWideStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - - - m_new_int32 = x.m_new_int32; - - - m_new_string = std::move(x.m_new_string); - -} - -BasicWideStruct& BasicWideStruct::operator =( - const BasicWideStruct& x) -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - - - m_new_int32 = x.m_new_int32; - - - m_new_string = x.m_new_string; - - return *this; -} - -BasicWideStruct& BasicWideStruct::operator =( - BasicWideStruct&& x) noexcept -{ - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - - - m_new_int32 = x.m_new_int32; - - - m_new_string = std::move(x.m_new_string); - - return *this; -} - -bool BasicWideStruct::operator ==( - const BasicWideStruct& x) const -{ - return (m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string && - m_new_int32 == x.m_new_int32 && - m_new_string == x.m_new_string); -} - -bool BasicWideStruct::operator !=( - const BasicWideStruct& x) const -{ - return !(*this == x); -} - -size_t BasicWideStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BasicWideStruct_max_cdr_typesize; -} - -size_t BasicWideStruct::getCdrSerializedSize( - const BasicWideStruct& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string().size() + 1; - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.new_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void BasicWideStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_bool; - - scdr << m_my_int32; - - scdr << m_my_string.c_str(); - - scdr << m_new_int32; - - scdr << m_new_string.c_str(); - -} - -void BasicWideStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_bool; - - - - dcdr >> m_my_int32; - - - - dcdr >> m_my_string; - - - - dcdr >> m_new_int32; - - - - dcdr >> m_new_string; - - -} - - -bool BasicWideStruct::isKeyDefined() -{ - return false; -} - -void BasicWideStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BasicWideStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BasicWideStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BasicWideStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BasicWideStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BasicWideStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BasicWideStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BasicWideStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BasicWideStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BasicWideStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BasicWideStruct::my_string() -{ - return m_my_string; -} - - -/*! - * @brief This function sets a value in member new_int32 - * @param _new_int32 New value for member new_int32 - */ -void BasicWideStruct::new_int32( - int32_t _new_int32) -{ - m_new_int32 = _new_int32; -} - -/*! - * @brief This function returns the value of member new_int32 - * @return Value of member new_int32 - */ -int32_t BasicWideStruct::new_int32() const -{ - return m_new_int32; -} - -/*! - * @brief This function returns a reference to member new_int32 - * @return Reference to member new_int32 - */ -int32_t& BasicWideStruct::new_int32() -{ - return m_new_int32; -} - - -/*! - * @brief This function copies the value in member new_string - * @param _new_string New value to be copied in member new_string - */ -void BasicWideStruct::new_string( - const std::string& _new_string) -{ - m_new_string = _new_string; -} - -/*! - * @brief This function moves the value in member new_string - * @param _new_string New value to be moved in member new_string - */ -void BasicWideStruct::new_string( - std::string&& _new_string) -{ - m_new_string = std::move(_new_string); -} - -/*! - * @brief This function returns a constant reference to member new_string - * @return Constant reference to member new_string - */ -const std::string& BasicWideStruct::new_string() const -{ - return m_new_string; -} - -/*! - * @brief This function returns a reference to member new_string - * @return Reference to member new_string - */ -std::string& BasicWideStruct::new_string() -{ - return m_new_string; -} - - - - - -BadBasicWideStruct::BadBasicWideStruct() -{ - // long m_new_int32 - m_new_int32 = 0; - // /type_d() m_new_string - - // boolean m_my_bool - m_my_bool = false; - // long m_my_int32 - m_my_int32 = 0; - // /type_d() m_my_string - - - // Just to register all known types - registerTypesTypes(); -} - -BadBasicWideStruct::~BadBasicWideStruct() -{ -} - -BadBasicWideStruct::BadBasicWideStruct( - const BadBasicWideStruct& x) -{ - m_new_int32 = x.m_new_int32; - - - m_new_string = x.m_new_string; - - - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - -} - -BadBasicWideStruct::BadBasicWideStruct( - BadBasicWideStruct&& x) noexcept -{ - m_new_int32 = x.m_new_int32; - - - m_new_string = std::move(x.m_new_string); - - - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - -} - -BadBasicWideStruct& BadBasicWideStruct::operator =( - const BadBasicWideStruct& x) -{ - m_new_int32 = x.m_new_int32; - - - m_new_string = x.m_new_string; - - - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = x.m_my_string; - - return *this; -} - -BadBasicWideStruct& BadBasicWideStruct::operator =( - BadBasicWideStruct&& x) noexcept -{ - m_new_int32 = x.m_new_int32; - - - m_new_string = std::move(x.m_new_string); - - - m_my_bool = x.m_my_bool; - - - m_my_int32 = x.m_my_int32; - - - m_my_string = std::move(x.m_my_string); - - return *this; -} - -bool BadBasicWideStruct::operator ==( - const BadBasicWideStruct& x) const -{ - return (m_new_int32 == x.m_new_int32 && - m_new_string == x.m_new_string && - m_my_bool == x.m_my_bool && - m_my_int32 == x.m_my_int32 && - m_my_string == x.m_my_string); -} - -bool BadBasicWideStruct::operator !=( - const BadBasicWideStruct& x) const -{ - return !(*this == x); -} - -size_t BadBasicWideStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return BadBasicWideStruct_max_cdr_typesize; -} - -size_t BadBasicWideStruct::getCdrSerializedSize( - const BadBasicWideStruct& 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 += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.new_string().size() + 1; - - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void BadBasicWideStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_new_int32; - - scdr << m_new_string.c_str(); - - scdr << m_my_bool; - - scdr << m_my_int32; - - scdr << m_my_string.c_str(); - -} - -void BadBasicWideStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_new_int32; - - - - dcdr >> m_new_string; - - - - dcdr >> m_my_bool; - - - - dcdr >> m_my_int32; - - - - dcdr >> m_my_string; - - -} - - -bool BadBasicWideStruct::isKeyDefined() -{ - return false; -} - -void BadBasicWideStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function sets a value in member new_int32 - * @param _new_int32 New value for member new_int32 - */ -void BadBasicWideStruct::new_int32( - int32_t _new_int32) -{ - m_new_int32 = _new_int32; -} - -/*! - * @brief This function returns the value of member new_int32 - * @return Value of member new_int32 - */ -int32_t BadBasicWideStruct::new_int32() const -{ - return m_new_int32; -} - -/*! - * @brief This function returns a reference to member new_int32 - * @return Reference to member new_int32 - */ -int32_t& BadBasicWideStruct::new_int32() -{ - return m_new_int32; -} - - -/*! - * @brief This function copies the value in member new_string - * @param _new_string New value to be copied in member new_string - */ -void BadBasicWideStruct::new_string( - const std::string& _new_string) -{ - m_new_string = _new_string; -} - -/*! - * @brief This function moves the value in member new_string - * @param _new_string New value to be moved in member new_string - */ -void BadBasicWideStruct::new_string( - std::string&& _new_string) -{ - m_new_string = std::move(_new_string); -} - -/*! - * @brief This function returns a constant reference to member new_string - * @return Constant reference to member new_string - */ -const std::string& BadBasicWideStruct::new_string() const -{ - return m_new_string; -} - -/*! - * @brief This function returns a reference to member new_string - * @return Reference to member new_string - */ -std::string& BadBasicWideStruct::new_string() -{ - return m_new_string; -} - - -/*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ -void BadBasicWideStruct::my_bool( - bool _my_bool) -{ - m_my_bool = _my_bool; -} - -/*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ -bool BadBasicWideStruct::my_bool() const -{ - return m_my_bool; -} - -/*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ -bool& BadBasicWideStruct::my_bool() -{ - return m_my_bool; -} - - -/*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ -void BadBasicWideStruct::my_int32( - int32_t _my_int32) -{ - m_my_int32 = _my_int32; -} - -/*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ -int32_t BadBasicWideStruct::my_int32() const -{ - return m_my_int32; -} - -/*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ -int32_t& BadBasicWideStruct::my_int32() -{ - return m_my_int32; -} - - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void BadBasicWideStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void BadBasicWideStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& BadBasicWideStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& BadBasicWideStruct::my_string() -{ - return m_my_string; -} - - - - - -StringStruct::StringStruct() -{ - // /type_d() m_my_string - - - // Just to register all known types - registerTypesTypes(); -} - -StringStruct::~StringStruct() -{ -} - -StringStruct::StringStruct( - const StringStruct& x) -{ - m_my_string = x.m_my_string; - -} - -StringStruct::StringStruct( - StringStruct&& x) noexcept -{ - m_my_string = std::move(x.m_my_string); - -} - -StringStruct& StringStruct::operator =( - const StringStruct& x) -{ - m_my_string = x.m_my_string; - - return *this; -} - -StringStruct& StringStruct::operator =( - StringStruct&& x) noexcept -{ - m_my_string = std::move(x.m_my_string); - - return *this; -} - -bool StringStruct::operator ==( - const StringStruct& x) const -{ - return (m_my_string == x.m_my_string); -} - -bool StringStruct::operator !=( - const StringStruct& x) const -{ - return !(*this == x); -} - -size_t StringStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return StringStruct_max_cdr_typesize; -} - -size_t StringStruct::getCdrSerializedSize( - const StringStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void StringStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_string.c_str(); - -} - -void StringStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_string; - - -} - - -bool StringStruct::isKeyDefined() -{ - return false; -} - -void StringStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ -void StringStruct::my_string( - const std::string& _my_string) -{ - m_my_string = _my_string; -} - -/*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ -void StringStruct::my_string( - std::string&& _my_string) -{ - m_my_string = std::move(_my_string); -} - -/*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ -const std::string& StringStruct::my_string() const -{ - return m_my_string; -} - -/*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ -std::string& StringStruct::my_string() -{ - return m_my_string; -} - - - - - -LargeStringStruct::LargeStringStruct() -{ - // /type_d() m_my_large_string - - - // Just to register all known types - registerTypesTypes(); -} - -LargeStringStruct::~LargeStringStruct() -{ -} - -LargeStringStruct::LargeStringStruct( - const LargeStringStruct& x) -{ - m_my_large_string = x.m_my_large_string; - -} - -LargeStringStruct::LargeStringStruct( - LargeStringStruct&& x) noexcept -{ - m_my_large_string = std::move(x.m_my_large_string); - -} - -LargeStringStruct& LargeStringStruct::operator =( - const LargeStringStruct& x) -{ - m_my_large_string = x.m_my_large_string; - - return *this; -} - -LargeStringStruct& LargeStringStruct::operator =( - LargeStringStruct&& x) noexcept -{ - m_my_large_string = std::move(x.m_my_large_string); - - return *this; -} - -bool LargeStringStruct::operator ==( - const LargeStringStruct& x) const -{ - return (m_my_large_string == x.m_my_large_string); -} - -bool LargeStringStruct::operator !=( - const LargeStringStruct& x) const -{ - return !(*this == x); -} - -size_t LargeStringStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return LargeStringStruct_max_cdr_typesize; -} - -size_t LargeStringStruct::getCdrSerializedSize( - const LargeStringStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.my_large_string().size() + 1; - - - return current_alignment - initial_alignment; -} - - -void LargeStringStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_large_string.c_str(); - -} - -void LargeStringStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - { - std::string aux; - dcdr >> aux; - m_my_large_string = aux.c_str(); - } - - -} - - -bool LargeStringStruct::isKeyDefined() -{ - return false; -} - -void LargeStringStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_large_string - * @param _my_large_string New value to be copied in member my_large_string - */ -void LargeStringStruct::my_large_string( - const eprosima::fastrtps::fixed_string<41925>& _my_large_string) -{ - m_my_large_string = _my_large_string; -} - -/*! - * @brief This function moves the value in member my_large_string - * @param _my_large_string New value to be moved in member my_large_string - */ -void LargeStringStruct::my_large_string( - eprosima::fastrtps::fixed_string<41925>&& _my_large_string) -{ - m_my_large_string = std::move(_my_large_string); -} - -/*! - * @brief This function returns a constant reference to member my_large_string - * @return Constant reference to member my_large_string - */ -const eprosima::fastrtps::fixed_string<41925>& LargeStringStruct::my_large_string() const -{ - return m_my_large_string; -} - -/*! - * @brief This function returns a reference to member my_large_string - * @return Reference to member my_large_string - */ -eprosima::fastrtps::fixed_string<41925>& LargeStringStruct::my_large_string() -{ - return m_my_large_string; -} - - - - - -WStringStruct::WStringStruct() -{ - // /type_15() m_my_wstring - - - // Just to register all known types - registerTypesTypes(); -} - -WStringStruct::~WStringStruct() -{ -} - -WStringStruct::WStringStruct( - const WStringStruct& x) -{ - m_my_wstring = x.m_my_wstring; - -} - -WStringStruct::WStringStruct( - WStringStruct&& x) noexcept -{ - m_my_wstring = std::move(x.m_my_wstring); - -} - -WStringStruct& WStringStruct::operator =( - const WStringStruct& x) -{ - m_my_wstring = x.m_my_wstring; - - return *this; -} - -WStringStruct& WStringStruct::operator =( - WStringStruct&& x) noexcept -{ - m_my_wstring = std::move(x.m_my_wstring); - - return *this; -} - -bool WStringStruct::operator ==( - const WStringStruct& x) const -{ - return (m_my_wstring == x.m_my_wstring); -} - -bool WStringStruct::operator !=( - const WStringStruct& x) const -{ - return !(*this == x); -} - -size_t WStringStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return WStringStruct_max_cdr_typesize; -} - -size_t WStringStruct::getCdrSerializedSize( - const WStringStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + (data.my_wstring().size()) * 4; // 32 bits - - - return current_alignment - initial_alignment; -} - - -void WStringStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_wstring; - -} - -void WStringStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_wstring; - - -} - - -bool WStringStruct::isKeyDefined() -{ - return false; -} - -void WStringStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_wstring - * @param _my_wstring New value to be copied in member my_wstring - */ -void WStringStruct::my_wstring( - const std::wstring& _my_wstring) -{ - m_my_wstring = _my_wstring; -} - -/*! - * @brief This function moves the value in member my_wstring - * @param _my_wstring New value to be moved in member my_wstring - */ -void WStringStruct::my_wstring( - std::wstring&& _my_wstring) -{ - m_my_wstring = std::move(_my_wstring); -} - -/*! - * @brief This function returns a constant reference to member my_wstring - * @return Constant reference to member my_wstring - */ -const std::wstring& WStringStruct::my_wstring() const -{ - return m_my_wstring; -} - -/*! - * @brief This function returns a reference to member my_wstring - * @return Reference to member my_wstring - */ -std::wstring& WStringStruct::my_wstring() -{ - return m_my_wstring; -} - - - - - -LargeWStringStruct::LargeWStringStruct() -{ - // /type_15() m_my_large_wstring - - - // Just to register all known types - registerTypesTypes(); -} - -LargeWStringStruct::~LargeWStringStruct() -{ -} - -LargeWStringStruct::LargeWStringStruct( - const LargeWStringStruct& x) -{ - m_my_large_wstring = x.m_my_large_wstring; - -} - -LargeWStringStruct::LargeWStringStruct( - LargeWStringStruct&& x) noexcept -{ - m_my_large_wstring = std::move(x.m_my_large_wstring); - -} - -LargeWStringStruct& LargeWStringStruct::operator =( - const LargeWStringStruct& x) -{ - m_my_large_wstring = x.m_my_large_wstring; - - return *this; -} - -LargeWStringStruct& LargeWStringStruct::operator =( - LargeWStringStruct&& x) noexcept -{ - m_my_large_wstring = std::move(x.m_my_large_wstring); - - return *this; -} - -bool LargeWStringStruct::operator ==( - const LargeWStringStruct& x) const -{ - return (m_my_large_wstring == x.m_my_large_wstring); -} - -bool LargeWStringStruct::operator !=( - const LargeWStringStruct& x) const -{ - return !(*this == x); -} - -size_t LargeWStringStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return LargeWStringStruct_max_cdr_typesize; -} - -size_t LargeWStringStruct::getCdrSerializedSize( - const LargeWStringStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + (data.my_large_wstring().size()) * 4; // 32 bits - - - return current_alignment - initial_alignment; -} - - -void LargeWStringStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_large_wstring; - -} - -void LargeWStringStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_large_wstring; - - -} - - -bool LargeWStringStruct::isKeyDefined() -{ - return false; -} - -void LargeWStringStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_large_wstring - * @param _my_large_wstring New value to be copied in member my_large_wstring - */ -void LargeWStringStruct::my_large_wstring( - const std::wstring& _my_large_wstring) -{ - m_my_large_wstring = _my_large_wstring; -} - -/*! - * @brief This function moves the value in member my_large_wstring - * @param _my_large_wstring New value to be moved in member my_large_wstring - */ -void LargeWStringStruct::my_large_wstring( - std::wstring&& _my_large_wstring) -{ - m_my_large_wstring = std::move(_my_large_wstring); -} - -/*! - * @brief This function returns a constant reference to member my_large_wstring - * @return Constant reference to member my_large_wstring - */ -const std::wstring& LargeWStringStruct::my_large_wstring() const -{ - return m_my_large_wstring; -} - -/*! - * @brief This function returns a reference to member my_large_wstring - * @return Reference to member my_large_wstring - */ -std::wstring& LargeWStringStruct::my_large_wstring() -{ - return m_my_large_wstring; -} - - - - - -ArrayStruct::ArrayStruct() -{ - // long m_my_array - memset(&m_my_array, 0, ((2)) * 4); - - // Just to register all known types - registerTypesTypes(); -} - -ArrayStruct::~ArrayStruct() -{ -} - -ArrayStruct::ArrayStruct( - const ArrayStruct& x) -{ - m_my_array = x.m_my_array; - -} - -ArrayStruct::ArrayStruct( - ArrayStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - -} - -ArrayStruct& ArrayStruct::operator =( - const ArrayStruct& x) -{ - m_my_array = x.m_my_array; - - return *this; -} - -ArrayStruct& ArrayStruct::operator =( - ArrayStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - - return *this; -} - -bool ArrayStruct::operator ==( - const ArrayStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArrayStruct::operator !=( - const ArrayStruct& x) const -{ - return !(*this == x); -} - -size_t ArrayStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ArrayStruct_max_cdr_typesize; -} - -size_t ArrayStruct::getCdrSerializedSize( - const ArrayStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((2)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - return current_alignment - initial_alignment; -} - - -void ArrayStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_array; - - -} - -void ArrayStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_array; - - -} - - -bool ArrayStruct::isKeyDefined() -{ - return false; -} - -void ArrayStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArrayStruct::my_array( - const std::array& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArrayStruct::my_array( - std::array&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array& ArrayStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array& ArrayStruct::my_array() -{ - return m_my_array; -} - - - - - -ArrayStructEqual::ArrayStructEqual() -{ - // long m_my_array_equal - memset(&m_my_array_equal, 0, ((2)) * 4); - - // Just to register all known types - registerTypesTypes(); -} - -ArrayStructEqual::~ArrayStructEqual() -{ -} - -ArrayStructEqual::ArrayStructEqual( - const ArrayStructEqual& x) -{ - m_my_array_equal = x.m_my_array_equal; - -} - -ArrayStructEqual::ArrayStructEqual( - ArrayStructEqual&& x) noexcept -{ - m_my_array_equal = std::move(x.m_my_array_equal); - -} - -ArrayStructEqual& ArrayStructEqual::operator =( - const ArrayStructEqual& x) -{ - m_my_array_equal = x.m_my_array_equal; - - return *this; -} - -ArrayStructEqual& ArrayStructEqual::operator =( - ArrayStructEqual&& x) noexcept -{ - m_my_array_equal = std::move(x.m_my_array_equal); - - return *this; -} - -bool ArrayStructEqual::operator ==( - const ArrayStructEqual& x) const -{ - return (m_my_array_equal == x.m_my_array_equal); -} - -bool ArrayStructEqual::operator !=( - const ArrayStructEqual& x) const -{ - return !(*this == x); -} - -size_t ArrayStructEqual::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ArrayStructEqual_max_cdr_typesize; -} - -size_t ArrayStructEqual::getCdrSerializedSize( - const ArrayStructEqual& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((2)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - return current_alignment - initial_alignment; -} - - -void ArrayStructEqual::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_array_equal; - - -} - -void ArrayStructEqual::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_array_equal; - - -} - - -bool ArrayStructEqual::isKeyDefined() -{ - return false; -} - -void ArrayStructEqual::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_array_equal - * @param _my_array_equal New value to be copied in member my_array_equal - */ -void ArrayStructEqual::my_array_equal( - const std::array& _my_array_equal) -{ - m_my_array_equal = _my_array_equal; -} - -/*! - * @brief This function moves the value in member my_array_equal - * @param _my_array_equal New value to be moved in member my_array_equal - */ -void ArrayStructEqual::my_array_equal( - std::array&& _my_array_equal) -{ - m_my_array_equal = std::move(_my_array_equal); -} - -/*! - * @brief This function returns a constant reference to member my_array_equal - * @return Constant reference to member my_array_equal - */ -const std::array& ArrayStructEqual::my_array_equal() const -{ - return m_my_array_equal; -} - -/*! - * @brief This function returns a reference to member my_array_equal - * @return Reference to member my_array_equal - */ -std::array& ArrayStructEqual::my_array_equal() -{ - return m_my_array_equal; -} - - - - - -ArrayBadStruct::ArrayBadStruct() -{ - // octet m_my_array - memset(&m_my_array, 0, ((2)) * 1); - - // Just to register all known types - registerTypesTypes(); -} - -ArrayBadStruct::~ArrayBadStruct() -{ -} - -ArrayBadStruct::ArrayBadStruct( - const ArrayBadStruct& x) -{ - m_my_array = x.m_my_array; - -} - -ArrayBadStruct::ArrayBadStruct( - ArrayBadStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - -} - -ArrayBadStruct& ArrayBadStruct::operator =( - const ArrayBadStruct& x) -{ - m_my_array = x.m_my_array; - - return *this; -} - -ArrayBadStruct& ArrayBadStruct::operator =( - ArrayBadStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - - return *this; -} - -bool ArrayBadStruct::operator ==( - const ArrayBadStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArrayBadStruct::operator !=( - const ArrayBadStruct& x) const -{ - return !(*this == x); -} - -size_t ArrayBadStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ArrayBadStruct_max_cdr_typesize; -} - -size_t ArrayBadStruct::getCdrSerializedSize( - const ArrayBadStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((2)) * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - return current_alignment - initial_alignment; -} - - -void ArrayBadStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_array; - - -} - -void ArrayBadStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_array; - - -} - - -bool ArrayBadStruct::isKeyDefined() -{ - return false; -} - -void ArrayBadStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArrayBadStruct::my_array( - const std::array& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArrayBadStruct::my_array( - std::array&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array& ArrayBadStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array& ArrayBadStruct::my_array() -{ - return m_my_array; -} - - - - - -ArrayDimensionsStruct::ArrayDimensionsStruct() -{ - // long m_my_array - memset(&m_my_array, 0, ((2) * (2)) * 4); - - // Just to register all known types - registerTypesTypes(); -} - -ArrayDimensionsStruct::~ArrayDimensionsStruct() -{ -} - -ArrayDimensionsStruct::ArrayDimensionsStruct( - const ArrayDimensionsStruct& x) -{ - m_my_array = x.m_my_array; - -} - -ArrayDimensionsStruct::ArrayDimensionsStruct( - ArrayDimensionsStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - -} - -ArrayDimensionsStruct& ArrayDimensionsStruct::operator =( - const ArrayDimensionsStruct& x) -{ - m_my_array = x.m_my_array; - - return *this; -} - -ArrayDimensionsStruct& ArrayDimensionsStruct::operator =( - ArrayDimensionsStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - - return *this; -} - -bool ArrayDimensionsStruct::operator ==( - const ArrayDimensionsStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArrayDimensionsStruct::operator !=( - const ArrayDimensionsStruct& x) const -{ - return !(*this == x); -} - -size_t ArrayDimensionsStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ArrayDimensionsStruct_max_cdr_typesize; -} - -size_t ArrayDimensionsStruct::getCdrSerializedSize( - const ArrayDimensionsStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((2) * (2)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - return current_alignment - initial_alignment; -} - - -void ArrayDimensionsStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - for (uint32_t b = 0; b < m_my_array.size(); ++b) - { - scdr << m_my_array[b]; - - } - - - -} - -void ArrayDimensionsStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - for (uint32_t d = 0; d < m_my_array.size(); ++d) - { - dcdr >> m_my_array[d]; - - } - - - -} - - -bool ArrayDimensionsStruct::isKeyDefined() -{ - return false; -} - -void ArrayDimensionsStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArrayDimensionsStruct::my_array( - const std::array, 2>& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArrayDimensionsStruct::my_array( - std::array, 2>&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array, 2>& ArrayDimensionsStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array, 2>& ArrayDimensionsStruct::my_array() -{ - return m_my_array; -} - - - - - -ArraySizeStruct::ArraySizeStruct() -{ - // long m_my_array - memset(&m_my_array, 0, ((5)) * 4); - - // Just to register all known types - registerTypesTypes(); -} - -ArraySizeStruct::~ArraySizeStruct() -{ -} - -ArraySizeStruct::ArraySizeStruct( - const ArraySizeStruct& x) -{ - m_my_array = x.m_my_array; - -} - -ArraySizeStruct::ArraySizeStruct( - ArraySizeStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - -} - -ArraySizeStruct& ArraySizeStruct::operator =( - const ArraySizeStruct& x) -{ - m_my_array = x.m_my_array; - - return *this; -} - -ArraySizeStruct& ArraySizeStruct::operator =( - ArraySizeStruct&& x) noexcept -{ - m_my_array = std::move(x.m_my_array); - - return *this; -} - -bool ArraySizeStruct::operator ==( - const ArraySizeStruct& x) const -{ - return (m_my_array == x.m_my_array); -} - -bool ArraySizeStruct::operator !=( - const ArraySizeStruct& x) const -{ - return !(*this == x); -} - -size_t ArraySizeStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return ArraySizeStruct_max_cdr_typesize; -} - -size_t ArraySizeStruct::getCdrSerializedSize( - const ArraySizeStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += (((5)) * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - return current_alignment - initial_alignment; -} - - -void ArraySizeStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_array; - - -} - -void ArraySizeStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_array; - - -} - - -bool ArraySizeStruct::isKeyDefined() -{ - return false; -} - -void ArraySizeStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ -void ArraySizeStruct::my_array( - const std::array& _my_array) -{ - m_my_array = _my_array; -} - -/*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ -void ArraySizeStruct::my_array( - std::array&& _my_array) -{ - m_my_array = std::move(_my_array); -} - -/*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ -const std::array& ArraySizeStruct::my_array() const -{ - return m_my_array; -} - -/*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ -std::array& ArraySizeStruct::my_array() -{ - return m_my_array; -} - - - - - - - -SequenceStruct::SequenceStruct() -{ - // sequence m_my_sequence - - - // Just to register all known types - registerTypesTypes(); -} - -SequenceStruct::~SequenceStruct() -{ -} - -SequenceStruct::SequenceStruct( - const SequenceStruct& x) -{ - m_my_sequence = x.m_my_sequence; - -} - -SequenceStruct::SequenceStruct( - SequenceStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - -} - -SequenceStruct& SequenceStruct::operator =( - const SequenceStruct& x) -{ - m_my_sequence = x.m_my_sequence; - - return *this; -} - -SequenceStruct& SequenceStruct::operator =( - SequenceStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - - return *this; -} - -bool SequenceStruct::operator ==( - const SequenceStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceStruct::operator !=( - const SequenceStruct& x) const -{ - return !(*this == x); -} - -size_t SequenceStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceStruct_max_cdr_typesize; -} - -size_t SequenceStruct::getCdrSerializedSize( - const SequenceStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence().size() > 0) - { - current_alignment += (data.my_sequence().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - - return current_alignment - initial_alignment; -} - - -void SequenceStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence; - - -} - -void SequenceStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence; - - -} - - -bool SequenceStruct::isKeyDefined() -{ - return false; -} - -void SequenceStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - - -SequenceStructEqual::SequenceStructEqual() -{ - // sequence m_my_sequence_equal - - - // Just to register all known types - registerTypesTypes(); -} - -SequenceStructEqual::~SequenceStructEqual() -{ -} - -SequenceStructEqual::SequenceStructEqual( - const SequenceStructEqual& x) -{ - m_my_sequence_equal = x.m_my_sequence_equal; - -} - -SequenceStructEqual::SequenceStructEqual( - SequenceStructEqual&& x) noexcept -{ - m_my_sequence_equal = std::move(x.m_my_sequence_equal); - -} - -SequenceStructEqual& SequenceStructEqual::operator =( - const SequenceStructEqual& x) -{ - m_my_sequence_equal = x.m_my_sequence_equal; - - return *this; -} - -SequenceStructEqual& SequenceStructEqual::operator =( - SequenceStructEqual&& x) noexcept -{ - m_my_sequence_equal = std::move(x.m_my_sequence_equal); - - return *this; -} - -bool SequenceStructEqual::operator ==( - const SequenceStructEqual& x) const -{ - return (m_my_sequence_equal == x.m_my_sequence_equal); -} - -bool SequenceStructEqual::operator !=( - const SequenceStructEqual& x) const -{ - return !(*this == x); -} - -size_t SequenceStructEqual::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceStructEqual_max_cdr_typesize; -} - -size_t SequenceStructEqual::getCdrSerializedSize( - const SequenceStructEqual& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence_equal().size() > 0) - { - current_alignment += (data.my_sequence_equal().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - - return current_alignment - initial_alignment; -} - - -void SequenceStructEqual::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence_equal; - - -} - -void SequenceStructEqual::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence_equal; - - -} - - -bool SequenceStructEqual::isKeyDefined() -{ - return false; -} - -void SequenceStructEqual::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence_equal - * @param _my_sequence_equal New value to be copied in member my_sequence_equal - */ -void SequenceStructEqual::my_sequence_equal( - const std::vector& _my_sequence_equal) -{ - m_my_sequence_equal = _my_sequence_equal; -} - -/*! - * @brief This function moves the value in member my_sequence_equal - * @param _my_sequence_equal New value to be moved in member my_sequence_equal - */ -void SequenceStructEqual::my_sequence_equal( - std::vector&& _my_sequence_equal) -{ - m_my_sequence_equal = std::move(_my_sequence_equal); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_equal - * @return Constant reference to member my_sequence_equal - */ -const std::vector& SequenceStructEqual::my_sequence_equal() const -{ - return m_my_sequence_equal; -} - -/*! - * @brief This function returns a reference to member my_sequence_equal - * @return Reference to member my_sequence_equal - */ -std::vector& SequenceStructEqual::my_sequence_equal() -{ - return m_my_sequence_equal; -} - - - - - - - -SequenceBadStruct::SequenceBadStruct() -{ - // sequence m_my_sequence - - - // Just to register all known types - registerTypesTypes(); -} - -SequenceBadStruct::~SequenceBadStruct() -{ -} - -SequenceBadStruct::SequenceBadStruct( - const SequenceBadStruct& x) -{ - m_my_sequence = x.m_my_sequence; - -} - -SequenceBadStruct::SequenceBadStruct( - SequenceBadStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - -} - -SequenceBadStruct& SequenceBadStruct::operator =( - const SequenceBadStruct& x) -{ - m_my_sequence = x.m_my_sequence; - - return *this; -} - -SequenceBadStruct& SequenceBadStruct::operator =( - SequenceBadStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - - return *this; -} - -bool SequenceBadStruct::operator ==( - const SequenceBadStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceBadStruct::operator !=( - const SequenceBadStruct& x) const -{ - return !(*this == x); -} - -size_t SequenceBadStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceBadStruct_max_cdr_typesize; -} - -size_t SequenceBadStruct::getCdrSerializedSize( - const SequenceBadStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence().size() > 0) - { - current_alignment += (data.my_sequence().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - } - - - - - return current_alignment - initial_alignment; -} - - -void SequenceBadStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence; - - -} - -void SequenceBadStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence; - - -} - - -bool SequenceBadStruct::isKeyDefined() -{ - return false; -} - -void SequenceBadStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceBadStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceBadStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceBadStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceBadStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - - -SequenceBoundsStruct::SequenceBoundsStruct() -{ - // sequence m_my_sequence - - - // Just to register all known types - registerTypesTypes(); -} - -SequenceBoundsStruct::~SequenceBoundsStruct() -{ -} - -SequenceBoundsStruct::SequenceBoundsStruct( - const SequenceBoundsStruct& x) -{ - m_my_sequence = x.m_my_sequence; - -} - -SequenceBoundsStruct::SequenceBoundsStruct( - SequenceBoundsStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - -} - -SequenceBoundsStruct& SequenceBoundsStruct::operator =( - const SequenceBoundsStruct& x) -{ - m_my_sequence = x.m_my_sequence; - - return *this; -} - -SequenceBoundsStruct& SequenceBoundsStruct::operator =( - SequenceBoundsStruct&& x) noexcept -{ - m_my_sequence = std::move(x.m_my_sequence); - - return *this; -} - -bool SequenceBoundsStruct::operator ==( - const SequenceBoundsStruct& x) const -{ - return (m_my_sequence == x.m_my_sequence); -} - -bool SequenceBoundsStruct::operator !=( - const SequenceBoundsStruct& x) const -{ - return !(*this == x); -} - -size_t SequenceBoundsStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceBoundsStruct_max_cdr_typesize; -} - -size_t SequenceBoundsStruct::getCdrSerializedSize( - const SequenceBoundsStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence().size() > 0) - { - current_alignment += (data.my_sequence().size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - - - return current_alignment - initial_alignment; -} - - -void SequenceBoundsStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence; - - -} - -void SequenceBoundsStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence; - - -} - - -bool SequenceBoundsStruct::isKeyDefined() -{ - return false; -} - -void SequenceBoundsStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ -void SequenceBoundsStruct::my_sequence( - const std::vector& _my_sequence) -{ - m_my_sequence = _my_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ -void SequenceBoundsStruct::my_sequence( - std::vector&& _my_sequence) -{ - m_my_sequence = std::move(_my_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ -const std::vector& SequenceBoundsStruct::my_sequence() const -{ - return m_my_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ -std::vector& SequenceBoundsStruct::my_sequence() -{ - return m_my_sequence; -} - - - - - - - - - -SequenceSequenceStruct::SequenceSequenceStruct() -{ - // sequence, 3> m_my_sequence_sequence - - - // Just to register all known types - registerTypesTypes(); -} - -SequenceSequenceStruct::~SequenceSequenceStruct() -{ -} - -SequenceSequenceStruct::SequenceSequenceStruct( - const SequenceSequenceStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; - -} - -SequenceSequenceStruct::SequenceSequenceStruct( - SequenceSequenceStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - -} - -SequenceSequenceStruct& SequenceSequenceStruct::operator =( - const SequenceSequenceStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; - - return *this; -} - -SequenceSequenceStruct& SequenceSequenceStruct::operator =( - SequenceSequenceStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - - return *this; -} - -bool SequenceSequenceStruct::operator ==( - const SequenceSequenceStruct& x) const -{ - return (m_my_sequence_sequence == x.m_my_sequence_sequence); -} - -bool SequenceSequenceStruct::operator !=( - const SequenceSequenceStruct& x) const -{ - return !(*this == x); -} - -size_t SequenceSequenceStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceSequenceStruct_max_cdr_typesize; -} - -size_t SequenceSequenceStruct::getCdrSerializedSize( - const SequenceSequenceStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.my_sequence_sequence().size(); ++a) - { - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence_sequence().at(a).size() > 0) - { - current_alignment += (data.my_sequence_sequence().at(a).size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - } - - - - return current_alignment - initial_alignment; -} - - -void SequenceSequenceStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence_sequence; - - -} - -void SequenceSequenceStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence_sequence; - - -} - - -bool SequenceSequenceStruct::isKeyDefined() -{ - return false; -} - -void SequenceSequenceStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ -void SequenceSequenceStruct::my_sequence_sequence( - const std::vector>& _my_sequence_sequence) -{ - m_my_sequence_sequence = _my_sequence_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ -void SequenceSequenceStruct::my_sequence_sequence( - std::vector>&& _my_sequence_sequence) -{ - m_my_sequence_sequence = std::move(_my_sequence_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ -const std::vector>& SequenceSequenceStruct::my_sequence_sequence() const -{ - return m_my_sequence_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ -std::vector>& SequenceSequenceStruct::my_sequence_sequence() -{ - return m_my_sequence_sequence; -} - - - - - - - - - -SequenceSequenceBoundsStruct::SequenceSequenceBoundsStruct() -{ - // sequence, 5> m_my_sequence_sequence - - - // Just to register all known types - registerTypesTypes(); -} - -SequenceSequenceBoundsStruct::~SequenceSequenceBoundsStruct() -{ -} - -SequenceSequenceBoundsStruct::SequenceSequenceBoundsStruct( - const SequenceSequenceBoundsStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; - -} - -SequenceSequenceBoundsStruct::SequenceSequenceBoundsStruct( - SequenceSequenceBoundsStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - -} - -SequenceSequenceBoundsStruct& SequenceSequenceBoundsStruct::operator =( - const SequenceSequenceBoundsStruct& x) -{ - m_my_sequence_sequence = x.m_my_sequence_sequence; - - return *this; -} - -SequenceSequenceBoundsStruct& SequenceSequenceBoundsStruct::operator =( - SequenceSequenceBoundsStruct&& x) noexcept -{ - m_my_sequence_sequence = std::move(x.m_my_sequence_sequence); - - return *this; -} - -bool SequenceSequenceBoundsStruct::operator ==( - const SequenceSequenceBoundsStruct& x) const -{ - return (m_my_sequence_sequence == x.m_my_sequence_sequence); -} - -bool SequenceSequenceBoundsStruct::operator !=( - const SequenceSequenceBoundsStruct& x) const -{ - return !(*this == x); -} - -size_t SequenceSequenceBoundsStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SequenceSequenceBoundsStruct_max_cdr_typesize; -} - -size_t SequenceSequenceBoundsStruct::getCdrSerializedSize( - const SequenceSequenceBoundsStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - for(size_t a = 0; a < data.my_sequence_sequence().size(); ++a) - { - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - if (data.my_sequence_sequence().at(a).size() > 0) - { - current_alignment += (data.my_sequence_sequence().at(a).size() * 4) + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - } - - - } - - - - return current_alignment - initial_alignment; -} - - -void SequenceSequenceBoundsStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_sequence_sequence; - - -} - -void SequenceSequenceBoundsStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_sequence_sequence; - - -} - - -bool SequenceSequenceBoundsStruct::isKeyDefined() -{ - return false; -} - -void SequenceSequenceBoundsStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ -void SequenceSequenceBoundsStruct::my_sequence_sequence( - const std::vector>& _my_sequence_sequence) -{ - m_my_sequence_sequence = _my_sequence_sequence; -} - -/*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ -void SequenceSequenceBoundsStruct::my_sequence_sequence( - std::vector>&& _my_sequence_sequence) -{ - m_my_sequence_sequence = std::move(_my_sequence_sequence); -} - -/*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ -const std::vector>& SequenceSequenceBoundsStruct::my_sequence_sequence() const -{ - return m_my_sequence_sequence; -} - -/*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ -std::vector>& SequenceSequenceBoundsStruct::my_sequence_sequence() -{ - return m_my_sequence_sequence; -} - - - - - - - -MapStruct::MapStruct() -{ - // map m_my_map - - - // Just to register all known types - registerTypesTypes(); -} - -MapStruct::~MapStruct() -{ -} - -MapStruct::MapStruct( - const MapStruct& x) -{ - m_my_map = x.m_my_map; - -} - -MapStruct::MapStruct( - MapStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - -} - -MapStruct& MapStruct::operator =( - const MapStruct& x) -{ - m_my_map = x.m_my_map; - - return *this; -} - -MapStruct& MapStruct::operator =( - MapStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - - return *this; -} - -bool MapStruct::operator ==( - const MapStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapStruct::operator !=( - const MapStruct& x) const -{ - return !(*this == x); -} - -size_t MapStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapStruct_max_cdr_typesize; -} - -size_t MapStruct::getCdrSerializedSize( - const MapStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map()) - { - (void)a; - - 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 MapStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map.size()); - for (const auto& pair : m_my_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map; - - -} - - -bool MapStruct::isKeyDefined() -{ - return false; -} - -void MapStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapStruct::my_map() -{ - return m_my_map; -} - - - - - - - -MapStructEqual::MapStructEqual() -{ - // map m_my_map_equal - - - // Just to register all known types - registerTypesTypes(); -} - -MapStructEqual::~MapStructEqual() -{ -} - -MapStructEqual::MapStructEqual( - const MapStructEqual& x) -{ - m_my_map_equal = x.m_my_map_equal; - -} - -MapStructEqual::MapStructEqual( - MapStructEqual&& x) noexcept -{ - m_my_map_equal = std::move(x.m_my_map_equal); - -} - -MapStructEqual& MapStructEqual::operator =( - const MapStructEqual& x) -{ - m_my_map_equal = x.m_my_map_equal; - - return *this; -} - -MapStructEqual& MapStructEqual::operator =( - MapStructEqual&& x) noexcept -{ - m_my_map_equal = std::move(x.m_my_map_equal); - - return *this; -} - -bool MapStructEqual::operator ==( - const MapStructEqual& x) const -{ - return (m_my_map_equal == x.m_my_map_equal); -} - -bool MapStructEqual::operator !=( - const MapStructEqual& x) const -{ - return !(*this == x); -} - -size_t MapStructEqual::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapStructEqual_max_cdr_typesize; -} - -size_t MapStructEqual::getCdrSerializedSize( - const MapStructEqual& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map_equal()) - { - (void)a; - - 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 MapStructEqual::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map_equal.size()); - for (const auto& pair : m_my_map_equal) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapStructEqual::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map_equal; - - -} - - -bool MapStructEqual::isKeyDefined() -{ - return false; -} - -void MapStructEqual::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map_equal - * @param _my_map_equal New value to be copied in member my_map_equal - */ -void MapStructEqual::my_map_equal( - const std::map& _my_map_equal) -{ - m_my_map_equal = _my_map_equal; -} - -/*! - * @brief This function moves the value in member my_map_equal - * @param _my_map_equal New value to be moved in member my_map_equal - */ -void MapStructEqual::my_map_equal( - std::map&& _my_map_equal) -{ - m_my_map_equal = std::move(_my_map_equal); -} - -/*! - * @brief This function returns a constant reference to member my_map_equal - * @return Constant reference to member my_map_equal - */ -const std::map& MapStructEqual::my_map_equal() const -{ - return m_my_map_equal; -} - -/*! - * @brief This function returns a reference to member my_map_equal - * @return Reference to member my_map_equal - */ -std::map& MapStructEqual::my_map_equal() -{ - return m_my_map_equal; -} - - - - - - - -MapBadKeyStruct::MapBadKeyStruct() -{ - // map m_my_map - - - // Just to register all known types - registerTypesTypes(); -} - -MapBadKeyStruct::~MapBadKeyStruct() -{ -} - -MapBadKeyStruct::MapBadKeyStruct( - const MapBadKeyStruct& x) -{ - m_my_map = x.m_my_map; - -} - -MapBadKeyStruct::MapBadKeyStruct( - MapBadKeyStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - -} - -MapBadKeyStruct& MapBadKeyStruct::operator =( - const MapBadKeyStruct& x) -{ - m_my_map = x.m_my_map; - - return *this; -} - -MapBadKeyStruct& MapBadKeyStruct::operator =( - MapBadKeyStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - - return *this; -} - -bool MapBadKeyStruct::operator ==( - const MapBadKeyStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapBadKeyStruct::operator !=( - const MapBadKeyStruct& x) const -{ - return !(*this == x); -} - -size_t MapBadKeyStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapBadKeyStruct_max_cdr_typesize; -} - -size_t MapBadKeyStruct::getCdrSerializedSize( - const MapBadKeyStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map()) - { - (void)a; - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - } - - - return current_alignment - initial_alignment; -} - - -void MapBadKeyStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map.size()); - for (const auto& pair : m_my_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapBadKeyStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map; - - -} - - -bool MapBadKeyStruct::isKeyDefined() -{ - return false; -} - -void MapBadKeyStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapBadKeyStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapBadKeyStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapBadKeyStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapBadKeyStruct::my_map() -{ - return m_my_map; -} - - - - - - - -MapBadElemStruct::MapBadElemStruct() -{ - // map m_my_map - - - // Just to register all known types - registerTypesTypes(); -} - -MapBadElemStruct::~MapBadElemStruct() -{ -} - -MapBadElemStruct::MapBadElemStruct( - const MapBadElemStruct& x) -{ - m_my_map = x.m_my_map; - -} - -MapBadElemStruct::MapBadElemStruct( - MapBadElemStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - -} - -MapBadElemStruct& MapBadElemStruct::operator =( - const MapBadElemStruct& x) -{ - m_my_map = x.m_my_map; - - return *this; -} - -MapBadElemStruct& MapBadElemStruct::operator =( - MapBadElemStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - - return *this; -} - -bool MapBadElemStruct::operator ==( - const MapBadElemStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapBadElemStruct::operator !=( - const MapBadElemStruct& x) const -{ - return !(*this == x); -} - -size_t MapBadElemStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapBadElemStruct_max_cdr_typesize; -} - -size_t MapBadElemStruct::getCdrSerializedSize( - const MapBadElemStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map()) - { - (void)a; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - } - - - return current_alignment - initial_alignment; -} - - -void MapBadElemStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map.size()); - for (const auto& pair : m_my_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapBadElemStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map; - - -} - - -bool MapBadElemStruct::isKeyDefined() -{ - return false; -} - -void MapBadElemStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapBadElemStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapBadElemStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapBadElemStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapBadElemStruct::my_map() -{ - return m_my_map; -} - - - - - - - -MapBoundsStruct::MapBoundsStruct() -{ - // map m_my_map - - - // Just to register all known types - registerTypesTypes(); -} - -MapBoundsStruct::~MapBoundsStruct() -{ -} - -MapBoundsStruct::MapBoundsStruct( - const MapBoundsStruct& x) -{ - m_my_map = x.m_my_map; - -} - -MapBoundsStruct::MapBoundsStruct( - MapBoundsStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - -} - -MapBoundsStruct& MapBoundsStruct::operator =( - const MapBoundsStruct& x) -{ - m_my_map = x.m_my_map; - - return *this; -} - -MapBoundsStruct& MapBoundsStruct::operator =( - MapBoundsStruct&& x) noexcept -{ - m_my_map = std::move(x.m_my_map); - - return *this; -} - -bool MapBoundsStruct::operator ==( - const MapBoundsStruct& x) const -{ - return (m_my_map == x.m_my_map); -} - -bool MapBoundsStruct::operator !=( - const MapBoundsStruct& x) const -{ - return !(*this == x); -} - -size_t MapBoundsStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapBoundsStruct_max_cdr_typesize; -} - -size_t MapBoundsStruct::getCdrSerializedSize( - const MapBoundsStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map()) - { - (void)a; - - 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 MapBoundsStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map.size()); - for (const auto& pair : m_my_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapBoundsStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map; - - -} - - -bool MapBoundsStruct::isKeyDefined() -{ - return false; -} - -void MapBoundsStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ -void MapBoundsStruct::my_map( - const std::map& _my_map) -{ - m_my_map = _my_map; -} - -/*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ -void MapBoundsStruct::my_map( - std::map&& _my_map) -{ - m_my_map = std::move(_my_map); -} - -/*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ -const std::map& MapBoundsStruct::my_map() const -{ - return m_my_map; -} - -/*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ -std::map& MapBoundsStruct::my_map() -{ - return m_my_map; -} - - - - - - - - - -MapMapStruct::MapMapStruct() -{ - // map> m_my_map_map - - - // Just to register all known types - registerTypesTypes(); -} - -MapMapStruct::~MapMapStruct() -{ -} - -MapMapStruct::MapMapStruct( - const MapMapStruct& x) -{ - m_my_map_map = x.m_my_map_map; - -} - -MapMapStruct::MapMapStruct( - MapMapStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); - -} - -MapMapStruct& MapMapStruct::operator =( - const MapMapStruct& x) -{ - m_my_map_map = x.m_my_map_map; - - return *this; -} - -MapMapStruct& MapMapStruct::operator =( - MapMapStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); - - return *this; -} - -bool MapMapStruct::operator ==( - const MapMapStruct& x) const -{ - return (m_my_map_map == x.m_my_map_map); -} - -bool MapMapStruct::operator !=( - const MapMapStruct& x) const -{ - return !(*this == x); -} - -size_t MapMapStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapMapStruct_max_cdr_typesize; -} - -size_t MapMapStruct::getCdrSerializedSize( - const MapMapStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map_map()) - { - (void)a; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto b : a.second) - { - (void)b; - - 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 MapMapStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map_map.size()); - for (const auto& pair : m_my_map_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapMapStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map_map; - - -} - - -bool MapMapStruct::isKeyDefined() -{ - return false; -} - -void MapMapStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ -void MapMapStruct::my_map_map( - const std::map>& _my_map_map) -{ - m_my_map_map = _my_map_map; -} - -/*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ -void MapMapStruct::my_map_map( - std::map>&& _my_map_map) -{ - m_my_map_map = std::move(_my_map_map); -} - -/*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ -const std::map>& MapMapStruct::my_map_map() const -{ - return m_my_map_map; -} - -/*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ -std::map>& MapMapStruct::my_map_map() -{ - return m_my_map_map; -} - - - - - - - - - -MapMapBoundsStruct::MapMapBoundsStruct() -{ - // map> m_my_map_map - - - // Just to register all known types - registerTypesTypes(); -} - -MapMapBoundsStruct::~MapMapBoundsStruct() -{ -} - -MapMapBoundsStruct::MapMapBoundsStruct( - const MapMapBoundsStruct& x) -{ - m_my_map_map = x.m_my_map_map; - -} - -MapMapBoundsStruct::MapMapBoundsStruct( - MapMapBoundsStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); - -} - -MapMapBoundsStruct& MapMapBoundsStruct::operator =( - const MapMapBoundsStruct& x) -{ - m_my_map_map = x.m_my_map_map; - - return *this; -} - -MapMapBoundsStruct& MapMapBoundsStruct::operator =( - MapMapBoundsStruct&& x) noexcept -{ - m_my_map_map = std::move(x.m_my_map_map); - - return *this; -} - -bool MapMapBoundsStruct::operator ==( - const MapMapBoundsStruct& x) const -{ - return (m_my_map_map == x.m_my_map_map); -} - -bool MapMapBoundsStruct::operator !=( - const MapMapBoundsStruct& x) const -{ - return !(*this == x); -} - -size_t MapMapBoundsStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return MapMapBoundsStruct_max_cdr_typesize; -} - -size_t MapMapBoundsStruct::getCdrSerializedSize( - const MapMapBoundsStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto a : data.my_map_map()) - { - (void)a; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - for(auto b : a.second) - { - (void)b; - - 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 MapMapBoundsStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << static_cast(m_my_map_map.size()); - for (const auto& pair : m_my_map_map) - { - scdr << pair.first; - scdr << pair.second; - } - -} - -void MapMapBoundsStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - - dcdr >> m_my_map_map; - - -} - - -bool MapMapBoundsStruct::isKeyDefined() -{ - return false; -} - -void MapMapBoundsStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ -void MapMapBoundsStruct::my_map_map( - const std::map>& _my_map_map) -{ - m_my_map_map = _my_map_map; -} - -/*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ -void MapMapBoundsStruct::my_map_map( - std::map>&& _my_map_map) -{ - m_my_map_map = std::move(_my_map_map); -} - -/*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ -const std::map>& MapMapBoundsStruct::my_map_map() const -{ - return m_my_map_map; -} - -/*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ -std::map>& MapMapBoundsStruct::my_map_map() -{ - return m_my_map_map; -} - - - - - -SimpleUnion::SimpleUnion() -{ - m__d = A; - // long m_first - m_first = 0; - // long long m_second - m_second = 0; -} - -SimpleUnion::~SimpleUnion() -{ -} - -SimpleUnion::SimpleUnion( - const SimpleUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleUnion::SimpleUnion( - SimpleUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleUnion& SimpleUnion::operator =( - const SimpleUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleUnion& SimpleUnion::operator =( - SimpleUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleUnion::operator ==( - const SimpleUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleUnion::operator !=( - const SimpleUnion& x) const -{ - return !(*this == x); -} - -void SimpleUnion::_d( - int32_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch(__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleUnion::_d() -{ - return m__d; -} - -void SimpleUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t SimpleUnion::first() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleUnion::first() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t SimpleUnion::second() const -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleUnion::second() -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -// TODO(Ricardo) Review -size_t SimpleUnion::getCdrSerializedSize( - const SimpleUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case A: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case B: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void SimpleUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_first; - - break; - - - case B: - scdr << m_second; - - break; - - default: - break; - } -} - -void SimpleUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_first; - - - break; - - - case B: - dcdr >> m_second; - - - break; - - default: - break; - } -} - - - - - -SimpleUnionNames::SimpleUnionNames() -{ - m__d = A; - // long m_first_case - m_first_case = 0; - // long long m_second_case - m_second_case = 0; -} - -SimpleUnionNames::~SimpleUnionNames() -{ -} - -SimpleUnionNames::SimpleUnionNames( - const SimpleUnionNames& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } -} - -SimpleUnionNames::SimpleUnionNames( - SimpleUnionNames&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } -} - -SimpleUnionNames& SimpleUnionNames::operator =( - const SimpleUnionNames& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } - - return *this; -} - -SimpleUnionNames& SimpleUnionNames::operator =( - SimpleUnionNames&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first_case = x.m_first_case; - break; - - - case B: - m_second_case = x.m_second_case; - break; - - default: - break; - } - - return *this; -} - -bool SimpleUnionNames::operator ==( - const SimpleUnionNames& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_first_case == x.m_first_case); - break; - - - case B: - return (m_second_case == x.m_second_case); - break; - - default: - break; - } - return false; -} - -bool SimpleUnionNames::operator !=( - const SimpleUnionNames& x) const -{ - return !(*this == x); -} - -void SimpleUnionNames::_d( - int32_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch(__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleUnionNames::_d() const -{ - return m__d; -} - -int32_t& SimpleUnionNames::_d() -{ - return m__d; -} - -void SimpleUnionNames::first_case( - int32_t _first_case) -{ - m_first_case = _first_case; - m__d = A; - -} - -int32_t SimpleUnionNames::first_case() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first_case; -} - -int32_t& SimpleUnionNames::first_case() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first_case; -} - - -void SimpleUnionNames::second_case( - int64_t _second_case) -{ - m_second_case = _second_case; - m__d = B; - -} - -int64_t SimpleUnionNames::second_case() const -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second_case; -} - -int64_t& SimpleUnionNames::second_case() -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second_case; -} - - -// TODO(Ricardo) Review -size_t SimpleUnionNames::getCdrSerializedSize( - const SimpleUnionNames& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case A: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case B: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void SimpleUnionNames::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_first_case; - - break; - - - case B: - scdr << m_second_case; - - break; - - default: - break; - } -} - -void SimpleUnionNames::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_first_case; - - - break; - - - case B: - dcdr >> m_second_case; - - - break; - - default: - break; - } -} - - - - - -SimpleTypeUnion::SimpleTypeUnion() -{ - m__d = A; - // octet m_first - m_first = 0; - // long long m_second - m_second = 0; -} - -SimpleTypeUnion::~SimpleTypeUnion() -{ -} - -SimpleTypeUnion::SimpleTypeUnion( - const SimpleTypeUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleTypeUnion::SimpleTypeUnion( - SimpleTypeUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleTypeUnion& SimpleTypeUnion::operator =( - const SimpleTypeUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleTypeUnion& SimpleTypeUnion::operator =( - SimpleTypeUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case B: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleTypeUnion::operator ==( - const SimpleTypeUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case B: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleTypeUnion::operator !=( - const SimpleTypeUnion& x) const -{ - return !(*this == x); -} - -void SimpleTypeUnion::_d( - int32_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case B: - switch(__d) - { - case B: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleTypeUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleTypeUnion::_d() -{ - return m__d; -} - -void SimpleTypeUnion::first( - uint8_t _first) -{ - m_first = _first; - m__d = A; - -} - -uint8_t SimpleTypeUnion::first() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -uint8_t& SimpleTypeUnion::first() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleTypeUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = B; - -} - -int64_t SimpleTypeUnion::second() const -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleTypeUnion::second() -{ - bool b = false; - - switch(m__d) - { - case B: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -// TODO(Ricardo) Review -size_t SimpleTypeUnion::getCdrSerializedSize( - const SimpleTypeUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case A: - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - break; - - - case B: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void SimpleTypeUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_first; - - break; - - - case B: - scdr << m_second; - - break; - - default: - break; - } -} - -void SimpleTypeUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_first; - - - break; - - - case B: - dcdr >> m_second; - - - break; - - default: - break; - } -} - - - - - -SimpleBadUnion::SimpleBadUnion() -{ - m__d = A; - // long m_first - m_first = 0; - // long long m_second - m_second = 0; -} - -SimpleBadUnion::~SimpleBadUnion() -{ -} - -SimpleBadUnion::SimpleBadUnion( - const SimpleBadUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadUnion::SimpleBadUnion( - SimpleBadUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadUnion& SimpleBadUnion::operator =( - const SimpleBadUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleBadUnion& SimpleBadUnion::operator =( - SimpleBadUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case A: - m_first = x.m_first; - break; - - - case C: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleBadUnion::operator ==( - const SimpleBadUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case A: - return (m_first == x.m_first); - break; - - - case C: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleBadUnion::operator !=( - const SimpleBadUnion& x) const -{ - return !(*this == x); -} - -void SimpleBadUnion::_d( - int32_t __d) -{ - bool b = false; - - switch(m__d) - { - case A: - switch(__d) - { - case A: - b = true; - break; - default: - break; - } - break; - - - case C: - switch(__d) - { - case C: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -int32_t SimpleBadUnion::_d() const -{ - return m__d; -} - -int32_t& SimpleBadUnion::_d() -{ - return m__d; -} - -void SimpleBadUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = A; - -} - -int32_t SimpleBadUnion::first() const -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleBadUnion::first() -{ - bool b = false; - - switch(m__d) - { - case A: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleBadUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = C; - -} - -int64_t SimpleBadUnion::second() const -{ - bool b = false; - - switch(m__d) - { - case C: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleBadUnion::second() -{ - bool b = false; - - switch(m__d) - { - case C: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -// TODO(Ricardo) Review -size_t SimpleBadUnion::getCdrSerializedSize( - const SimpleBadUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - - - switch(data.m__d) - { - case A: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case C: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void SimpleBadUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case A: - scdr << m_first; - - break; - - - case C: - scdr << m_second; - - break; - - default: - break; - } -} - -void SimpleBadUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case A: - dcdr >> m_first; - - - break; - - - case C: - dcdr >> m_second; - - - break; - - default: - break; - } -} - - - - - -SimpleBadDiscUnion::SimpleBadDiscUnion() -{ - m__d = 0; - // long m_first - m_first = 0; - // long long m_second - m_second = 0; -} - -SimpleBadDiscUnion::~SimpleBadDiscUnion() -{ -} - -SimpleBadDiscUnion::SimpleBadDiscUnion( - const SimpleBadDiscUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadDiscUnion::SimpleBadDiscUnion( - SimpleBadDiscUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } -} - -SimpleBadDiscUnion& SimpleBadDiscUnion::operator =( - const SimpleBadDiscUnion& x) -{ - m__d = x.m__d; - - switch(m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -SimpleBadDiscUnion& SimpleBadDiscUnion::operator =( - SimpleBadDiscUnion&& x) noexcept -{ - m__d = x.m__d; - - switch(m__d) - { - case 0: - m_first = x.m_first; - break; - - - case 1: - m_second = x.m_second; - break; - - default: - break; - } - - return *this; -} - -bool SimpleBadDiscUnion::operator ==( - const SimpleBadDiscUnion& x) const -{ - if (m__d != x.m__d) - { - return false; - } - - switch(m__d) - { - case 0: - return (m_first == x.m_first); - break; - - - case 1: - return (m_second == x.m_second); - break; - - default: - break; - } - return false; -} - -bool SimpleBadDiscUnion::operator !=( - const SimpleBadDiscUnion& x) const -{ - return !(*this == x); -} - -void SimpleBadDiscUnion::_d( - uint8_t __d) -{ - bool b = false; - - switch(m__d) - { - case 0: - switch(__d) - { - case 0: - b = true; - break; - default: - break; - } - break; - - - case 1: - switch(__d) - { - case 1: - b = true; - break; - default: - break; - } - break; - - } - - if(!b) - { - throw BadParamException("Discriminator doesn't correspond with the selected union member"); - } - - m__d = __d; -} - -uint8_t SimpleBadDiscUnion::_d() const -{ - return m__d; -} - -uint8_t& SimpleBadDiscUnion::_d() -{ - return m__d; -} - -void SimpleBadDiscUnion::first( - int32_t _first) -{ - m_first = _first; - m__d = 0; - -} - -int32_t SimpleBadDiscUnion::first() const -{ - bool b = false; - - switch(m__d) - { - case 0: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - -int32_t& SimpleBadDiscUnion::first() -{ - bool b = false; - - switch(m__d) - { - case 0: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_first; -} - - -void SimpleBadDiscUnion::second( - int64_t _second) -{ - m_second = _second; - m__d = 1; - -} - -int64_t SimpleBadDiscUnion::second() const -{ - bool b = false; - - switch(m__d) - { - case 1: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - -int64_t& SimpleBadDiscUnion::second() -{ - bool b = false; - - switch(m__d) - { - case 1: - b = true; - break; - default: - break; - } - - if(!b) - { - throw BadParamException("This member has not been selected"); - } - - return m_second; -} - - -// TODO(Ricardo) Review -size_t SimpleBadDiscUnion::getCdrSerializedSize( - const SimpleBadDiscUnion& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1); - - - - switch(data.m__d) - { - case 0: - current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4); - - break; - - - case 1: - current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8); - - break; - - default: - break; - } - - return current_alignment - initial_alignment; -} - - -void SimpleBadDiscUnion::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m__d; - - switch(m__d) - { - case 0: - scdr << m_first; - - break; - - - case 1: - scdr << m_second; - - break; - - default: - break; - } -} - -void SimpleBadDiscUnion::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m__d; - - - switch(m__d) - { - case 0: - dcdr >> m_first; - - - break; - - - case 1: - dcdr >> m_second; - - - break; - - default: - break; - } -} - - - - - -SimpleUnionStruct::SimpleUnionStruct() -{ - // SimpleUnion m_my_union - - - // Just to register all known types - registerTypesTypes(); -} - -SimpleUnionStruct::~SimpleUnionStruct() -{ -} - -SimpleUnionStruct::SimpleUnionStruct( - const SimpleUnionStruct& x) -{ - m_my_union = x.m_my_union; - -} - -SimpleUnionStruct::SimpleUnionStruct( - SimpleUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -SimpleUnionStruct& SimpleUnionStruct::operator =( - const SimpleUnionStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -SimpleUnionStruct& SimpleUnionStruct::operator =( - SimpleUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool SimpleUnionStruct::operator ==( - const SimpleUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleUnionStruct::operator !=( - const SimpleUnionStruct& x) const -{ - return !(*this == x); -} - -size_t SimpleUnionStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimpleUnionStruct_max_cdr_typesize; -} - -size_t SimpleUnionStruct::getCdrSerializedSize( - const SimpleUnionStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimpleUnionStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void SimpleUnionStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool SimpleUnionStruct::isKeyDefined() -{ - return false; -} - -void SimpleUnionStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleUnionStruct::my_union( - const SimpleUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleUnionStruct::my_union( - SimpleUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleUnion& SimpleUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleUnion& SimpleUnionStruct::my_union() -{ - return m_my_union; -} - - - - - -SimpleUnionStructEqual::SimpleUnionStructEqual() -{ - // SimpleUnion m_my_union_equal - - - // Just to register all known types - registerTypesTypes(); -} - -SimpleUnionStructEqual::~SimpleUnionStructEqual() -{ -} - -SimpleUnionStructEqual::SimpleUnionStructEqual( - const SimpleUnionStructEqual& x) -{ - m_my_union_equal = x.m_my_union_equal; - -} - -SimpleUnionStructEqual::SimpleUnionStructEqual( - SimpleUnionStructEqual&& x) noexcept -{ - m_my_union_equal = std::move(x.m_my_union_equal); - -} - -SimpleUnionStructEqual& SimpleUnionStructEqual::operator =( - const SimpleUnionStructEqual& x) -{ - m_my_union_equal = x.m_my_union_equal; - - return *this; -} - -SimpleUnionStructEqual& SimpleUnionStructEqual::operator =( - SimpleUnionStructEqual&& x) noexcept -{ - m_my_union_equal = std::move(x.m_my_union_equal); - - return *this; -} - -bool SimpleUnionStructEqual::operator ==( - const SimpleUnionStructEqual& x) const -{ - return (m_my_union_equal == x.m_my_union_equal); -} - -bool SimpleUnionStructEqual::operator !=( - const SimpleUnionStructEqual& x) const -{ - return !(*this == x); -} - -size_t SimpleUnionStructEqual::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimpleUnionStructEqual_max_cdr_typesize; -} - -size_t SimpleUnionStructEqual::getCdrSerializedSize( - const SimpleUnionStructEqual& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleUnion::getCdrSerializedSize(data.my_union_equal(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimpleUnionStructEqual::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union_equal; - -} - -void SimpleUnionStructEqual::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union_equal; - - -} - - -bool SimpleUnionStructEqual::isKeyDefined() -{ - return false; -} - -void SimpleUnionStructEqual::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union_equal - * @param _my_union_equal New value to be copied in member my_union_equal - */ -void SimpleUnionStructEqual::my_union_equal( - const SimpleUnion& _my_union_equal) -{ - m_my_union_equal = _my_union_equal; -} - -/*! - * @brief This function moves the value in member my_union_equal - * @param _my_union_equal New value to be moved in member my_union_equal - */ -void SimpleUnionStructEqual::my_union_equal( - SimpleUnion&& _my_union_equal) -{ - m_my_union_equal = std::move(_my_union_equal); -} - -/*! - * @brief This function returns a constant reference to member my_union_equal - * @return Constant reference to member my_union_equal - */ -const SimpleUnion& SimpleUnionStructEqual::my_union_equal() const -{ - return m_my_union_equal; -} - -/*! - * @brief This function returns a reference to member my_union_equal - * @return Reference to member my_union_equal - */ -SimpleUnion& SimpleUnionStructEqual::my_union_equal() -{ - return m_my_union_equal; -} - - - - - -SimpleUnionNamesStruct::SimpleUnionNamesStruct() -{ - // SimpleUnionNames m_my_union - - - // Just to register all known types - registerTypesTypes(); -} - -SimpleUnionNamesStruct::~SimpleUnionNamesStruct() -{ -} - -SimpleUnionNamesStruct::SimpleUnionNamesStruct( - const SimpleUnionNamesStruct& x) -{ - m_my_union = x.m_my_union; - -} - -SimpleUnionNamesStruct::SimpleUnionNamesStruct( - SimpleUnionNamesStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -SimpleUnionNamesStruct& SimpleUnionNamesStruct::operator =( - const SimpleUnionNamesStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -SimpleUnionNamesStruct& SimpleUnionNamesStruct::operator =( - SimpleUnionNamesStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool SimpleUnionNamesStruct::operator ==( - const SimpleUnionNamesStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleUnionNamesStruct::operator !=( - const SimpleUnionNamesStruct& x) const -{ - return !(*this == x); -} - -size_t SimpleUnionNamesStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimpleUnionNamesStruct_max_cdr_typesize; -} - -size_t SimpleUnionNamesStruct::getCdrSerializedSize( - const SimpleUnionNamesStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleUnionNames::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimpleUnionNamesStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void SimpleUnionNamesStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool SimpleUnionNamesStruct::isKeyDefined() -{ - return false; -} - -void SimpleUnionNamesStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleUnionNamesStruct::my_union( - const SimpleUnionNames& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleUnionNamesStruct::my_union( - SimpleUnionNames&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleUnionNames& SimpleUnionNamesStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleUnionNames& SimpleUnionNamesStruct::my_union() -{ - return m_my_union; -} - - - - - -SimpleTypeUnionStruct::SimpleTypeUnionStruct() -{ - // SimpleTypeUnion m_my_union - - - // Just to register all known types - registerTypesTypes(); -} - -SimpleTypeUnionStruct::~SimpleTypeUnionStruct() -{ -} - -SimpleTypeUnionStruct::SimpleTypeUnionStruct( - const SimpleTypeUnionStruct& x) -{ - m_my_union = x.m_my_union; - -} - -SimpleTypeUnionStruct::SimpleTypeUnionStruct( - SimpleTypeUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -SimpleTypeUnionStruct& SimpleTypeUnionStruct::operator =( - const SimpleTypeUnionStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -SimpleTypeUnionStruct& SimpleTypeUnionStruct::operator =( - SimpleTypeUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool SimpleTypeUnionStruct::operator ==( - const SimpleTypeUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleTypeUnionStruct::operator !=( - const SimpleTypeUnionStruct& x) const -{ - return !(*this == x); -} - -size_t SimpleTypeUnionStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimpleTypeUnionStruct_max_cdr_typesize; -} - -size_t SimpleTypeUnionStruct::getCdrSerializedSize( - const SimpleTypeUnionStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleTypeUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimpleTypeUnionStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void SimpleTypeUnionStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool SimpleTypeUnionStruct::isKeyDefined() -{ - return false; -} - -void SimpleTypeUnionStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleTypeUnionStruct::my_union( - const SimpleTypeUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleTypeUnionStruct::my_union( - SimpleTypeUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleTypeUnion& SimpleTypeUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleTypeUnion& SimpleTypeUnionStruct::my_union() -{ - return m_my_union; -} - - - - - -SimpleBadUnionStruct::SimpleBadUnionStruct() -{ - // SimpleBadUnion m_my_union - - - // Just to register all known types - registerTypesTypes(); -} - -SimpleBadUnionStruct::~SimpleBadUnionStruct() -{ -} - -SimpleBadUnionStruct::SimpleBadUnionStruct( - const SimpleBadUnionStruct& x) -{ - m_my_union = x.m_my_union; - -} - -SimpleBadUnionStruct::SimpleBadUnionStruct( - SimpleBadUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -SimpleBadUnionStruct& SimpleBadUnionStruct::operator =( - const SimpleBadUnionStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -SimpleBadUnionStruct& SimpleBadUnionStruct::operator =( - SimpleBadUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool SimpleBadUnionStruct::operator ==( - const SimpleBadUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimpleBadUnionStruct::operator !=( - const SimpleBadUnionStruct& x) const -{ - return !(*this == x); -} - -size_t SimpleBadUnionStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimpleBadUnionStruct_max_cdr_typesize; -} - -size_t SimpleBadUnionStruct::getCdrSerializedSize( - const SimpleBadUnionStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleBadUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimpleBadUnionStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void SimpleBadUnionStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool SimpleBadUnionStruct::isKeyDefined() -{ - return false; -} - -void SimpleBadUnionStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimpleBadUnionStruct::my_union( - const SimpleBadUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimpleBadUnionStruct::my_union( - SimpleBadUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleBadUnion& SimpleBadUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleBadUnion& SimpleBadUnionStruct::my_union() -{ - return m_my_union; -} - - - - - -SimplBadDiscUnionStruct::SimplBadDiscUnionStruct() -{ - // SimpleBadDiscUnion m_my_union - - - // Just to register all known types - registerTypesTypes(); -} - -SimplBadDiscUnionStruct::~SimplBadDiscUnionStruct() -{ -} - -SimplBadDiscUnionStruct::SimplBadDiscUnionStruct( - const SimplBadDiscUnionStruct& x) -{ - m_my_union = x.m_my_union; - -} - -SimplBadDiscUnionStruct::SimplBadDiscUnionStruct( - SimplBadDiscUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - -} - -SimplBadDiscUnionStruct& SimplBadDiscUnionStruct::operator =( - const SimplBadDiscUnionStruct& x) -{ - m_my_union = x.m_my_union; - - return *this; -} - -SimplBadDiscUnionStruct& SimplBadDiscUnionStruct::operator =( - SimplBadDiscUnionStruct&& x) noexcept -{ - m_my_union = std::move(x.m_my_union); - - return *this; -} - -bool SimplBadDiscUnionStruct::operator ==( - const SimplBadDiscUnionStruct& x) const -{ - return (m_my_union == x.m_my_union); -} - -bool SimplBadDiscUnionStruct::operator !=( - const SimplBadDiscUnionStruct& x) const -{ - return !(*this == x); -} - -size_t SimplBadDiscUnionStruct::getMaxCdrSerializedSize( - size_t current_alignment) -{ - static_cast(current_alignment); - return SimplBadDiscUnionStruct_max_cdr_typesize; -} - -size_t SimplBadDiscUnionStruct::getCdrSerializedSize( - const SimplBadDiscUnionStruct& data, - size_t current_alignment) -{ - (void)data; - size_t initial_alignment = current_alignment; - - current_alignment += SimpleBadDiscUnion::getCdrSerializedSize(data.my_union(), current_alignment); - - - return current_alignment - initial_alignment; -} - - -void SimplBadDiscUnionStruct::serialize( - eprosima::fastcdr::Cdr& scdr) const -{ - scdr << m_my_union; - -} - -void SimplBadDiscUnionStruct::deserialize( - eprosima::fastcdr::Cdr& dcdr) -{ - dcdr >> m_my_union; - - -} - - -bool SimplBadDiscUnionStruct::isKeyDefined() -{ - return false; -} - -void SimplBadDiscUnionStruct::serializeKey( - eprosima::fastcdr::Cdr& scdr) const -{ - (void) scdr; -} - -/*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ -void SimplBadDiscUnionStruct::my_union( - const SimpleBadDiscUnion& _my_union) -{ - m_my_union = _my_union; -} - -/*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ -void SimplBadDiscUnionStruct::my_union( - SimpleBadDiscUnion&& _my_union) -{ - m_my_union = std::move(_my_union); -} - -/*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ -const SimpleBadDiscUnion& SimplBadDiscUnionStruct::my_union() const -{ - return m_my_union; -} - -/*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ -SimpleBadDiscUnion& SimplBadDiscUnionStruct::my_union() -{ - return m_my_union; -} - - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/test/xtypes/idl/Typesv1.h b/test/xtypes/idl/Typesv1.h deleted file mode 100644 index 9cf664ae223..00000000000 --- a/test/xtypes/idl/Typesv1.h +++ /dev/null @@ -1,6495 +0,0 @@ -// 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 Types.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool fastddsgen. - */ - -#include - -#if FASTCDR_VERSION_MAJOR == 1 - -#ifndef _FAST_DDS_GENERATED_TYPES_H_ -#define _FAST_DDS_GENERATED_TYPES_H_ - - -#include - -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define eProsima_user_DllExport -#endif // _WIN32 - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(TYPES_SOURCE) -#define TYPES_DllAPI __declspec( dllexport ) -#else -#define TYPES_DllAPI __declspec( dllimport ) -#endif // TYPES_SOURCE -#else -#define TYPES_DllAPI -#endif // EPROSIMA_USER_DLL_EXPORT -#else -#define TYPES_DllAPI -#endif // _WIN32 - -namespace eprosima { -namespace fastcdr { -class Cdr; -} // namespace fastcdr -} // namespace eprosima - - - -/*! - * @brief This class represents the enumeration MyEnum defined by the user in the IDL file. - * @ingroup Types - */ -enum MyEnum : uint32_t -{ - A, - B, - C -}; -/*! - * @brief This class represents the enumeration MyBadEnum defined by the user in the IDL file. - * @ingroup Types - */ -enum MyBadEnum : uint32_t -{ - A1, - B1, - C1 -}; - - -/*! - * @brief This class represents the structure MyEnumStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MyEnumStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyEnumStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyEnumStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MyEnumStruct that will be copied. - */ - eProsima_user_DllExport MyEnumStruct( - const MyEnumStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MyEnumStruct that will be copied. - */ - eProsima_user_DllExport MyEnumStruct( - MyEnumStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MyEnumStruct that will be copied. - */ - eProsima_user_DllExport MyEnumStruct& operator =( - const MyEnumStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MyEnumStruct that will be copied. - */ - eProsima_user_DllExport MyEnumStruct& operator =( - MyEnumStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MyEnumStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyEnumStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MyEnumStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyEnumStruct& x) const; - - /*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ - eProsima_user_DllExport void my_enum( - MyEnum _my_enum); - - /*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ - eProsima_user_DllExport MyEnum my_enum() const; - - /*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ - eProsima_user_DllExport MyEnum& my_enum(); - - - /*! - * @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 MyEnumStruct& 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 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: - - MyEnum m_my_enum; - -}; - - - -/*! - * @brief This class represents the structure MyBadEnumStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MyBadEnumStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyBadEnumStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyBadEnumStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MyBadEnumStruct that will be copied. - */ - eProsima_user_DllExport MyBadEnumStruct( - const MyBadEnumStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MyBadEnumStruct that will be copied. - */ - eProsima_user_DllExport MyBadEnumStruct( - MyBadEnumStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MyBadEnumStruct that will be copied. - */ - eProsima_user_DllExport MyBadEnumStruct& operator =( - const MyBadEnumStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MyBadEnumStruct that will be copied. - */ - eProsima_user_DllExport MyBadEnumStruct& operator =( - MyBadEnumStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MyBadEnumStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyBadEnumStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MyBadEnumStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyBadEnumStruct& x) const; - - /*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ - eProsima_user_DllExport void my_enum( - MyBadEnum _my_enum); - - /*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ - eProsima_user_DllExport MyBadEnum my_enum() const; - - /*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ - eProsima_user_DllExport MyBadEnum& my_enum(); - - - /*! - * @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 MyBadEnumStruct& 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 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: - - MyBadEnum m_my_enum; - -}; - -typedef MyEnum MyAliasEnum; - - - -/*! - * @brief This class represents the structure MyAliasEnumStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MyAliasEnumStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MyAliasEnumStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MyAliasEnumStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MyAliasEnumStruct that will be copied. - */ - eProsima_user_DllExport MyAliasEnumStruct( - const MyAliasEnumStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MyAliasEnumStruct that will be copied. - */ - eProsima_user_DllExport MyAliasEnumStruct( - MyAliasEnumStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MyAliasEnumStruct that will be copied. - */ - eProsima_user_DllExport MyAliasEnumStruct& operator =( - const MyAliasEnumStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MyAliasEnumStruct that will be copied. - */ - eProsima_user_DllExport MyAliasEnumStruct& operator =( - MyAliasEnumStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MyAliasEnumStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MyAliasEnumStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MyAliasEnumStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MyAliasEnumStruct& x) const; - - /*! - * @brief This function sets a value in member my_enum - * @param _my_enum New value for member my_enum - */ - eProsima_user_DllExport void my_enum( - MyAliasEnum _my_enum); - - /*! - * @brief This function returns the value of member my_enum - * @return Value of member my_enum - */ - eProsima_user_DllExport MyAliasEnum my_enum() const; - - /*! - * @brief This function returns a reference to member my_enum - * @return Reference to member my_enum - */ - eProsima_user_DllExport MyAliasEnum& my_enum(); - - - /*! - * @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 MyAliasEnumStruct& 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 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: - - MyAliasEnum m_my_enum; - -}; - - - -/*! - * @brief This class represents the structure BasicStruct defined by the user in the IDL file. - * @ingroup Types - */ -class BasicStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BasicStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BasicStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BasicStruct that will be copied. - */ - eProsima_user_DllExport BasicStruct( - const BasicStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BasicStruct that will be copied. - */ - eProsima_user_DllExport BasicStruct( - BasicStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BasicStruct that will be copied. - */ - eProsima_user_DllExport BasicStruct& operator =( - const BasicStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BasicStruct that will be copied. - */ - eProsima_user_DllExport BasicStruct& operator =( - BasicStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BasicStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BasicStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BasicStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BasicStruct& x) const; - - /*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ - eProsima_user_DllExport void my_bool( - bool _my_bool); - - /*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ - eProsima_user_DllExport bool my_bool() const; - - /*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ - eProsima_user_DllExport bool& my_bool(); - - - /*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ - eProsima_user_DllExport void my_int32( - int32_t _my_int32); - - /*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ - eProsima_user_DllExport int32_t my_int32() const; - - /*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ - eProsima_user_DllExport int32_t& my_int32(); - - - /*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ - eProsima_user_DllExport void my_string( - const std::string& _my_string); - - /*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ - eProsima_user_DllExport void my_string( - std::string&& _my_string); - - /*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ - eProsima_user_DllExport const std::string& my_string() const; - - /*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ - eProsima_user_DllExport std::string& my_string(); - - - /*! - * @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 BasicStruct& 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 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: - - bool m_my_bool; - int32_t m_my_int32; - std::string m_my_string; - -}; - - - -/*! - * @brief This class represents the structure BasicNamesStruct defined by the user in the IDL file. - * @ingroup Types - */ -class BasicNamesStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BasicNamesStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BasicNamesStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BasicNamesStruct that will be copied. - */ - eProsima_user_DllExport BasicNamesStruct( - const BasicNamesStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BasicNamesStruct that will be copied. - */ - eProsima_user_DllExport BasicNamesStruct( - BasicNamesStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BasicNamesStruct that will be copied. - */ - eProsima_user_DllExport BasicNamesStruct& operator =( - const BasicNamesStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BasicNamesStruct that will be copied. - */ - eProsima_user_DllExport BasicNamesStruct& operator =( - BasicNamesStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BasicNamesStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BasicNamesStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BasicNamesStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BasicNamesStruct& x) const; - - /*! - * @brief This function sets a value in member my_bool_name - * @param _my_bool_name New value for member my_bool_name - */ - eProsima_user_DllExport void my_bool_name( - bool _my_bool_name); - - /*! - * @brief This function returns the value of member my_bool_name - * @return Value of member my_bool_name - */ - eProsima_user_DllExport bool my_bool_name() const; - - /*! - * @brief This function returns a reference to member my_bool_name - * @return Reference to member my_bool_name - */ - eProsima_user_DllExport bool& my_bool_name(); - - - /*! - * @brief This function sets a value in member my_int32_name - * @param _my_int32_name New value for member my_int32_name - */ - eProsima_user_DllExport void my_int32_name( - int32_t _my_int32_name); - - /*! - * @brief This function returns the value of member my_int32_name - * @return Value of member my_int32_name - */ - eProsima_user_DllExport int32_t my_int32_name() const; - - /*! - * @brief This function returns a reference to member my_int32_name - * @return Reference to member my_int32_name - */ - eProsima_user_DllExport int32_t& my_int32_name(); - - - /*! - * @brief This function copies the value in member my_string_name - * @param _my_string_name New value to be copied in member my_string_name - */ - eProsima_user_DllExport void my_string_name( - const std::string& _my_string_name); - - /*! - * @brief This function moves the value in member my_string_name - * @param _my_string_name New value to be moved in member my_string_name - */ - eProsima_user_DllExport void my_string_name( - std::string&& _my_string_name); - - /*! - * @brief This function returns a constant reference to member my_string_name - * @return Constant reference to member my_string_name - */ - eProsima_user_DllExport const std::string& my_string_name() const; - - /*! - * @brief This function returns a reference to member my_string_name - * @return Reference to member my_string_name - */ - eProsima_user_DllExport std::string& my_string_name(); - - - /*! - * @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 BasicNamesStruct& 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 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: - - bool m_my_bool_name; - int32_t m_my_int32_name; - std::string m_my_string_name; - -}; - - - -/*! - * @brief This class represents the structure BasicBadStruct defined by the user in the IDL file. - * @ingroup Types - */ -class BasicBadStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BasicBadStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BasicBadStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BasicBadStruct that will be copied. - */ - eProsima_user_DllExport BasicBadStruct( - const BasicBadStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BasicBadStruct that will be copied. - */ - eProsima_user_DllExport BasicBadStruct( - BasicBadStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BasicBadStruct that will be copied. - */ - eProsima_user_DllExport BasicBadStruct& operator =( - const BasicBadStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BasicBadStruct that will be copied. - */ - eProsima_user_DllExport BasicBadStruct& operator =( - BasicBadStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BasicBadStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BasicBadStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BasicBadStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BasicBadStruct& x) const; - - /*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ - eProsima_user_DllExport void my_bool( - uint8_t _my_bool); - - /*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ - eProsima_user_DllExport uint8_t my_bool() const; - - /*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ - eProsima_user_DllExport uint8_t& my_bool(); - - - /*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ - eProsima_user_DllExport void my_int32( - int32_t _my_int32); - - /*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ - eProsima_user_DllExport int32_t my_int32() const; - - /*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ - eProsima_user_DllExport int32_t& my_int32(); - - - /*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ - eProsima_user_DllExport void my_string( - const std::string& _my_string); - - /*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ - eProsima_user_DllExport void my_string( - std::string&& _my_string); - - /*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ - eProsima_user_DllExport const std::string& my_string() const; - - /*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ - eProsima_user_DllExport std::string& my_string(); - - - /*! - * @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 BasicBadStruct& 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 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: - - uint8_t m_my_bool; - int32_t m_my_int32; - std::string m_my_string; - -}; - - - -/*! - * @brief This class represents the structure BasicWideStruct defined by the user in the IDL file. - * @ingroup Types - */ -class BasicWideStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BasicWideStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BasicWideStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BasicWideStruct that will be copied. - */ - eProsima_user_DllExport BasicWideStruct( - const BasicWideStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BasicWideStruct that will be copied. - */ - eProsima_user_DllExport BasicWideStruct( - BasicWideStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BasicWideStruct that will be copied. - */ - eProsima_user_DllExport BasicWideStruct& operator =( - const BasicWideStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BasicWideStruct that will be copied. - */ - eProsima_user_DllExport BasicWideStruct& operator =( - BasicWideStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BasicWideStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BasicWideStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BasicWideStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BasicWideStruct& x) const; - - /*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ - eProsima_user_DllExport void my_bool( - bool _my_bool); - - /*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ - eProsima_user_DllExport bool my_bool() const; - - /*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ - eProsima_user_DllExport bool& my_bool(); - - - /*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ - eProsima_user_DllExport void my_int32( - int32_t _my_int32); - - /*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ - eProsima_user_DllExport int32_t my_int32() const; - - /*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ - eProsima_user_DllExport int32_t& my_int32(); - - - /*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ - eProsima_user_DllExport void my_string( - const std::string& _my_string); - - /*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ - eProsima_user_DllExport void my_string( - std::string&& _my_string); - - /*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ - eProsima_user_DllExport const std::string& my_string() const; - - /*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ - eProsima_user_DllExport std::string& my_string(); - - - /*! - * @brief This function sets a value in member new_int32 - * @param _new_int32 New value for member new_int32 - */ - eProsima_user_DllExport void new_int32( - int32_t _new_int32); - - /*! - * @brief This function returns the value of member new_int32 - * @return Value of member new_int32 - */ - eProsima_user_DllExport int32_t new_int32() const; - - /*! - * @brief This function returns a reference to member new_int32 - * @return Reference to member new_int32 - */ - eProsima_user_DllExport int32_t& new_int32(); - - - /*! - * @brief This function copies the value in member new_string - * @param _new_string New value to be copied in member new_string - */ - eProsima_user_DllExport void new_string( - const std::string& _new_string); - - /*! - * @brief This function moves the value in member new_string - * @param _new_string New value to be moved in member new_string - */ - eProsima_user_DllExport void new_string( - std::string&& _new_string); - - /*! - * @brief This function returns a constant reference to member new_string - * @return Constant reference to member new_string - */ - eProsima_user_DllExport const std::string& new_string() const; - - /*! - * @brief This function returns a reference to member new_string - * @return Reference to member new_string - */ - eProsima_user_DllExport std::string& new_string(); - - - /*! - * @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 BasicWideStruct& 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 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: - - bool m_my_bool; - int32_t m_my_int32; - std::string m_my_string; - int32_t m_new_int32; - std::string m_new_string; - -}; - - - -/*! - * @brief This class represents the structure BadBasicWideStruct defined by the user in the IDL file. - * @ingroup Types - */ -class BadBasicWideStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BadBasicWideStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BadBasicWideStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BadBasicWideStruct that will be copied. - */ - eProsima_user_DllExport BadBasicWideStruct( - const BadBasicWideStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BadBasicWideStruct that will be copied. - */ - eProsima_user_DllExport BadBasicWideStruct( - BadBasicWideStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object BadBasicWideStruct that will be copied. - */ - eProsima_user_DllExport BadBasicWideStruct& operator =( - const BadBasicWideStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BadBasicWideStruct that will be copied. - */ - eProsima_user_DllExport BadBasicWideStruct& operator =( - BadBasicWideStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x BadBasicWideStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const BadBasicWideStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x BadBasicWideStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const BadBasicWideStruct& x) const; - - /*! - * @brief This function sets a value in member new_int32 - * @param _new_int32 New value for member new_int32 - */ - eProsima_user_DllExport void new_int32( - int32_t _new_int32); - - /*! - * @brief This function returns the value of member new_int32 - * @return Value of member new_int32 - */ - eProsima_user_DllExport int32_t new_int32() const; - - /*! - * @brief This function returns a reference to member new_int32 - * @return Reference to member new_int32 - */ - eProsima_user_DllExport int32_t& new_int32(); - - - /*! - * @brief This function copies the value in member new_string - * @param _new_string New value to be copied in member new_string - */ - eProsima_user_DllExport void new_string( - const std::string& _new_string); - - /*! - * @brief This function moves the value in member new_string - * @param _new_string New value to be moved in member new_string - */ - eProsima_user_DllExport void new_string( - std::string&& _new_string); - - /*! - * @brief This function returns a constant reference to member new_string - * @return Constant reference to member new_string - */ - eProsima_user_DllExport const std::string& new_string() const; - - /*! - * @brief This function returns a reference to member new_string - * @return Reference to member new_string - */ - eProsima_user_DllExport std::string& new_string(); - - - /*! - * @brief This function sets a value in member my_bool - * @param _my_bool New value for member my_bool - */ - eProsima_user_DllExport void my_bool( - bool _my_bool); - - /*! - * @brief This function returns the value of member my_bool - * @return Value of member my_bool - */ - eProsima_user_DllExport bool my_bool() const; - - /*! - * @brief This function returns a reference to member my_bool - * @return Reference to member my_bool - */ - eProsima_user_DllExport bool& my_bool(); - - - /*! - * @brief This function sets a value in member my_int32 - * @param _my_int32 New value for member my_int32 - */ - eProsima_user_DllExport void my_int32( - int32_t _my_int32); - - /*! - * @brief This function returns the value of member my_int32 - * @return Value of member my_int32 - */ - eProsima_user_DllExport int32_t my_int32() const; - - /*! - * @brief This function returns a reference to member my_int32 - * @return Reference to member my_int32 - */ - eProsima_user_DllExport int32_t& my_int32(); - - - /*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ - eProsima_user_DllExport void my_string( - const std::string& _my_string); - - /*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ - eProsima_user_DllExport void my_string( - std::string&& _my_string); - - /*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ - eProsima_user_DllExport const std::string& my_string() const; - - /*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ - eProsima_user_DllExport std::string& my_string(); - - - /*! - * @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 BadBasicWideStruct& 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 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_new_int32; - std::string m_new_string; - bool m_my_bool; - int32_t m_my_int32; - std::string m_my_string; - -}; - - - -/*! - * @brief This class represents the structure StringStruct defined by the user in the IDL file. - * @ingroup Types - */ -class StringStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport StringStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~StringStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object StringStruct that will be copied. - */ - eProsima_user_DllExport StringStruct( - const StringStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object StringStruct that will be copied. - */ - eProsima_user_DllExport StringStruct( - StringStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object StringStruct that will be copied. - */ - eProsima_user_DllExport StringStruct& operator =( - const StringStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object StringStruct that will be copied. - */ - eProsima_user_DllExport StringStruct& operator =( - StringStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x StringStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const StringStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x StringStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const StringStruct& x) const; - - /*! - * @brief This function copies the value in member my_string - * @param _my_string New value to be copied in member my_string - */ - eProsima_user_DllExport void my_string( - const std::string& _my_string); - - /*! - * @brief This function moves the value in member my_string - * @param _my_string New value to be moved in member my_string - */ - eProsima_user_DllExport void my_string( - std::string&& _my_string); - - /*! - * @brief This function returns a constant reference to member my_string - * @return Constant reference to member my_string - */ - eProsima_user_DllExport const std::string& my_string() const; - - /*! - * @brief This function returns a reference to member my_string - * @return Reference to member my_string - */ - eProsima_user_DllExport std::string& my_string(); - - - /*! - * @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 StringStruct& 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 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: - - std::string m_my_string; - -}; - - - -/*! - * @brief This class represents the structure LargeStringStruct defined by the user in the IDL file. - * @ingroup Types - */ -class LargeStringStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport LargeStringStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~LargeStringStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object LargeStringStruct that will be copied. - */ - eProsima_user_DllExport LargeStringStruct( - const LargeStringStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object LargeStringStruct that will be copied. - */ - eProsima_user_DllExport LargeStringStruct( - LargeStringStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object LargeStringStruct that will be copied. - */ - eProsima_user_DllExport LargeStringStruct& operator =( - const LargeStringStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object LargeStringStruct that will be copied. - */ - eProsima_user_DllExport LargeStringStruct& operator =( - LargeStringStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x LargeStringStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const LargeStringStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x LargeStringStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const LargeStringStruct& x) const; - - /*! - * @brief This function copies the value in member my_large_string - * @param _my_large_string New value to be copied in member my_large_string - */ - eProsima_user_DllExport void my_large_string( - const eprosima::fastrtps::fixed_string<41925>& _my_large_string); - - /*! - * @brief This function moves the value in member my_large_string - * @param _my_large_string New value to be moved in member my_large_string - */ - eProsima_user_DllExport void my_large_string( - eprosima::fastrtps::fixed_string<41925>&& _my_large_string); - - /*! - * @brief This function returns a constant reference to member my_large_string - * @return Constant reference to member my_large_string - */ - eProsima_user_DllExport const eprosima::fastrtps::fixed_string<41925>& my_large_string() const; - - /*! - * @brief This function returns a reference to member my_large_string - * @return Reference to member my_large_string - */ - eProsima_user_DllExport eprosima::fastrtps::fixed_string<41925>& my_large_string(); - - - /*! - * @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 LargeStringStruct& 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 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: - - eprosima::fastrtps::fixed_string<41925> m_my_large_string; - -}; - - - -/*! - * @brief This class represents the structure WStringStruct defined by the user in the IDL file. - * @ingroup Types - */ -class WStringStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport WStringStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~WStringStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object WStringStruct that will be copied. - */ - eProsima_user_DllExport WStringStruct( - const WStringStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object WStringStruct that will be copied. - */ - eProsima_user_DllExport WStringStruct( - WStringStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object WStringStruct that will be copied. - */ - eProsima_user_DllExport WStringStruct& operator =( - const WStringStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object WStringStruct that will be copied. - */ - eProsima_user_DllExport WStringStruct& operator =( - WStringStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x WStringStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const WStringStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x WStringStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const WStringStruct& x) const; - - /*! - * @brief This function copies the value in member my_wstring - * @param _my_wstring New value to be copied in member my_wstring - */ - eProsima_user_DllExport void my_wstring( - const std::wstring& _my_wstring); - - /*! - * @brief This function moves the value in member my_wstring - * @param _my_wstring New value to be moved in member my_wstring - */ - eProsima_user_DllExport void my_wstring( - std::wstring&& _my_wstring); - - /*! - * @brief This function returns a constant reference to member my_wstring - * @return Constant reference to member my_wstring - */ - eProsima_user_DllExport const std::wstring& my_wstring() const; - - /*! - * @brief This function returns a reference to member my_wstring - * @return Reference to member my_wstring - */ - eProsima_user_DllExport std::wstring& my_wstring(); - - - /*! - * @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 WStringStruct& 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 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: - - std::wstring m_my_wstring; - -}; - - - -/*! - * @brief This class represents the structure LargeWStringStruct defined by the user in the IDL file. - * @ingroup Types - */ -class LargeWStringStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport LargeWStringStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~LargeWStringStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object LargeWStringStruct that will be copied. - */ - eProsima_user_DllExport LargeWStringStruct( - const LargeWStringStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object LargeWStringStruct that will be copied. - */ - eProsima_user_DllExport LargeWStringStruct( - LargeWStringStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object LargeWStringStruct that will be copied. - */ - eProsima_user_DllExport LargeWStringStruct& operator =( - const LargeWStringStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object LargeWStringStruct that will be copied. - */ - eProsima_user_DllExport LargeWStringStruct& operator =( - LargeWStringStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x LargeWStringStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const LargeWStringStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x LargeWStringStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const LargeWStringStruct& x) const; - - /*! - * @brief This function copies the value in member my_large_wstring - * @param _my_large_wstring New value to be copied in member my_large_wstring - */ - eProsima_user_DllExport void my_large_wstring( - const std::wstring& _my_large_wstring); - - /*! - * @brief This function moves the value in member my_large_wstring - * @param _my_large_wstring New value to be moved in member my_large_wstring - */ - eProsima_user_DllExport void my_large_wstring( - std::wstring&& _my_large_wstring); - - /*! - * @brief This function returns a constant reference to member my_large_wstring - * @return Constant reference to member my_large_wstring - */ - eProsima_user_DllExport const std::wstring& my_large_wstring() const; - - /*! - * @brief This function returns a reference to member my_large_wstring - * @return Reference to member my_large_wstring - */ - eProsima_user_DllExport std::wstring& my_large_wstring(); - - - /*! - * @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 LargeWStringStruct& 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 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: - - std::wstring m_my_large_wstring; - -}; - - - -/*! - * @brief This class represents the structure ArrayStruct defined by the user in the IDL file. - * @ingroup Types - */ -class ArrayStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ArrayStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ArrayStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ArrayStruct that will be copied. - */ - eProsima_user_DllExport ArrayStruct( - const ArrayStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ArrayStruct that will be copied. - */ - eProsima_user_DllExport ArrayStruct( - ArrayStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ArrayStruct that will be copied. - */ - eProsima_user_DllExport ArrayStruct& operator =( - const ArrayStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ArrayStruct that will be copied. - */ - eProsima_user_DllExport ArrayStruct& operator =( - ArrayStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ArrayStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ArrayStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ArrayStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ArrayStruct& x) const; - - /*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ - eProsima_user_DllExport void my_array( - const std::array& _my_array); - - /*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ - eProsima_user_DllExport void my_array( - std::array&& _my_array); - - /*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ - eProsima_user_DllExport const std::array& my_array() const; - - /*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ - eProsima_user_DllExport std::array& my_array(); - - - /*! - * @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 ArrayStruct& 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 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: - - std::array m_my_array; - -}; - - - -/*! - * @brief This class represents the structure ArrayStructEqual defined by the user in the IDL file. - * @ingroup Types - */ -class ArrayStructEqual -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ArrayStructEqual(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ArrayStructEqual(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ArrayStructEqual that will be copied. - */ - eProsima_user_DllExport ArrayStructEqual( - const ArrayStructEqual& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ArrayStructEqual that will be copied. - */ - eProsima_user_DllExport ArrayStructEqual( - ArrayStructEqual&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ArrayStructEqual that will be copied. - */ - eProsima_user_DllExport ArrayStructEqual& operator =( - const ArrayStructEqual& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ArrayStructEqual that will be copied. - */ - eProsima_user_DllExport ArrayStructEqual& operator =( - ArrayStructEqual&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ArrayStructEqual object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ArrayStructEqual& x) const; - - /*! - * @brief Comparison operator. - * @param x ArrayStructEqual object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ArrayStructEqual& x) const; - - /*! - * @brief This function copies the value in member my_array_equal - * @param _my_array_equal New value to be copied in member my_array_equal - */ - eProsima_user_DllExport void my_array_equal( - const std::array& _my_array_equal); - - /*! - * @brief This function moves the value in member my_array_equal - * @param _my_array_equal New value to be moved in member my_array_equal - */ - eProsima_user_DllExport void my_array_equal( - std::array&& _my_array_equal); - - /*! - * @brief This function returns a constant reference to member my_array_equal - * @return Constant reference to member my_array_equal - */ - eProsima_user_DllExport const std::array& my_array_equal() const; - - /*! - * @brief This function returns a reference to member my_array_equal - * @return Reference to member my_array_equal - */ - eProsima_user_DllExport std::array& my_array_equal(); - - - /*! - * @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 ArrayStructEqual& 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 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: - - std::array m_my_array_equal; - -}; - - - -/*! - * @brief This class represents the structure ArrayBadStruct defined by the user in the IDL file. - * @ingroup Types - */ -class ArrayBadStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ArrayBadStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ArrayBadStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ArrayBadStruct that will be copied. - */ - eProsima_user_DllExport ArrayBadStruct( - const ArrayBadStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ArrayBadStruct that will be copied. - */ - eProsima_user_DllExport ArrayBadStruct( - ArrayBadStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ArrayBadStruct that will be copied. - */ - eProsima_user_DllExport ArrayBadStruct& operator =( - const ArrayBadStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ArrayBadStruct that will be copied. - */ - eProsima_user_DllExport ArrayBadStruct& operator =( - ArrayBadStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ArrayBadStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ArrayBadStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ArrayBadStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ArrayBadStruct& x) const; - - /*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ - eProsima_user_DllExport void my_array( - const std::array& _my_array); - - /*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ - eProsima_user_DllExport void my_array( - std::array&& _my_array); - - /*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ - eProsima_user_DllExport const std::array& my_array() const; - - /*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ - eProsima_user_DllExport std::array& my_array(); - - - /*! - * @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 ArrayBadStruct& 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 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: - - std::array m_my_array; - -}; - - - -/*! - * @brief This class represents the structure ArrayDimensionsStruct defined by the user in the IDL file. - * @ingroup Types - */ -class ArrayDimensionsStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ArrayDimensionsStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ArrayDimensionsStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ArrayDimensionsStruct that will be copied. - */ - eProsima_user_DllExport ArrayDimensionsStruct( - const ArrayDimensionsStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ArrayDimensionsStruct that will be copied. - */ - eProsima_user_DllExport ArrayDimensionsStruct( - ArrayDimensionsStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ArrayDimensionsStruct that will be copied. - */ - eProsima_user_DllExport ArrayDimensionsStruct& operator =( - const ArrayDimensionsStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ArrayDimensionsStruct that will be copied. - */ - eProsima_user_DllExport ArrayDimensionsStruct& operator =( - ArrayDimensionsStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ArrayDimensionsStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ArrayDimensionsStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ArrayDimensionsStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ArrayDimensionsStruct& x) const; - - /*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ - eProsima_user_DllExport void my_array( - const std::array, 2>& _my_array); - - /*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ - eProsima_user_DllExport void my_array( - std::array, 2>&& _my_array); - - /*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ - eProsima_user_DllExport const std::array, 2>& my_array() const; - - /*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ - eProsima_user_DllExport std::array, 2>& my_array(); - - - /*! - * @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 ArrayDimensionsStruct& 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 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: - - std::array, 2> m_my_array; - -}; - - - -/*! - * @brief This class represents the structure ArraySizeStruct defined by the user in the IDL file. - * @ingroup Types - */ -class ArraySizeStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ArraySizeStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ArraySizeStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ArraySizeStruct that will be copied. - */ - eProsima_user_DllExport ArraySizeStruct( - const ArraySizeStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ArraySizeStruct that will be copied. - */ - eProsima_user_DllExport ArraySizeStruct( - ArraySizeStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object ArraySizeStruct that will be copied. - */ - eProsima_user_DllExport ArraySizeStruct& operator =( - const ArraySizeStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ArraySizeStruct that will be copied. - */ - eProsima_user_DllExport ArraySizeStruct& operator =( - ArraySizeStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x ArraySizeStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const ArraySizeStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x ArraySizeStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const ArraySizeStruct& x) const; - - /*! - * @brief This function copies the value in member my_array - * @param _my_array New value to be copied in member my_array - */ - eProsima_user_DllExport void my_array( - const std::array& _my_array); - - /*! - * @brief This function moves the value in member my_array - * @param _my_array New value to be moved in member my_array - */ - eProsima_user_DllExport void my_array( - std::array&& _my_array); - - /*! - * @brief This function returns a constant reference to member my_array - * @return Constant reference to member my_array - */ - eProsima_user_DllExport const std::array& my_array() const; - - /*! - * @brief This function returns a reference to member my_array - * @return Reference to member my_array - */ - eProsima_user_DllExport std::array& my_array(); - - - /*! - * @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 ArraySizeStruct& 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 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: - - std::array m_my_array; - -}; - - - - - -/*! - * @brief This class represents the structure SequenceStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SequenceStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceStruct( - const SequenceStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceStruct( - SequenceStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceStruct& operator =( - const SequenceStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceStruct& operator =( - SequenceStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceStruct& x) const; - - /*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); - - /*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); - - /*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ - eProsima_user_DllExport const std::vector& my_sequence() const; - - /*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ - eProsima_user_DllExport std::vector& my_sequence(); - - - /*! - * @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 SequenceStruct& 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 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: - - std::vector m_my_sequence; - -}; - - - - - -/*! - * @brief This class represents the structure SequenceStructEqual defined by the user in the IDL file. - * @ingroup Types - */ -class SequenceStructEqual -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceStructEqual(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceStructEqual(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceStructEqual that will be copied. - */ - eProsima_user_DllExport SequenceStructEqual( - const SequenceStructEqual& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceStructEqual that will be copied. - */ - eProsima_user_DllExport SequenceStructEqual( - SequenceStructEqual&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceStructEqual that will be copied. - */ - eProsima_user_DllExport SequenceStructEqual& operator =( - const SequenceStructEqual& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceStructEqual that will be copied. - */ - eProsima_user_DllExport SequenceStructEqual& operator =( - SequenceStructEqual&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceStructEqual object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceStructEqual& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceStructEqual object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceStructEqual& x) const; - - /*! - * @brief This function copies the value in member my_sequence_equal - * @param _my_sequence_equal New value to be copied in member my_sequence_equal - */ - eProsima_user_DllExport void my_sequence_equal( - const std::vector& _my_sequence_equal); - - /*! - * @brief This function moves the value in member my_sequence_equal - * @param _my_sequence_equal New value to be moved in member my_sequence_equal - */ - eProsima_user_DllExport void my_sequence_equal( - std::vector&& _my_sequence_equal); - - /*! - * @brief This function returns a constant reference to member my_sequence_equal - * @return Constant reference to member my_sequence_equal - */ - eProsima_user_DllExport const std::vector& my_sequence_equal() const; - - /*! - * @brief This function returns a reference to member my_sequence_equal - * @return Reference to member my_sequence_equal - */ - eProsima_user_DllExport std::vector& my_sequence_equal(); - - - /*! - * @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 SequenceStructEqual& 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 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: - - std::vector m_my_sequence_equal; - -}; - - - - - -/*! - * @brief This class represents the structure SequenceBadStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SequenceBadStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceBadStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceBadStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceBadStruct that will be copied. - */ - eProsima_user_DllExport SequenceBadStruct( - const SequenceBadStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceBadStruct that will be copied. - */ - eProsima_user_DllExport SequenceBadStruct( - SequenceBadStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceBadStruct that will be copied. - */ - eProsima_user_DllExport SequenceBadStruct& operator =( - const SequenceBadStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceBadStruct that will be copied. - */ - eProsima_user_DllExport SequenceBadStruct& operator =( - SequenceBadStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceBadStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceBadStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceBadStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceBadStruct& x) const; - - /*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); - - /*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); - - /*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ - eProsima_user_DllExport const std::vector& my_sequence() const; - - /*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ - eProsima_user_DllExport std::vector& my_sequence(); - - - /*! - * @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 SequenceBadStruct& 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 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: - - std::vector m_my_sequence; - -}; - - - - - -/*! - * @brief This class represents the structure SequenceBoundsStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SequenceBoundsStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceBoundsStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceBoundsStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceBoundsStruct( - const SequenceBoundsStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceBoundsStruct( - SequenceBoundsStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceBoundsStruct& operator =( - const SequenceBoundsStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceBoundsStruct& operator =( - SequenceBoundsStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceBoundsStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceBoundsStruct& x) const; - - /*! - * @brief This function copies the value in member my_sequence - * @param _my_sequence New value to be copied in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - const std::vector& _my_sequence); - - /*! - * @brief This function moves the value in member my_sequence - * @param _my_sequence New value to be moved in member my_sequence - */ - eProsima_user_DllExport void my_sequence( - std::vector&& _my_sequence); - - /*! - * @brief This function returns a constant reference to member my_sequence - * @return Constant reference to member my_sequence - */ - eProsima_user_DllExport const std::vector& my_sequence() const; - - /*! - * @brief This function returns a reference to member my_sequence - * @return Reference to member my_sequence - */ - eProsima_user_DllExport std::vector& my_sequence(); - - - /*! - * @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 SequenceBoundsStruct& 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 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: - - std::vector m_my_sequence; - -}; - - - - - - - -/*! - * @brief This class represents the structure SequenceSequenceStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SequenceSequenceStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceSequenceStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceSequenceStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceSequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceStruct( - const SequenceSequenceStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceSequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceStruct( - SequenceSequenceStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceSequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceStruct& operator =( - const SequenceSequenceStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceSequenceStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceStruct& operator =( - SequenceSequenceStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceSequenceStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceSequenceStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceSequenceStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceSequenceStruct& x) const; - - /*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ - eProsima_user_DllExport void my_sequence_sequence( - const std::vector>& _my_sequence_sequence); - - /*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ - eProsima_user_DllExport void my_sequence_sequence( - std::vector>&& _my_sequence_sequence); - - /*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ - eProsima_user_DllExport const std::vector>& my_sequence_sequence() const; - - /*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ - eProsima_user_DllExport std::vector>& my_sequence_sequence(); - - - /*! - * @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 SequenceSequenceStruct& 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 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: - - std::vector> m_my_sequence_sequence; - -}; - - - - - - - -/*! - * @brief This class represents the structure SequenceSequenceBoundsStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SequenceSequenceBoundsStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SequenceSequenceBoundsStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SequenceSequenceBoundsStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceBoundsStruct( - const SequenceSequenceBoundsStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceBoundsStruct( - SequenceSequenceBoundsStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceBoundsStruct& operator =( - const SequenceSequenceBoundsStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SequenceSequenceBoundsStruct that will be copied. - */ - eProsima_user_DllExport SequenceSequenceBoundsStruct& operator =( - SequenceSequenceBoundsStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SequenceSequenceBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SequenceSequenceBoundsStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SequenceSequenceBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SequenceSequenceBoundsStruct& x) const; - - /*! - * @brief This function copies the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be copied in member my_sequence_sequence - */ - eProsima_user_DllExport void my_sequence_sequence( - const std::vector>& _my_sequence_sequence); - - /*! - * @brief This function moves the value in member my_sequence_sequence - * @param _my_sequence_sequence New value to be moved in member my_sequence_sequence - */ - eProsima_user_DllExport void my_sequence_sequence( - std::vector>&& _my_sequence_sequence); - - /*! - * @brief This function returns a constant reference to member my_sequence_sequence - * @return Constant reference to member my_sequence_sequence - */ - eProsima_user_DllExport const std::vector>& my_sequence_sequence() const; - - /*! - * @brief This function returns a reference to member my_sequence_sequence - * @return Reference to member my_sequence_sequence - */ - eProsima_user_DllExport std::vector>& my_sequence_sequence(); - - - /*! - * @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 SequenceSequenceBoundsStruct& 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 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: - - std::vector> m_my_sequence_sequence; - -}; - - - - - -/*! - * @brief This class represents the structure MapStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MapStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapStruct that will be copied. - */ - eProsima_user_DllExport MapStruct( - const MapStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapStruct that will be copied. - */ - eProsima_user_DllExport MapStruct( - MapStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapStruct that will be copied. - */ - eProsima_user_DllExport MapStruct& operator =( - const MapStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapStruct that will be copied. - */ - eProsima_user_DllExport MapStruct& operator =( - MapStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapStruct& x) const; - - /*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ - eProsima_user_DllExport void my_map( - const std::map& _my_map); - - /*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ - eProsima_user_DllExport void my_map( - std::map&& _my_map); - - /*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ - eProsima_user_DllExport const std::map& my_map() const; - - /*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ - eProsima_user_DllExport std::map& my_map(); - - - /*! - * @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 MapStruct& 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 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: - - std::map m_my_map; - -}; - - - - - -/*! - * @brief This class represents the structure MapStructEqual defined by the user in the IDL file. - * @ingroup Types - */ -class MapStructEqual -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapStructEqual(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapStructEqual(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapStructEqual that will be copied. - */ - eProsima_user_DllExport MapStructEqual( - const MapStructEqual& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapStructEqual that will be copied. - */ - eProsima_user_DllExport MapStructEqual( - MapStructEqual&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapStructEqual that will be copied. - */ - eProsima_user_DllExport MapStructEqual& operator =( - const MapStructEqual& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapStructEqual that will be copied. - */ - eProsima_user_DllExport MapStructEqual& operator =( - MapStructEqual&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapStructEqual object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapStructEqual& x) const; - - /*! - * @brief Comparison operator. - * @param x MapStructEqual object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapStructEqual& x) const; - - /*! - * @brief This function copies the value in member my_map_equal - * @param _my_map_equal New value to be copied in member my_map_equal - */ - eProsima_user_DllExport void my_map_equal( - const std::map& _my_map_equal); - - /*! - * @brief This function moves the value in member my_map_equal - * @param _my_map_equal New value to be moved in member my_map_equal - */ - eProsima_user_DllExport void my_map_equal( - std::map&& _my_map_equal); - - /*! - * @brief This function returns a constant reference to member my_map_equal - * @return Constant reference to member my_map_equal - */ - eProsima_user_DllExport const std::map& my_map_equal() const; - - /*! - * @brief This function returns a reference to member my_map_equal - * @return Reference to member my_map_equal - */ - eProsima_user_DllExport std::map& my_map_equal(); - - - /*! - * @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 MapStructEqual& 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 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: - - std::map m_my_map_equal; - -}; - - - - - -/*! - * @brief This class represents the structure MapBadKeyStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MapBadKeyStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapBadKeyStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapBadKeyStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapBadKeyStruct that will be copied. - */ - eProsima_user_DllExport MapBadKeyStruct( - const MapBadKeyStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapBadKeyStruct that will be copied. - */ - eProsima_user_DllExport MapBadKeyStruct( - MapBadKeyStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapBadKeyStruct that will be copied. - */ - eProsima_user_DllExport MapBadKeyStruct& operator =( - const MapBadKeyStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapBadKeyStruct that will be copied. - */ - eProsima_user_DllExport MapBadKeyStruct& operator =( - MapBadKeyStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapBadKeyStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapBadKeyStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapBadKeyStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapBadKeyStruct& x) const; - - /*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ - eProsima_user_DllExport void my_map( - const std::map& _my_map); - - /*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ - eProsima_user_DllExport void my_map( - std::map&& _my_map); - - /*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ - eProsima_user_DllExport const std::map& my_map() const; - - /*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ - eProsima_user_DllExport std::map& my_map(); - - - /*! - * @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 MapBadKeyStruct& 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 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: - - std::map m_my_map; - -}; - - - - - -/*! - * @brief This class represents the structure MapBadElemStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MapBadElemStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapBadElemStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapBadElemStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapBadElemStruct that will be copied. - */ - eProsima_user_DllExport MapBadElemStruct( - const MapBadElemStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapBadElemStruct that will be copied. - */ - eProsima_user_DllExport MapBadElemStruct( - MapBadElemStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapBadElemStruct that will be copied. - */ - eProsima_user_DllExport MapBadElemStruct& operator =( - const MapBadElemStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapBadElemStruct that will be copied. - */ - eProsima_user_DllExport MapBadElemStruct& operator =( - MapBadElemStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapBadElemStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapBadElemStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapBadElemStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapBadElemStruct& x) const; - - /*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ - eProsima_user_DllExport void my_map( - const std::map& _my_map); - - /*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ - eProsima_user_DllExport void my_map( - std::map&& _my_map); - - /*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ - eProsima_user_DllExport const std::map& my_map() const; - - /*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ - eProsima_user_DllExport std::map& my_map(); - - - /*! - * @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 MapBadElemStruct& 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 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: - - std::map m_my_map; - -}; - - - - - -/*! - * @brief This class represents the structure MapBoundsStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MapBoundsStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapBoundsStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapBoundsStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapBoundsStruct( - const MapBoundsStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapBoundsStruct( - MapBoundsStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapBoundsStruct& operator =( - const MapBoundsStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapBoundsStruct& operator =( - MapBoundsStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapBoundsStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapBoundsStruct& x) const; - - /*! - * @brief This function copies the value in member my_map - * @param _my_map New value to be copied in member my_map - */ - eProsima_user_DllExport void my_map( - const std::map& _my_map); - - /*! - * @brief This function moves the value in member my_map - * @param _my_map New value to be moved in member my_map - */ - eProsima_user_DllExport void my_map( - std::map&& _my_map); - - /*! - * @brief This function returns a constant reference to member my_map - * @return Constant reference to member my_map - */ - eProsima_user_DllExport const std::map& my_map() const; - - /*! - * @brief This function returns a reference to member my_map - * @return Reference to member my_map - */ - eProsima_user_DllExport std::map& my_map(); - - - /*! - * @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 MapBoundsStruct& 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 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: - - std::map m_my_map; - -}; - - - - - - - -/*! - * @brief This class represents the structure MapMapStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MapMapStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapMapStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapMapStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapMapStruct that will be copied. - */ - eProsima_user_DllExport MapMapStruct( - const MapMapStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapMapStruct that will be copied. - */ - eProsima_user_DllExport MapMapStruct( - MapMapStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapMapStruct that will be copied. - */ - eProsima_user_DllExport MapMapStruct& operator =( - const MapMapStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapMapStruct that will be copied. - */ - eProsima_user_DllExport MapMapStruct& operator =( - MapMapStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapMapStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapMapStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapMapStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapMapStruct& x) const; - - /*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ - eProsima_user_DllExport void my_map_map( - const std::map>& _my_map_map); - - /*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ - eProsima_user_DllExport void my_map_map( - std::map>&& _my_map_map); - - /*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ - eProsima_user_DllExport const std::map>& my_map_map() const; - - /*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ - eProsima_user_DllExport std::map>& my_map_map(); - - - /*! - * @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 MapMapStruct& 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 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: - - std::map> m_my_map_map; - -}; - - - - - - - -/*! - * @brief This class represents the structure MapMapBoundsStruct defined by the user in the IDL file. - * @ingroup Types - */ -class MapMapBoundsStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport MapMapBoundsStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~MapMapBoundsStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object MapMapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapMapBoundsStruct( - const MapMapBoundsStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object MapMapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapMapBoundsStruct( - MapMapBoundsStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object MapMapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapMapBoundsStruct& operator =( - const MapMapBoundsStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object MapMapBoundsStruct that will be copied. - */ - eProsima_user_DllExport MapMapBoundsStruct& operator =( - MapMapBoundsStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x MapMapBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const MapMapBoundsStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x MapMapBoundsStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const MapMapBoundsStruct& x) const; - - /*! - * @brief This function copies the value in member my_map_map - * @param _my_map_map New value to be copied in member my_map_map - */ - eProsima_user_DllExport void my_map_map( - const std::map>& _my_map_map); - - /*! - * @brief This function moves the value in member my_map_map - * @param _my_map_map New value to be moved in member my_map_map - */ - eProsima_user_DllExport void my_map_map( - std::map>&& _my_map_map); - - /*! - * @brief This function returns a constant reference to member my_map_map - * @return Constant reference to member my_map_map - */ - eProsima_user_DllExport const std::map>& my_map_map() const; - - /*! - * @brief This function returns a reference to member my_map_map - * @return Reference to member my_map_map - */ - eProsima_user_DllExport std::map>& my_map_map(); - - - /*! - * @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 MapMapBoundsStruct& 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 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: - - std::map> m_my_map_map; - -}; - - - -/*! - * @brief This class represents the union SimpleUnion defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleUnion that will be copied. - */ - eProsima_user_DllExport SimpleUnion( - const SimpleUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleUnion that will be copied. - */ - eProsima_user_DllExport SimpleUnion( - SimpleUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleUnion that will be copied. - */ - eProsima_user_DllExport SimpleUnion& operator =( - const SimpleUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleUnion that will be copied. - */ - eProsima_user_DllExport SimpleUnion& operator =( - SimpleUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int32_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int32_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int32_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - int32_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first(); - - - /*! - * @brief This function sets a value in member second - * @param _second New value for member second - */ - eProsima_user_DllExport void second( - int64_t _second); - - /*! - * @brief This function returns the value of member second - * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second(); - - - /*! - * @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 SimpleUnion& 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); - - - - - -private: - - int32_t m__d; - - int32_t m_first; - int64_t m_second; -}; - - - -/*! - * @brief This class represents the union SimpleUnionNames defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleUnionNames -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleUnionNames(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleUnionNames(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleUnionNames that will be copied. - */ - eProsima_user_DllExport SimpleUnionNames( - const SimpleUnionNames& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleUnionNames that will be copied. - */ - eProsima_user_DllExport SimpleUnionNames( - SimpleUnionNames&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleUnionNames that will be copied. - */ - eProsima_user_DllExport SimpleUnionNames& operator =( - const SimpleUnionNames& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleUnionNames that will be copied. - */ - eProsima_user_DllExport SimpleUnionNames& operator =( - SimpleUnionNames&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionNames object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleUnionNames& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionNames object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleUnionNames& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int32_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int32_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int32_t& _d(); - - /*! - * @brief This function sets a value in member first_case - * @param _first_case New value for member first_case - */ - eProsima_user_DllExport void first_case( - int32_t _first_case); - - /*! - * @brief This function returns the value of member first_case - * @return Value of member first_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first_case() const; - - /*! - * @brief This function returns a reference to member first_case - * @return Reference to member first_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first_case(); - - - /*! - * @brief This function sets a value in member second_case - * @param _second_case New value for member second_case - */ - eProsima_user_DllExport void second_case( - int64_t _second_case); - - /*! - * @brief This function returns the value of member second_case - * @return Value of member second_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second_case() const; - - /*! - * @brief This function returns a reference to member second_case - * @return Reference to member second_case - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second_case(); - - - /*! - * @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 SimpleUnionNames& 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); - - - - - -private: - - int32_t m__d; - - int32_t m_first_case; - int64_t m_second_case; -}; - - - -/*! - * @brief This class represents the union SimpleTypeUnion defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleTypeUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleTypeUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleTypeUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleTypeUnion that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnion( - const SimpleTypeUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleTypeUnion that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnion( - SimpleTypeUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleTypeUnion that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnion& operator =( - const SimpleTypeUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleTypeUnion that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnion& operator =( - SimpleTypeUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleTypeUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleTypeUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleTypeUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleTypeUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int32_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int32_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int32_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - uint8_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport uint8_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport uint8_t& first(); - - - /*! - * @brief This function sets a value in member second - * @param _second New value for member second - */ - eProsima_user_DllExport void second( - int64_t _second); - - /*! - * @brief This function returns the value of member second - * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second(); - - - /*! - * @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 SimpleTypeUnion& 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); - - - - - -private: - - int32_t m__d; - - uint8_t m_first; - int64_t m_second; -}; - - - -/*! - * @brief This class represents the union SimpleBadUnion defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleBadUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleBadUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleBadUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleBadUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadUnion( - const SimpleBadUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleBadUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadUnion( - SimpleBadUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleBadUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadUnion& operator =( - const SimpleBadUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleBadUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadUnion& operator =( - SimpleBadUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleBadUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleBadUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleBadUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleBadUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - int32_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport int32_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport int32_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - int32_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first(); - - - /*! - * @brief This function sets a value in member second - * @param _second New value for member second - */ - eProsima_user_DllExport void second( - int64_t _second); - - /*! - * @brief This function returns the value of member second - * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second(); - - - /*! - * @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 SimpleBadUnion& 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); - - - - - -private: - - int32_t m__d; - - int32_t m_first; - int64_t m_second; -}; - - - -/*! - * @brief This class represents the union SimpleBadDiscUnion defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleBadDiscUnion -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleBadDiscUnion(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleBadDiscUnion(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleBadDiscUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadDiscUnion( - const SimpleBadDiscUnion& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleBadDiscUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadDiscUnion( - SimpleBadDiscUnion&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleBadDiscUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadDiscUnion& operator =( - const SimpleBadDiscUnion& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleBadDiscUnion that will be copied. - */ - eProsima_user_DllExport SimpleBadDiscUnion& operator =( - SimpleBadDiscUnion&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleBadDiscUnion object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleBadDiscUnion& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleBadDiscUnion object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleBadDiscUnion& x) const; - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d( - uint8_t __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport uint8_t _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport uint8_t& _d(); - - /*! - * @brief This function sets a value in member first - * @param _first New value for member first - */ - eProsima_user_DllExport void first( - int32_t _first); - - /*! - * @brief This function returns the value of member first - * @return Value of member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t first() const; - - /*! - * @brief This function returns a reference to member first - * @return Reference to member first - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int32_t& first(); - - - /*! - * @brief This function sets a value in member second - * @param _second New value for member second - */ - eProsima_user_DllExport void second( - int64_t _second); - - /*! - * @brief This function returns the value of member second - * @return Value of member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t second() const; - - /*! - * @brief This function returns a reference to member second - * @return Reference to member second - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport int64_t& second(); - - - /*! - * @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 SimpleBadDiscUnion& 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); - - - - - -private: - - uint8_t m__d; - - int32_t m_first; - int64_t m_second; -}; - - - -/*! - * @brief This class represents the structure SimpleUnionStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionStruct( - const SimpleUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionStruct( - SimpleUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionStruct& operator =( - const SimpleUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionStruct& operator =( - SimpleUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleUnion& my_union(); - - - /*! - * @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 SimpleUnionStruct& 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 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: - - SimpleUnion m_my_union; - -}; - - - -/*! - * @brief This class represents the structure SimpleUnionStructEqual defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleUnionStructEqual -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleUnionStructEqual(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleUnionStructEqual(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleUnionStructEqual that will be copied. - */ - eProsima_user_DllExport SimpleUnionStructEqual( - const SimpleUnionStructEqual& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleUnionStructEqual that will be copied. - */ - eProsima_user_DllExport SimpleUnionStructEqual( - SimpleUnionStructEqual&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleUnionStructEqual that will be copied. - */ - eProsima_user_DllExport SimpleUnionStructEqual& operator =( - const SimpleUnionStructEqual& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleUnionStructEqual that will be copied. - */ - eProsima_user_DllExport SimpleUnionStructEqual& operator =( - SimpleUnionStructEqual&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionStructEqual object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleUnionStructEqual& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionStructEqual object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleUnionStructEqual& x) const; - - /*! - * @brief This function copies the value in member my_union_equal - * @param _my_union_equal New value to be copied in member my_union_equal - */ - eProsima_user_DllExport void my_union_equal( - const SimpleUnion& _my_union_equal); - - /*! - * @brief This function moves the value in member my_union_equal - * @param _my_union_equal New value to be moved in member my_union_equal - */ - eProsima_user_DllExport void my_union_equal( - SimpleUnion&& _my_union_equal); - - /*! - * @brief This function returns a constant reference to member my_union_equal - * @return Constant reference to member my_union_equal - */ - eProsima_user_DllExport const SimpleUnion& my_union_equal() const; - - /*! - * @brief This function returns a reference to member my_union_equal - * @return Reference to member my_union_equal - */ - eProsima_user_DllExport SimpleUnion& my_union_equal(); - - - /*! - * @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 SimpleUnionStructEqual& 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 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: - - SimpleUnion m_my_union_equal; - -}; - - - -/*! - * @brief This class represents the structure SimpleUnionNamesStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleUnionNamesStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleUnionNamesStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleUnionNamesStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleUnionNamesStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionNamesStruct( - const SimpleUnionNamesStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleUnionNamesStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionNamesStruct( - SimpleUnionNamesStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleUnionNamesStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionNamesStruct& operator =( - const SimpleUnionNamesStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleUnionNamesStruct that will be copied. - */ - eProsima_user_DllExport SimpleUnionNamesStruct& operator =( - SimpleUnionNamesStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionNamesStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleUnionNamesStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleUnionNamesStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleUnionNamesStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleUnionNames& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleUnionNames&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleUnionNames& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleUnionNames& my_union(); - - - /*! - * @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 SimpleUnionNamesStruct& 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 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: - - SimpleUnionNames m_my_union; - -}; - - - -/*! - * @brief This class represents the structure SimpleTypeUnionStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleTypeUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleTypeUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleTypeUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleTypeUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnionStruct( - const SimpleTypeUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleTypeUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnionStruct( - SimpleTypeUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleTypeUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnionStruct& operator =( - const SimpleTypeUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleTypeUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleTypeUnionStruct& operator =( - SimpleTypeUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleTypeUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleTypeUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleTypeUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleTypeUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleTypeUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleTypeUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleTypeUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleTypeUnion& my_union(); - - - /*! - * @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 SimpleTypeUnionStruct& 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 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: - - SimpleTypeUnion m_my_union; - -}; - - - -/*! - * @brief This class represents the structure SimpleBadUnionStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SimpleBadUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimpleBadUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimpleBadUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimpleBadUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleBadUnionStruct( - const SimpleBadUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimpleBadUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleBadUnionStruct( - SimpleBadUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimpleBadUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleBadUnionStruct& operator =( - const SimpleBadUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimpleBadUnionStruct that will be copied. - */ - eProsima_user_DllExport SimpleBadUnionStruct& operator =( - SimpleBadUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimpleBadUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimpleBadUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimpleBadUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimpleBadUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleBadUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleBadUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleBadUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleBadUnion& my_union(); - - - /*! - * @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 SimpleBadUnionStruct& 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 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: - - SimpleBadUnion m_my_union; - -}; - - - -/*! - * @brief This class represents the structure SimplBadDiscUnionStruct defined by the user in the IDL file. - * @ingroup Types - */ -class SimplBadDiscUnionStruct -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport SimplBadDiscUnionStruct(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~SimplBadDiscUnionStruct(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. - */ - eProsima_user_DllExport SimplBadDiscUnionStruct( - const SimplBadDiscUnionStruct& x); - - /*! - * @brief Move constructor. - * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. - */ - eProsima_user_DllExport SimplBadDiscUnionStruct( - SimplBadDiscUnionStruct&& x) noexcept; - - /*! - * @brief Copy assignment. - * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. - */ - eProsima_user_DllExport SimplBadDiscUnionStruct& operator =( - const SimplBadDiscUnionStruct& x); - - /*! - * @brief Move assignment. - * @param x Reference to the object SimplBadDiscUnionStruct that will be copied. - */ - eProsima_user_DllExport SimplBadDiscUnionStruct& operator =( - SimplBadDiscUnionStruct&& x) noexcept; - - /*! - * @brief Comparison operator. - * @param x SimplBadDiscUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator ==( - const SimplBadDiscUnionStruct& x) const; - - /*! - * @brief Comparison operator. - * @param x SimplBadDiscUnionStruct object to compare. - */ - eProsima_user_DllExport bool operator !=( - const SimplBadDiscUnionStruct& x) const; - - /*! - * @brief This function copies the value in member my_union - * @param _my_union New value to be copied in member my_union - */ - eProsima_user_DllExport void my_union( - const SimpleBadDiscUnion& _my_union); - - /*! - * @brief This function moves the value in member my_union - * @param _my_union New value to be moved in member my_union - */ - eProsima_user_DllExport void my_union( - SimpleBadDiscUnion&& _my_union); - - /*! - * @brief This function returns a constant reference to member my_union - * @return Constant reference to member my_union - */ - eProsima_user_DllExport const SimpleBadDiscUnion& my_union() const; - - /*! - * @brief This function returns a reference to member my_union - * @return Reference to member my_union - */ - eProsima_user_DllExport SimpleBadDiscUnion& my_union(); - - - /*! - * @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 SimplBadDiscUnionStruct& 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 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: - - SimpleBadDiscUnion m_my_union; - -}; - - -#endif // _FAST_DDS_GENERATED_TYPES_H_ - - - -#endif // FASTCDR_VERSION_MAJOR == 1 diff --git a/utils/scripts/update_generated_code_from_idl.sh b/utils/scripts/update_generated_code_from_idl.sh index cd92641bf91..3cd1dbd405c 100755 --- a/utils/scripts/update_generated_code_from_idl.sh +++ b/utils/scripts/update_generated_code_from_idl.sh @@ -76,14 +76,14 @@ for idl_file in "${idl_files[@]}"; do od_entry_split=(${od_entry//\|/ }) for od_entry_split_element in ${od_entry_split[@]:1}; do od_arg="-d ${od_entry_split_element}" - fastddsgen -cdr both -replace $to_arg $cs_arg $od_arg "$file_from_gen" + fastddsgen -replace $to_arg $cs_arg $od_arg "$file_from_gen" done break fi done if $not_processed ; then - fastddsgen -cdr both -replace $to_arg $cs_arg "$file_from_gen" + fastddsgen -replace $to_arg $cs_arg "$file_from_gen" fi if [[ $? != 0 ]]; then