| Application Interface | Domain Interfaces | Common Facilities | Object Services |
| Object Request Broker | |||
| Client | Object Implementation | ||
| Dynamic Invocation | IDL Stub | IDL Skeleton Object Adapter |
|
| ORB Core | |||
ORB.resolve_initial_reference("NameService").//OMG IDL interface Factory { Object create(); };
modules, which are groups of
interfaces.exceptions.attributes, which are like data
members.long (signed and
unsigned)- 32-bit arithmetic types.long long(signed and
unsigned)- 64-bit arithmetic types.short(signed and
unsigned)- 16-bit arithmetic types.float, double, and
long- IEEE 754-1985 floating point types.char and wchar- character and wide
character types.boolean- Boolean type.octet- 8-bit value.enum- enumerated type.any- a tagged type that can hold a value of any
OMG IDL type, including built-in types and user-defined
types.struct- data aggregation construct, like in
C.union- like in C.string and wstring can be bounded
by providing a number argument:
string<10> defines a string type of
maximum length 10.sequence is a dynamic-length linear container
(like Java Vector) whose maximum length and element
type can be specified in angle brackets (unlike in Java).
sequence<Factory> defines a sequence
of factories.sequence<Factory,10> only 10
factories allowed.fixed- a fixed-point decimal value with no more
than 31 significant digits.
fixed<5,2> has a precision of 5 and
scale of 2. e.g., 999.99module EmployeeInfoServer { interface Employee; interface Department; exception EmployeeInfoException { string message; }; interface Employee { unsigned long getId(); Department getDepartment(); float authorizeCommission(in float saleVolume) raises (EmployeeInfoException); attribute string name; attribute string ssn; }; typedef sequence<Employee> EmployeeList; interface Department { unsigned long getId(); attribute string name; EmployeeList employees(); }; };
interface FactoryFinder { //define a sequence of Factory object references typedef sequence<Factory> FactorySeq; FactorySeq find_factories(in string interface_name); };
interface Factory{ Object create(); }; //Forware declaration of Spreadsheet interface interface Spreadsheet; //SpreadsheetFactory derives from Factory interface SpreadsheetFactory : Factory { Spreadsheet create_spreadsheet(); };
create function is inherited from
Factory.Object interface defined in the CORBA module.| OMG IDL Type | C++ Mapping Type |
|---|---|
long, short |
long, short |
float, double |
float, double |
enum |
enum |
char |
char |
boolean |
boolean |
octet |
unsigned char |
any |
Any class |
struct |
struct |
union |
class |
string |
char* |
wstring |
wchar_t* |
sequence |
class |
fixed |
Fixed template class |
| object reference | pointer or object |
| interface | class |
modules map to C++ namespaces.CORB::Object.get_interface()
which returns an InterfaceDef object. Since all
objects inherit from Object they all define this
function.CORBA::Object interface implements
Request create_request() function.
This talk available at http://jmvidal.cse.sc.edu/talks/corba/
Copyright © 2009 José M. Vidal
.
All rights reserved.
26 February 2004, 12:30PM