DDS-PSM-C++  1.0
ISO C++ API for OpenSplice DDS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
TPublisher.hpp
Go to the documentation of this file.
1 #ifndef OMG_TDDS_PUB_PUBLISHER_HPP_
2 #define OMG_TDDS_PUB_PUBLISHER_HPP_
3 
4 /* Copyright 2010, Object Management Group, Inc.
5  * Copyright 2010, PrismTech, Corp.
6  * Copyright 2010, Real-Time Innovations, Inc.
7  * All rights reserved.
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #include <dds/core/types.hpp>
23 #include <dds/core/TEntity.hpp>
28 
29 
30 
31 namespace dds { namespace pub {
32  template <typename DELEGATE>
33  class TPublisher;
34 
35  class PublisherListener;
36 } }
37 
46 template <typename DELEGATE>
47 class dds::pub::TPublisher : public dds::core::TEntity<DELEGATE> {
48 public:
50 
51 public:
53 
54 
55 
59  TPublisher(const dds::domain::DomainParticipant& dp);
60 
72  TPublisher(const dds::domain::DomainParticipant& dp,
73  const dds::pub::qos::PublisherQos& qos,
74  dds::pub::PublisherListener* listener = NULL,
75  const dds::core::status::StatusMask& mask = dds::core::status::StatusMask::all());
76 
77  ~TPublisher();
78 
79  //==========================================================================
80 
84  const dds::pub::qos::PublisherQos qos() const;
85 
86 
92  void qos(const dds::pub::qos::PublisherQos& pqos);
93 
94 
100  TPublisher& operator <<(const dds::pub::qos::PublisherQos& the_qos);
101 
105  TPublisher& operator >> (dds::pub::qos::PublisherQos& the_qos);
106 
115  TPublisher& default_writer_qos(const dds::pub::qos::DataWriterQos& dwqos);
116 
122  dds::pub::qos::DataWriterQos default_writer_qos() const;
123 
124  //==========================================================================
125 
132  void listener(Listener* plistener,
133  const dds::core::status::StatusMask& event_mask);
134 
138  Listener* listener() const;
139 
140  //==========================================================================
141 
151  void wait_for_acknowledgments(const dds::core::Duration& timeout);
152 
153 
154 
155  //==========================================================================
156 
160  const dds::domain::DomainParticipant& participant() const;
161 
162 };
163 
164 
165 #endif /* OMG_TDDS_PUB_PUBLISHER_HPP_ */