Fast DDS  Version 3.1.2
Fast DDS
Loading...
Searching...
No Matches
DynamicDataFactory.hpp
1// Copyright 2023 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef FASTDDS_DDS_XTYPES_DYNAMIC_TYPES__DYNAMICDATAFACTORY_HPP
16#define FASTDDS_DDS_XTYPES_DYNAMIC_TYPES__DYNAMICDATAFACTORY_HPP
17
18#include <memory>
19
20#include <fastdds/dds/core/ReturnCode.hpp>
21#include <fastdds/dds/xtypes/dynamic_types/DynamicData.hpp>
22#include <fastdds/fastdds_dll.hpp>
23
24namespace eprosima {
25namespace fastdds {
26namespace dds {
27
28class DynamicDataFactory : public std::enable_shared_from_this<DynamicDataFactory>
29{
30public:
31
33
40
47 FASTDDS_EXPORTED_API static ReturnCode_t delete_instance();
48
55 FASTDDS_EXPORTED_API virtual traits<DynamicData>::ref_type create_data(
57
65 FASTDDS_EXPORTED_API virtual ReturnCode_t delete_data(
67
68protected:
69
70 virtual ~DynamicDataFactory() = default;
71
72};
73
74} // namespace dds
75} // namespace fastdds
76} // namespace eprosima
77
78#endif // FASTDDS_DDS_XTYPES_DYNAMIC_TYPES__DYNAMICDATAFACTORY_HPP
Definition DynamicDataFactory.hpp:29
typename traits< DynamicDataFactory >::ref_type _ref_type
Definition DynamicDataFactory.hpp:32
virtual FASTDDS_EXPORTED_API ReturnCode_t delete_data(traits< DynamicData >::ref_type &data)=0
Resets the internal reference if it is cached.
static FASTDDS_EXPORTED_API traits< DynamicDataFactory >::ref_type get_instance()
Returns the singleton factory object.
static FASTDDS_EXPORTED_API ReturnCode_t delete_instance()
Resets the singleton reference.
virtual FASTDDS_EXPORTED_API traits< DynamicData >::ref_type create_data(traits< DynamicType >::ref_type type)=0
Creates a new DynamicData reference based on the given DynamicType reference.
Definition DomainParticipant.hpp:45
int32_t ReturnCode_t
Definition DDSReturnCode.hpp:59
eProsima namespace.
typename ::std::shared_ptr< T > ref_type
Definition type_traits.hpp:29