00001 #ifndef OMG_DDS_DESCRIPTOR_HPP_ 00002 #define OMG_DDS_DESCRIPTOR_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/corefwd.hpp> 00026 #include <dds/core/Value.hpp> 00027 #include <tdds/xtypes/tdds_xtypes_fwd.hpp> 00028 00029 00030 #ifdef OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT 00031 00032 00033 template <typename DELEGATE> 00034 class tdds::type::dynamic::AnnotationDescriptor : public dds::core::Value<DELEGATE> 00035 { 00036 00037 public: 00038 dds::type::dynamic::DynamicType type() const; 00039 void type(const dds::type::dynamic::DynamicType& value); 00040 00041 const std::string value(const std::string& key); 00042 00043 const dds::type::dynamic::Parameters all_values() const; 00044 00045 dds::type::dynamic::Parameters& 00046 all_values(dds::type::dynamic::Parameters& dst) const; 00047 00048 void value(const std::string& key, const std::string& value); 00049 00050 bool is_consistent() const; 00051 }; 00052 00053 00054 template <typename DELEGATE> 00055 class tdds::type::dynamic::MemberDescriptor : public dds::core::Value<DELEGATE> 00056 { 00057 00058 public: 00059 const std::string name() const; 00060 void name(const std::string& value); 00061 00062 dds::type::MemberId id() const; 00063 void id(dds::type::MemberId value); 00064 00065 dds::type::dynamic::DynamicType type() const; 00066 void type(const dds::type::dynamic::DynamicType& value); 00067 00068 const std::string default_value() const; 00069 void default_value(const std::string& value); 00070 00071 uint32_t index() const; 00072 void index(uint32_t value); 00073 00074 const dds::type::UnionCaseLabelSeq label() const; 00075 00076 dds::type::UnionCaseLabelSeq& 00077 label(dds::type::UnionCaseLabelSeq& dst) const; 00078 00079 void label(const dds::type::UnionCaseLabelSeq& value); 00080 00081 bool default_label(); 00082 void default_label(bool value); 00083 00084 bool is_consistent(); 00085 }; 00086 00087 00088 template <typename DELEGATE> 00089 class tdds::type::dynamic::TypeDescriptor : public dds::core::Value<DELEGATE> 00090 { 00091 00092 public: 00093 dds::type::TypeKind kind() const; 00094 void kind(dds::type::TypeKind value); 00095 00096 const std::string name() const; 00097 void name(const std::string& value); 00098 00099 dds::type::dynamic::DynamicType base_type() const; 00100 void base_type(const dds::type::dynamic::DynamicType& value); 00101 00102 dds::type::dynamic::DynamicType discriminator_type() const; 00103 void discriminator_type(const dds::type::dynamic::DynamicType& value); 00104 00105 const dds::type::BoundSeq bound() const; 00106 dds::type::BoundSeq& bound(dds::type::BoundSeq& dst) const; 00107 void bound(const dds::type::BoundSeq& value); 00108 00109 dds::type::dynamic::DynamicType element_type() const; 00110 void element_type(const dds::type::dynamic::DynamicType& value); 00111 00112 dds::type::dynamic::DynamicType key_element_type() const; 00113 void key_element_type(const dds::type::dynamic::DynamicType& value); 00114 00115 bool is_consistent() const; 00116 }; 00117 00118 00119 #endif // OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT 00120 00121 00122 #endif // !defined(OMG_DDS_DESCRIPTOR_HPP_)
1.7.1