src/share/classes/org/omg/CORBA/ir.idl

Wed, 27 Apr 2016 01:21:28 +0800

author
aoqi
date
Wed, 27 Apr 2016 01:21:28 +0800
changeset 0
7ef37b2cdcad
child 748
6845b95cba6b
permissions
-rw-r--r--

Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/corba/
changeset: 765:f46df0af2ca8
tag: jdk8u25-b17

aoqi@0 1 /*
aoqi@0 2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 *
aoqi@0 5 * This code is free software; you can redistribute it and/or modify it
aoqi@0 6 * under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 * published by the Free Software Foundation. Oracle designates this
aoqi@0 8 * particular file as subject to the "Classpath" exception as provided
aoqi@0 9 * by Oracle in the LICENSE file that accompanied this code.
aoqi@0 10 *
aoqi@0 11 * This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 14 * version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 15 * accompanied this code).
aoqi@0 16 *
aoqi@0 17 * You should have received a copy of the GNU General Public License version
aoqi@0 18 * 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 20 *
aoqi@0 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 22 * or visit www.oracle.com if you need additional information or have any
aoqi@0 23 * questions.
aoqi@0 24 */
aoqi@0 25
aoqi@0 26 /*
aoqi@0 27 * This file contains OMG IDL from CORBA V2.0, July 1995.
aoqi@0 28 * It also contains the TypeCode creation APIs in CORBA::ORB
aoqi@0 29 **/
aoqi@0 30
aoqi@0 31 #pragma prefix "omg.org"
aoqi@0 32 //#pragma javaPackage org.omg
aoqi@0 33
aoqi@0 34 module CORBA {
aoqi@0 35 typedef string Identifier;
aoqi@0 36 typedef string ScopedName;
aoqi@0 37 typedef string RepositoryId;
aoqi@0 38
aoqi@0 39 enum DefinitionKind {
aoqi@0 40 dk_none, dk_all,
aoqi@0 41 dk_Attribute, dk_Constant, dk_Exception, dk_Interface,
aoqi@0 42 dk_Module, dk_Operation, dk_Typedef,
aoqi@0 43 dk_Alias, dk_Struct, dk_Union, dk_Enum,
aoqi@0 44 dk_Primitive, dk_String, dk_Sequence, dk_Array,
aoqi@0 45 dk_Repository,
aoqi@0 46 dk_Wstring, dk_Fixed,
aoqi@0 47 dk_Value, dk_ValueBox, dk_ValueMember, // orbos 98-01-18: Objects By Value
aoqi@0 48 dk_Native
aoqi@0 49 };
aoqi@0 50
aoqi@0 51
aoqi@0 52 interface IRObject
aoqi@0 53 /**
aoqi@0 54 An IRObject IDL interface represents the most generic interface
aoqi@0 55 from which all other Interface Repository interfaces are derived,
aoqi@0 56 even the Repository itself.
aoqi@0 57 */
aoqi@0 58 {
aoqi@0 59 // read interface
aoqi@0 60 readonly attribute DefinitionKind def_kind;
aoqi@0 61
aoqi@0 62 // write interface
aoqi@0 63 void destroy ();
aoqi@0 64 };
aoqi@0 65
aoqi@0 66
aoqi@0 67
aoqi@0 68 typedef string VersionSpec;
aoqi@0 69
aoqi@0 70 interface Contained;
aoqi@0 71 interface Repository;
aoqi@0 72 interface Container;
aoqi@0 73
aoqi@0 74 interface Contained : IRObject
aoqi@0 75 /**
aoqi@0 76 The Contained Interface is inherited by all Interface Repository
aoqi@0 77 interfaces that are contained by other objects.
aoqi@0 78 */
aoqi@0 79 {
aoqi@0 80 // read/write interface
aoqi@0 81
aoqi@0 82 attribute RepositoryId id;
aoqi@0 83 attribute Identifier name;
aoqi@0 84 attribute VersionSpec version;
aoqi@0 85
aoqi@0 86 // read interface
aoqi@0 87
aoqi@0 88 readonly attribute Container defined_in;
aoqi@0 89 readonly attribute ScopedName absolute_name;
aoqi@0 90 readonly attribute Repository containing_repository;
aoqi@0 91
aoqi@0 92 struct Description {
aoqi@0 93 DefinitionKind kind;
aoqi@0 94 any value;
aoqi@0 95 };
aoqi@0 96
aoqi@0 97 Description describe ();
aoqi@0 98
aoqi@0 99 // write interface
aoqi@0 100
aoqi@0 101 void move (
aoqi@0 102 in Container new_container,
aoqi@0 103 in Identifier new_name,
aoqi@0 104 in VersionSpec new_version
aoqi@0 105 );
aoqi@0 106 };
aoqi@0 107
aoqi@0 108
aoqi@0 109 interface ModuleDef;
aoqi@0 110 interface ConstantDef;
aoqi@0 111 interface IDLType;
aoqi@0 112 interface StructDef;
aoqi@0 113 interface UnionDef;
aoqi@0 114 interface EnumDef;
aoqi@0 115 interface AliasDef;
aoqi@0 116 interface InterfaceDef;
aoqi@0 117 interface ExceptionDef;
aoqi@0 118 interface ValueDef; // orbos 98-01-18: Objects By Value
aoqi@0 119 interface ValueMemberDef; // orbos 98-01-18: Objects By Value
aoqi@0 120 interface ValueBoxDef; // orbos 98-01-18: Objects By Value
aoqi@0 121 interface NativeDef;
aoqi@0 122
aoqi@0 123
aoqi@0 124 typedef sequence <InterfaceDef> InterfaceDefSeq;
aoqi@0 125
aoqi@0 126
aoqi@0 127 typedef sequence <Contained> ContainedSeq;
aoqi@0 128
aoqi@0 129 struct StructMember {
aoqi@0 130 Identifier name;
aoqi@0 131 TypeCode type;
aoqi@0 132 IDLType type_def;
aoqi@0 133 };
aoqi@0 134 typedef sequence <StructMember> StructMemberSeq;
aoqi@0 135
aoqi@0 136 struct UnionMember {
aoqi@0 137 Identifier name;
aoqi@0 138 any label;
aoqi@0 139 TypeCode type;
aoqi@0 140 IDLType type_def;
aoqi@0 141 };
aoqi@0 142 typedef sequence <UnionMember> UnionMemberSeq;
aoqi@0 143
aoqi@0 144
aoqi@0 145 typedef sequence <Identifier> EnumMemberSeq;
aoqi@0 146
aoqi@0 147 // orbos 98-01-18: Objects By Value -- begin
aoqi@0 148 typedef short Visibility;
aoqi@0 149 const Visibility PRIVATE_MEMBER = 0;
aoqi@0 150 const Visibility PUBLIC_MEMBER = 1;
aoqi@0 151
aoqi@0 152 struct ValueMember {
aoqi@0 153 Identifier name;
aoqi@0 154 RepositoryId id;
aoqi@0 155 RepositoryId defined_in;
aoqi@0 156 VersionSpec version;
aoqi@0 157 TypeCode type;
aoqi@0 158 IDLType type_def;
aoqi@0 159 Visibility access;
aoqi@0 160 };
aoqi@0 161 typedef sequence <ValueMember> ValueMemberSeq;
aoqi@0 162
aoqi@0 163 struct Initializer {
aoqi@0 164 StructMemberSeq members;
aoqi@0 165 };
aoqi@0 166 typedef sequence <Initializer> InitializerSeq;
aoqi@0 167
aoqi@0 168 typedef sequence <ValueDef> ValueDefSeq;
aoqi@0 169
aoqi@0 170 // orbos 98-01-18: Objects By Value -- end
aoqi@0 171
aoqi@0 172
aoqi@0 173 interface Container : IRObject
aoqi@0 174 /**
aoqi@0 175 The Container interface is used to form a containment hierarchy
aoqi@0 176 in the Interface Repository. A Container can contain any number
aoqi@0 177 of objects derived from the Contained interface.
aoqi@0 178 */
aoqi@0 179 {
aoqi@0 180 // read interface
aoqi@0 181
aoqi@0 182 Contained lookup ( in ScopedName search_name);
aoqi@0 183
aoqi@0 184 ContainedSeq contents (
aoqi@0 185 in DefinitionKind limit_type,
aoqi@0 186 in boolean exclude_inherited
aoqi@0 187 );
aoqi@0 188
aoqi@0 189 ContainedSeq lookup_name (
aoqi@0 190 in Identifier search_name,
aoqi@0 191 in long levels_to_search,
aoqi@0 192 in DefinitionKind limit_type,
aoqi@0 193 in boolean exclude_inherited
aoqi@0 194 );
aoqi@0 195
aoqi@0 196 struct Description {
aoqi@0 197 Contained contained_object;
aoqi@0 198 DefinitionKind kind;
aoqi@0 199 any value;
aoqi@0 200 };
aoqi@0 201
aoqi@0 202 typedef sequence<Description> DescriptionSeq;
aoqi@0 203
aoqi@0 204 DescriptionSeq describe_contents (
aoqi@0 205 in DefinitionKind limit_type,
aoqi@0 206 in boolean exclude_inherited,
aoqi@0 207 in long max_returned_objs
aoqi@0 208 );
aoqi@0 209
aoqi@0 210 // write interface
aoqi@0 211
aoqi@0 212 ModuleDef create_module (
aoqi@0 213 in RepositoryId id,
aoqi@0 214 in Identifier name,
aoqi@0 215 in VersionSpec version
aoqi@0 216 );
aoqi@0 217
aoqi@0 218 ConstantDef create_constant (
aoqi@0 219 in RepositoryId id,
aoqi@0 220 in Identifier name,
aoqi@0 221 in VersionSpec version,
aoqi@0 222 in IDLType type,
aoqi@0 223 in any value
aoqi@0 224 );
aoqi@0 225
aoqi@0 226 StructDef create_struct (
aoqi@0 227 in RepositoryId id,
aoqi@0 228 in Identifier name,
aoqi@0 229 in VersionSpec version,
aoqi@0 230 in StructMemberSeq members
aoqi@0 231 );
aoqi@0 232
aoqi@0 233 UnionDef create_union (
aoqi@0 234 in RepositoryId id,
aoqi@0 235 in Identifier name,
aoqi@0 236 in VersionSpec version,
aoqi@0 237 in IDLType discriminator_type,
aoqi@0 238 in UnionMemberSeq members
aoqi@0 239 );
aoqi@0 240
aoqi@0 241 EnumDef create_enum (
aoqi@0 242 in RepositoryId id,
aoqi@0 243 in Identifier name,
aoqi@0 244 in VersionSpec version,
aoqi@0 245 in EnumMemberSeq members
aoqi@0 246 );
aoqi@0 247
aoqi@0 248 AliasDef create_alias (
aoqi@0 249 in RepositoryId id,
aoqi@0 250 in Identifier name,
aoqi@0 251 in VersionSpec version,
aoqi@0 252 in IDLType original_type
aoqi@0 253 );
aoqi@0 254
aoqi@0 255 ExceptionDef create_exception (
aoqi@0 256 in RepositoryId id,
aoqi@0 257 in Identifier name,
aoqi@0 258 in VersionSpec version,
aoqi@0 259 in StructMemberSeq members
aoqi@0 260 );
aoqi@0 261
aoqi@0 262
aoqi@0 263 InterfaceDef create_interface (
aoqi@0 264 in RepositoryId id,
aoqi@0 265 in Identifier name,
aoqi@0 266 in VersionSpec version,
aoqi@0 267 in boolean is_abstract,
aoqi@0 268 in InterfaceDefSeq base_interfaces
aoqi@0 269 );
aoqi@0 270
aoqi@0 271 // orbos 98-01-18: Objects By Value
aoqi@0 272 ValueDef create_value(
aoqi@0 273 in RepositoryId id,
aoqi@0 274 in Identifier name,
aoqi@0 275 in VersionSpec version,
aoqi@0 276 in boolean is_custom,
aoqi@0 277 in boolean is_abstract,
aoqi@0 278 in octet flags, // must be 0
aoqi@0 279 in ValueDef base_value,
aoqi@0 280 in boolean has_safe_base,
aoqi@0 281 in ValueDefSeq abstract_base_values,
aoqi@0 282 in InterfaceDefSeq supported_interfaces,
aoqi@0 283 in InitializerSeq initializers
aoqi@0 284 );
aoqi@0 285
aoqi@0 286 // orbos 98-01-18: Objects By Value
aoqi@0 287 ValueBoxDef create_value_box(
aoqi@0 288 in RepositoryId id,
aoqi@0 289 in Identifier name,
aoqi@0 290 in VersionSpec version,
aoqi@0 291 in IDLType original_type_def
aoqi@0 292 );
aoqi@0 293
aoqi@0 294 NativeDef create_native(
aoqi@0 295 in RepositoryId id,
aoqi@0 296 in Identifier name,
aoqi@0 297 in VersionSpec version
aoqi@0 298 );
aoqi@0 299
aoqi@0 300 };
aoqi@0 301
aoqi@0 302
aoqi@0 303
aoqi@0 304 interface IDLType : IRObject
aoqi@0 305 /**
aoqi@0 306 The IDLType interface is an abstract interface inherited by all
aoqi@0 307 IR objects that represent the OMG IDL types. It provides access
aoqi@0 308 to the TypeCode describing the type, and is used in defining the
aoqi@0 309 other interfaces wherever definitions of IDLType must be referenced.
aoqi@0 310 */
aoqi@0 311 {
aoqi@0 312 readonly attribute TypeCode type;
aoqi@0 313 };
aoqi@0 314
aoqi@0 315
aoqi@0 316
aoqi@0 317 interface PrimitiveDef;
aoqi@0 318 interface StringDef;
aoqi@0 319 interface SequenceDef;
aoqi@0 320 interface ArrayDef;
aoqi@0 321
aoqi@0 322 enum PrimitiveKind {
aoqi@0 323 pk_null, pk_void, pk_short, pk_long, pk_ushort, pk_ulong,
aoqi@0 324 pk_float, pk_double, pk_boolean, pk_char, pk_octet,
aoqi@0 325 pk_any, pk_TypeCode, pk_Principal, pk_string, pk_objref
aoqi@0 326 };
aoqi@0 327
aoqi@0 328 interface Repository : Container
aoqi@0 329 /**
aoqi@0 330 Repository is an interface that provides global access to the
aoqi@0 331 Interface Repository. Repository objects can contain constants,
aoqi@0 332 typedefs, exceptions, interfaces, and modules.
aoqi@0 333 */
aoqi@0 334 {
aoqi@0 335 // read interface
aoqi@0 336
aoqi@0 337 Contained lookup_id (in RepositoryId search_id);
aoqi@0 338
aoqi@0 339 PrimitiveDef get_primitive (in PrimitiveKind kind);
aoqi@0 340
aoqi@0 341 // write interface
aoqi@0 342
aoqi@0 343 StringDef create_string (in unsigned long bound);
aoqi@0 344
aoqi@0 345 SequenceDef create_sequence (
aoqi@0 346 in unsigned long bound,
aoqi@0 347 in IDLType element_type
aoqi@0 348 );
aoqi@0 349
aoqi@0 350 ArrayDef create_array (
aoqi@0 351 in unsigned long length,
aoqi@0 352 in IDLType element_type
aoqi@0 353 );
aoqi@0 354 };
aoqi@0 355
aoqi@0 356
aoqi@0 357 interface ModuleDef : Container, Contained
aoqi@0 358 /**
aoqi@0 359 A ModuleDef can contain constants, typedefs, exceptions, interfaces,
aoqi@0 360 and other module objects.
aoqi@0 361 */
aoqi@0 362 {
aoqi@0 363 };
aoqi@0 364
aoqi@0 365 struct ModuleDescription {
aoqi@0 366 Identifier name;
aoqi@0 367 RepositoryId id;
aoqi@0 368 RepositoryId defined_in;
aoqi@0 369 VersionSpec version;
aoqi@0 370 };
aoqi@0 371
aoqi@0 372
aoqi@0 373 interface ConstantDef : Contained
aoqi@0 374 /**
aoqi@0 375 A ConstantDef object defines a named constant.
aoqi@0 376 */
aoqi@0 377 {
aoqi@0 378 readonly attribute TypeCode type;
aoqi@0 379 attribute IDLType type_def;
aoqi@0 380 attribute any value;
aoqi@0 381 };
aoqi@0 382
aoqi@0 383 struct ConstantDescription {
aoqi@0 384 Identifier name;
aoqi@0 385 RepositoryId id;
aoqi@0 386 RepositoryId defined_in;
aoqi@0 387 VersionSpec version;
aoqi@0 388 TypeCode type;
aoqi@0 389 any value;
aoqi@0 390 };
aoqi@0 391
aoqi@0 392
aoqi@0 393 interface TypedefDef : Contained, IDLType
aoqi@0 394 /**
aoqi@0 395 TypedefDef is an abstract interface used as a base interface for
aoqi@0 396 all named non-object types(structures, unions, enumerations,
aoqi@0 397 aliases). The TypedefDef interface is not inherited by the definition
aoqi@0 398 objects for the primitive or anonymous types.
aoqi@0 399 */
aoqi@0 400 {
aoqi@0 401 };
aoqi@0 402
aoqi@0 403 struct TypeDescription {
aoqi@0 404 Identifier name;
aoqi@0 405 RepositoryId id;
aoqi@0 406 RepositoryId defined_in;
aoqi@0 407 VersionSpec version;
aoqi@0 408 TypeCode type;
aoqi@0 409 };
aoqi@0 410
aoqi@0 411
aoqi@0 412 interface StructDef : TypedefDef, Container
aoqi@0 413 /**
aoqi@0 414 A StructDef represents an OMG IDL structure definition.
aoqi@0 415 */
aoqi@0 416 {
aoqi@0 417 attribute StructMemberSeq members;
aoqi@0 418 };
aoqi@0 419
aoqi@0 420
aoqi@0 421 interface UnionDef : TypedefDef, Container
aoqi@0 422 /**
aoqi@0 423 A UnionDef represents an OMG IDL union definition.
aoqi@0 424 */
aoqi@0 425 {
aoqi@0 426 readonly attribute TypeCode discriminator_type;
aoqi@0 427 attribute IDLType discriminator_type_def;
aoqi@0 428 attribute UnionMemberSeq members;
aoqi@0 429 };
aoqi@0 430
aoqi@0 431
aoqi@0 432 interface EnumDef : TypedefDef
aoqi@0 433 /**
aoqi@0 434 A EnumDef represents an OMG IDL enum definition.
aoqi@0 435 */
aoqi@0 436 {
aoqi@0 437 attribute EnumMemberSeq members;
aoqi@0 438 };
aoqi@0 439
aoqi@0 440
aoqi@0 441 interface AliasDef : TypedefDef
aoqi@0 442 /**
aoqi@0 443 An AliasDef represents an OMG IDL typedef that aliases other
aoqi@0 444 definition.
aoqi@0 445 */
aoqi@0 446 {
aoqi@0 447 attribute IDLType original_type_def;
aoqi@0 448 };
aoqi@0 449
aoqi@0 450
aoqi@0 451 interface PrimitiveDef: IDLType
aoqi@0 452 /**
aoqi@0 453 A PrimitiveDef represents one of the IDL primitive types. As
aoqi@0 454 primitive types are unnamed, this interface is not derived from
aoqi@0 455 TypedefDef or Contained.
aoqi@0 456 */
aoqi@0 457 {
aoqi@0 458 readonly attribute PrimitiveKind kind;
aoqi@0 459 };
aoqi@0 460
aoqi@0 461
aoqi@0 462 interface StringDef : IDLType
aoqi@0 463 /**
aoqi@0 464 A StringDef represents an OMG IDL string type. As string
aoqi@0 465 types are anonymous, this interface is not derived from TypedefDef
aoqi@0 466 or Contained.
aoqi@0 467 */
aoqi@0 468 {
aoqi@0 469 attribute unsigned long bound;
aoqi@0 470 };
aoqi@0 471
aoqi@0 472
aoqi@0 473 interface SequenceDef : IDLType
aoqi@0 474 /**
aoqi@0 475 A SequenceDef represents an OMG IDL sequence type. As sequence
aoqi@0 476 types are anonymous, this interface is not derived from TypedefDef
aoqi@0 477 or Contained.
aoqi@0 478 */
aoqi@0 479 {
aoqi@0 480 attribute unsigned long bound;
aoqi@0 481 readonly attribute TypeCode element_type;
aoqi@0 482 attribute IDLType element_type_def;
aoqi@0 483 };
aoqi@0 484
aoqi@0 485 interface ArrayDef : IDLType
aoqi@0 486 /**
aoqi@0 487 An ArrayDef represents an OMG IDL array type. As array
aoqi@0 488 types are anonymous, this interface is not derived from TypedefDef
aoqi@0 489 or Contained.
aoqi@0 490 */
aoqi@0 491 {
aoqi@0 492 attribute unsigned long length;
aoqi@0 493 readonly attribute TypeCode element_type;
aoqi@0 494 attribute IDLType element_type_def;
aoqi@0 495 };
aoqi@0 496
aoqi@0 497
aoqi@0 498 interface ExceptionDef : Contained, Container
aoqi@0 499 /**
aoqi@0 500 An ExceptionDef represents an exception definition.
aoqi@0 501 */
aoqi@0 502 {
aoqi@0 503 readonly attribute TypeCode type;
aoqi@0 504 attribute StructMemberSeq members;
aoqi@0 505 };
aoqi@0 506 struct ExceptionDescription {
aoqi@0 507 Identifier name;
aoqi@0 508 RepositoryId id;
aoqi@0 509 RepositoryId defined_in;
aoqi@0 510 VersionSpec version;
aoqi@0 511 TypeCode type;
aoqi@0 512 };
aoqi@0 513
aoqi@0 514
aoqi@0 515
aoqi@0 516 enum AttributeMode {ATTR_NORMAL, ATTR_READONLY};
aoqi@0 517
aoqi@0 518 interface AttributeDef : Contained
aoqi@0 519 /**
aoqi@0 520 An AttributeDef represents the information that defines an
aoqi@0 521 attribute of an interface.
aoqi@0 522 */
aoqi@0 523 {
aoqi@0 524 readonly attribute TypeCode type;
aoqi@0 525 attribute IDLType type_def;
aoqi@0 526 attribute AttributeMode mode;
aoqi@0 527 };
aoqi@0 528
aoqi@0 529 struct AttributeDescription {
aoqi@0 530 Identifier name;
aoqi@0 531 RepositoryId id;
aoqi@0 532 RepositoryId defined_in;
aoqi@0 533 VersionSpec version;
aoqi@0 534 TypeCode type;
aoqi@0 535 AttributeMode mode;
aoqi@0 536 };
aoqi@0 537
aoqi@0 538
aoqi@0 539
aoqi@0 540 enum OperationMode {OP_NORMAL, OP_ONEWAY};
aoqi@0 541
aoqi@0 542 enum ParameterMode {PARAM_IN, PARAM_OUT, PARAM_INOUT};
aoqi@0 543 struct ParameterDescription {
aoqi@0 544 Identifier name;
aoqi@0 545 TypeCode type;
aoqi@0 546 IDLType type_def;
aoqi@0 547 ParameterMode mode;
aoqi@0 548 };
aoqi@0 549 typedef sequence <ParameterDescription> ParDescriptionSeq;
aoqi@0 550
aoqi@0 551 typedef Identifier ContextIdentifier;
aoqi@0 552 typedef sequence <ContextIdentifier> ContextIdSeq;
aoqi@0 553
aoqi@0 554 typedef sequence <ExceptionDef> ExceptionDefSeq;
aoqi@0 555 typedef sequence <ExceptionDescription> ExcDescriptionSeq;
aoqi@0 556
aoqi@0 557 interface OperationDef : Contained
aoqi@0 558 /**
aoqi@0 559 An OperationDef represents the information that defines an
aoqi@0 560 operation of an interface.
aoqi@0 561 */
aoqi@0 562 {
aoqi@0 563 readonly attribute TypeCode result;
aoqi@0 564 attribute IDLType result_def;
aoqi@0 565 attribute ParDescriptionSeq params;
aoqi@0 566 attribute OperationMode mode;
aoqi@0 567 attribute ContextIdSeq contexts;
aoqi@0 568 attribute ExceptionDefSeq exceptions;
aoqi@0 569 };
aoqi@0 570
aoqi@0 571 struct OperationDescription {
aoqi@0 572 Identifier name;
aoqi@0 573 RepositoryId id;
aoqi@0 574 RepositoryId defined_in;
aoqi@0 575 VersionSpec version;
aoqi@0 576 TypeCode result;
aoqi@0 577 OperationMode mode;
aoqi@0 578 ContextIdSeq contexts;
aoqi@0 579 ParDescriptionSeq parameters;
aoqi@0 580 ExcDescriptionSeq exceptions;
aoqi@0 581 };
aoqi@0 582
aoqi@0 583
aoqi@0 584
aoqi@0 585 typedef sequence <RepositoryId> RepositoryIdSeq;
aoqi@0 586 typedef sequence <OperationDescription> OpDescriptionSeq;
aoqi@0 587 typedef sequence <AttributeDescription> AttrDescriptionSeq;
aoqi@0 588
aoqi@0 589 interface InterfaceDef : Container, Contained, IDLType
aoqi@0 590 /**
aoqi@0 591 An InterfaceDef object represents an interface definition. It can
aoqi@0 592 contains constants, typedefs, exceptions, operations, and
aoqi@0 593 attributes.
aoqi@0 594 */
aoqi@0 595 {
aoqi@0 596 // read/write interface
aoqi@0 597
aoqi@0 598 attribute InterfaceDefSeq base_interfaces;
aoqi@0 599 attribute boolean is_abstract;
aoqi@0 600
aoqi@0 601 // read interface
aoqi@0 602
aoqi@0 603 boolean is_a (in RepositoryId interface_id);
aoqi@0 604
aoqi@0 605 struct FullInterfaceDescription {
aoqi@0 606 Identifier name;
aoqi@0 607 RepositoryId id;
aoqi@0 608 RepositoryId defined_in;
aoqi@0 609 VersionSpec version;
aoqi@0 610 boolean is_abstract;
aoqi@0 611 OpDescriptionSeq operations;
aoqi@0 612 AttrDescriptionSeq attributes;
aoqi@0 613 RepositoryIdSeq base_interfaces;
aoqi@0 614 TypeCode type;
aoqi@0 615 };
aoqi@0 616
aoqi@0 617 FullInterfaceDescription describe_interface();
aoqi@0 618
aoqi@0 619 // write interface
aoqi@0 620
aoqi@0 621 AttributeDef create_attribute (
aoqi@0 622 in RepositoryId id,
aoqi@0 623 in Identifier name,
aoqi@0 624 in VersionSpec version,
aoqi@0 625 in IDLType type,
aoqi@0 626 in AttributeMode mode
aoqi@0 627 );
aoqi@0 628
aoqi@0 629 OperationDef create_operation (
aoqi@0 630 in RepositoryId id,
aoqi@0 631 in Identifier name,
aoqi@0 632 in VersionSpec version,
aoqi@0 633 in IDLType result,
aoqi@0 634 in OperationMode mode,
aoqi@0 635 in ParDescriptionSeq params,
aoqi@0 636 in ExceptionDefSeq exceptions,
aoqi@0 637 in ContextIdSeq contexts
aoqi@0 638 );
aoqi@0 639 };
aoqi@0 640
aoqi@0 641 struct InterfaceDescription {
aoqi@0 642 Identifier name;
aoqi@0 643 RepositoryId id;
aoqi@0 644 RepositoryId defined_in;
aoqi@0 645 VersionSpec version;
aoqi@0 646 RepositoryIdSeq base_interfaces;
aoqi@0 647 };
aoqi@0 648
aoqi@0 649
aoqi@0 650 // orbos 98-01-18: Objects By Value -- begin
aoqi@0 651
aoqi@0 652 interface ValueMemberDef : Contained
aoqi@0 653
aoqi@0 654 /** A <code>ValueMemberDef</code> object represents the public
aoqi@0 655 and private data member definition of a <code>Value</code> type
aoqi@0 656 */
aoqi@0 657
aoqi@0 658 {
aoqi@0 659 readonly attribute TypeCode type;
aoqi@0 660 attribute IDLType type_def;
aoqi@0 661 attribute Visibility access;
aoqi@0 662 };
aoqi@0 663
aoqi@0 664 interface ValueDef : Container, Contained, IDLType
aoqi@0 665 /**
aoqi@0 666 A ValueDef object represents the definition of the
aoqi@0 667 <code>Value</code> object used to pass the object state
aoqi@0 668 between hosts
aoqi@0 669 */
aoqi@0 670
aoqi@0 671 {
aoqi@0 672 // read/write interface
aoqi@0 673 attribute InterfaceDefSeq supported_interfaces;
aoqi@0 674 attribute InitializerSeq initializers;
aoqi@0 675 attribute ValueDef base_value;
aoqi@0 676 attribute ValueDefSeq abstract_base_values;
aoqi@0 677 attribute boolean is_abstract;
aoqi@0 678 attribute boolean is_custom;
aoqi@0 679 attribute octet flags; // always 0
aoqi@0 680 attribute boolean has_safe_base;
aoqi@0 681
aoqi@0 682 // read interface
aoqi@0 683 boolean is_a(in RepositoryId value_id);
aoqi@0 684
aoqi@0 685 struct FullValueDescription {
aoqi@0 686 Identifier name;
aoqi@0 687 RepositoryId id;
aoqi@0 688 boolean is_abstract;
aoqi@0 689 boolean is_custom;
aoqi@0 690 octet flags; // always 0
aoqi@0 691 RepositoryId defined_in;
aoqi@0 692 VersionSpec version;
aoqi@0 693 OpDescriptionSeq operations;
aoqi@0 694 AttrDescriptionSeq attributes;
aoqi@0 695 ValueMemberSeq members;
aoqi@0 696 InitializerSeq initializers;
aoqi@0 697 RepositoryIdSeq supported_interfaces;
aoqi@0 698 RepositoryIdSeq abstract_base_values;
aoqi@0 699 boolean has_safe_base;
aoqi@0 700 RepositoryId base_value;
aoqi@0 701 TypeCode type;
aoqi@0 702 };
aoqi@0 703
aoqi@0 704 FullValueDescription describe_value();
aoqi@0 705
aoqi@0 706 // write interface
aoqi@0 707
aoqi@0 708 ValueMemberDef create_value_member(
aoqi@0 709 in RepositoryId id,
aoqi@0 710 in Identifier name,
aoqi@0 711 in VersionSpec version,
aoqi@0 712 in IDLType type_def,
aoqi@0 713 in Visibility access
aoqi@0 714 );
aoqi@0 715
aoqi@0 716 AttributeDef create_attribute(
aoqi@0 717 in RepositoryId id,
aoqi@0 718 in Identifier name,
aoqi@0 719 in VersionSpec version,
aoqi@0 720 in IDLType type,
aoqi@0 721 in AttributeMode mode
aoqi@0 722 );
aoqi@0 723
aoqi@0 724 OperationDef create_operation(
aoqi@0 725 in RepositoryId id,
aoqi@0 726 in Identifier name,
aoqi@0 727 in VersionSpec version,
aoqi@0 728 in IDLType result,
aoqi@0 729 in OperationMode mode,
aoqi@0 730 in ParDescriptionSeq params,
aoqi@0 731 in ExceptionDefSeq exceptions,
aoqi@0 732 in ContextIdSeq contexts
aoqi@0 733 );
aoqi@0 734 };
aoqi@0 735 struct ValueDescription {
aoqi@0 736 Identifier name;
aoqi@0 737 RepositoryId id;
aoqi@0 738 boolean is_abstract;
aoqi@0 739 boolean is_custom;
aoqi@0 740 octet flags; // always 0
aoqi@0 741 RepositoryId defined_in;
aoqi@0 742 VersionSpec version;
aoqi@0 743 RepositoryIdSeq supported_interfaces;
aoqi@0 744 RepositoryIdSeq abstract_base_values;
aoqi@0 745 boolean has_safe_base;
aoqi@0 746 RepositoryId base_value;
aoqi@0 747 };
aoqi@0 748
aoqi@0 749 interface ValueBoxDef : IDLType
aoqi@0 750
aoqi@0 751 /** ValueBoxDef is an interface that reresents a value type with
aoqi@0 752 a single data member inside its state section and no
aoqi@0 753 inheritance or methods. For example, when transmitting a
aoqi@0 754 string or sequence as an actual parameter on an interface
aoqi@0 755 operation or as a data member of a value type that is an
aoqi@0 756 actual parameter, it may be important to preserve any sharing
aoqi@0 757 of the string or sequence within the object graph being
aoqi@0 758 transmitted. Because current IDL data types do not preserve
aoqi@0 759 referential integrity in this way, this requirement is
aoqi@0 760 conveniently handled by using a value type. Value types also
aoqi@0 761 support the transmission of nulls (as a distinguished value),
aoqi@0 762 whereas IDL data types such as string and sequence (which are
aoqi@0 763 mapped to empty strings and sequences) do not. The Java to IDL
aoqi@0 764 mapping requires both preservation of referential integrity
aoqi@0 765 and transmission of nulls. Because it would be cumbersome to
aoqi@0 766 require the full IDL syntax for a value type for this specific
aoqi@0 767 usage, this shorthand notation is introduced to cover this use
aoqi@0 768 of value types for simple containment of a single data member.
aoqi@0 769 */
aoqi@0 770
aoqi@0 771 {
aoqi@0 772 attribute IDLType original_type_def;
aoqi@0 773 };
aoqi@0 774
aoqi@0 775 // orbos 98-01-18: Objects By Value -- end
aoqi@0 776
aoqi@0 777 enum TCKind {
aoqi@0 778 tk_null, tk_void,
aoqi@0 779 tk_short, tk_long, tk_ushort, tk_ulong,
aoqi@0 780 tk_float, tk_double, tk_boolean, tk_char,
aoqi@0 781 tk_octet, tk_any, tk_TypeCode, tk_Principal, tk_objref,
aoqi@0 782 tk_struct, tk_union, tk_enum, tk_string,
aoqi@0 783 tk_sequence, tk_array, tk_alias, tk_except,
aoqi@0 784 tk_longlong, tk_ulonglong, tk_longdouble,
aoqi@0 785 tk_wchar, tk_wstring, tk_fixed,
aoqi@0 786 tk_value, tk_value_box,
aoqi@0 787 tk_native,
aoqi@0 788 tk_abstract_interface
aoqi@0 789 };
aoqi@0 790
aoqi@0 791 interface NativeDef : TypedefDef {
aoqi@0 792 };
aoqi@0 793 };

mercurial