home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / TRIAL / JBUILDER / JVISBRKR.Z / ir.idl < prev    next >
Encoding:
Text File  |  1998-05-08  |  9.3 KB  |  431 lines

  1. // ir.idl
  2.  
  3. #pragma prefix "omg.org"
  4.  
  5. module CORBA
  6. {
  7.  
  8.     typedef string    Identifier;
  9.     typedef string    ScopedName;
  10.     typedef string    RepositoryId;
  11.     
  12.     enum DefinitionKind {
  13.         dk_none, dk_all,
  14.         dk_Attribute, dk_Constant, dk_Exception, dk_Interface,
  15.         dk_Module, dk_Operation, dk_Typedef,
  16.         dk_Alias, dk_Struct, dk_Union, dk_Enum,
  17.         dk_Primitive, dk_String, dk_Sequence, dk_Array,
  18.         dk_Repository, dk_Wstring, dk_Estruct
  19.     };
  20.  
  21.     interface IRObject {
  22.         readonly attribute DefinitionKind def_kind;
  23.  
  24.         void destroy();
  25.     };
  26.  
  27.     interface IDLType: IRObject {
  28.         readonly attribute TypeCode type;
  29.     };
  30.  
  31.     struct VersionSpec {
  32.         unsigned short major;
  33.         unsigned short minor;
  34.     };
  35.  
  36.     interface Contained;
  37.     interface Repository;
  38.     interface Container;
  39.     
  40.     interface Contained: IRObject {
  41.         attribute RepositoryId id;
  42.         attribute Identifier name;
  43.         attribute VersionSpec version;
  44.  
  45.         readonly attribute Container defined_in;
  46.         readonly attribute ScopedName absolute_name;
  47.         readonly attribute Repository containing_repository;
  48.  
  49.         struct Description {
  50.             DefinitionKind kind;
  51.             any value;
  52.         };
  53.  
  54.         Description describe();
  55.  
  56.         void move(
  57.             in Container new_container,
  58.             in Identifier new_name,
  59.             in VersionSpec new_version
  60.         );
  61.  
  62.     };
  63.  
  64.     interface ModuleDef;
  65.     interface ConstantDef;
  66.     interface StructDef;
  67.     interface EstructDef;
  68.     interface UnionDef;
  69.     interface EnumDef;
  70.     interface AliasDef;
  71.     interface InterfaceDef;
  72.     typedef sequence <InterfaceDef> InterfaceDefSeq;
  73.     
  74.     typedef sequence <Contained> ContainedSeq;
  75.  
  76.     struct StructMember {
  77.         Identifier name;    
  78.         TypeCode type;
  79.         IDLType type_def;
  80.     };
  81.     typedef sequence<StructMember> StructMemberSeq;
  82.     
  83.     struct UnionMember {
  84.         Identifier name;
  85.         any label;
  86.         TypeCode type;
  87.         IDLType type_def;
  88.     };
  89.     typedef sequence<UnionMember> UnionMemberSeq;
  90.  
  91.     typedef sequence<Identifier> EnumMemberSeq;
  92.  
  93.     interface Container: IRObject {
  94.         Contained lookup(in ScopedName search_name);
  95.         ContainedSeq contents(
  96.             in DefinitionKind limit_type,
  97.             in boolean exclude_inherited
  98.         );
  99.         ContainedSeq lookup_name(
  100.             in Identifier search_name,
  101.             in long levels_to_search,
  102.             in DefinitionKind limit_type,
  103.             in boolean exclude_inherited
  104.         );
  105.  
  106.         struct Description {
  107.             Contained contained_object;
  108.             DefinitionKind kind;
  109.             any value;
  110.         };
  111.         typedef sequence<Description> DescriptionSeq;
  112.  
  113.         DescriptionSeq describe_contents(
  114.             in DefinitionKind limit_type,
  115.             in boolean exclude_inherited,
  116.             in long max_returned_objs
  117.         );
  118.  
  119.         ModuleDef create_module(
  120.             in RepositoryId id,
  121.             in Identifier name,
  122.             in VersionSpec version
  123.         );
  124.         
  125.         ConstantDef create_constant(
  126.             in RepositoryId id,
  127.             in Identifier name,
  128.             in VersionSpec version,
  129.             in IDLType type,
  130.             in any value
  131.         );
  132.  
  133.         StructDef create_struct(
  134.             in RepositoryId id,
  135.             in Identifier name,
  136.             in VersionSpec version,
  137.             in StructMemberSeq members
  138.         );
  139.  
  140.         EstructDef create_estruct(
  141.             in RepositoryId id,
  142.             in Identifier name,
  143.             in VersionSpec version,
  144.             in EstructDef base, 
  145.             in StructMemberSeq members
  146.         );
  147.  
  148.         UnionDef create_union(    
  149.             in RepositoryId id,
  150.             in Identifier name,
  151.             in VersionSpec version,
  152.             in IDLType discriminator_type,
  153.             in UnionMemberSeq members
  154.         );
  155.  
  156.         EnumDef create_enum(
  157.             in RepositoryId id,
  158.             in Identifier name,
  159.             in VersionSpec version,
  160.             in EnumMemberSeq members
  161.         );
  162.  
  163.         AliasDef create_alias(
  164.             in RepositoryId id,
  165.             in Identifier name,
  166.             in VersionSpec version,
  167.             in IDLType original_type
  168.         );
  169.  
  170.         InterfaceDef create_interface(
  171.             in RepositoryId id,
  172.             in Identifier name,
  173.             in VersionSpec version,
  174.             in InterfaceDefSeq base_interfaces
  175.         );
  176.  
  177.         InterfaceDef forward_declare_interface(
  178.             in RepositoryId id,
  179.             in Identifier name,
  180.             in VersionSpec version
  181.         );
  182.  
  183.     };
  184.  
  185.  
  186.     interface PrimitiveDef;
  187.     interface StringDef;
  188.     interface WstringDef;
  189.     interface SequenceDef;
  190.     interface ArrayDef;
  191.     
  192.     enum PrimitiveKind {
  193.         pk_null, pk_void, pk_short, pk_long, pk_ushort, pk_ulong,
  194.         pk_float, pk_double, pk_boolean, pk_char, pk_octet,
  195.         pk_any, pk_TypeCode, pk_Principal, pk_string, pk_objref,
  196.         pk_longlong, pk_ulonglong, pk_longdouble,
  197.         pk_wchar, pk_wstring
  198.     };
  199.         
  200.     interface Repository: Container {
  201.  
  202.         Contained lookup_id(in RepositoryId search_id);
  203.  
  204.         PrimitiveDef get_primitive(in PrimitiveKind kind);
  205.  
  206.         StringDef create_string(in unsigned long bound);
  207.  
  208.         WstringDef create_wstring(in unsigned long bound);
  209.  
  210.         SequenceDef create_sequence(
  211.             in unsigned long bound,
  212.             in IDLType element_type
  213.         );
  214.  
  215.         ArrayDef create_array(
  216.             in unsigned long length,
  217.             in IDLType element_type
  218.         );
  219.  
  220.     };
  221.  
  222.     interface ModuleDef: Container, Contained {
  223.     };
  224.  
  225.     struct ModuleDescription {
  226.         Identifier name;
  227.         RepositoryId id;
  228.         RepositoryId defined_in;
  229.         VersionSpec version;
  230.     };
  231.  
  232.     interface ConstantDef: Contained {
  233.         readonly attribute TypeCode type;
  234.         attribute IDLType type_def;
  235.         attribute any value;
  236.     };
  237.  
  238.     struct ConstantDescription {
  239.         Identifier name;
  240.         RepositoryId id;
  241.         RepositoryId defined_in;
  242.         VersionSpec version;
  243.         TypeCode type;
  244.         any value;
  245.     };
  246.  
  247.     interface TypedefDef: Contained, IDLType {
  248.     };
  249.  
  250.     struct TypeDescription {
  251.         Identifier name;
  252.         RepositoryId id;
  253.         RepositoryId defined_in;
  254.         VersionSpec version;
  255.         TypeCode type;
  256.     };
  257.  
  258.     interface StructDef: TypedefDef {
  259.         attribute StructMemberSeq members;
  260.     };
  261.  
  262.     interface EstructDef: TypedefDef {
  263.         readonly attribute TypeCode base;
  264.         attribute EstructDef base_def;
  265.         attribute StructMemberSeq members;
  266.     };
  267.  
  268.     interface UnionDef: TypedefDef {
  269.         readonly attribute TypeCode discriminator_type;
  270.         attribute IDLType discriminator_type_def;
  271.         attribute UnionMemberSeq members;
  272.     };
  273.  
  274.     interface EnumDef: TypedefDef {
  275.         attribute EnumMemberSeq members;
  276.     };
  277.  
  278.     interface AliasDef: TypedefDef {
  279.         attribute IDLType original_type_def;
  280.     };
  281.     
  282.     interface PrimitiveDef: IDLType {
  283.         readonly attribute PrimitiveKind kind;
  284.     };
  285.  
  286.     interface StringDef: IDLType {
  287.         attribute unsigned long bound;
  288.     };
  289.  
  290.     interface WstringDef: IDLType {
  291.         attribute unsigned long bound;
  292.     };
  293.  
  294.     interface SequenceDef: IDLType {
  295.         attribute unsigned long bound;
  296.         readonly attribute TypeCode element_type;
  297.         attribute IDLType element_type_def;
  298.     };
  299.  
  300.     interface ArrayDef: IDLType {
  301.         attribute unsigned long length;
  302.         readonly attribute TypeCode element_type;
  303.         attribute IDLType element_type_def;
  304.     };
  305.  
  306.     interface ExceptionDef: Contained {
  307.         readonly attribute TypeCode type;
  308.         attribute StructMemberSeq members;
  309.     };
  310.  
  311.     struct ExceptionDescription {
  312.         Identifier name;
  313.         RepositoryId id;
  314.         RepositoryId defined_in;
  315.         VersionSpec version;
  316.         TypeCode type;
  317.     };
  318.  
  319.     enum AttributeMode { ATTR_NORMAL, ATTR_READONLY};
  320.  
  321.     interface AttributeDef: Contained {
  322.         readonly attribute TypeCode type;
  323.         attribute IDLType type_def;
  324.         attribute AttributeMode mode;
  325.     };
  326.  
  327.     struct AttributeDescription {
  328.         Identifier name;
  329.         RepositoryId id;
  330.         RepositoryId defined_in;
  331.         VersionSpec version;
  332.         TypeCode type;
  333.         AttributeMode mode;
  334.     };
  335.  
  336.     enum OperationMode {OP_NORMAL, OP_ONEWAY};
  337.  
  338.     enum ParameterMode {PARAM_IN, PARAM_OUT, PARAM_INOUT};
  339.  
  340.     struct ParameterDescription {
  341.         Identifier name;
  342.         TypeCode type;
  343.         IDLType type_def;
  344.         ParameterMode mode;
  345.     };
  346.  
  347.     typedef sequence<ParameterDescription> ParDescriptionSeq;
  348.  
  349.     typedef Identifier ContextIdentifier;
  350.     typedef sequence<ContextIdentifier> ContextIdSeq;
  351.     
  352.     typedef sequence<ExceptionDef> ExceptionDefSeq;
  353.     typedef sequence<ExceptionDescription> ExcDescriptionSeq;
  354.  
  355.     interface OperationDef: Contained {
  356.         readonly attribute TypeCode result;
  357.         attribute IDLType result_def;
  358.         attribute ParDescriptionSeq params;
  359.         attribute OperationMode mode;
  360.         attribute ContextIdSeq contexts;
  361.         attribute ExceptionDefSeq exceptions;
  362.     };
  363.     
  364.     struct OperationDescription {
  365.         Identifier name;
  366.         RepositoryId id;
  367.         RepositoryId defined_in;
  368.         VersionSpec version;
  369.         TypeCode result;
  370.         OperationMode mode;
  371.         ContextIdSeq contexts;
  372.         ParDescriptionSeq parameters;
  373.         ExcDescriptionSeq exceptions;
  374.     };
  375.  
  376.     typedef sequence<RepositoryId> RepositoryIdSeq;
  377.     typedef sequence<OperationDescription> OpDescriptionSeq;
  378.     typedef sequence<AttributeDescription> AttrDescriptionSeq;
  379.  
  380.     interface InterfaceDef: Container, Contained, IDLType {
  381.  
  382.         attribute InterfaceDefSeq base_interfaces;
  383.  
  384.         readonly attribute boolean forward_declared;
  385.         
  386.         boolean is_a(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.  
  399.         FullInterfaceDescription describe_interface();
  400.  
  401.         AttributeDef create_attribute(
  402.             in RepositoryId id,
  403.             in Identifier name,
  404.             in VersionSpec version,
  405.             in IDLType type,
  406.             in AttributeMode mode
  407.         );
  408.  
  409.         OperationDef create_operation(
  410.             in RepositoryId id,
  411.             in Identifier name,
  412.             in VersionSpec version,
  413.             in IDLType result,
  414.             in OperationMode mode,
  415.             in ParDescriptionSeq params,
  416.             in ExceptionDefSeq exceptions,
  417.             in ContextIdSeq contexts
  418.         );
  419.     };
  420.  
  421.     struct InterfaceDescription {
  422.         Identifier name;
  423.         RepositoryId id;
  424.         RepositoryId defined_in;
  425.         VersionSpec version;
  426.         RepositoryIdSeq base_interfaces;
  427.     };
  428.  
  429. };
  430.  
  431.