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

src/hpp/dds/xtypes/BuiltinTypes.hpp

Go to the documentation of this file.
00001 #ifndef OMG_DDS_XTYPES_BUILTIN_TYPES_HPP_
00002 #define OMG_DDS_XTYPES_BUILTIN_TYPES_HPP_
00003 
00004 
00005 /* Copyright 2010, Object Management Group, Inc.
00006  * Copyright 2010, PrismTech, Corp.
00007  * Copyright 2010, Real-Time Innovations, Inc.
00008  * All rights reserved.
00009  *
00010  * Licensed under the Apache License, Version 2.0 (the "License");
00011  * you may not use this file except in compliance with the License.
00012  * You may obtain a copy of the License at
00013  *
00014  *     http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing, software
00017  * distributed under the License is distributed on an "AS IS" BASIS,
00018  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00019  * See the License for the specific language governing permissions and
00020  * limitations under the License.
00021  */
00022 
00023 #include <string>
00024 
00025 #include <dds/core/detail/conformance.hpp>
00026 #include <dds/xtypes/dds_xtypes_fwd.hpp>
00027 #include <dds/pub/DataWriter.hpp>
00028 #include <dds/sub/DataReader.hpp>
00029 
00030 
00031 #ifdef OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT
00032 
00033 
00034 // --- Keyed string: ---------------------------------------------------------
00035 
00036 class dds::type::builtin::KeyedStringDataWriter :
00037     public dds::pub::DataWriter<KeyedString>
00038 {
00039 
00040 public:
00041     using dds::pub::DataWriter<KeyedString>::register_instance;
00042     dds::core::InstanceHandle register_instance(const std::string& key);
00043     dds::core::InstanceHandle
00044     register_instance(const std::string& key,
00045                       const dds::core::Time& source_timestamp);
00046 
00047     using dds::pub::DataWriter<KeyedString>::unregister_instance;
00048     void unregister_instance(const std::string& key);
00049     void unregister_instance(const std::string& key,
00050                              const dds::core::Time& source_timestamp);
00051 
00052     using dds::pub::DataWriter<KeyedString>::write;
00053     void write(const std::string& key,
00054                const std::string& str);
00055     void write(const std::string& key,
00056                const std::string& str,
00057                const dds::core::InstanceHandle& handle);
00058     void write(const std::string& key,
00059                const std::string& str,
00060                const dds::core::InstanceHandle& handle,
00061                const dds::core::Time& source_timestamp);
00062 
00063     void dispose(const std::string& key);
00064     void dispose(const std::string& key,
00065                  const dds::core::Time& source_timestamp);
00066 
00067     using dds::pub::DataWriter<KeyedString>::key_value;
00068     const std::string key_value(const dds::core::InstanceHandle& handle);
00069     
00070     using dds::pub::DataWriter<KeyedString>::lookup_instance;
00071     const dds::core::InstanceHandle lookup_instance(const std::string& key);
00072 };
00073 
00074 
00075 class dds::type::builtin::KeyedStringDataReader :
00076     public dds::sub::DataReader<KeyedString>
00077 {
00078 
00079 };
00080 
00081 
00082 // --- Bytes: ----------------------------------------------------------------
00083 
00084 class dds::type::builtin::BytesDataWriter :
00085     public dds::pub::DataWriter<dds::core::ByteSeq>
00086 {
00087 
00088 public:
00089     using dds::pub::DataWriter<dds::core::ByteSeq>::write;
00090     template <typename RNDA_ITER>
00091     void write(RNDA_ITER begin,
00092                RNDA_ITER end);
00093     template <typename RNDA_ITER>
00094     void write(RNDA_ITER begin,
00095                RNDA_ITER end,
00096                const dds::core::InstanceHandle& handle);
00097     template <typename RNDA_ITER>
00098     void write(RNDA_ITER begin,
00099                RNDA_ITER end,
00100                const dds::core::InstanceHandle& handle,
00101                const dds::core::Time& source_timestamp);
00102 };
00103 
00104 
00105 class dds::type::builtin::BytesDataReader :
00106     public dds::sub::DataReader<dds::core::ByteSeq>
00107 { };
00108 
00109 
00110 // --- Keyed bytes: ----------------------------------------------------------
00111 
00112 class dds::type::builtin::KeyedBytesDataWriter :
00113     public dds::pub::DataWriter<KeyedBytes>
00114 {
00115 
00116 public:
00117     using dds::pub::DataWriter<KeyedBytes>::register_instance;
00118     const dds::core::InstanceHandle register_instance(const std::string& key);
00119     const dds::core::InstanceHandle
00120     register_instance(const std::string& key,
00121                       const dds::core::Time& source_timestamp);
00122 
00123     using dds::pub::DataWriter<KeyedBytes>::unregister_instance;
00124     void unregister_instance(const std::string& key);
00125     void unregister_instance(const std::string& key,
00126                              const dds::core::Time& source_timestamp);
00127 
00128     using dds::pub::DataWriter<KeyedBytes>::write;
00129     template <typename RNDA_ITER>
00130     void write(const std::string& key,
00131                RNDA_ITER value_begin,
00132                RNDA_ITER value_end);
00133     template <typename RNDA_ITER>
00134     void write(const std::string& key,
00135                RNDA_ITER value_begin,
00136                RNDA_ITER value_end,
00137                const dds::core::InstanceHandle& handle);
00138     template <typename RNDA_ITER>
00139     void write(const std::string& key,
00140                RNDA_ITER value_begin,
00141                RNDA_ITER value_end,
00142                const dds::core::InstanceHandle& handle,
00143                const dds::core::Time& source_timestamp);
00144 
00145     using dds::pub::DataWriter<KeyedBytes>::dispose_instance;
00146     void dispose(const std::string& key);
00147     void dispose(const std::string& key,
00148                  const dds::core::Time& source_timestamp);
00149 
00150     using dds::pub::DataWriter<KeyedBytes>::key_value;
00151     const std::string key_value(const dds::core::InstanceHandle& handle);
00152 
00153     using dds::pub::DataWriter<KeyedBytes>::lookup_instance;
00154     const dds::core::InstanceHandle lookup_instance(const std::string& key);
00155 };
00156 
00157 
00158 class dds::type::builtin::KeyedBytesDataReader :
00159     public dds::sub::DataReader<KeyedBytes>
00160 { };
00161 
00162 
00163 #endif  // defined(OMG_DDS_XTYPES_BUILTIN_TYPES_HPP_)
00164 
00165 
00166 #endif // !defined(OMG_DDS_BUILTIN_TYPES_HPP_)

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