OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
Topic.hpp
Go to the documentation of this file.
1 #ifndef OMG_DDS_TTOPIC_TOPIC_HPP_
2 #define OMG_DDS_TTOPIC_TOPIC_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/conformance.hpp>
23 #include <dds/core/types.hpp>
24 #include <dds/core/ref_traits.hpp>
28 #include <dds/topic/AnyTopic.hpp>
29 
30 
31 namespace dds
32 {
33 namespace topic
34 {
35 template <typename T>
36 class Topic;
37 
38 template <typename T>
40 }
41 }
42 
43 
74 template <typename T>
76 {
77 public:
81  typedef T DataType;
82 
87 
88 public:
91 
92 public:
94  virtual ~Topic();
141  const std::string& topic_name);
142 
188  const std::string& topic_name,
189  const std::string& type_name);
190 
254  const std::string& topic_name,
258 
323  const std::string& topic_name,
324  const std::string& type_name,
325  const dds::topic::qos::TopicQos& qos,
328 
329  #if defined (OMG_DDS_X_TYPE_DYNAMIC_TYPES_SUPPORT)
330 
347  const std::string& topic_name,
348  const dds::core::xtypes::DynamicType type);
349 
369  const std::string& topic_name,
370  const dds::core::xtypes::DynamicType type
371  const dds::topic::qos::TopicQos& qos,
374 
375  #endif /* OMG_DDS_X_TYPE_DYNAMIC_TYPES_SUPPORT */
376 
377 public:
441  void listener(Listener* listener,
442  const ::dds::core::status::StatusMask& event_mask);
443 
453  Listener* listener() const;
454 
455 };
456 
457 
458 #endif /* OMG_DDS_TTOPIC_TOPIC_HPP_ */
Typeless base class for the typed Topic.
Definition: AnyTopic.hpp:53
TopicListener< T > Listener
Definition: Topic.hpp:86
static StatusMask none()
Definition: State.hpp:205
#define OMG_DDS_IMPLICIT_REF_BASE(TYPE)
Definition: refmacros.hpp:70
Topic is the most basic description of the data to be published and subscribed.
Definition: Topic.hpp:36
A DomainParticipant represents the local membership of the application in a Domain.
const std::string & type_name() const
Definition: array.hpp:23
Topic(const dds::domain::DomainParticipant &dp, const std::string &topic_name)
Definition: TopicImpl.hpp:52
#define OMG_DDS_REF_TYPE_PROTECTED_DC_T(TYPE, BASE, T_PARAM, DELEGATE)
Definition: refmacros.hpp:166
StatusMask is a bitmap or bitset field.
Definition: State.hpp:144
This struct provides the basic mechanism for an application to specify Quality of Service attributes ...
Definition: TopicQos.hpp:67
Listener * listener() const
Definition: TopicImpl.hpp:139
dds::topic::qos::TopicQos qos() const
Topic events Listener.
Definition: Topic.hpp:39