OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
PublisherImpl.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_PUB_TPUBLISHER_IMPL_HPP_
22 #define OSPL_DDS_PUB_TPUBLISHER_IMPL_HPP_
23 
28 /*
29  * OMG PSM class declaration
30  */
31 #include <dds/pub/Publisher.hpp>
32 #include <org/opensplice/core/ReportUtils.hpp>
33 
34 // Implementation
35 
36 namespace dds
37 {
38 namespace pub
39 {
40 
41 
43  : ::dds::core::Reference(new DELEGATE(dp,
44  dp.default_publisher_qos(),
45  NULL,
46  dds::core::status::StatusMask::none()))
47 {
48  ISOCPP_REPORT_STACK_DDS_BEGIN(dp);
49  this->delegate()->init(this->impl_);
50 }
51 
52 
57  : ::dds::core::Reference(new DELEGATE(dp, qos, listener, mask))
58 {
59  ISOCPP_REPORT_STACK_DDS_BEGIN(dp);
60  this->delegate()->init(this->impl_);
61 }
62 
63 
64 Publisher::~Publisher() { }
65 
66 
68 {
69  ISOCPP_REPORT_STACK_DDS_BEGIN(*this);
70  return this->delegate()->qos();
71 }
72 
73 
75 {
76  ISOCPP_REPORT_STACK_DDS_BEGIN(*this);
77  this->delegate()->qos(pqos);
78 }
79 
80 
82 {
83  ISOCPP_REPORT_STACK_DDS_BEGIN(*this);
84  this->qos(qos);
85  return *this;
86 }
87 
88 
90 {
91  ISOCPP_REPORT_STACK_DDS_BEGIN(*this);
92  qos = this->qos();
93  return *this;
94 }
95 
96 
98 {
99  ISOCPP_REPORT_STACK_DDS_BEGIN(*this);
100  this->delegate()->default_datawriter_qos(dwqos);
101  return *this;
102 }
103 
104 
106 {
107  ISOCPP_REPORT_STACK_DDS_BEGIN(*this);
108  return this->delegate()->default_datawriter_qos();
109 }
110 
111 
112 void Publisher::listener(Listener* plistener, const dds::core::status::StatusMask& event_mask)
113 {
114  ISOCPP_REPORT_STACK_DDS_BEGIN(*this);
115  this->delegate()->listener(plistener, event_mask);
116 }
117 
118 
120 {
121  ISOCPP_REPORT_STACK_DDS_BEGIN(*this);
122  return this->delegate()->listener();
123 }
124 
125 
127 {
128  ISOCPP_REPORT_STACK_DDS_BEGIN(*this);
129  this->delegate()->wait_for_acknowledgments(timeout);
130 }
131 
132 
134 {
135  ISOCPP_REPORT_STACK_DDS_BEGIN(*this);
136  return this->delegate()->participant();
137 }
138 
139 }
140 }
141 
142 // End of implementation
143 
144 #endif /* OSPL_DDS_PUB_TPUBLISHER_IMPL_HPP_ */
Reference(dds::core::null_type &)
This object provides the basic mechanism for an application to specify Quality of Service attributes ...
Publisher events Listener.
Listener * listener() const
Publisher(const dds::domain::DomainParticipant &dp)
A DomainParticipant represents the local membership of the application in a Domain.
Publisher & operator<<(const dds::pub::qos::PublisherQos &qos)
const dds::domain::DomainParticipant & participant() const
Definition: array.hpp:23
const dds::pub::qos::PublisherQos & qos() const
void wait_for_acknowledgments(const dds::core::Duration &timeout)
StatusMask is a bitmap or bitset field.
Definition: State.hpp:144
Publisher & operator>>(dds::pub::qos::PublisherQos &qos)
dds::pub::qos::DataWriterQos default_datawriter_qos() const
This object provides the basic mechanism for an application to specify Quality of Service attributes ...
The Publisher acts on the behalf of one or several DataWriter objects that belong to it...
Definition: Publisher.hpp:55