1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
// p_orb.h -- Shield against CORBA system dependencies of C++ ORBs
//
// Based on the paper "Portability of C++ CORBA Applications"
// by Ciaran McHale:
// http://www.iona.com/devcenter/corba/portability_cpp_corba.pdf
//
// The name of the ORB system CORBA include file (the file where
// basic CORBA types such as CORBA::Boolean etc. are defined)
// is not standardized, and each ORB names this file differently.
// For portability, just #include "p_orb.h".
//
// Currently following ORBs are supported:
//
// * ORBIX (http://www.iona.com/)
// In order to use this configuration, define a C preprocessor symbol
// named P_USE_ORBIX.
//
// * ORBacus (http://www.orbacus.com/)
// In order to use this configuration, define a C preprocessor symbol
// named P_USE_ORBACUS.
//
// * VisiBroker (http://www.borland.com/)
// In order to use this configuration, define a C preprocessor symbol
// named P_USE_VISIBROKER.
//
// * omniORB4 (http://omniorb.sourceforge.net/)
// In order to use this configuration, define a C preprocessor symbol
// named P_USE_OMNIORB.
//
// * MICO (http://www.mico.org/)
// In order to use this configuration, define a C preprocessor symbol
// named P_USE_MICO.
//
// * TAO (http://www.cs.wustl.edu/~schmidt/TAO.html)
// In order to use this configuration, define a C preprocessor symbol
// named P_USE_TAO.
//
// * ORBit-C++ (http://orbitcpp.sourceforge.net/)
// In order to use this configuration, define a C preprocessor
// symbol named P_USE_ORBITCPP.
//
// [...] Add others here [...]
//
// * No CORBA ORB
// In order to use this configuration, define a C preprocessor
// symbol named P_USE_NONE.
// This configuration only supports the primitive IDL data types
// excluding sequence, bounded string, and any.
// It does not support any ORB operations.
//
#ifndef P_ORB_H_
#define P_ORB_H_
#if defined (P_USE_ORBIX)
#include <omg/orb.hh>
#elif defined (P_USE_ORBACUS)
#include <OB/CORBA.h>
#elif defined (P_USE_VISIBROKER)
#include <corba.h>
#elif defined (P_USE_OMNIORB)
# include <omniORB4/CORBA.h>
#elif defined (P_USE_MICO)
# include <CORBA.h>
#elif defined (P_USE_TAO)
# include <tao/corbafwd.h>
namespace CORBA {
typedef char* String; // For some reason this is missing in corbafwd.
};
#elif defined (P_USE_ORBITCPP)
# include <orb/orbitcpp.hh>
/********** Add other ORB configurations here. **************/
#elif defined (P_USE_NONE)
// If P_USE_NONE is defined then we use a minimal CORBA spec.
namespace CORBA {
typedef bool Boolean;
typedef unsigned char Octet;
typedef char Char;
typedef short Short;
typedef unsigned short UShort;
typedef int Long;
typedef unsigned int ULong;
typedef long long LongLong;
typedef unsigned long long ULongLong;
typedef float Float;
typedef double Double;
typedef char * String;
};
#else
# error "ORB system not defined"
#endif
#endif // P_ORB_H_
|