TypeCodeFactory_Adapter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    TypeCodeFactory_Adapter.h
00006  *
00007  *  TypeCodeFactory_Adapter.h,v 1.26 2006/06/19 14:51:11 parsons Exp
00008  *
00009  *  @author  Jeff Parsons <parsons@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_TYPECODEFACTORY_ADAPTER_H
00014 #define TAO_TYPECODEFACTORY_ADAPTER_H
00015 
00016 #include /**/ "ace/pre.h"
00017 #include "ace/Service_Object.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "tao/SystemException.h"
00024 #include "tao/Environment.h"
00025 #include "tao/Typecode_typesC.h"
00026 
00027 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00028 template<class T> class ACE_Array_Base;
00029 ACE_END_VERSIONED_NAMESPACE_DECL
00030 
00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00032 
00033 namespace CORBA
00034 {
00035   class EnumMemberSeq;
00036   class StructMemberSeq;
00037   class UnionMemberSeq;
00038   class ValueMemberSeq;
00039 
00040   typedef TAO_Pseudo_Var_T<TypeCode> TypeCode_var;
00041   typedef TAO_Pseudo_Out_T<TypeCode> TypeCode_out;
00042 
00043   typedef CORBA::Short ValueModifier;
00044 }
00045 
00046 namespace TAO
00047 {
00048   namespace TypeCode
00049   {
00050     template<typename StringType, typename TypeCodeType> class Case;
00051     template<typename StringType, typename TypeCodeType> struct Struct_Field;
00052     template<typename StringType, typename TypeCodeType> struct Value_Field;
00053   }
00054 }
00055 
00056 
00057 /**
00058  * @class TAO_TypeCodeFactory_Adapter
00059  *
00060  * @brief TAO_TypeCodeFactory_Adapter.
00061  *
00062  * Class that adapts the CORBA::ORB create_*_tc functions
00063  * to use the TypeCodeFactory. This is a base class for
00064  * the actual implementation in the TypeCodeFactory_DLL library.
00065  */
00066 class TAO_Export TAO_TypeCodeFactory_Adapter : public ACE_Service_Object
00067 {
00068 public:
00069   virtual ~TAO_TypeCodeFactory_Adapter (void);
00070 
00071   virtual CORBA::TypeCode_ptr create_struct_tc (
00072       const char *id,
00073       const char *name,
00074       const CORBA::StructMemberSeq &members
00075       ACE_ENV_ARG_DECL
00076     )
00077     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00078 
00079   virtual CORBA::TypeCode_ptr create_union_tc (
00080       const char *id,
00081       const char *name,
00082       CORBA::TypeCode_ptr discriminator_type,
00083       const CORBA::UnionMemberSeq &members
00084       ACE_ENV_ARG_DECL
00085     )
00086     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00087 
00088   virtual CORBA::TypeCode_ptr create_enum_tc (
00089       const char *id,
00090       const char *name,
00091       const CORBA::EnumMemberSeq &members
00092       ACE_ENV_ARG_DECL
00093     )
00094     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00095 
00096   virtual CORBA::TypeCode_ptr create_alias_tc (
00097       const char *id,
00098       const char *name,
00099       CORBA::TypeCode_ptr original_type
00100       ACE_ENV_ARG_DECL
00101     )
00102 
00103     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00104   virtual CORBA::TypeCode_ptr create_exception_tc (
00105       const char *id,
00106       const char *name,
00107       const CORBA::StructMemberSeq &members
00108       ACE_ENV_ARG_DECL
00109     )
00110     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00111 
00112   virtual CORBA::TypeCode_ptr create_interface_tc (
00113       const char *id,
00114       const char *name
00115       ACE_ENV_ARG_DECL
00116     )
00117     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00118 
00119   virtual CORBA::TypeCode_ptr create_string_tc (
00120       CORBA::ULong bound
00121       ACE_ENV_ARG_DECL
00122     )
00123     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00124 
00125   virtual CORBA::TypeCode_ptr create_wstring_tc (
00126       CORBA::ULong bound
00127       ACE_ENV_ARG_DECL
00128     )
00129     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00130 
00131   virtual CORBA::TypeCode_ptr create_fixed_tc (
00132       CORBA::UShort digits,
00133       CORBA::UShort scale
00134       ACE_ENV_ARG_DECL
00135     )
00136     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00137 
00138   virtual CORBA::TypeCode_ptr create_sequence_tc (
00139       CORBA::ULong bound,
00140       CORBA::TypeCode_ptr element_type
00141       ACE_ENV_ARG_DECL
00142     )
00143     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00144 
00145   virtual CORBA::TypeCode_ptr create_array_tc (
00146       CORBA::ULong length,
00147       CORBA::TypeCode_ptr element_type
00148       ACE_ENV_ARG_DECL
00149     )
00150     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00151 
00152   virtual CORBA::TypeCode_ptr create_value_tc (
00153       const char *id,
00154       const char *name,
00155       CORBA::ValueModifier type_modifier,
00156       CORBA::TypeCode_ptr concrete_base,
00157       const CORBA::ValueMemberSeq &members
00158       ACE_ENV_ARG_DECL
00159     )
00160     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00161 
00162   virtual CORBA::TypeCode_ptr create_value_box_tc (
00163       const char *id,
00164       const char *name,
00165       CORBA::TypeCode_ptr boxed_type
00166       ACE_ENV_ARG_DECL
00167     )
00168     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00169 
00170   virtual CORBA::TypeCode_ptr create_native_tc (
00171       const char *id,
00172       const char *name
00173       ACE_ENV_ARG_DECL
00174     )
00175     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00176 
00177   virtual CORBA::TypeCode_ptr create_recursive_tc (
00178       const char *id
00179       ACE_ENV_ARG_DECL
00180     )
00181     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00182 
00183   virtual CORBA::TypeCode_ptr create_abstract_interface_tc (
00184       const char *id,
00185       const char *name
00186       ACE_ENV_ARG_DECL
00187     )
00188     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00189 
00190   virtual CORBA::TypeCode_ptr create_local_interface_tc (
00191       const char *id,
00192       const char *name
00193       ACE_ENV_ARG_DECL
00194     )
00195     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00196 
00197   virtual CORBA::TypeCode_ptr create_component_tc (
00198       const char *id,
00199       const char *name
00200       ACE_ENV_ARG_DECL_WITH_DEFAULTS
00201     )
00202     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00203 
00204   virtual CORBA::TypeCode_ptr create_home_tc (
00205       const char *id,
00206       const char *name
00207       ACE_ENV_ARG_DECL_WITH_DEFAULTS
00208     )
00209     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00210 
00211   virtual CORBA::TypeCode_ptr create_event_tc (
00212       const char *id,
00213       const char *name,
00214       CORBA::ValueModifier type_modifier,
00215       CORBA::TypeCode_ptr concrete_base,
00216       const CORBA::ValueMemberSeq &members
00217       ACE_ENV_ARG_DECL_WITH_DEFAULTS
00218     )
00219     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00220 
00221   // --
00222 
00223   /**
00224    * @name TAO-specific TypeCode factory methods.
00225    *
00226    * Factory methods that has no corresponding TypeCodeFactory IDL,
00227    * i.e. they are specific to TAO.
00228    */
00229   //@{
00230   /// Create an enumeration TypeCode.
00231   virtual CORBA::TypeCode_ptr create_enum_tc (
00232     char const * id,
00233     char const * name,
00234     ACE_Array_Base<CORBA::String_var> const & enumerators,
00235     CORBA::ULong ncases
00236     ACE_ENV_ARG_DECL) = 0;
00237 
00238   /// Create a structure or exception TypeCode.
00239   virtual CORBA::TypeCode_ptr create_struct_except_tc (
00240     CORBA::TCKind,
00241     char const * id,
00242     char const * name,
00243     ACE_Array_Base<
00244       TAO::TypeCode::Struct_Field<CORBA::String_var,
00245                                   CORBA::TypeCode_var> > const & fields,
00246     CORBA::ULong nfields
00247     ACE_ENV_ARG_DECL) = 0;
00248 
00249   /// Create a union TypeCode.
00250   virtual CORBA::TypeCode_ptr create_union_tc (
00251     char const * id,
00252     char const * name,
00253     CORBA::TypeCode_ptr discriminant_type,
00254     ACE_Array_Base<TAO::TypeCode::Case<CORBA::String_var,
00255                                        CORBA::TypeCode_var> > const & cases,
00256     CORBA::ULong ncases,
00257     CORBA::Long default_index,
00258     char const * default_case_name,
00259     CORBA::TypeCode_ptr default_case_type
00260     ACE_ENV_ARG_DECL) = 0;
00261 
00262   /// Create a valuetype or eventtype TypeCode.
00263   virtual CORBA::TypeCode_ptr create_value_event_tc (
00264     CORBA::TCKind,
00265     char const * id,
00266     char const * name,
00267     CORBA::ValueModifier modifier,
00268     CORBA::TypeCode_ptr concrete_base,
00269     ACE_Array_Base<
00270       TAO::TypeCode::Value_Field<CORBA::String_var,
00271                                  CORBA::TypeCode_var> > const & fields,
00272     CORBA::ULong nfields
00273     ACE_ENV_ARG_DECL) = 0;
00274   //@}
00275 
00276 };
00277 
00278 TAO_END_VERSIONED_NAMESPACE_DECL
00279 
00280 #include /**/ "ace/post.h"
00281 
00282 #endif /* TAO_TYPECODEFACTORY_ADAPTER_H */

Generated on Thu Nov 9 11:54:27 2006 for TAO by doxygen 1.3.6