The Interface Repository is the CORBA service which
manages the object interfaces. The orb and the clients may need to
know which operations and attributes can be applied on an object, in
particular when dynamic method invocation is used.
The whole OMG
IDL specification of the Interface Repository is implemented.
The
Interface Repository is an initial service, which runs inside the
OrbRiver orb, its object id is "InterfaceRepository".
Versioning is not yet supported.
The Interface Repository objects persistent state is saved in the file $ORBRIVER_DIR/etc/IR_<Id> where <Id> is the ORB identity of the orb containing this IR. This file is only updated when the Save command is executed, or when the orb is cleanly stopped (see Stopping OrbRiver with stop_orb).
ir_editor is the tool to edit the InterfaceRepository (IR) of a given running orb. This means:
Load an IDL file
List the contents of a given container
Display the description of an IR object
Destroy an IR object (all its contents and all the other objects referencing it
It has the CPP switches as idl2ada (see idl2ada
Switches) plus the orb connection switches (see Client
and Service switches).
When an IDL file name is given on the
command line, ir_editor loads its contents and exits. When no IDL
file name is given on the command line, ir_editor prompts for
commands. The prompt is "-> ".
Several commands
execute actions on the IR objects which can be named by their
RepositoryId, their absolute scoped name, or a scoped name relative
to the current container. At startup, the current container is the
repository itself.
The modifications done with ir_editor are
permanent (reloaded automatically when the orb starts) if the orb has
been stopped by "stop_orb".
The commands are not
case sensitive and some have a short alias.
The possible commands
are:
Path (no alias)
Display the current container
RepositoryId
example:
-> path
IDL:/CosNaming:1.0
->
Change_Path (alias cd)
Change the current container
Usage: Change_Path <ScopedName or RepositoryId>
The given RepositoryId indicates the container to become current. '..' is interpreted as the parent container
example:
-> cd ::CORBA::InterfaceDef
-> path
IDL:omg.org/CORBA/InterfaceDef:1.0
->
List (alias ls)
List the contents of a given
container
Usage: List [<ScopedName or RepositoryId>]
Display the list of the name, definition kind and repository id of the objects contained in the given container (default current) example:
-> ls
base_interfaces DK_ATTRIBUTE IDL:omg.org/CORBA/InterfaceDef/base_interfaces:1.0
is_a DK_OPERATION IDL:omg.org/CORBA/InterfaceDef/is_a:1.0
FullInterfaceDescription DK_STRUCT IDL:omg.org/CORBA/InterfaceDef/FullInterfaceDescription:1.0
describe_interface DK_OPERATION IDL:omg.org/CORBA/InterfaceDef/describe_interface:1.0
create_attribute DK_OPERATION IDL:omg.org/CORBA/InterfaceDef/create_attribute:1.0
create_operation DK_OPERATION IDL:omg.org/CORBA/InterfaceDef/create_operation:1.0
->
Load (alias ld)
Load an IDL file
Usage: load {-I<include path>} <IDL file name>
This command creates the objects described in the given IDL file. The objects described in the included IDL files are also created if they don't exist. If an error occurs during the parsing phase, no IR object is created. If an error occurs during the load phase, the load will only be partial and manual cleaning may-be needed. If no IDL file is given, a file name is requested.
example:
-> ld Store.idl
Processing IDL file: Store.idl
No syntax error detected
Loading IR from OMG IDL file: Store.idl
Done
->
Describe (alias des)
Display the description of an
IR object
Usage: Describe <ScopedName or RepositoryId>
Display the object in the IDL format
example:
-> des base_interfaces
attribute ::CORBA::InterfaceDefSeq base_interfaces
->
Destroy (alias del)
Destroy an IR object
Usage: Destroy <ScopedName or RepositoryId>
The given IR object is destroyed, and all its contents and recursively all the IR objects depending on any of the destroyed objects (necessary before loading a new version)
example:
-> del ::Store
->
Save (no alias)
Save the IR state into its
persistent store
Usage: Save
Tell the orbriver daemon to save the InterfaceRepository state to its persistent store
Quote (no alias)
Change the quote character
Usage: Quote [<character>]
With no parameter, it displays the current quoting character. The given character will be used as the quoting character in order to allow the use of special characters inside names. Inside a name, the following characters must be quoted:
' ', the quote, the cancel character.
The default quote is '`'
-> quote @
-> quote
The current quote is @
->
Cancel (no alias)
Change the cancel character
Usage: Cancel [<character>]
With no parameter, it displays the current cancel character. The given character will be used to cancel a command. The default cancel character is '?'
-> Cancel #
-> Cancel
The current cancel is #
-> ls #
cancelled
->
Help (alias h)
Display information about commands
Usage: help [command]
With no parameter, the list of commands is displayed.
With a parameter, the given command is described.
Quit (alias q)
Quit ir_editor
Usage: quit
Examples:
- To simply load an IDL
file in the IR
$ORBRIVER_DIR/bin/ir_editor -ORBName OrbRiver_1 store.idl # Unix systems
%ORBRIVER_DIR%\bin\ir_editor -ORBName OrbRiver_1 store.idl !! rem Windows-Nt systems
- To do several actions in the IR
$ORBRIVER_DIR/bin/ir_editor -ORBName OrbRiver_1 # Unix systems
%ORBRIVER_DIR%\bin\ir_editor -ORBName OrbRiver_1 !! rem Windows-Nt system
print_idl is the tool to display the contents of the
InterfaceRepository of a given orb in a form similar to an IDL file.
The result is not valid IDL mainly due to missing forwards. Its only
switches are the orb connection switches (see Client
Switches).
Example:
$ORBRIVER_DIR/bin/print_idl -ORBName
OrbRiver_1 # Unix systems
%ORBRIVER_DIR%\bin\print_idl -ORBName
OrbRiver_1 !! rem Windows-Nt systems
Copyright
Micro Focus 2002-2014. All rights reserved.