00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_TYPECODEFACTORY_I_H
00014 #define TAO_TYPECODEFACTORY_I_H
00015
00016 #include "ace/pre.h"
00017 #include "tao/TypeCodeFactory/TypeCodeFactory_Loader.h"
00018
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif
00022
00023 #include "tao/LocalObject.h"
00024
00025 #if defined(_MSC_VER)
00026 #pragma warning(push)
00027 #pragma warning(disable:4250)
00028 #endif
00029
00030 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00031
00032 namespace TAO
00033 {
00034 namespace TypeCode
00035 {
00036 template <typename StringType, typename TypeCodeType> class Case;
00037
00038 typedef Case<CORBA::String_var, CORBA::TypeCode_var> Case_Dynamic;
00039 }
00040 }
00041
00042
00043 class TAO_TypeCodeFactory_Export TAO_TypeCodeFactory_i
00044 : public virtual CORBA::TypeCodeFactory,
00045 public virtual ::CORBA::LocalObject
00046 {
00047
00048
00049
00050
00051
00052
00053
00054 public:
00055
00056 TAO_TypeCodeFactory_i (void);
00057
00058
00059 ~TAO_TypeCodeFactory_i (void);
00060
00061
00062 static TAO_TypeCodeFactory_i *_narrow (CORBA::Object_ptr obj);
00063
00064 virtual CORBA::TypeCode_ptr create_struct_tc (
00065 const char *id,
00066 const char *name,
00067 const CORBA::StructMemberSeq &members);
00068
00069 virtual CORBA::TypeCode_ptr create_union_tc (
00070 const char *id,
00071 const char *name,
00072 CORBA::TypeCode_ptr discriminator_type,
00073 const CORBA::UnionMemberSeq &members);
00074
00075 virtual CORBA::TypeCode_ptr create_enum_tc (
00076 const char *id,
00077 const char *name,
00078 const CORBA::EnumMemberSeq &members);
00079
00080 virtual CORBA::TypeCode_ptr create_alias_tc (
00081 const char *id,
00082 const char *name,
00083 CORBA::TypeCode_ptr original_type);
00084
00085 virtual CORBA::TypeCode_ptr create_exception_tc (
00086 const char *id,
00087 const char *name,
00088 const CORBA::StructMemberSeq &members);
00089
00090 virtual CORBA::TypeCode_ptr create_interface_tc (
00091 const char *id,
00092 const char *name);
00093
00094 virtual CORBA::TypeCode_ptr create_string_tc (
00095 CORBA::ULong bound);
00096
00097 virtual CORBA::TypeCode_ptr create_wstring_tc (
00098 CORBA::ULong bound);
00099
00100 virtual CORBA::TypeCode_ptr create_fixed_tc (
00101 CORBA::UShort digits,
00102 CORBA::UShort scale);
00103
00104 virtual CORBA::TypeCode_ptr create_sequence_tc (
00105 CORBA::ULong bound,
00106 CORBA::TypeCode_ptr element_type);
00107
00108 virtual CORBA::TypeCode_ptr create_array_tc (
00109 CORBA::ULong length,
00110 CORBA::TypeCode_ptr element_type);
00111
00112 virtual CORBA::TypeCode_ptr create_value_tc (
00113 const char *id,
00114 const char *name,
00115 CORBA::ValueModifier type_modifier,
00116 CORBA::TypeCode_ptr concrete_base,
00117 const CORBA::ValueMemberSeq &members);
00118
00119 virtual CORBA::TypeCode_ptr create_value_box_tc (
00120 const char *id,
00121 const char *name,
00122 CORBA::TypeCode_ptr boxed_type);
00123
00124 virtual CORBA::TypeCode_ptr create_native_tc (
00125 const char *id,
00126 const char *name);
00127
00128 virtual CORBA::TypeCode_ptr create_recursive_tc (
00129 const char *id);
00130
00131 virtual CORBA::TypeCode_ptr create_abstract_interface_tc (
00132 const char *id,
00133 const char *name);
00134
00135 virtual CORBA::TypeCode_ptr create_local_interface_tc (
00136 const char *id,
00137 const char *name);
00138
00139 virtual CORBA::TypeCode_ptr create_component_tc (
00140 const char *id,
00141 const char *name);
00142
00143 virtual CORBA::TypeCode_ptr create_home_tc (
00144 const char *id,
00145 const char *name);
00146
00147 virtual CORBA::TypeCode_ptr create_event_tc (
00148 const char *id,
00149 const char *name,
00150 CORBA::ValueModifier type_modifier,
00151 CORBA::TypeCode_ptr concrete_base,
00152 const CORBA::ValueMemberSeq &members);
00153
00154 private:
00155
00156 void compute_default_label (CORBA::TCKind kind,
00157 CORBA::ULong skip_slot,
00158 const CORBA::UnionMemberSeq &members,
00159 TAO::TypeCode::Case_Dynamic *& the_case);
00160
00161
00162 CORBA::TypeCode_ptr create_tc_common (
00163 const char *id,
00164 const char *name,
00165 CORBA::TCKind kind);
00166
00167
00168 CORBA::TypeCode_ptr string_wstring_tc_common (
00169 CORBA::ULong bound,
00170 CORBA::TCKind kind);
00171
00172
00173 CORBA::TypeCode_ptr sequence_array_tc_common (
00174 CORBA::ULong bound,
00175 CORBA::TypeCode_ptr element_type,
00176 CORBA::TCKind kind);
00177
00178
00179 CORBA::TypeCode_ptr struct_except_tc_common (
00180 const char *id,
00181 const char *name,
00182 const CORBA::StructMemberSeq &members,
00183 CORBA::TCKind kind);
00184
00185
00186 CORBA::TypeCode_ptr alias_value_box_tc_common (
00187 const char *id,
00188 const char *name,
00189 CORBA::TypeCode_ptr underlying_type,
00190 CORBA::TCKind kind);
00191
00192 CORBA::TypeCode_ptr value_event_tc_common (
00193 const char *id,
00194 const char *name,
00195 CORBA::ValueModifier type_modifier,
00196 CORBA::TypeCode_ptr concrete_base,
00197 const CORBA::ValueMemberSeq &members,
00198 CORBA::TCKind kind);
00199
00200
00201
00202 CORBA::Boolean valid_name (const char *name);
00203 CORBA::Boolean valid_id (const char *id);
00204 CORBA::Boolean valid_content_type (CORBA::TypeCode_ptr tc);
00205 CORBA::Boolean unique_label_values (const CORBA::UnionMemberSeq &members,
00206 CORBA::TypeCode_ptr disc_tc,
00207 CORBA::ULong default_index_slot);
00208 CORBA::Boolean valid_disc_type (CORBA::TypeCode_ptr tc);
00209
00210
00211
00212
00213
00214
00215
00216
00217 bool check_recursion (CORBA::TCKind kind,
00218 char const * id,
00219 CORBA::TypeCode_ptr member,
00220 CORBA::TypeCode_ptr & recursive_tc,
00221 char const * working_id);
00222
00223
00224 CORBA::TypeCode_ptr make_recursive_tc (CORBA::TCKind kind,
00225 char const * id);
00226
00227
00228 TAO_TypeCodeFactory_i (const TAO_TypeCodeFactory_i &src);
00229 TAO_TypeCodeFactory_i &operator= (const TAO_TypeCodeFactory_i &src);
00230 };
00231
00232 TAO_END_VERSIONED_NAMESPACE_DECL
00233
00234 #if defined(_MSC_VER)
00235 #pragma warning(pop)
00236 #endif
00237
00238 #include "ace/post.h"
00239 #endif