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

src/hpp/dds/pub/Publisher.hpp

Go to the documentation of this file.
00001 #ifndef OMG_DDS_PUB_PUBLISHER_HPP_
00002 #define OMG_DDS_PUB_PUBLISHER_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/pub/pubfwd.hpp>
00023 #include <dds/pub/detail/Publisher.hpp>
00024 #include <dds/pub/detail/PublisherHolder.hpp>
00025 #include <dds/core/ref_traits.hpp>
00026 
00027 template <typename DELEGATE> template <typename T>
00028 dds::pub::DataWriter<T>
00029 tdds::pub::Publisher<DELEGATE>::create_datawriter(
00030         const dds::topic::Topic<T>& a_topic,
00031         const dds::pub::qos::DataWriterQos& a_qos,
00032         dds::pub::DataWriterListener<T>* a_listener,
00033         const dds::core::status::StatusMask& a_mask) {
00034     return dds::pub::DataWriter<T>(
00035         new dds::pub::detail::DataWriter<T>(
00036             a_topic,
00037             a_qos,
00038             dds::core::smart_ptr_traits<dds::pub::detail::PublisherHolder>::ref_type(new dds::pub::detail::PublisherHolder(*this))));
00039 }
00040 
00041 #endif /* OMG_DDS_PUB_PUBLISHER_HPP_ */

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