00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TAO_ENUM_TYPECODE_H
00016 #define TAO_ENUM_TYPECODE_H
00017
00018 #include "ace/pre.h"
00019
00020 #include "tao/AnyTypeCode/TypeCode.h"
00021
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif
00025
00026 #include "tao/AnyTypeCode/TypeCode_Base_Attributes.h"
00027
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029
00030 namespace TAO
00031 {
00032 namespace TypeCode
00033 {
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 template <typename StringType,
00044 class EnumeratorArrayType,
00045 class RefCountPolicy>
00046 class Enum
00047 : public CORBA::TypeCode,
00048 private RefCountPolicy
00049 {
00050 public:
00051
00052
00053 Enum (char const * id,
00054 char const * name,
00055 EnumeratorArrayType const & enumerators,
00056 CORBA::ULong nenumerators);
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 virtual bool tao_marshal (TAO_OutputCDR & cdr, CORBA::ULong offset) const;
00068 virtual void tao_duplicate (void);
00069 virtual void tao_release (void);
00070
00071
00072 protected:
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 virtual CORBA::Boolean equal_i (CORBA::TypeCode_ptr tc) const;
00083 virtual CORBA::Boolean equivalent_i (CORBA::TypeCode_ptr tc) const;
00084 virtual CORBA::TypeCode_ptr get_compact_typecode_i (void) const;
00085 virtual char const * id_i (void) const;
00086 virtual char const * name_i (void) const;
00087 virtual CORBA::ULong member_count_i (void) const;
00088 virtual char const * member_name_i (CORBA::ULong index) const;
00089
00090
00091 private:
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107 Base_Attributes<StringType> base_attributes_;
00108
00109
00110 CORBA::ULong const nenumerators_;
00111
00112
00113
00114 EnumeratorArrayType const enumerators_;
00115
00116 };
00117
00118 }
00119 }
00120
00121 TAO_END_VERSIONED_NAMESPACE_DECL
00122
00123 #ifdef __ACE_INLINE__
00124 # include "tao/AnyTypeCode/Enum_TypeCode.inl"
00125 #endif
00126
00127 #ifdef ACE_TEMPLATES_REQUIRE_SOURCE
00128 # include "tao/AnyTypeCode/Enum_TypeCode.cpp"
00129 #endif
00130
00131 #ifdef ACE_TEMPLATES_REQUIRE_PRAGMA
00132 # pragma implementation ("Enum_TypeCode.cpp")
00133 #endif
00134
00135
00136 #include "ace/post.h"
00137
00138 #endif