00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_ORB_INIT_INFO_H
00014 #define TAO_ORB_INIT_INFO_H
00015
00016 #include "ace/pre.h"
00017
00018 #include "tao/PI/pi_export.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #include "tao/PI/ORBInitInfoC.h"
00025 #include "tao/LocalObject.h"
00026
00027
00028
00029 #if defined(_MSC_VER)
00030 #pragma warning(push)
00031 #pragma warning(disable:4250)
00032 #endif
00033
00034 #if defined (__BORLANDC__)
00035 #pragma option push -w-rvl -w-rch -w-ccc -w-inl
00036 #endif
00037
00038 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00039
00040 class TAO_ORB_Core;
00041 class TAO_ORBInitInfo;
00042 typedef TAO_ORBInitInfo *TAO_ORBInitInfo_ptr;
00043
00044 typedef TAO_Objref_Var_T<TAO_ORBInitInfo>
00045 TAO_ORBInitInfo_var;
00046
00047 typedef TAO_Objref_Out_T<TAO_ORBInitInfo>
00048 TAO_ORBInitInfo_out;
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059 class TAO_PI_Export TAO_ORBInitInfo
00060 : public virtual PortableInterceptor::ORBInitInfo_3_1,
00061 public virtual TAO_Local_RefCounted_Object
00062 {
00063 public:
00064
00065
00066 TAO_ORBInitInfo (TAO_ORB_Core *orb_core,
00067 int argc,
00068 char *argv[],
00069 PortableInterceptor::SlotId slotid);
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 virtual CORBA::StringSeq * arguments (
00081 ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00082 ACE_THROW_SPEC ((CORBA::SystemException));
00083
00084
00085 virtual char * orb_id (
00086 ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00087 ACE_THROW_SPEC ((CORBA::SystemException));
00088
00089
00090
00091 virtual IOP::CodecFactory_ptr codec_factory (
00092 ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00093 ACE_THROW_SPEC ((CORBA::SystemException));
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105 virtual void register_initial_reference (
00106 const char * id,
00107 CORBA::Object_ptr obj
00108 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00109 ACE_THROW_SPEC ((CORBA::SystemException,
00110 PortableInterceptor::ORBInitInfo::InvalidName));
00111
00112
00113
00114
00115 virtual CORBA::Object_ptr resolve_initial_references (
00116 const char * id
00117 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00118 ACE_THROW_SPEC ((CORBA::SystemException,
00119 PortableInterceptor::ORBInitInfo::InvalidName));
00120
00121
00122
00123 virtual void add_client_request_interceptor (
00124 PortableInterceptor::ClientRequestInterceptor_ptr interceptor
00125 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00126 ACE_THROW_SPEC ((CORBA::SystemException,
00127 PortableInterceptor::ORBInitInfo::DuplicateName));
00128
00129
00130
00131 virtual void add_server_request_interceptor (
00132 PortableInterceptor::ServerRequestInterceptor_ptr interceptor
00133 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00134 ACE_THROW_SPEC ((CORBA::SystemException,
00135 PortableInterceptor::ORBInitInfo::DuplicateName));
00136
00137
00138
00139 virtual void add_ior_interceptor (
00140 PortableInterceptor::IORInterceptor_ptr interceptor
00141 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00142 ACE_THROW_SPEC ((CORBA::SystemException,
00143 PortableInterceptor::ORBInitInfo::DuplicateName));
00144
00145
00146
00147 virtual void add_client_request_interceptor_with_policy (
00148 PortableInterceptor::ClientRequestInterceptor_ptr interceptor,
00149 const CORBA::PolicyList& policies
00150 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00151 ACE_THROW_SPEC ((CORBA::SystemException,
00152 PortableInterceptor::ORBInitInfo::DuplicateName,
00153 CORBA::PolicyError));
00154
00155
00156
00157 virtual void add_server_request_interceptor_with_policy (
00158 PortableInterceptor::ServerRequestInterceptor_ptr interceptor,
00159 const CORBA::PolicyList& policies
00160 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00161 ACE_THROW_SPEC ((CORBA::SystemException,
00162 PortableInterceptor::ORBInitInfo::DuplicateName,
00163 CORBA::PolicyError));
00164
00165
00166
00167 virtual void add_ior_interceptor_with_policy (
00168 PortableInterceptor::IORInterceptor_ptr interceptor,
00169 const CORBA::PolicyList& policies
00170 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00171 ACE_THROW_SPEC ((CORBA::SystemException,
00172 PortableInterceptor::ORBInitInfo::DuplicateName,
00173 CORBA::PolicyError));
00174
00175
00176
00177 virtual PortableInterceptor::SlotId allocate_slot_id (
00178 ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00179 ACE_THROW_SPEC ((CORBA::SystemException));
00180
00181
00182
00183 virtual void register_policy_factory (
00184 CORBA::PolicyType type,
00185 PortableInterceptor::PolicyFactory_ptr policy_factory
00186 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00187 ACE_THROW_SPEC ((CORBA::SystemException));
00188
00189 virtual CORBA::ORB_ptr _get_orb (
00190 ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
00191 );
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211 size_t allocate_tss_slot_id (
00212 ACE_CLEANUP_FUNC cleanup
00213 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00214 ACE_THROW_SPEC ((CORBA::SystemException));
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225 TAO_ORB_Core *orb_core (void) const;
00226
00227
00228
00229
00230
00231
00232 void invalidate (void);
00233
00234
00235
00236 PortableInterceptor::SlotId slot_count (void) const;
00237
00238
00239
00240
00241
00242
00243
00244
00245 typedef TAO_ORBInitInfo_ptr _ptr_type;
00246 typedef TAO_ORBInitInfo_var _var_type;
00247
00248 static TAO_ORBInitInfo_ptr _duplicate (TAO_ORBInitInfo_ptr obj);
00249
00250 static TAO_ORBInitInfo_ptr _narrow (
00251 CORBA::Object_ptr obj
00252 ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00253
00254
00255 static TAO_ORBInitInfo_ptr _unchecked_narrow (
00256 CORBA::Object_ptr obj
00257 ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00258
00259
00260 static TAO_ORBInitInfo_ptr _nil (void)
00261 {
00262 return (TAO_ORBInitInfo_ptr)0;
00263 }
00264
00265
00266 virtual const char* _interface_repository_id (void) const;
00267
00268 protected:
00269
00270
00271
00272 ~TAO_ORBInitInfo (void);
00273
00274
00275
00276
00277 void check_validity (ACE_ENV_SINGLE_ARG_DECL);
00278
00279 private:
00280
00281
00282
00283 TAO_ORBInitInfo (const TAO_ORBInitInfo &);
00284 void operator= (const TAO_ORBInitInfo &);
00285
00286 private:
00287
00288
00289 TAO_ORB_Core *orb_core_;
00290
00291
00292
00293 int argc_;
00294
00295
00296 char **argv_;
00297
00298
00299
00300 IOP::CodecFactory_var codec_factory_;
00301
00302
00303 PortableInterceptor::SlotId slot_count_;
00304
00305 };
00306
00307
00308 namespace TAO
00309 {
00310
00311 template<>
00312 struct TAO_PI_Export Objref_Traits<TAO_ORBInitInfo>
00313 {
00314 static TAO_ORBInitInfo_ptr duplicate (
00315 TAO_ORBInitInfo_ptr
00316 );
00317 static void release (
00318 TAO_ORBInitInfo_ptr
00319 );
00320 static TAO_ORBInitInfo_ptr nil (void);
00321 static CORBA::Boolean marshal (
00322 TAO_ORBInitInfo_ptr p,
00323 TAO_OutputCDR & cdr
00324 );
00325 };
00326 }
00327
00328 TAO_END_VERSIONED_NAMESPACE_DECL
00329
00330 #if defined (__ACE_INLINE__)
00331 #include "tao/PI/ORBInitInfo.inl"
00332 #endif
00333
00334 #if defined(_MSC_VER)
00335 #pragma warning(pop)
00336 #endif
00337
00338 #if defined (__BORLANDC__)
00339 #pragma option pop
00340 #endif
00341
00342 #include "ace/post.h"
00343
00344 #endif