ir.idl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. //
  2. // %Z%%W% %I%
  3. // ===========================================================================
  4. // Licensed Materials - Property of IBM
  5. // "Restricted Materials of IBM"
  6. //
  7. // IBM Object Request Broker Edition, 2.00
  8. // (C) Copyright IBM Corp. 1998, 2015. All Rights Reserved
  9. //
  10. // US Government Users Restricted Rights - Use, duplication or disclosure
  11. // restricted by GSA ADP Schedule Contract with IBM Corp.
  12. // ===========================================================================
  13. //
  14. //Updated: December 1999
  15. //This file contains OMG IDL from CORBA V2.3 December 1999
  16. //
  17. // OMG IDL from Chapters 1 through 15 CORBA module
  18. //
  19. // Post CORBA 2.3 changes from core RTF bracketed
  20. // in #ifdef CORBA_2_5 ... #endif
  21. //
  22. // Stuff from Messaging specification is bracketed
  23. // in #ifdef CORBA3 ... #endif
  24. #pragma prefix "omg.org"
  25. module CORBA {
  26. // Chapter 10 Interface Repository
  27. typedef string Identifier;
  28. typedef string ScopedName;
  29. typedef string RepositoryId;
  30. enum DefinitionKind {
  31. dk_none, dk_all,
  32. dk_Attribute, dk_Constant, dk_Exception, dk_Interface,
  33. dk_Module, dk_Operation, dk_Typedef,
  34. dk_Alias, dk_Struct, dk_Union, dk_Enum,
  35. dk_Primitive, dk_String, dk_Sequence, dk_Array,
  36. dk_Repository,
  37. dk_Wstring, dk_Fixed,
  38. dk_Value, dk_ValueBox, dk_ValueMember,
  39. dk_Native,
  40. dk_AbstractInterface
  41. };
  42. interface IRObject {
  43. // read interface
  44. readonly attribute DefinitionKind def_kind;
  45. // write interface
  46. void destroy ();
  47. };
  48. typedef string VersionSpec;
  49. interface Contained;
  50. interface Repository;
  51. interface Container;
  52. interface Contained : IRObject {
  53. // read/write interface
  54. attribute RepositoryId id;
  55. attribute Identifier name;
  56. attribute VersionSpec version;
  57. // read interface
  58. readonly attribute Container defined_in;
  59. readonly attribute ScopedName absolute_name;
  60. readonly attribute Repository containing_repository;
  61. struct Description {
  62. DefinitionKind kind;
  63. any value;
  64. };
  65. Description describe ();
  66. // write interface
  67. void move (
  68. in Container new_container,
  69. in Identifier new_name,
  70. in VersionSpec new_version
  71. );
  72. };
  73. interface ModuleDef;
  74. interface ConstantDef;
  75. interface IDLType;
  76. interface StructDef;
  77. interface UnionDef;
  78. interface EnumDef;
  79. interface AliasDef;
  80. interface InterfaceDef;
  81. interface ExceptionDef;
  82. interface NativeDef;
  83. typedef sequence <InterfaceDef> InterfaceDefSeq;
  84. interface ValueDef;
  85. typedef sequence <ValueDef> ValueDefSeq;
  86. interface ValueBoxDef;
  87. typedef sequence <Contained> ContainedSeq;
  88. interface AbstractInterfaceDef;
  89. typedef sequence <AbstractInterfaceDef> AbstractInterfaceDefSeq;
  90. struct StructMember {
  91. Identifier name;
  92. TypeCode type;
  93. IDLType type_def;
  94. };
  95. typedef sequence <StructMember> StructMemberSeq;
  96. struct Initializer {
  97. StructMemberSeq members;
  98. Identifier name;
  99. };
  100. typedef sequence <Initializer> InitializerSeq;
  101. struct UnionMember {
  102. Identifier name;
  103. any label;
  104. TypeCode type;
  105. IDLType type_def;
  106. };
  107. typedef sequence <UnionMember> UnionMemberSeq;
  108. typedef sequence <Identifier> EnumMemberSeq;
  109. interface Container : IRObject {
  110. // read interface
  111. Contained lookup (
  112. in ScopedName search_name
  113. );
  114. ContainedSeq contents (
  115. in DefinitionKind limit_type,
  116. in boolean exclude_inherited
  117. );
  118. ContainedSeq lookup_name (
  119. in Identifier search_name,
  120. in long levels_to_search,
  121. in DefinitionKind limit_type,
  122. in boolean exclude_inherited
  123. );
  124. struct Description {
  125. Contained contained_object;
  126. DefinitionKind kind;
  127. any value;
  128. };
  129. typedef sequence<Description> DescriptionSeq;
  130. DescriptionSeq describe_contents (
  131. in DefinitionKind limit_type,
  132. in boolean exclude_inherited,
  133. in long max_returned_objs
  134. );
  135. // write interface
  136. ModuleDef create_module (
  137. in RepositoryId id,
  138. in Identifier name,
  139. in VersionSpec version
  140. );
  141. ConstantDef create_constant (
  142. in RepositoryId id,
  143. in Identifier name,
  144. in VersionSpec version,
  145. in IDLType type,
  146. in any value
  147. );
  148. StructDef create_struct (
  149. in RepositoryId id,
  150. in Identifier name,
  151. in VersionSpec version,
  152. in StructMemberSeq members
  153. );
  154. UnionDef create_union (
  155. in RepositoryId id,
  156. in Identifier name,
  157. in VersionSpec version,
  158. in IDLType discriminator_type,
  159. in UnionMemberSeq members
  160. );
  161. EnumDef create_enum (
  162. in RepositoryId id,
  163. in Identifier name,
  164. in VersionSpec version,
  165. in EnumMemberSeq members
  166. );
  167. AliasDef create_alias (
  168. in RepositoryId id,
  169. in Identifier name,
  170. in VersionSpec version,
  171. in IDLType original_type
  172. );
  173. InterfaceDef create_interface (
  174. in RepositoryId id,
  175. in Identifier name,
  176. in VersionSpec version,
  177. in InterfaceDefSeq base_interfaces
  178. );
  179. ValueDef create_value(
  180. in RepositoryId id,
  181. in Identifier name,
  182. in VersionSpec version,
  183. in boolean is_custom,
  184. in boolean is_abstract,
  185. in ValueDef base_value,
  186. in boolean is_truncatable,
  187. in ValueDefSeq abstract_base_values,
  188. in InterfaceDefSeq supported_interfaces,
  189. in InitializerSeq initializers
  190. );
  191. ValueBoxDef create_value_box(
  192. in RepositoryId id,
  193. in Identifier name,
  194. in VersionSpec version,
  195. in IDLType original_type_def
  196. );
  197. ExceptionDef create_exception(
  198. in RepositoryId id,
  199. in Identifier name,
  200. in VersionSpec version,
  201. in StructMemberSeq members
  202. );
  203. NativeDef create_native(
  204. in RepositoryId id,
  205. in Identifier name,
  206. in VersionSpec version
  207. );
  208. AbstractInterfaceDef create_abstract_interface (
  209. in RepositoryId id,
  210. in Identifier name,
  211. in VersionSpec version,
  212. in AbstractInterfaceDefSeq base_interfaces
  213. );
  214. };
  215. interface IDLType : IRObject {
  216. readonly attribute TypeCode type;
  217. };
  218. interface PrimitiveDef;
  219. interface StringDef;
  220. interface SequenceDef;
  221. interface ArrayDef;
  222. interface WstringDef;
  223. interface FixedDef;
  224. enum PrimitiveKind {
  225. pk_null, pk_void, pk_short, pk_long, pk_ushort, pk_ulong,
  226. pk_float, pk_double, pk_boolean, pk_char, pk_octet,
  227. pk_any, pk_TypeCode, pk_Principal, pk_string, pk_objref,
  228. pk_longlong, pk_ulonglong, pk_longdouble,
  229. pk_wchar, pk_wstring, pk_value_base
  230. };
  231. interface Repository : Container {
  232. // read interface
  233. Contained lookup_id (in RepositoryId search_id);
  234. TypeCode get_canonical_typecode(in TypeCode tc);
  235. PrimitiveDef get_primitive (in PrimitiveKind kind);
  236. // write interface
  237. StringDef create_string (in unsigned long bound);
  238. WstringDef create_wstring (in unsigned long bound);
  239. SequenceDef create_sequence (
  240. in unsigned long bound,
  241. in IDLType element_type
  242. );
  243. ArrayDef create_array (
  244. in unsigned long length,
  245. in IDLType element_type
  246. );
  247. FixedDef create_fixed (
  248. in unsigned short digits,
  249. in short scale
  250. );
  251. };
  252. interface ModuleDef : Container, Contained {
  253. };
  254. struct ModuleDescription {
  255. Identifier name;
  256. RepositoryId id;
  257. RepositoryId defined_in;
  258. VersionSpec version;
  259. };
  260. interface ConstantDef : Contained {
  261. readonly attribute TypeCode type;
  262. attribute IDLType type_def;
  263. attribute any value;
  264. };
  265. struct ConstantDescription {
  266. Identifier name;
  267. RepositoryId id;
  268. RepositoryId defined_in;
  269. VersionSpec version;
  270. TypeCode type;
  271. any value;
  272. };
  273. interface TypedefDef : Contained, IDLType {
  274. };
  275. struct TypeDescription {
  276. Identifier name;
  277. RepositoryId id;
  278. RepositoryId defined_in;
  279. VersionSpec version;
  280. TypeCode type;
  281. };
  282. interface StructDef : TypedefDef, Container {
  283. attribute StructMemberSeq members;
  284. };
  285. interface UnionDef : TypedefDef, Container {
  286. readonly attribute TypeCode discriminator_type;
  287. attribute IDLType discriminator_type_def;
  288. attribute UnionMemberSeq members;
  289. };
  290. interface EnumDef : TypedefDef {
  291. attribute EnumMemberSeq members;
  292. };
  293. interface AliasDef : TypedefDef {
  294. attribute IDLType original_type_def;
  295. };
  296. interface NativeDef : TypedefDef {
  297. };
  298. interface PrimitiveDef: IDLType {
  299. readonly attribute PrimitiveKind kind;
  300. };
  301. interface StringDef : IDLType {
  302. attribute unsigned long bound;
  303. };
  304. interface WstringDef : IDLType {
  305. attribute unsigned long bound;
  306. };
  307. interface FixedDef : IDLType {
  308. attribute unsigned short digits;
  309. attribute short scale;
  310. };
  311. interface SequenceDef : IDLType {
  312. attribute unsigned long bound;
  313. readonly attribute TypeCode element_type;
  314. attribute IDLType element_type_def;
  315. };
  316. interface ArrayDef : IDLType {
  317. attribute unsigned long length;
  318. readonly attribute TypeCode element_type;
  319. attribute IDLType element_type_def;
  320. };
  321. interface ExceptionDef : Contained, Container {
  322. readonly attribute TypeCode type;
  323. attribute StructMemberSeq members;
  324. };
  325. struct ExceptionDescription {
  326. Identifier name;
  327. RepositoryId id;
  328. RepositoryId defined_in;
  329. VersionSpec version;
  330. TypeCode type;
  331. };
  332. enum AttributeMode {ATTR_NORMAL, ATTR_READONLY};
  333. interface AttributeDef : Contained {
  334. readonly attribute TypeCode type;
  335. attribute IDLType type_def;
  336. attribute AttributeMode mode;
  337. };
  338. struct AttributeDescription {
  339. Identifier name;
  340. RepositoryId id;
  341. RepositoryId defined_in;
  342. VersionSpec version;
  343. TypeCode type;
  344. AttributeMode mode;
  345. };
  346. enum OperationMode {OP_NORMAL, OP_ONEWAY};
  347. enum ParameterMode {PARAM_IN, PARAM_OUT, PARAM_INOUT};
  348. struct ParameterDescription {
  349. Identifier name;
  350. TypeCode type;
  351. IDLType type_def;
  352. ParameterMode mode;
  353. };
  354. typedef sequence <ParameterDescription> ParDescriptionSeq;
  355. typedef Identifier ContextIdentifier;
  356. typedef sequence <ContextIdentifier> ContextIdSeq;
  357. typedef sequence <ExceptionDef> ExceptionDefSeq;
  358. typedef sequence <ExceptionDescription> ExcDescriptionSeq;
  359. interface OperationDef : Contained {
  360. readonly attribute TypeCode result;
  361. attribute IDLType result_def;
  362. attribute ParDescriptionSeq params;
  363. attribute OperationMode mode;
  364. attribute ContextIdSeq contexts;
  365. attribute ExceptionDefSeq exceptions;
  366. };
  367. struct OperationDescription {
  368. Identifier name;
  369. RepositoryId id;
  370. RepositoryId defined_in;
  371. VersionSpec version;
  372. TypeCode result;
  373. OperationMode mode;
  374. ContextIdSeq contexts;
  375. ParDescriptionSeq parameters;
  376. ExcDescriptionSeq exceptions;
  377. };
  378. typedef sequence <RepositoryId> RepositoryIdSeq;
  379. typedef sequence <OperationDescription> OpDescriptionSeq;
  380. typedef sequence <AttributeDescription> AttrDescriptionSeq;
  381. interface InterfaceDef : Container, Contained, IDLType {
  382. // read/write interface
  383. attribute InterfaceDefSeq base_interfaces;
  384. // read interface
  385. boolean is_a (
  386. in RepositoryId interface_id
  387. );
  388. struct FullInterfaceDescription {
  389. Identifier name;
  390. RepositoryId id;
  391. RepositoryId defined_in;
  392. VersionSpec version;
  393. OpDescriptionSeq operations;
  394. AttrDescriptionSeq attributes;
  395. RepositoryIdSeq base_interfaces;
  396. TypeCode type;
  397. };
  398. FullInterfaceDescription describe_interface();
  399. // write interface
  400. AttributeDef create_attribute (
  401. in RepositoryId id,
  402. in Identifier name,
  403. in VersionSpec version,
  404. in IDLType type,
  405. in AttributeMode mode
  406. );
  407. OperationDef create_operation (
  408. in RepositoryId id,
  409. in Identifier name,
  410. in VersionSpec version,
  411. in IDLType result,
  412. in OperationMode mode,
  413. in ParDescriptionSeq params,
  414. in ExceptionDefSeq exceptions,
  415. in ContextIdSeq contexts
  416. );
  417. };
  418. struct InterfaceDescription {
  419. Identifier name;
  420. RepositoryId id;
  421. RepositoryId defined_in;
  422. VersionSpec version;
  423. RepositoryIdSeq base_interfaces;
  424. };
  425. typedef short Visibility;
  426. const Visibility PRIVATE_MEMBER = 0;
  427. const Visibility PUBLIC_MEMBER = 1;
  428. struct ValueMember {
  429. Identifier name;
  430. RepositoryId id;
  431. RepositoryId defined_in;
  432. VersionSpec version;
  433. TypeCode type;
  434. IDLType type_def;
  435. Visibility access;
  436. };
  437. typedef sequence <ValueMember> ValueMemberSeq;
  438. interface ValueMemberDef : Contained {
  439. readonly attribute TypeCode type;
  440. attribute IDLType type_def;
  441. attribute Visibility access;
  442. };
  443. interface ValueDef : Container, Contained, IDLType {
  444. // read/write interface
  445. attribute InterfaceDefSeq supported_interfaces;
  446. attribute InitializerSeq initializers;
  447. attribute ValueDef base_value;
  448. attribute ValueDefSeq abstract_base_values;
  449. attribute boolean is_abstract;
  450. attribute boolean is_custom;
  451. attribute boolean is_truncatable;
  452. // read interface
  453. boolean is_a(
  454. in RepositoryId id
  455. );
  456. struct FullValueDescription {
  457. Identifier name;
  458. RepositoryId id;
  459. boolean is_abstract;
  460. boolean is_custom;
  461. RepositoryId defined_in;
  462. VersionSpec version;
  463. OpDescriptionSeq operations;
  464. AttrDescriptionSeq attributes;
  465. ValueMemberSeq members;
  466. InitializerSeq initializers;
  467. RepositoryIdSeq supported_interfaces;
  468. RepositoryIdSeq abstract_base_values;
  469. boolean is_truncatable;
  470. RepositoryId base_value;
  471. TypeCode type;
  472. };
  473. FullValueDescription describe_value();
  474. ValueMemberDef create_value_member(
  475. in RepositoryId id,
  476. in Identifier name,
  477. in VersionSpec version,
  478. in IDLType type,
  479. in Visibility access
  480. );
  481. AttributeDef create_attribute(
  482. in RepositoryId id,
  483. in Identifier name,
  484. in VersionSpec version,
  485. in IDLType type,
  486. in AttributeMode mode
  487. );
  488. OperationDef create_operation (
  489. in RepositoryId id,
  490. in Identifier name,
  491. in VersionSpec version,
  492. in IDLType result,
  493. in OperationMode mode,
  494. in ParDescriptionSeq params,
  495. in ExceptionDefSeq exceptions,
  496. in ContextIdSeq contexts
  497. );
  498. };
  499. struct ValueDescription {
  500. Identifier name;
  501. RepositoryId id;
  502. boolean is_abstract;
  503. boolean is_custom;
  504. RepositoryId defined_in;
  505. VersionSpec version;
  506. RepositoryIdSeq supported_interfaces;
  507. RepositoryIdSeq abstract_base_values;
  508. boolean is_truncatable;
  509. RepositoryId base_value;
  510. };
  511. interface ValueBoxDef : TypedefDef {
  512. attribute IDLType original_type_def;
  513. };
  514. interface AbstractInterfaceDef : InterfaceDef {
  515. };
  516. enum TCKind {
  517. # pragma version TCKind 2.3
  518. tk_null, tk_void,
  519. tk_short, tk_long, tk_ushort, tk_ulong,
  520. tk_float, tk_double, tk_boolean, tk_char,
  521. tk_octet, tk_any, tk_TypeCode, tk_Principal, tk_objref,
  522. tk_struct, tk_union, tk_enum, tk_string,
  523. tk_sequence, tk_array, tk_alias, tk_except,
  524. tk_longlong, tk_ulonglong, tk_longdouble,
  525. tk_wchar, tk_wstring, tk_fixed,
  526. tk_value, tk_value_box,
  527. tk_native,
  528. tk_abstract_interface
  529. };
  530. typedef short ValueModifier;
  531. const ValueModifier VM_NONE = 0;
  532. const ValueModifier VM_CUSTOM = 1;
  533. const ValueModifier VM_ABSTRACT = 2;
  534. const ValueModifier VM_TRUNCATABLE = 3;
  535. };