Fast RTPS  Version 2.5.0
Fast RTPS
DynamicTypeBuilderPtr.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_TYPE_BUILDER_PTR_H
16 #define TYPES_DYNAMIC_TYPE_BUILDER_PTR_H
17 
18 #include <fastrtps/types/TypesBase.h>
19 
20 namespace eprosima {
21 namespace fastrtps {
22 namespace types {
23 
24 class DynamicTypeBuilder;
25 
26 class DynamicTypeBuilder_ptr : public std::shared_ptr<DynamicTypeBuilder>
27 {
28 public:
29 
30  typedef std::shared_ptr<DynamicTypeBuilder> Base;
31 
32  using Base::operator ->;
33  using Base::operator *;
34  using Base::operator bool;
35 
36  RTPS_DllAPI DynamicTypeBuilder_ptr()
37  {
38  }
39 
41  DynamicTypeBuilder* pType);
42 
44  DynamicTypeBuilder_ptr&& other) = default;
45 
47  DynamicTypeBuilder_ptr&&) = default;
48 
49  RTPS_DllAPI bool operator !=(
50  std::nullptr_t) const
51  {
52  return bool(*this);
53  }
54 
55  RTPS_DllAPI bool operator ==(
56  std::nullptr_t) const
57  {
58  return !*this;
59  }
60 
61 };
62 
63 } // namespace types
64 } // namespace fastrtps
65 } // namespace eprosima
66 
67 #endif // TYPES_DYNAMIC_TYPE_BUILDER_PTR_H
Definition: DynamicTypeBuilderPtr.h:27
RTPS_DllAPI bool operator!=(std::nullptr_t) const
Definition: DynamicTypeBuilderPtr.h:49
RTPS_DllAPI DynamicTypeBuilder_ptr()
Definition: DynamicTypeBuilderPtr.h:36
RTPS_DllAPI DynamicTypeBuilder_ptr(DynamicTypeBuilder_ptr &&other)=default
std::shared_ptr< DynamicTypeBuilder > Base
Definition: DynamicTypeBuilderPtr.h:30
RTPS_DllAPI DynamicTypeBuilder_ptr & operator=(DynamicTypeBuilder_ptr &&)=default
RTPS_DllAPI bool operator==(std::nullptr_t) const
Definition: DynamicTypeBuilderPtr.h:55
RTPS_DllAPI DynamicTypeBuilder_ptr(DynamicTypeBuilder *pType)
Definition: DynamicTypeBuilder.h:32
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23