Debian Codegraph @

runtime/cpp/p_orb.h

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