00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef _TAO_IDL_ORIG_IORTABLEC_H_
00032 #define _TAO_IDL_ORIG_IORTABLEC_H_
00033
00034 #include "ace/pre.h"
00035
00036
00037 #include "ace/config-all.h"
00038
00039 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00040 # pragma once
00041 #endif
00042
00043 #include "tao/IORTable/iortable_export.h"
00044 #include "tao/ORB.h"
00045 #include "tao/SystemException.h"
00046 #include "tao/Environment.h"
00047 #include "tao/Object.h"
00048 #include "tao/Objref_VarOut_T.h"
00049
00050 #ifndef TAO_IORTABLE_SAFE_INCLUDE
00051 #error "You should not include IORTableC.h directly, use IORTable.h"
00052 #endif
00053
00054 #if defined (TAO_EXPORT_MACRO)
00055 #undef TAO_EXPORT_MACRO
00056 #endif
00057 #define TAO_EXPORT_MACRO TAO_IORTable_Export
00058
00059 #if defined(_MSC_VER)
00060 #pragma warning(push)
00061 #pragma warning(disable:4250)
00062 #endif
00063
00064 #if defined (__BORLANDC__)
00065 #pragma option push -w-rvl -w-rch -w-ccc -w-inl
00066 #endif
00067
00068
00069
00070
00071 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00072
00073 namespace IORTable
00074 {
00075
00076
00077
00078
00079 #if !defined (_IORTABLE_LOCATOR__VAR_OUT_CH_)
00080 #define _IORTABLE_LOCATOR__VAR_OUT_CH_
00081
00082 class Locator;
00083 typedef Locator *Locator_ptr;
00084
00085 typedef
00086 TAO_Objref_Var_T<
00087 Locator
00088 >
00089 Locator_var;
00090
00091 typedef
00092 TAO_Objref_Out_T<
00093 Locator
00094 >
00095 Locator_out;
00096
00097 #endif
00098
00099
00100
00101
00102 #if !defined (_IORTABLE_ALREADYBOUND_CH_)
00103 #define _IORTABLE_ALREADYBOUND_CH_
00104
00105 class TAO_IORTable_Export AlreadyBound : public CORBA::UserException
00106 {
00107 public:
00108
00109 AlreadyBound (void);
00110 AlreadyBound (const AlreadyBound &);
00111 ~AlreadyBound (void);
00112
00113 AlreadyBound &operator= (const AlreadyBound &);
00114
00115 static AlreadyBound *_downcast (CORBA::Exception *);
00116 static const AlreadyBound *_downcast (CORBA::Exception const *);
00117
00118 static CORBA::Exception *_alloc (void);
00119
00120 virtual CORBA::Exception *_tao_duplicate (void) const;
00121
00122 virtual void _raise (void) const;
00123
00124 virtual void _tao_encode (
00125 TAO_OutputCDR &
00126 ACE_ENV_ARG_DECL
00127 ) const;
00128
00129 virtual void _tao_decode (
00130 TAO_InputCDR &
00131 ACE_ENV_ARG_DECL
00132 );
00133
00134
00135
00136 };
00137
00138 #endif
00139
00140
00141
00142
00143 #if !defined (_IORTABLE_NOTFOUND_CH_)
00144 #define _IORTABLE_NOTFOUND_CH_
00145
00146 class TAO_IORTable_Export NotFound : public CORBA::UserException
00147 {
00148 public:
00149
00150 NotFound (void);
00151 NotFound (const NotFound &);
00152 ~NotFound (void);
00153
00154 NotFound &operator= (const NotFound &);
00155
00156 static NotFound *_downcast (CORBA::Exception *);
00157 static const NotFound *_downcast (CORBA::Exception const *);
00158
00159 static CORBA::Exception *_alloc (void);
00160
00161 virtual CORBA::Exception *_tao_duplicate (void) const;
00162
00163 virtual void _raise (void) const;
00164
00165 virtual void _tao_encode (
00166 TAO_OutputCDR &
00167 ACE_ENV_ARG_DECL
00168 ) const;
00169
00170 virtual void _tao_decode (
00171 TAO_InputCDR &
00172 ACE_ENV_ARG_DECL
00173 );
00174
00175
00176
00177 };
00178
00179 #endif
00180
00181
00182
00183
00184 #if !defined (_IORTABLE_TABLE__VAR_OUT_CH_)
00185 #define _IORTABLE_TABLE__VAR_OUT_CH_
00186
00187 class Table;
00188 typedef Table *Table_ptr;
00189
00190 typedef
00191 TAO_Objref_Var_T<
00192 Table
00193 >
00194 Table_var;
00195
00196 typedef
00197 TAO_Objref_Out_T<
00198 Table
00199 >
00200 Table_out;
00201
00202 #endif
00203
00204
00205
00206
00207 #if !defined (_IORTABLE_TABLE_CH_)
00208 #define _IORTABLE_TABLE_CH_
00209
00210 class TAO_IORTable_Export Table
00211 : public virtual CORBA::Object
00212 {
00213 public:
00214 typedef Table_ptr _ptr_type;
00215 typedef Table_var _var_type;
00216
00217
00218 static Table_ptr _duplicate (Table_ptr obj);
00219
00220 static void _tao_release (Table_ptr obj);
00221
00222 static Table_ptr _narrow (
00223 CORBA::Object_ptr obj
00224 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00225 );
00226
00227 static Table_ptr _unchecked_narrow (
00228 CORBA::Object_ptr obj
00229 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00230 );
00231
00232 static Table_ptr _nil (void)
00233 {
00234 return static_cast<Table_ptr> (0);
00235 }
00236
00237
00238
00239
00240
00241
00242 virtual void bind (
00243 const char * object_key,
00244 const char * IOR
00245 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00246 )
00247 ACE_THROW_SPEC ((
00248 CORBA::SystemException,
00249 ::IORTable::AlreadyBound
00250 )) = 0;
00251
00252
00253
00254
00255 virtual void rebind (
00256 const char * object_key,
00257 const char * IOR
00258 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00259 )
00260 ACE_THROW_SPEC ((
00261 CORBA::SystemException
00262 )) = 0;
00263
00264
00265
00266
00267 virtual void unbind (
00268 const char * object_key
00269 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00270 )
00271 ACE_THROW_SPEC ((
00272 CORBA::SystemException,
00273 ::IORTable::NotFound
00274 )) = 0;
00275
00276
00277
00278
00279 virtual void set_locator (
00280 ::IORTable::Locator_ptr the_locator
00281 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00282 )
00283 ACE_THROW_SPEC ((
00284 CORBA::SystemException
00285 )) = 0;
00286
00287
00288
00289
00290 virtual CORBA::Boolean _is_a (
00291 const char *type_id
00292 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00293 );
00294
00295 virtual const char* _interface_repository_id (void) const;
00296 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00297
00298 protected:
00299
00300 Table (void);
00301
00302 virtual ~Table (void);
00303
00304 private:
00305
00306 Table (const Table &);
00307
00308 void operator= (const Table &);
00309 };
00310
00311 #endif
00312
00313
00314
00315
00316 #if !defined (_IORTABLE_LOCATOR_CH_)
00317 #define _IORTABLE_LOCATOR_CH_
00318
00319 class TAO_IORTable_Export Locator
00320 : public virtual CORBA::Object
00321 {
00322 public:
00323 typedef Locator_ptr _ptr_type;
00324 typedef Locator_var _var_type;
00325
00326
00327 static Locator_ptr _duplicate (Locator_ptr obj);
00328
00329 static void _tao_release (Locator_ptr obj);
00330
00331 static Locator_ptr _narrow (
00332 CORBA::Object_ptr obj
00333 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00334 );
00335
00336 static Locator_ptr _unchecked_narrow (
00337 CORBA::Object_ptr obj
00338 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00339 );
00340
00341 static Locator_ptr _nil (void)
00342 {
00343 return static_cast<Locator_ptr> (0);
00344 }
00345
00346
00347
00348
00349
00350
00351 virtual char * locate (
00352 const char * object_key
00353 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00354 )
00355 ACE_THROW_SPEC ((
00356 CORBA::SystemException,
00357 ::IORTable::NotFound
00358 )) = 0;
00359
00360
00361
00362
00363 virtual CORBA::Boolean _is_a (
00364 const char *type_id
00365 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00366 );
00367
00368 virtual const char* _interface_repository_id (void) const;
00369 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00370
00371 protected:
00372
00373 Locator (void);
00374
00375 virtual ~Locator (void);
00376
00377 private:
00378
00379 Locator (const Locator &);
00380
00381 void operator= (const Locator &);
00382 };
00383
00384 #endif
00385
00386
00387
00388
00389 }
00390
00391
00392
00393
00394
00395 namespace TAO
00396 {
00397
00398 #if !defined (_IORTABLE_LOCATOR__TRAITS_CH_)
00399 #define _IORTABLE_LOCATOR__TRAITS_CH_
00400
00401 template<>
00402 struct TAO_IORTable_Export Objref_Traits< ::IORTable::Locator>
00403 {
00404 static ::IORTable::Locator_ptr duplicate (
00405 ::IORTable::Locator_ptr
00406 );
00407 static void release (
00408 ::IORTable::Locator_ptr
00409 );
00410 static ::IORTable::Locator_ptr nil (void);
00411 static CORBA::Boolean marshal (
00412 ::IORTable::Locator_ptr p,
00413 TAO_OutputCDR & cdr
00414 );
00415 };
00416
00417 #endif
00418
00419 #if !defined (_IORTABLE_TABLE__TRAITS_CH_)
00420 #define _IORTABLE_TABLE__TRAITS_CH_
00421
00422 template<>
00423 struct TAO_IORTable_Export Objref_Traits< ::IORTable::Table>
00424 {
00425 static ::IORTable::Table_ptr duplicate (
00426 ::IORTable::Table_ptr
00427 );
00428 static void release (
00429 ::IORTable::Table_ptr
00430 );
00431 static ::IORTable::Table_ptr nil (void);
00432 static CORBA::Boolean marshal (
00433 ::IORTable::Table_ptr p,
00434 TAO_OutputCDR & cdr
00435 );
00436 };
00437
00438 #endif
00439 }
00440
00441
00442
00443
00444 TAO_IORTable_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const IORTable::AlreadyBound &);
00445 TAO_IORTable_Export CORBA::Boolean operator>> (TAO_InputCDR &, IORTable::AlreadyBound &);
00446
00447
00448
00449
00450 TAO_IORTable_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const IORTable::NotFound &);
00451 TAO_IORTable_Export CORBA::Boolean operator>> (TAO_InputCDR &, IORTable::NotFound &);
00452
00453
00454
00455
00456 TAO_END_VERSIONED_NAMESPACE_DECL
00457
00458 #if defined(_MSC_VER)
00459 #pragma warning(pop)
00460 #endif
00461
00462 #if defined (__BORLANDC__)
00463 #pragma option pop
00464 #endif
00465
00466 #include "ace/post.h"
00467
00468 #endif
00469
00470