1
// File: CORBA_InterfaceRepository.idl
2
// CORBA 2.3, Chapter 10
4
#pragma prefix "omg.org"
10
interface AttributeDef;
11
interface ConstantDef;
15
interface ExceptionDef;
18
interface InterfaceDef;
22
interface OperationDef;
23
interface PrimitiveDef;
25
interface SequenceDef;
29
typedef string ScopedName;
30
typedef string RepositoryId;
32
# pragma version DefinitionKind 2.3
34
dk_Attribute, dk_Constant, dk_Exception, dk_Interface,
35
dk_Module, dk_Operation, dk_Typedef,
36
dk_Alias, dk_Struct, dk_Union, dk_Enum,
37
dk_Primitive, dk_String, dk_Sequence, dk_Array,
40
dk_Value, dk_ValueBox, dk_ValueMember,
45
# pragma version IRObject 2.3
47
readonly attribute DefinitionKind def_kind;
52
typedef string VersionSpec;
54
interface Contained : IRObject {
55
# pragma version Contained 2.3
57
// read/write interface
58
attribute RepositoryId id;
59
attribute Identifier name;
60
attribute VersionSpec version;
62
readonly attribute Container defined_in;
63
readonly attribute ScopedName absolute_name;
64
readonly attribute Repository containing_repository;
69
Description describe ();
71
void move ( in Container new_container,
72
in Identifier new_name,
73
in VersionSpec new_version
76
typedef sequence <InterfaceDef> InterfaceDefSeq;
77
typedef sequence <ValueDef> ValueDefSeq;
78
typedef sequence <Contained> ContainedSeq;
85
typedef sequence <StructMember> StructMemberSeq;
87
# pragma version Initializer 2.3
88
StructMemberSeq members;
91
typedef sequence <Initializer> InitializerSeq;
98
typedef sequence <UnionMember> UnionMemberSeq;
99
typedef sequence <Identifier> EnumMemberSeq;
100
interface Container : IRObject {
101
# pragma version Container 2.3
104
in ScopedName search_name);
105
ContainedSeq contents (
106
in DefinitionKind limit_type,
107
in boolean exclude_inherited
109
ContainedSeq lookup_name (
110
in Identifier search_name,
111
in long levels_to_search,
112
in DefinitionKind limit_type,
113
in boolean exclude_inherited
116
Contained contained_object;
120
typedef sequence<Description> DescriptionSeq;
121
DescriptionSeq describe_contents (
122
in DefinitionKind limit_type,
123
in boolean exclude_inherited,
124
in long max_returned_objs
127
ModuleDef create_module (
130
in VersionSpec version
132
ConstantDef create_constant (
135
in VersionSpec version,
139
StructDef create_struct (
142
in VersionSpec version,
143
in StructMemberSeq members
145
UnionDef create_union (
148
in VersionSpec version,
149
in IDLType discriminator_type,
150
in UnionMemberSeq members
152
EnumDef create_enum (
155
in VersionSpec version,
156
in EnumMemberSeq members
158
AliasDef create_alias (
161
in VersionSpec version,
162
in IDLType original_type
164
InterfaceDef create_interface (
167
in VersionSpec version,
168
in InterfaceDefSeq base_interfaces,
169
in boolean is_abstract
171
ValueDef create_value(
174
in VersionSpec version,
175
in boolean is_custom,
176
in boolean is_abstract,
177
in ValueDef base_value,
178
in boolean is_truncatable,
179
in ValueDefSeq abstract_base_values,
180
in InterfaceDefSeq supported_interfaces,
181
in InitializerSeq initializers
183
ValueBoxDef create_value_box(
186
in VersionSpec version,
187
in IDLType original_type_def
189
ExceptionDef create_exception(
192
in VersionSpec version,
193
in StructMemberSeq members
195
NativeDef create_native(
198
in VersionSpec version
201
interface IDLType : IRObject {
202
# pragma version IDLType 2.3
203
readonly attribute TypeCode type;
207
# pragma version PrimitiveKind 2.3
208
pk_null, pk_void, pk_short, pk_long, pk_ushort, pk_ulong,
209
pk_float, pk_double, pk_boolean, pk_char, pk_octet,
210
pk_any, pk_TypeCode, pk_Principal, pk_string, pk_objref,
211
pk_longlong,pk_ulonglong, pk_longdouble,
212
pk_wchar, pk_wstring, pk_value_base
215
interface Repository : Container {
216
# pragma version Repository 2.3
218
Contained lookup_id (in RepositoryId search_id);
219
TypeCode get_canonical_typecode (in TypeCode tc);
220
PrimitiveDef get_primitive (in PrimitiveKind kind);
222
StringDef create_string (in unsigned long bound);
223
WstringDef create_wstring (in unsigned long bound);
224
SequenceDef create_sequence (in unsigned long bound,
225
in IDLType element_type
227
ArrayDef create_array (in unsigned long length,
228
in IDLType element_type
230
FixedDef create_fixed (in unsigned short digits,
234
interface ModuleDef : Container, Contained {
235
# pragma version ModuleDef 2.3
238
struct ModuleDescription {
241
RepositoryId defined_in;
245
interface ConstantDef : Contained {
246
# pragma version ConstantDef 2.3
247
readonly attribute TypeCode type;
248
attribute IDLType type_def;
251
struct ConstantDescription {
254
RepositoryId defined_in;
260
interface TypedefDef : Contained, IDLType {
261
# pragma version TypedefDef 2.3
264
struct TypeDescription {
267
RepositoryId defined_in;
272
interface StructDef : TypedefDef, Container {
273
# pragma version StructDef 2.3
274
attribute StructMemberSeq members;
277
interface UnionDef : TypedefDef, Container {
278
# pragma version UnionDef 2.3
279
readonly attribute TypeCode discriminator_type;
280
attribute IDLType discriminator_type_def;
281
attribute UnionMemberSeq members;
284
interface EnumDef : TypedefDef {
285
# pragma version EnumDef 2.3
286
attribute EnumMemberSeq members;
288
interface AliasDef : TypedefDef {
289
# pragma version AliasDef 2.3
290
attribute IDLType original_type_def;
292
interface NativeDef : TypedefDef {
293
# pragma version NativeDef 2.3
295
interface PrimitiveDef: IDLType {
296
# pragma version PrimitiveDef 2.3
297
readonly attribute PrimitiveKind kind;
299
interface StringDef : IDLType {
300
# pragma version StringDef 2.3
301
attribute unsigned long bound;
303
interface WstringDef : IDLType {
304
# pragma version WstringDef 2.3
305
attribute unsigned long bound;
307
interface FixedDef : IDLType {
308
# pragma version FixedDef 2.3
309
attribute unsigned short digits;
310
attribute short scale;
312
interface SequenceDef : IDLType {
313
# pragma version SequenceDef 2.3
314
attribute unsigned long bound;
315
readonly attribute TypeCode element_type;
316
attribute IDLType element_type_def;
318
interface ArrayDef : IDLType {
319
# pragma version ArrayDef 2.3
320
attribute unsigned long length;
321
readonly attribute TypeCode element_type;
322
attribute IDLType element_type_def;
324
interface ExceptionDef : Contained, Container {
325
# pragma version ExceptionDef 2.3
326
readonly attribute TypeCode type;
327
attribute StructMemberSeq members;
329
struct ExceptionDescription {
332
RepositoryId defined_in;
336
enum AttributeMode {ATTR_NORMAL, ATTR_READONLY};
337
interface AttributeDef : Contained {
338
# pragma version AttributeDef 2.3
339
readonly attribute TypeCode type;
340
attribute IDLType type_def;
341
attribute AttributeMode mode;
343
struct AttributeDescription {
346
RepositoryId defined_in;
351
enum OperationMode {OP_NORMAL, OP_ONEWAY};
352
enum ParameterMode {PARAM_IN, PARAM_OUT, PARAM_INOUT};
353
struct ParameterDescription {
359
typedef sequence <ParameterDescription> ParDescriptionSeq;
360
typedef Identifier ContextIdentifier;
361
typedef sequence <ContextIdentifier> ContextIdSeq;
362
typedef sequence <ExceptionDef> ExceptionDefSeq;
363
typedef sequence <ExceptionDescription> ExcDescriptionSeq;
365
interface OperationDef : Contained {
366
# pragma version OperationDef 2.3
367
readonly attribute TypeCode result;
368
attribute IDLType result_def;
369
attribute ParDescriptionSeq params;
370
attribute OperationMode mode;
371
attribute ContextIdSeq contexts;
372
attribute ExceptionDefSeq exceptions;
375
struct OperationDescription {
378
RepositoryId defined_in;
382
ContextIdSeq contexts;
383
ParDescriptionSeq parameters;
384
ExcDescriptionSeq exceptions;
386
typedef sequence <RepositoryId> RepositoryIdSeq;
387
typedef sequence <OperationDescription> OpDescriptionSeq;
388
typedef sequence <AttributeDescription> AttrDescriptionSeq;
390
interface InterfaceDef : Container, Contained, IDLType {
391
# pragma version InterfaceDef 2.3
392
// read/write interface
393
attribute InterfaceDefSeq base_interfaces;
394
attribute boolean is_abstract;
396
boolean is_a (in RepositoryId interface_id
398
struct FullInterfaceDescription {
399
# pragma version FullInterfaceDescription 2.3
402
RepositoryId defined_in;
404
OpDescriptionSeq operations;
405
AttrDescriptionSeq attributes;
406
RepositoryIdSeq base_interfaces;
410
FullInterfaceDescription describe_interface();
412
AttributeDef create_attribute (
415
in VersionSpec version,
417
in AttributeMode mode
419
OperationDef create_operation (
422
in VersionSpec version,
424
in OperationMode mode,
425
in ParDescriptionSeq params,
426
in ExceptionDefSeq exceptions,
427
in ContextIdSeq contexts
430
struct InterfaceDescription {
431
# pragma version InterfaceDescription 2.3
434
RepositoryId defined_in;
436
RepositoryIdSeq base_interfaces;
439
typedef short Visibility;
440
const Visibility PRIVATE_MEMBER = 0;
441
const Visibility PUBLIC_MEMBER = 1;
444
# pragma version ValueMember 2.3
447
RepositoryId defined_in;
453
typedef sequence <ValueMember> ValueMemberSeq;
454
interface ValueMemberDef : Contained {
455
# pragma version ValueMemberDef 2.3
456
readonly attribute TypeCode type;
457
attribute IDLType type_def;
458
attribute Visibility access;
460
interface ValueDef : Container, Contained, IDLType {
461
# pragma version ValueDef 2.3
462
// read/write interface
463
attribute InterfaceDefSeq supported_interfaces;
464
attribute InitializerSeq initializers;
465
attribute ValueDef base_value;
466
attribute ValueDefSeq abstract_base_values;
467
attribute boolean is_abstract;
468
attribute boolean is_custom;
469
attribute boolean is_truncatable;
471
boolean is_a(in RepositoryId id);
472
struct FullValueDescription {
473
# pragma version FullValueDescription 2.3
478
RepositoryId defined_in;
480
OpDescriptionSeq operations;
481
AttrDescriptionSeq attributes;
482
ValueMemberSeq members;
483
InitializerSeq initializers;
484
RepositoryIdSeq supported_interfaces;
485
RepositoryIdSeq abstract_base_values;
486
boolean is_truncatable;
487
RepositoryId base_value;
490
FullValueDescription describe_value();
491
ValueMemberDef create_value_member(
494
in VersionSpec version,
498
AttributeDef create_attribute(
501
in VersionSpec version,
503
in AttributeMode mode
505
OperationDef create_operation (
508
in VersionSpec version,
510
in OperationMode mode,
511
in ParDescriptionSeq params,
512
in ExceptionDefSeq exceptions,
513
in ContextIdSeq contexts
516
struct ValueDescription {
517
# pragma version ValueDescription 2.3
522
RepositoryId defined_in;
524
RepositoryIdSeq supported_interfaces;
525
RepositoryIdSeq abstract_base_values;
526
boolean is_truncatable;
527
RepositoryId base_value;
529
interface ValueBoxDef : TypedefDef {
530
# pragma version ValueBoxDef 2.3
531
attribute IDLType original_type_def;
533
enum TCKind { // PIDL
534
# pragma version TCKind 2.3
536
tk_short, tk_long, tk_ushort, tk_ulong,
537
tk_float, tk_double, tk_boolean, tk_char,
538
tk_octet, tk_any, tk_TypeCode,tk_Principal, tk_objref,
539
tk_struct, tk_union, tk_enum, tk_string,
540
tk_sequence,tk_array, tk_alias, tk_except,
541
tk_longlong,tk_ulonglong, tk_longdouble,
542
tk_wchar, tk_wstring, tk_fixed,
543
tk_value, tk_value_box,
545
tk_abstract_interface
547
typedef short ValueModifier; // PIDL
548
const ValueModifier VM_NONE = 0;
549
const ValueModifier VM_CUSTOM = 1;
550
const ValueModifier VM_ABSTRACT = 2;
551
const ValueModifier VM_TRUNCATABLE = 3;
554
interface TypeCode { // PIDL
555
# pragma version TTypeCode 2.3
557
exception BadKind {};
558
// for all TypeCode kinds
559
boolean equal (in TypeCode tc);
560
boolean equivalent (in TypeCode tc);
561
TypeCode get_compact_typecode();
563
// for tk_objref, tk_struct, tk_union, tk_enum, tk_alias,
564
// tk_value, tk_value_box, tk_native, tk_abstract_interface
566
RepositoryId id () raises (BadKind);
567
// for tk_objref, tk_struct, tk_union, tk_enum, tk_alias,
568
// tk_value, tk_value_box, tk_native, tk_abstract_interface
570
Identifier name () raises (BadKind);
571
// for tk_struct, tk_union, tk_enum, tk_value,
573
unsigned long member_count () raises (BadKind);
574
Identifier member_name (in unsigned long index)
575
raises (BadKind, Bounds);
576
// for tk_struct, tk_union, tk_value, and tk_except
577
TypeCode member_type (in unsigned long index)
578
raises (BadKind, Bounds);
580
any member_label (in unsigned long index)
581
raises (BadKind, Bounds);
582
TypeCode discriminator_type () raises (BadKind);
583
long default_index () raises (BadKind);
584
// for tk_string, tk_sequence, and tk_array
585
unsigned long length () raises (BadKind);
586
// for tk_sequence, tk_array, tk_value_box, and tk_alias
587
TypeCode content_type () raises (BadKind);
589
unsigned short fixed_digits() raises (BadKind);
590
short fixed_scale() raises (BadKind);
592
Visibility member_visibility(in unsigned long index)
593
raises(BadKind, Bounds);
594
ValueModifier type_modifier() raises(BadKind);
595
TypeCode concrete_base_type() raises(BadKind);