1 // -*- Mode: C++; -*- 2 // Package : omniORB 3 // CORBA.h Created on: 30/1/96 4 // Author : Sai Lai Lo (sll) 5 // 6 // Copyright (C) 2003-2011 Apasphere Ltd 7 // Copyright (C) 1996-1999 AT&T Laboratories Cambridge 8 // 9 // This file is part of the omniORB library 10 // 11 // The omniORB library is free software; you can redistribute it and/or 12 // modify it under the terms of the GNU Lesser General Public 13 // License as published by the Free Software Foundation; either 14 // version 2.1 of the License, or (at your option) any later version. 15 // 16 // This library is distributed in the hope that it will be useful, 17 // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 // Lesser General Public License for more details. 20 // 21 // You should have received a copy of the GNU Lesser General Public 22 // License along with this library. If not, see http://www.gnu.org/licenses/ 23 // 24 // 25 // Description: 26 // A complete set of C++ definitions for the CORBA module. 27 // 28 29 #ifndef __CORBA_H__ 30 #define __CORBA_H__ 31 32 #ifndef __CORBA_H_EXTERNAL_GUARD__ 33 # define __CORBA_H_EXTERNAL_GUARD__ 34 #endif 35 36 #ifdef _core_attr 37 # error "A local CPP macro _core_attr has already been defined." 38 #endif 39 40 #ifdef _dyn_attr 41 # error "A local CPP macro _dyn_attr has already been defined." 42 #endif 43 44 #if defined(_OMNIORB_LIBRARY) && defined(_OMNIORB_DYNAMIC_LIBRARY) 45 # error "_OMNIORB_LIBRARY and _OMNIORB_DYNAMIC_LIBRARY are both defined." 46 #endif 47 48 #if defined(_OMNIORB_LIBRARY) 49 # define _core_attr 50 # define _dyn_attr _OMNIORB_NTDLL_IMPORT 51 #elif defined(_OMNIORB_DYNAMIC_LIBRARY) 52 # define _core_attr _OMNIORB_NTDLL_IMPORT 53 # define _dyn_attr 54 #else 55 # define _core_attr _OMNIORB_NTDLL_IMPORT 56 # define _dyn_attr _OMNIORB_NTDLL_IMPORT 57 #endif 58 59 #ifndef USE_omniORB_logStream 60 # define USE_omniORB_logStream 61 #endif 62 63 #include <omniORB4/omniInternal.h> 64 65 // Forward declarations. 66 class omniOrbBoaServant; 67 class _omni_ValueFactoryManager; 68 struct _omni_ValueIds; 69 class cdrAnyMemoryStream; 70 71 _CORBA_MODULE CORBA 72 73 _CORBA_MODULE_BEG 74 75 # define INSIDE_OMNIORB_CORBA_MODULE 76 77 ////////////////////////////////////////////////////////////////////// 78 ////////////////////////////// Forward decls ///////////////////////// 79 ////////////////////////////////////////////////////////////////////// 80 81 class Object; 82 class Object_var; 83 class Object_OUT_arg; 84 typedef Object* Object_ptr; 85 typedef Object_ptr ObjectRef; 86 87 class TypeCode; 88 typedef TypeCode* TypeCode_ptr; 89 typedef TypeCode_ptr TypeCodeRef; 90 91 class Fixed; 92 class Any; 93 class ValueBase; 94 95 class AbstractBase; 96 typedef AbstractBase* AbstractBase_ptr; 97 98 ////////////////////////////////////////////////////////////////////// 99 ////////////////////// Definitions /////////////////////////////////// 100 ////////////////////////////////////////////////////////////////////// 101 102 # include "CORBA_primitive_types.h" 103 # include "CORBA_String.h" 104 # include "CORBA_Exception.h" 105 # include "CORBA_Environment.h" 106 # include "CORBA_NamedValue.h" 107 # include "CORBA_Context.h" 108 # include "CORBA_Principal.h" 109 # include "CORBA_ExceptionList.h" 110 # include "CORBA_TypeCode_member.h" 111 # include "CORBA_Object.h" 112 # include "CORBA_Object_vartypes.h" 113 # include "CORBA_LocalObject.h" 114 # include "CORBA_LocalObject_vartypes.h" 115 # include "CORBA_Any.h" 116 # include "CORBA_Any_vartypes.h" 117 118 ////////////////////////////////////////////////////////////////////// 119 ////////////////////// Generated from corbaidl.idl /////////////////// 120 ////////////////////////////////////////////////////////////////////// 121 122 # include <omniORB4/corbaidl_defs.hh> 123 124 ////////////////////////////////////////////////////////////////////// 125 ////////////////////// More Definitions ////////////////////////////// 126 ////////////////////////////////////////////////////////////////////// 127 128 # include "CORBA_TypeCode.h" 129 # include "CORBA_Request.h" 130 # include "CORBA_ServerRequest.h" 131 # include "CORBA_ValueBase.h" 132 # include "CORBA_ValueBase_vartypes.h" 133 # include "CORBA_AbstractBase.h" 134 # include "CORBA_UnknownUserException.h" 135 # include "CORBA_Policy.h" 136 # include "CORBA_Current.h" 137 # include "CORBA_DomainManager.h" 138 # include "CORBA_BOA.h" 139 # include "CORBA_ORB.h" 140 # include "CORBA_Fixed.h" 141 # include "CORBA_static_fns.h" 142 # include "CORBA_vartypes.h" 143 144 ////////////////////////////////////////////////////////////////////// 145 ////////////////////// Generated code //////////////////////////////// 146 ////////////////////////////////////////////////////////////////////// 147 148 // "core" attributes in these headers are exported by the dynamic library 149 150 # if defined(_OMNIORB_LIBRARY) 151 # undef _core_attr 152 # define _core_attr _OMNIORB_NTDLL_IMPORT 153 # elif defined(_OMNIORB_DYNAMIC_LIBRARY) 154 # undef _core_attr 155 # define _core_attr 156 # endif 157 158 # if defined(ENABLE_CLIENT_IR_SUPPORT) 159 # include <omniORB4/ir_defs.hh> 160 # endif 161 162 # include <omniORB4/boxes_defs.hh> 163 # include <omniORB4/pollable_defs.hh> 164 165 # if defined(_OMNIORB_LIBRARY) 166 # undef _core_attr 167 # define _core_attr 168 # elif defined(_OMNIORB_DYNAMIC_LIBRARY) 169 # undef _core_attr 170 # define _core_attr _OMNIORB_NTDLL_IMPORT 171 # endif 172 173 174 ////////////////////////////////////////////////////////////////////// 175 ////////////////////// End of CORBA module /////////////////////////// 176 ////////////////////////////////////////////////////////////////////// 177 178 # undef INSIDE_OMNIORB_CORBA_MODULE 179 180 _CORBA_MODULE_END 181 182 183 //?? These really want to be renamed and put elsewhere. 184 extern CORBA::Boolean 185 _omni_callTransientExceptionHandler(omniObjRef* obj, 186 CORBA::ULong retries, 187 const CORBA::TRANSIENT& ex, 188 const char* op); 189 extern CORBA::Boolean 190 _omni_callTimeoutExceptionHandler(omniObjRef* obj, 191 CORBA::ULong retries, 192 const CORBA::TIMEOUT& ex, 193 const char* op); 194 extern CORBA::Boolean 195 _omni_callCommFailureExceptionHandler(omniObjRef* obj, 196 CORBA::ULong retries, 197 const CORBA::COMM_FAILURE& ex, 198 const char* op); 199 extern CORBA::Boolean 200 _omni_callSystemExceptionHandler(omniObjRef* obj, 201 CORBA::ULong retries, 202 const CORBA::SystemException& ex, 203 const char* op); 204 205 206 extern void _omni_set_NameService(CORBA::Object_ptr); 207 208 #include <omniORB4/omniIOR.h> 209 #include <omniORB4/omniORB.h> 210 #include <omniORB4/proxyFactory.h> 211 #include <omniORB4/valueType.h> 212 213 #include <omniORB4/templatedefns.h> 214 #include <omniORB4/corba_operators.h> 215 #include <omniORB4/poa.h> 216 #include <omniORB4/fixed.h> 217 #include <omniORB4/BiDirPolicy.h> 218 #include <omniORB4/omniPolicy.h> 219 #include <omniORB4/dynAny.h> 220 221 #include <omniORB4/minorCode.h> 222 223 #include <omniORB4/omniAsyncInvoker.h> 224 225 #include <omniORB4/corbaidl_operators.hh> 226 227 #if defined(ENABLE_CLIENT_IR_SUPPORT) 228 # include <omniORB4/ir_operators.hh> 229 #endif 230 231 #include <omniORB4/boxes_operators.hh> 232 #include <omniORB4/pollable_operators.hh> 233 234 235 _CORBA_MODULE POA_CORBA 236 _CORBA_MODULE_BEG 237 238 #include <omniORB4/corbaidl_poa.hh> 239 #if defined(ENABLE_CLIENT_IR_SUPPORT) 240 # include <omniORB4/ir_poa.hh> 241 #endif 242 #include <omniORB4/boxes_poa.hh> 243 #include <omniORB4/pollable_poa.hh> 244 245 _CORBA_MODULE_END 246 247 #include <omniORB4/boa.h> 248 249 #undef _core_attr 250 #undef _dyn_attr 251 252 // Define external guards for CORBA module IDL files. 253 #ifndef __corbaidl_hh_EXTERNAL_GUARD__ 254 # define __corbaidl_hh_EXTERNAL_GUARD__ 255 #endif 256 257 #ifdef ENABLE_CLIENT_IR_SUPPORT 258 # ifndef __ir_hh_EXTERNAL_GUARD__ 259 # define __ir_hh_EXTERNAL_GUARD__ 260 # endif 261 #endif 262 263 #ifndef __boxes_hh_EXTERNAL_GUARD__ 264 # define __boxes_hh_EXTERNAL_GUARD__ 265 #endif 266 267 #ifndef __pollable_hh_EXTERNAL_GUARD__ 268 # define __pollable_hh_EXTERNAL_GUARD__ 269 #endif 270 271 // Include headers for generated code outside the CORBA module 272 273 #if !defined(_OMNIORB_LIBRARY) && !defined(_OMNIORB_DYNAMIC_LIBRARY) 274 # ifndef USE_core_stub_in_nt_dll 275 # define USE_core_stub_in_nt_dll 276 # define USE_core_stub_in_nt_dll_NOT_DEFINED 277 # endif 278 # ifndef USE_dyn_stub_in_nt_dll 279 # define USE_dyn_stub_in_nt_dll 280 # define USE_dyn_stub_in_nt_dll_NOT_DEFINED 281 # endif 282 # include <omniORB4/Naming.hh> 283 # include <omniORB4/messaging.hh> 284 # ifdef USE_core_stub_in_nt_dll_NOT_DEFINED 285 # undef USE_core_stub_in_nt_dll 286 # undef USE_core_stub_in_nt_dll_NOT_DEFINED 287 # endif 288 # ifdef USE_dyn_stub_in_nt_dll_NOT_DEFINED 289 # undef USE_dyn_stub_in_nt_dll 290 # undef USE_dyn_stub_in_nt_dll_NOT_DEFINED 291 # endif 292 #endif 293 294 // OMG COS IDLs refer to CosNaming IDL as "CosNaming.idl". 295 // omniORB uses the file name "Naming.idl". Any IDLs that include 296 // CosNaming.idl will have in their stubs #include "CosNaming.hh". 297 // Define the external guard for CosNaming to stop include to have 298 // any effect. This works because the stubs generated by omniidl 299 // put external guards around the include. 300 #ifndef __CosNaming_hh_EXTERNAL_GUARD__ 301 # define __CosNaming_hh_EXTERNAL_GUARD__ 302 #endif 303 304 // Define __CosNaming_hh__ in case application code tries to import a 305 // header generated from CosNaming.idl. 306 #ifndef __CosNaming_hh__ 307 # define __CosNaming_hh__ 308 #endif 309 310 #ifndef __messaging_hh_EXTERNAL_GUARD__ 311 # define __messaging_hh_EXTERNAL_GUARD__ 312 #endif 313 314 #endif // __CORBA_H__ 315