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

src/hpp/dds/sub/find.hpp

Go to the documentation of this file.
00001 #ifndef OMG_DDS_SUB_FIND_HPP_
00002 #define OMG_DDS_SUB_FIND_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 <string>
00023 #include <vector>
00024 
00025 #include <dds/core/corefwd.hpp>
00026 #include <dds/core/ref_traits.hpp>
00027 #include <dds/topic/topicfwd.hpp>
00028 #include <dds/sub/subfwd.hpp>
00029 #include <dds/sub/detail/find.hpp>
00030 
00031 
00032 namespace dds { namespace sub {
00033 
00034 
00047 template <typename READER, typename FwdIterator>
00048 uint32_t
00049 find(const dds::sub::Subscriber& sub,
00050                 const std::string& topic_name,
00051                 FwdIterator begin, uint32_t max_size) {
00052         return ::dds::sub::detail::find<READER, FwdIterator>(sub,
00053                                                          topic_name,
00054                                                          begin,
00055                                                          max_size);
00056 }
00057 
00069 template <typename READER, typename BinIterator>
00070 uint32_t
00071 find(const dds::sub::Subscriber& sub,
00072                 const std::string& topic_name,
00073                 BinIterator begin) {
00074         return ::dds::sub::detail::find<READER, BinIterator>(sub,
00075                                                          topic_name,
00076                                                          begin);
00077 }
00078 
00087 template <typename READER, typename T, typename FwdIterator>
00088 uint32_t
00089 find(const dds::sub::Subscriber& sub,
00090                 const dds::topic::TopicDescription<T>& topic_description,
00091                 FwdIterator begin, uint32_t max_size) {
00092 
00093         DDS_STATIC_ASSERT((dds::core::is_same<T, typename READER::DataType>::value));
00094         return ::dds::sub::detail::find<READER, T, FwdIterator>(sub,
00095                                                             topic_description,
00096                                                             begin,
00097                                                             max_size);
00098 }
00099 
00100 template <typename READER, typename T, typename BinIterator>
00101 uint32_t
00102 find(const dds::sub::Subscriber& sub,
00103                 const dds::topic::TopicDescription<T>& topic_description,
00104                 BinIterator begin) {
00105 
00106         DDS_STATIC_ASSERT((dds::core::is_same<T, typename READER::DataType>::value));
00107         return ::dds::sub::detail::find<READER, T, BinIterator>(sub,
00108                                                             topic_description,
00109                                                             begin);
00110 }
00111 
00112 
00113 template <typename READER, typename FwdIterator>
00114 uint32_t
00115 find(const dds::sub::Subscriber& sub,
00116         const dds::sub::status::ReaderState& rs,
00117         FwdIterator begin, uint32_t max_size)
00118 {
00119         return dds::sub::detail::find<READER, FwdIterator>(sub,
00120                                                        rs,
00121                                                        begin,
00122                                                        max_size);
00123 }
00124 
00125 template <typename READER, typename BinIterator>
00126 uint32_t
00127 find(const dds::sub::Subscriber& sub,
00128         const dds::sub::status::ReaderState& rs,
00129         BinIterator begin)
00130 {
00131         return dds::sub::detail::find<READER, BinIterator>(sub, rs, begin);
00132 }
00133 
00134 
00135 } }
00136 
00137 #endif /* OMG_DDS_SUB_FIND_HPP_ */

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