Ejemplo n.º 1
0
 public org.omg.CORBA.ModuleDef create_module(
     java.lang.String id, java.lang.String name, java.lang.String version) {
   org.omg.CORBA.Request _request = this._request("create_module");
   _request.set_return_type(org.omg.CORBA.ModuleDefHelper.type());
   org.omg.CORBA.Any $id = _request.add_named_in_arg("id");
   $id.insert_string(id);
   org.omg.CORBA.Any $name = _request.add_named_in_arg("name");
   $name.insert_string(name);
   org.omg.CORBA.Any $version = _request.add_named_in_arg("version");
   $version.insert_string(version);
   _request.invoke();
   java.lang.Exception _exception = _request.env().exception();
   if (_exception != null) {
     if (_exception instanceof org.omg.CORBA.UnknownUserException) {
       org.omg.CORBA.UnknownUserException _userException =
           (org.omg.CORBA.UnknownUserException) _exception;
     }
     throw (org.omg.CORBA.SystemException) _exception;
   }
   ;
   org.omg.CORBA.ModuleDef _result;
   _result = org.omg.CORBA.ModuleDefHelper.extract(_request.return_value());
   return _result;
 }
Ejemplo n.º 2
0
  /**
   * print the IDL definition for a module
   *
   * @param mdes the module description
   * @param indentation how many spaces to use for indentation
   */
  public void printModule(org.omg.CORBA.ModuleDescription mdes, int indentation) {
    indent(indentation);

    org.omg.CORBA.ModuleDef mdef = org.omg.CORBA.ModuleDefHelper.narrow(ir.lookup_id(mdes.id));
    print("module " + mdef.name() + "\n");
    print("{\n");
    org.omg.CORBA.Contained[] contents = mdef.contents(org.omg.CORBA.DefinitionKind.dk_all, true);

    for (int x = 0; x < contents.length; x++) {
      printContained(contents[x], indentation);
    }

    indent(indentation);
    print("};" + "\n\n");
  }