00001 #ifndef OMG_DDS_TOPIC_TOPIC_HPP_ 00002 #define OMG_DDS_TOPIC_TOPIC_HPP_ 00003 00004 /* Copyright 2010, Object Management Group, Inc. 00005 * Copyright 2010, PrismTech, Corp. 00006 * Copyright 2010, Real-Time Innovations, Inc. 00007 * All rights reserved. 00008 * 00009 * Licensed under the Apache License, Version 2.0 (the "License"); 00010 * you may not use this file except in compliance with the License. 00011 * You may obtain a copy of the License at 00012 * 00013 * http://www.apache.org/licenses/LICENSE-2.0 00014 * 00015 * Unless required by applicable law or agreed to in writing, software 00016 * distributed under the License is distributed on an "AS IS" BASIS, 00017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00018 * See the License for the specific language governing permissions and 00019 * limitations under the License. 00020 */ 00021 00022 #include <dds/core/corefwd.hpp> 00023 #include <dds/core/types.hpp> 00024 #include <dds/core/cond/StatusCondition.hpp> 00025 #include <dds/topic/topicfwd.hpp> 00026 #include <dds/topic/qos/TopicQos.hpp> 00027 #include <dds/topic/detail/Topic.hpp> 00028 #include <dds/topic/TopicDescription.hpp> 00029 00030 00031 namespace dds { namespace topic { 00032 00044 template <typename T, template <typename Q> class DELEGATE> 00045 class Topic : public TopicDescription <T, DELEGATE> { 00046 public: 00047 typedef TopicListener<T> Listener; 00048 typedef dds::core::cond::StatusCondition<T> StatusCondition; 00049 00050 public: 00051 OMG_DDS_REF_TYPE_T(Topic, TopicDescription, T, DELEGATE) 00052 00053 virtual ~Topic() {} 00054 00055 public: 00065 StatusCondition status_condition() const{ 00066 return this->delegate()->template status_condition<Topic>(*this); 00067 } 00068 00069 public: 00070 void listener(Listener* the_listener, 00071 const dds::core::status::StatusMask& event_mask); 00072 00073 Listener* listener() const; 00074 00075 using tdds::core::Entity< DELEGATE<T> >::qos; 00076 00077 const dds::topic::qos::TopicQos qos() const { 00078 return this->dds::core::Reference<DELEGATE<T> >::delegate()->qos(); 00079 } 00080 00081 void qos(const dds::topic::qos::TopicQos& the_qos) { 00082 this->dds::core::Reference<DELEGATE<T> >::delegate()->qos(the_qos); 00083 } 00084 00095 const dds::core::status::InconsistentTopicStatus inconsistent_topic_status() { 00096 return this->delegate()->inconsistent_topic_status(); 00097 } 00098 }; 00099 00100 } } 00101 00102 #endif /* OMG_DDS_TOPIC_TOPIC_HPP_ */
1.7.1