• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

src/hpp/dds/topic/detail/Topic.hpp

Go to the documentation of this file.
00001 #ifndef OMG_DDS_TOPIC_DETAIL_TOPIC_HPP_
00002 #define OMG_DDS_TOPIC_DETAIL_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/topic/detail/topicfwd.hpp>
00023 #include <dds/topic/qos/TopicQos.hpp>
00024 #include <dds/core/status/Status.hpp>
00025 #include <idds/topic/TopicDescription.hpp>
00026 #include <dds/core/ref_traits.hpp>
00027 
00028 namespace dds { namespace topic { namespace detail {
00029 
00030 template <typename T>
00031 class Topic : public idds::topic::TopicDescriptionImpl<T> {
00032 public:
00033     Topic(const std::string& the_name,
00034           const std::string& the_type_name,
00035           const dds::topic::qos::TopicQos& the_qos,
00036           const dds::core::smart_ptr_traits<dds::domain::detail::DomainParticipantHolder>::ref_type& dp)
00037     : idds::topic::TopicDescriptionImpl<T>(the_name, the_type_name, dp),
00038           qos_(the_qos)
00039           { }
00040 
00041 public:
00046     template <typename SELF>
00047     ::dds::core::cond::StatusCondition<SELF>
00048     status_condition(const SELF& self) const {
00049         return ::dds::core::cond::StatusCondition<SELF>(
00050                 new dds::core::cond::detail::StatusCondition<SELF>(self));
00051     }
00052 
00053 public:
00054         const dds::topic::qos::TopicQos qos() const {
00055                 return qos_;
00056         }
00057 
00058         void qos(const dds::topic::qos::TopicQos& the_qos) {
00059                 qos_ = the_qos;
00060         }
00061 
00062         dds::core::status::InconsistentTopicStatus inconsistent_topic_status() {
00063                 return dds::core::status::InconsistentTopicStatus();
00064         }
00065 
00066 private:
00067         dds::topic::qos::TopicQos qos_;
00068 
00069 };
00070 
00071 } } }
00072 #endif /* OMG_DDS_TOPIC_DETAIL_TOPIC_HPP_ */

Generated on Tue Nov 9 2010 02:16:21 for dds-psm-cxx-doc by  doxygen 1.7.1