Fast RTPS  Version 2.14.1
Fast RTPS
Loading...
Searching...
No Matches
DynamicDataFactory.h
1// Copyright 2018 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 TYPES_DYNAMIC_DATA_FACTORY_H
16#define TYPES_DYNAMIC_DATA_FACTORY_H
17
18#include <fastrtps/types/TypesBase.h>
19#include <fastrtps/types/DynamicTypePtr.h>
20#include <fastrtps/types/DynamicTypeBuilder.h>
21#include <fastrtps/types/DynamicType.h>
22#include <fastrtps/types/DynamicData.h>
23#include <mutex>
24
25//#define DISABLE_DYNAMIC_MEMORY_CHECK
26
27namespace eprosima {
28namespace fastrtps {
29namespace types {
30
32{
33protected:
35
37 DynamicData* pData,
38 DynamicType_ptr pType);
39
40#ifndef DISABLE_DYNAMIC_MEMORY_CHECK
41 std::vector<DynamicData*> dynamic_datas_;
42 mutable std::recursive_mutex mutex_;
43#endif
44
45public:
47
48 RTPS_DllAPI static DynamicDataFactory* get_instance();
49
50 RTPS_DllAPI static ReturnCode_t delete_instance();
51
53
55
56 RTPS_DllAPI DynamicData* create_copy(const DynamicData* pData);
57
59
60 RTPS_DllAPI bool is_empty() const;
61};
62
63
64} // namespace types
65} // namespace fastrtps
66} // namespace eprosima
67
68#endif // TYPES_DYNAMIC_DATA_FACTORY_H
Definition DynamicDataFactory.h:32
static RTPS_DllAPI DynamicDataFactory * get_instance()
RTPS_DllAPI ReturnCode_t delete_data(DynamicData *pData)
std::vector< DynamicData * > dynamic_datas_
Definition DynamicDataFactory.h:41
static RTPS_DllAPI ReturnCode_t delete_instance()
RTPS_DllAPI DynamicData * create_copy(const DynamicData *pData)
RTPS_DllAPI DynamicData * create_data(DynamicType_ptr pType)
ReturnCode_t create_members(DynamicData *pData, DynamicType_ptr pType)
std::recursive_mutex mutex_
Definition DynamicDataFactory.h:42
RTPS_DllAPI DynamicData * create_data(DynamicTypeBuilder *pBuilder)
Definition DynamicData.h:44
Definition DynamicTypePtr.h:27
Definition DynamicTypeBuilder.h:32
This class represents the enumeration ReturnCode_t.
Definition TypesBase.h:190
eProsima namespace.
Definition LibrarySettingsAttributes.h:23