OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
EntityQosImpl.hpp
Go to the documentation of this file.
1 /*
2  * Vortex OpenSplice
3  *
4  * This software and documentation are Copyright 2006 to 2021 ADLINK
5  * Technology Limited, its affiliated companies and licensors. All rights
6  * reserved.
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 #ifndef OSPL_DDS_CORE_TENTITYQOS_IMPL_HPP_
22 #define OSPL_DDS_CORE_TENTITYQOS_IMPL_HPP_
23 
28 /*
29  * OMG PSM class declaration
30  */
31 #include <dds/core/EntityQos.hpp>
32 
33 // Implementation
34 namespace dds
35 {
36 namespace core
37 {
38 
39 
40 EntityQos::EntityQos() : dds::core::Value() { }
41 
42 
43 EntityQos::EntityQos(const EntityQos& other)
44  : dds::core::Value(other.delegate()) { }
45 
46 
51 template <typename T>
52 EntityQos::EntityQos(const EntityQos<T>& qos) :
53  dds::core::Value(qos.delegate()) { }
57 EntityQos::~EntityQos() { }
58 
59 
64 template <typename POLICY>
65 EntityQos& EntityQos::policy(const POLICY& p)
66 {
67  this->dds::core::Value::delegate().policy(p);
68  return *this;
69 }
70 
71 
72 template <typename POLICY>
73 const POLICY& EntityQos::policy() const
74 {
75  return this->delegate().template policy<POLICY>();
76 }
77 
78 
79 template <typename POLICY>
80 POLICY& EntityQos::policy()
81 {
82  return this->delegate().template policy<POLICY>();
83 }
84 
85 
86 template <typename POLICY>
87 EntityQos& EntityQos::operator << (const POLICY& p)
88 {
89  this->policy(p);
90  return *this;
91 }
92 
93 
94 template <typename POLICY>
95 const EntityQos& EntityQos::operator >> (POLICY& p) const
96 {
97  p = this->policy<POLICY>();
98  return *this;
99 }
100 
101 
102 template <typename T>
103 EntityQos& EntityQos::operator = (const EntityQos<T>& other)
104 {
105  if(this != (EntityQos*)&other)
106  {
107  this->d_ = other.delegate();
108  }
109  return *this;
110 }
113 }
114 }
115 
116 // End of implementation
117 
118 #endif /* OSPL_DDS_CORE_TENTITYQOS_IMPL_HPP_ */
EntityQos & policy(const POLICY &p)
This class is the base for various value-type dds objects.
Definition: Value.hpp:28
Definition: array.hpp:23
std::ostream & operator<<(std::ostream &os, const dds::core::InstanceHandle< org::opensplice::core::InstanceHandleDelegate > &h)
QoS Container.
Definition: EntityQos.hpp:45