Go to the documentation of this file.00001 #ifndef OMG_TDDS_DOMAIN_DOMAIN_PARTICIPANT_HPP_
00002 #define OMG_TDDS_DOMAIN_DOMAIN_PARTICIPANT_HPP_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <string>
00023
00024 #include <dds/core/detail/conformance.hpp>
00025 #include <tdds/core/Entity.hpp>
00026 #include <dds/core/cond/StatusCondition.hpp>
00027 #include <dds/topic/qos/TopicQos.hpp>
00028 #include <dds/topic/Topic.hpp>
00029 #include <dds/topic/ContentFilteredTopic.hpp>
00030 #include <dds/topic/MultiTopic.hpp>
00031 #include <dds/pub/pubfwd.hpp>
00032 #include <dds/pub/qos/PublisherQos.hpp>
00033 #include <dds/pub/Publisher.hpp>
00034 #include <dds/sub/qos/SubscriberQos.hpp>
00035 #include <dds/sub/Subscriber.hpp>
00036 #include <dds/domain/domainfwd.hpp>
00037 #include <dds/domain/qos/DomainParticipantQos.hpp>
00038 #include <dds/core/macros.hpp>
00039
00040 namespace tdds { namespace domain {
00041
00042
00058 template <typename DELEGATE>
00059 class DomainParticipant : public tdds::core::Entity<DELEGATE> {
00060 public:
00061 typedef dds::domain::DomainParticipantListener Listener;
00062
00063 typedef dds::core::cond::StatusCondition<DomainParticipant>
00064 StatusCondition;
00065
00066 public:
00067 OMG_DDS_REF_TYPE(DomainParticipant, tdds::core::Entity, DELEGATE)
00068
00069 public:
00070 ~DomainParticipant() {
00071 OMG_DDS_LOG("MM", "~DomainParticipant()");
00072 }
00073
00074 public:
00084 StatusCondition status_condition() const{
00085 return this->delegate()->template status_condition<DomainParticipant>(*this);
00086 }
00087
00097 void listener(
00098 Listener* the_listener,
00099 const dds::core::status::StatusMask& event_mask) {
00100 this->delegate()->listener(the_listener, event_mask);
00101 }
00102
00106 Listener* listener() const {
00107 return this->delegate()->listener();
00108 }
00109
00110 using tdds::core::Entity<DELEGATE>::qos;
00111
00117 const dds::domain::qos::DomainParticipantQos
00118 qos() const {
00119 return this->delegate()->qos();
00120 }
00121
00122 void qos(const dds::domain::qos::DomainParticipantQos& the_qos) {
00123 this->delegate()->qos(the_qos);
00124 }
00125
00136 dds::domain::DomainId domain_id() const {
00137 return this->delegate()->domain_id();
00138 }
00139
00140
00154 void
00155 assert_liveliness() {
00156 this->delegate()->assert_liveliness();
00157 }
00158
00159
00174 bool
00175 contains_entity(const dds::core::InstanceHandle& handle) {
00176 return this->delegate()->contains_entity();
00177 }
00178
00184 const dds::core::Time
00185 current_time() {
00186 return this->delegate()->current_time();
00187 }
00188
00189
00190 public:
00194 dds::pub::Publisher create_publisher();
00195
00202 dds::pub::Publisher create_publisher(
00203 const dds::pub::qos::PublisherQos& pub_qos,
00204 dds::pub::PublisherListener* pub_listener = NULL,
00205 const dds::core::status::StatusMask& event_mask =
00206 dds::core::status::StatusMask::all());
00207
00214 dds::pub::Publisher create_publisher(
00215 const std::string& qos_library_name,
00216 const std::string& qos_profile_name,
00217 const dds::pub::PublisherListener* a_listener = NULL,
00218 const dds::core::status::StatusMask& mask =
00219 dds::core::status::StatusMask::all());
00220
00221 const dds::pub::qos::PublisherQos default_publisher_qos() const;
00222 void default_publisher_qos(const dds::pub::qos::PublisherQos& qos);
00223 void default_publisher_qos(const std::string& qos_library_name,
00224 const std::string& qos_profile_name);
00225
00226
00227 public:
00228 dds::sub::Subscriber create_subscriber();
00229
00230 dds::sub::Subscriber create_subscriber(
00231 const dds::sub::qos::SubscriberQos& qos,
00232 dds::sub::SubscriberListener* a_listener = NULL,
00233 const dds::core::status::StatusMask& a_mask =
00234 dds::core::status::StatusMask::all());
00235
00236 dds::sub::Subscriber create_subscriber(
00237 const std::string& qos_library_name,
00238 const std::string& qos_profile_name,
00239 dds::sub::SubscriberListener* a_listener = NULL,
00240 const dds::core::status::StatusMask& a_mask =
00241 dds::core::status::StatusMask::all());
00242
00243 const dds::sub::qos::SubscriberQos default_subscriber_qos() const;
00244 void default_subscriber_qos(const dds::sub::qos::SubscriberQos& qos);
00245 void default_subscriber_qos(const std::string& qos_library_name,
00246 const std::string& qos_profile_name);
00247
00248
00249 public:
00250 template <typename T>
00251 dds::topic::Topic<T> create_topic(
00252 const std::string& topic_name);
00253
00254 template <typename T>
00255 dds::topic::Topic<T> create_topic(
00256 const std::string& topic_name,
00257 const std::string& type_name_name);
00258
00259 template <typename T>
00260 dds::topic::Topic<T> create_topic(
00261 const std::string& topic_name,
00262 const std::string& type_name,
00263 const dds::topic::qos::TopicQos& topic_qos,
00264 dds::topic::TopicListener<T>* a_listener = NULL,
00265 const dds::core::status::StatusMask& mask =
00266 dds::core::status::StatusMask::all());
00267
00268 template <typename T>
00269 dds::topic::Topic<T> create_topic(
00270 const std::string& topic_name,
00271 const std::string& type_name_name,
00272 const std::string& qos_library_name,
00273 const std::string& qos_profile_name,
00274 dds::topic::TopicListener<T>* a_listener = NULL,
00275 const dds::core::status::StatusMask& mask =
00276 dds::core::status::StatusMask::all());
00277
00278
00279 const dds::topic::qos::TopicQos default_topic_qos() const;
00280 void default_topic_qos(const dds::topic::qos::TopicQos& topic_qos);
00281 void default_topic_qos(const std::string& qos_library_name,
00282 const std::string& qos_profile_name);
00283
00284
00285 public:
00286 #ifdef OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
00287 template <typename T>
00288 dds::topic::ContentFilteredTopic<T> create_contentfilteredtopic(
00289 const std::string& name,
00290 const dds::topic::Topic<T>& related_topic,
00291 const std::string& filter_expression,
00292 const dds::core::StringSeq& expression_parameters);
00293 #endif // OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
00294
00295
00296 public:
00297 #ifdef OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
00298 template <typename T>
00299 dds::topic::MultiTopic<T> create_multitopic(
00300 const std::string& name,
00301 const std::string& type_name,
00302 const std::string& subscription_expression,
00303 const dds::core::StringSeq& expression_parameters);
00304 #endif // OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
00305 };
00306
00307 } }
00308
00309 #endif