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

src/hpp/dds/xtypes/TypeObject.hpp

Go to the documentation of this file.
00001 #ifndef OMG_DDS_TYPE_OBJECT_HPP_
00002 #define OMG_DDS_TYPE_OBJECT_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 <bitset>
00023 
00024 #include <dds/core/detail/conformance.hpp>
00025 #include <dds/xtypes/dds_xtypes_fwd.hpp>
00026 
00027 
00028 #ifdef OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT
00029 
00030 
00031 // --- Shared meta-data: -------------------------------------------------
00032 
00033 namespace dds {
00034     namespace type {
00035         enum TypeKind
00036         {
00037             NO_TYPE          =  0, // sentinel indicating "null" value
00038             
00039             BOOLEAN_TYPE     =  1,
00040             BYTE_TYPE        =  2,
00041             INT_16_TYPE      =  3,
00042             UINT_16_TYPE     =  4,
00043             INT_32_TYPE      =  5,
00044             UINT_32_TYPE     =  6,
00045             INT_64_TYPE      =  7,
00046             UINT_64_TYPE     =  8,
00047             FLOAT_32_TYPE    =  9,
00048             FLOAT_64_TYPE    = 10,
00049             FLOAT_128_TYPE   = 11,
00050             CHAR_8_TYPE      = 12,
00051             CHAR_32_TYPE     = 13,
00052             
00053             ENUMERATION_TYPE = 14,
00054             BITSET_TYPE      = 15,
00055             ALIAS_TYPE       = 16,
00056             
00057             ARRAY_TYPE       = 17,
00058             SEQUENCE_TYPE    = 18,
00059             STRING_TYPE      = 19,
00060             MAP_TYPE         = 20,
00061             
00062             UNION_TYPE       = 21,
00063             STRUCTURE_TYPE   = 22,
00064             ANNOTATION_TYPE  = 23
00065         };
00066         
00067         namespace typeobject {
00068             // --- Type ID --- //
00069             const TypeId NO_TYPE_ID         = NO_TYPE;
00070             const TypeId BOOLEAN_TYPE_ID    = BOOLEAN_TYPE;
00071             const TypeId BYTE_TYPE_ID       = BYTE_TYPE;
00072             const TypeId INT_16_TYPE_ID     = INT_16_TYPE;
00073             const TypeId UINT_16_TYPE_ID    = UINT_16_TYPE;
00074             const TypeId INT_32_TYPE_ID     = INT_32_TYPE;
00075             const TypeId UINT_32_TYPE_ID    = UINT_32_TYPE;
00076             const TypeId INT_64_TYPE_ID     = INT_64_TYPE;
00077             const TypeId UINT_64_TYPE_ID    = UINT_64_TYPE;
00078             const TypeId FLOAT_32_TYPE_ID   = FLOAT_32_TYPE;
00079             const TypeId FLOAT_64_TYPE_ID   = FLOAT_64_TYPE;
00080             const TypeId FLOAT_128_TYPE_ID  = FLOAT_128_TYPE;
00081             const TypeId CHAR_8_TYPE_ID     = CHAR_8_TYPE;
00082             const TypeId CHAR_32_TYPE_ID    = CHAR_32_TYPE;
00083             
00084             // --- Member ID --- //
00085             const MemberId MEMBER_ID_INVALID = 0x0FFFFFFF;
00086         }
00087     }
00088 }
00089 
00090 
00091 // --- Type base class: --------------------------------------------------
00092 
00096 namespace dds {
00097     namespace type {
00098         namespace typeobject {
00099             namespace TypeFlag {
00100                 enum Bits
00101                 {
00102                     IS_FINAL    = (0x0001 << 0),    // | can't both
00103                     IS_MUTABLE  = (0x0001 << 1),    // | be '1'
00104                     IS_NESTED   = (0x0001 << 2)
00105                 };
00106                 
00107                 typedef std::bitset<16> Mask;
00108             }
00109         }
00110     }
00111 }
00112 
00113 
00114 // --- Aggregations: -----------------------------------------------------
00115 
00119 namespace dds {
00120     namespace type {
00121         namespace typeobject {
00122             namespace MemberFlag {
00123                 enum Bits
00124                 {
00125                     IS_KEY           = (0x0001 << 0),
00126                     IS_OPTIONAL      = (0x0001 << 1),
00127                     IS_SHAREABLE     = (0x0001 << 2),
00129                     IS_UNION_DEFAULT = (0x0001 << 3)
00130                 };
00131                 
00132                 typedef std::bitset<16> Mask;
00133             }
00134         }
00135     }
00136 }
00137 
00138 
00139 #endif  // OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT
00140 
00141 
00142 #endif // !defined(OMG_DDS_TYPE_OBJECT_HPP_)

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