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

src/hpp/dds/topic/detail/MultiTopic.hpp

Go to the documentation of this file.
00001 #ifndef OMG_DDS_TOPIC_DETAIL_MULTI_HPP_
00002 #define OMG_DDS_TOPIC_DETAIL_MULTI_HPP_
00003 
00004 /* Copyright 2010, Object Management Group, Inc.
00005  * Copyright 2010, PrismTech, Inc.
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 <string>
00023 #include <vector>
00024 
00025 #include <dds/core/detail/conformance.hpp>
00026 #include <dds/core/types.hpp>
00027 #include <dds/topic/detail/topicfwd.hpp>
00028 #include <idds/topic/TopicDescription.hpp>
00029 
00030 
00031 namespace dds { namespace topic { namespace detail {
00032 
00033 #ifdef OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
00034 
00035 template <typename T>
00036 class MultiTopic  : public idds::topic::TopicDescriptionImpl<T>
00037 {
00038 public:
00039     MultiTopic(const std::string& the_name,
00040                const std::string& sub_expr,
00041                const dds::core::StringSeq& params,
00042                const typename idds::topic::TopicDescriptionImpl<T>::DPHolder& dp)
00043     : idds::topic::TopicDescriptionImpl<T>(the_name, " ", dp),
00044       sub_expr_(sub_expr),
00045       params_(params)
00046     { }
00047 
00048         virtual ~MultiTopic() { }
00049 
00050 public:
00051     const std::string& subscription_expression() const {
00052                 return sub_expr_;
00053         }
00054 
00055     const dds::core::StringSeq expression_parameters() const {
00056                 return params_;
00057         }
00058 
00059     void expression_parameters(const dds::core::StringSeq& params) {
00060                 params_ = params;
00061         }
00062 
00063 private:
00064         std::string                                     sub_expr_;
00065         std::vector<std::string>                params_;
00066 
00067 };
00068 
00069 #endif  // OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
00070 
00071 } } }
00072 
00073 
00074 #endif /* OMG_DDS_TOPIC_DETAIL_MULTI_HPP_ */

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