# OpenORB 1.3.1: Class IdlFromIR

## org.openorb.compiler.ir
Class IdlFromIR

    java.lang.Object
      |
      +--org.openorb.compiler.ir.IdlFromIR

All Implemented Interfaces:
  IRImport

public class IdlFromIR
extends java.lang.Object
implements IRImport

This class provides an import mechanism to get IDL descriptions from Interface Repository.

Version:
  $Revision: 1.7 $ $Date: 2002/08/21 08:19:21 $
Author:
  Jerome Daniel

Constructor Summary
`IdlFromIR()` Constructor
`IdlFromIR(ORB orb)` Constructor

Method Summary
`boolean` `checkFromImportFromFile(java.lang.String container_name)` This operation is used to import a container from an IDL file if a link has been provided.
`IdlObject` `createContainer(Container container, IdlObject parent)` Create a new container
`IdlObject` `createOrFindScope(java.lang.String scope_name, IdlObject current_scope, Container ir_scope)` Find or create the parent scope to import description
`void` `getDescriptionFromIR(java.lang.String scope_name, IdlObject current_scope)` This method is called from the IDL parser to get an IR container description.
`IdlObject` `getType(IRObject type, IdlObject parent)` Return a data type
`void` `initialize()` Initialize ( not required if normal use : getDescriptionFromIR )
`IdlObject` `irAlias(Contained contained, IdlObject scope, boolean visible)` Add an alias description
`IdlObject` `irConstant(Contained contained, IdlObject scope, boolean visible)` Add a constant description
`IdlObject` `irContained(Contained contained, IdlObject scope, boolean visible)` Add a contained description
`IdlObject` `irContainer(Container container, IdlObject scope, boolean visible)` Add a container description
`IdlObject` `irDescription(IRObject type, IdlObject scope, boolean visible)` Add an IR description
`IdlObject` `irEnum(Contained contained, IdlObject scope, boolean visible)` Add an enum description
`IdlObject` `irException(Container container, IdlObject scope, boolean content)` Add an exception description
`IdlObject` `irInterface(Container container, IdlObject scope, boolean content, int type)` Add an interface description type : 0 = NORMAL, 1 = LOCAL, 2 = ABSTRACT
`IdlObject` `irModule(Container container, IdlObject scope, boolean content)` Add a module description
`IdlObject` `irNative(Contained contained, IdlObject scope, boolean visible)` Add an native description
`IdlObject` `irStruct(Container container, IdlObject scope, boolean content)` Add a struct description
`IdlObject` `irUnion(Container container, IdlObject scope, boolean content)` Add an union description
`IdlObject` `irValue(Container container, IdlObject scope, boolean content)` Add a value description
`IdlObject` `irValueBox(Contained contained, IdlObject scope, boolean visible)` Add a valuebox description
`void` `set_parser(IdlParser parser)` Set the parser

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### IdlFromIR

    public IdlFromIR()

  Constructor

### IdlFromIR

    public IdlFromIR(ORB orb)

  Constructor

Method Detail

### set_parser

    public void set_parser(IdlParser parser)

  Set the parser
  Specified by:
    `set_parser` in interface `IRImport`

### initialize

    public void initialize()

  Initialize ( not required if normal use : getDescriptionFromIR )

### getDescriptionFromIR

    public void getDescriptionFromIR(java.lang.String scope_name,
                                     IdlObject current_scope)

  This method is called from the IDL parser to get an IR container description.
  Specified by:
    `getDescriptionFromIR` in interface `IRImport`

### irDescription

    public IdlObject irDescription(IRObject type,
                                   IdlObject scope,
                                   boolean visible)

  Add an IR description

### irContainer

    public IdlObject irContainer(Container container,
                                 IdlObject scope,
                                 boolean visible)

  Add a container description

### irContained

    public IdlObject irContained(Contained contained,
                                 IdlObject scope,
                                 boolean visible)

  Add a contained description

### irModule

    public IdlObject irModule(Container container,
                              IdlObject scope,
                              boolean content)

  Add a module description

### irInterface

    public IdlObject irInterface(Container container,
                                 IdlObject scope,
                                 boolean content,
                                 int type)

  Add an interface description type : 0 = NORMAL, 1 = LOCAL, 2 = ABSTRACT

### irValue

    public IdlObject irValue(Container container,
                             IdlObject scope,
                             boolean content)

  Add a value description

### irStruct

    public IdlObject irStruct(Container container,
                              IdlObject scope,
                              boolean content)

  Add a struct description

### irUnion

    public IdlObject irUnion(Container container,
                             IdlObject scope,
                             boolean content)

  Add an union description

### irException

    public IdlObject irException(Container container,
                                 IdlObject scope,
                                 boolean content)

  Add an exception description

### irEnum

    public IdlObject irEnum(Contained contained,
                            IdlObject scope,
                            boolean visible)

  Add an enum description

### irNative

    public IdlObject irNative(Contained contained,
                              IdlObject scope,
                              boolean visible)

  Add an native description

### irAlias

    public IdlObject irAlias(Contained contained,
                             IdlObject scope,
                             boolean visible)

  Add an alias description

### irValueBox

    public IdlObject irValueBox(Contained contained,
                                IdlObject scope,
                                boolean visible)

  Add a valuebox description

### irConstant

    public IdlObject irConstant(Contained contained,
                                IdlObject scope,
                                boolean visible)

  Add a constant description

### createOrFindScope

    public IdlObject createOrFindScope(java.lang.String scope_name,
                                       IdlObject current_scope,
                                       Container ir_scope)

  Find or create the parent scope to import description

### createContainer

    public IdlObject createContainer(Container container,
                                     IdlObject parent)

  Create a new container

### getType

    public IdlObject getType(IRObject type,
                             IdlObject parent)

  Return a data type

### checkFromImportFromFile

    public boolean checkFromImportFromFile(java.lang.String container_name)

  This operation is used to import a container from an IDL file if a link has been provided. Only top level import are accepted and only one level container are accepted : import ::top // OK import top::foo // NOT OK import ::top::foo // NOT OK