Fast RTPS  Version 2.14.1
Fast RTPS
Loading...
Searching...
No Matches
DynamicTypePtr.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_PTR_H
16#define TYPES_DYNAMIC_TYPE_PTR_H
17
18#include <fastrtps/types/TypesBase.h>
19
20namespace eprosima {
21namespace fastrtps {
22namespace types {
23
24class DynamicType;
25
26class DynamicType_ptr : public std::shared_ptr<DynamicType>
27{
28public:
29
30 typedef std::shared_ptr<DynamicType> Base;
31
32 using Base::operator ->;
33 using Base::operator *;
34 using Base::operator bool;
35
37 {
38 }
39
40 RTPS_DllAPI explicit DynamicType_ptr(
41 DynamicType* pType);
42
43 RTPS_DllAPI DynamicType_ptr(
44 const DynamicType_ptr& other) = default;
45
46 RTPS_DllAPI DynamicType_ptr(
47 DynamicType_ptr&& other) = default;
48
50 const DynamicType_ptr&) = default;
51
53 DynamicType_ptr&&) = default;
54
57
58 RTPS_DllAPI bool operator !=(
59 std::nullptr_t) const
60 {
61 return bool(*this);
62 }
63
64 RTPS_DllAPI bool operator ==(
65 std::nullptr_t) const
66 {
67 return !*this;
68 }
69
70};
71
72} // namespace types
73} // namespace fastrtps
74} // namespace eprosima
75
76#endif // TYPES_DYNAMIC_TYPE_PTR_H
Definition DynamicTypePtr.h:27
RTPS_DllAPI DynamicType_ptr(DynamicType_ptr &&other)=default
RTPS_DllAPI bool operator!=(std::nullptr_t) const
Definition DynamicTypePtr.h:58
DynamicType_ptr()
Definition DynamicTypePtr.h:36
RTPS_DllAPI DynamicType_ptr & operator=(const DynamicType_ptr &)=default
RTPS_DllAPI DynamicType_ptr(DynamicType *pType)
std::shared_ptr< DynamicType > Base
Definition DynamicTypePtr.h:30
RTPS_DllAPI bool operator==(std::nullptr_t) const
Definition DynamicTypePtr.h:64
RTPS_DllAPI DynamicType_ptr(const DynamicType_ptr &other)=default
Definition DynamicType.h:38
eProsima namespace.
Definition LibrarySettingsAttributes.h:23