NonStop Serverware

Using the Interface Repository

Previous Topic | Next Topic | Contents | Index
Getting Started | Administration Guide | Programmer's Guide

Subtopics

Emitting IDL Information into the Interface Repository
Using showir to Browse the IR Databases
Sample IDL Source File

Information can be stored in the Interface Repository (IR) but it must be transformed first. The IDL compiler is used to parse the IDL file, transform the information in the IDL source into Interface Repository objects, and serialize the objects to IR databases.

Emitting IDL Information into the Interface Repository

To emit IDL information contained in IDL source files into the IR:

  1. Specify the location of IR databases. You can do this in one of the following ways:

  2. Next, run the IDL compiler with the appropriate IR emitter option: -ir for update -IR for replace

    For example:

    nsdidl -ir | -IR stack.idl

The update option updates existing interface objects in the IR with ones with later version IDs from the IDL source. The replace option replaces the existing interface objects. Both options create new interface objects in the IR if no interface objects with same scoped name exist.

If you specify more than one IR database for nsdom_ir, separate the database names with semicolons. If any of the IR databases is empty or invalid, an error message is logged by the IR Emitter and no IDL information is emitted to the IR.

To generate IR databases, first point nsdom_ir to one IR database and emit a set of IDL sources. Then expand nsdom_ir to point to two IR databases by appending the path of the second database to the first one, and emit another set of IDL sources. The information on the second set of IDL sources is emitted to the second IR database. You can repeat the process as needed.

Using showir to Browse the IR Databases

You can use the showir tool to browse the IR databases. Set nsdom_ir accordingly as described above and then run showir to display the IR database contents. showir has the following options:

$ showir -?

showir Usage

showir [ -i <RepoID> ] [ -s <ScopedName> ] [ -n <Name> ]

showir Parameters

<RepoID>

The Repository ID of the IR object to be displayed.

<ScopedName>

The absolute scope of the IR object to be displayed.

<Name>

The name of the IR objects to be displayed.

showir Example

showir -i IDL:omg.org/CORBA/orb:1.0
showir -s ::CORBA::orb
showir -n orb

Sample IDL Source File

Following is a sample IDL source file that contains information that will be emitted to the IR:

$ cat stack.idl
interface Stack
{
  const long StackSize = 10;
  exception STACK_OVERFLOW{};
  exception STACK_UNDERFLOW{};
  boolean full( );
  boolean empty( );
  long top( ) raises(STACK_UNDERFLOW);
  long pop( ) raises(STACK_UNDERFLOW);
  void push(in long aNumber) raises(STACK_OVERFLOW);
};
 
$ export nsdom_ir="nsdom.ir"
$ nsdidl -ir stack.idl
$ showir


 NSDOM Interface Repository: 

 NSDOM Interface subrepository: nsdom.ir

    Kind     : dk_Interface
    Id       : IDL:Stack:1.0
    Name     : Stack
    Version  : 1.0
    Scoped   : ::Stack
    Container: ::
     TypeCode: CORBA::tk_objref
    ID = IDL : Stack:1.0
    Name = Stack
    Base Interfaces: 

     Kind     : dk_Constant
     Id       : IDL:Stack/StackSize:1.0
     Name     : StackSize
     Version  : 1.0
     Scoped   : ::Stack::StackSize
     Container: ::Stack
      TypeCode: CORBA::tk_long
     Any Value = 10

     Kind     : dk_Exception
     Id       : IDL:Stack/STACK_OVERFLOW:1.0
     Name     : STACK_OVERFLOW
     Version  : 1.0
     Scoped   : ::Stack::STACK_OVERFLOW
     Container: ::Stack
     Exception Members: 

     Kind     : dk_Exception
     Id       : IDL:Stack/STACK_UNDERFLOW:1.0
     Name     : STACK_UNDERFLOW
     Version  : 1.0
     Scoped   : ::Stack::STACK_UNDERFLOW
     Container: ::Stack
     Exception Members: 

     Kind     : dk_Operation
     Id       : IDL:Stack/full:1.0
     Name     : full
     Version  : 1.0
     Scoped   : ::Stack::full
     Container: ::Stack
     Return Type: 
      TypeCode: CORBA::tk_boolean
     Operation Mode: CORBA::OP_NORMAL
     Parameters : 
     Exceptions : 
     Contexts   : 

     Kind     : dk_Operation
     Id       : IDL:Stack/empty:1.0
     Name     : empty
     Version  : 1.0
     Scoped   : ::Stack::empty
     Container: ::Stack
     Return Type: 
      TypeCode: CORBA::tk_boolean
     Operation Mode: CORBA::OP_NORMAL
     Parameters : 
     Exceptions : 
     Contexts   : 

     Kind     : dk_Operation
     Id       : IDL:Stack/top:1.0
     Name     : top
     Version  : 1.0
     Scoped   : ::Stack::top
     Container: ::Stack
     Return Type: 
      TypeCode: CORBA::tk_long
     Operation Mode: CORBA::OP_NORMAL
     Parameters : 
     Exceptions : 
      ::Stack::STACK_UNDERFLOW
     Contexts : 

     Kind     : dk_Operation
     Id       : IDL:Stack/pop:1.0
     Name     : pop
     Version  : 1.0
     Scoped   : ::Stack::pop
     Container: ::Stack
     Return Type: 
      TypeCode: CORBA::tk_long
     Operation Mode: CORBA::OP_NORMAL
     Parameters : 
     Exceptions : 
      ::Stack::STACK_UNDERFLOW
     Contexts : 

     Kind     : dk_Operation
     Id       : IDL:Stack/push:1.0
     Name     : push
     Version  : 1.0
     Scoped   : ::Stack::push
     Container: ::Stack
     Return Type: 
      TypeCode: CORBA::tk_void
     Operation Mode: CORBA::OP_NORMAL
     Parameters : 
      Name: aNumber
      Mode: CORBA::PARAM_IN
      Type: 
       TypeCode: CORBA::tk_long
     Exceptions : 
      ::Stack::STACK_OVERFLOW
     Contexts : 

Previous Topic | Next Topic | Contents| Top
Getting Started Guide | Administration Guide | Programmer's Guide
Bibliography | Glossary | Index
© Tandem, a division of Compaq. All rights reserved. Legal notices.