2005/5/10

     
 

acdkorbidl

artefaktur

With acdkorbidl the CORBA IDL definitions of a compiled package can be extracted



Content of this chapter:

   Usage
   Mapping
     Namespaces
     Classes
     Exceptions
     Parameter / Member types
     Methods
       Non-static methods
       Non-static Memberfields
     Constructors, static methods and members
   CORBA IDL related ACDK MetaAttributes
     Value Types


 Usage

acdkorbidl [options]
    with options:
      -o|--output    where to write output
      -u|--unit      unit to include (multiple usage possible, example acdk::text)
      --no-fields              no attributes
      -k|--only-known          generate only known declared corba-interface
      -x|--only-explict        generate only explicit declared corba-interface
      -c|--classname  generate IDL for a single class (example acdk/text/RegExp)
The units has to be already been compiled and located in the $ACDKHOME directory, so the classloader can find them.

 Mapping

 Namespaces

Namespaces are mapped to modules.

 Classes

normal classes are mapped to interfaces.
The ACKD class acdk::lang::Object will be renamed to IDL interface acdk::lang::AObject.

 Exceptions

ACDK exceptions are mapped to corresponding exceptions in CORBA. ACDK exceptions are classes derived from acdk::lang::Throwable.
Because CORBA doesn't supported derived exceptions, and methods, these are suppressed in the translated CORBA exceptions. All members (including private) of the exception and its parents are included in the CORBA exceptions.

 Parameter / Member types

The parameters are mapped corresponding to the standard ACDK/CORBA type mapping.

Exceptions cannot be used as Parameter or member.
Methods and field members containing exception as parameter will be suppressed.

 Methods

 Non-static methods

Public non-static methods are normal methods.
Methods, which contains a non-confirming parameter are suppressed.

 Non-static Memberfields

Public ACDK non-static members are mapped to interface attributes.

 Constructors, static methods and members

For each class containing public constrturs or static methods or members an additionally interface will be created:


// ACDK class
class AClass
{
  ACDK_WITH_METAINFO(AClass)
public:
  static int pubStaticInt;
  RString pubString;
  AClass(IN(RString) str)
  : pubString(str)
  {
  }
  int baz();
  virtual int foo();
  static int bar();
};

interface AClass
{
  attribute string pubString;
  long foo();
};

interface AClassCorFactory
{
  AClass createAClass(in string str); // was constructor
  attribute long pubStaticInt;
  long bar();
}

 CORBA IDL related ACDK MetaAttributes

Unit include hints To include other IDL files an StringTagAttribute can be attached to an Unit declaration. Use the tag name acdkx_orb_UnitInclude1, acdkx_orb_UnitInclude2, etc to add include statemants.

// ACDK header
ACDK_UNITATTRIBUTE(acdk.tools.mc.StringTagAttribute("acdkx_orb_UnitInclude1", "acdk_core.idl"))
ACDK_UNITATTRIBUTE(acdk.tools.mc.StringTagAttribute("acdkx_orb_UnitInclude2", "acdk_text.idl"))
ACDK_DECL_UNIT(acdk_tools_aunit)
will result in:

 Value Types

ACDK_UNITATTRIBUTE(acdk.tools.mc.StringTagAttribute("acdkx_orb_StructType"))
Default constructor the public method or static RObject create_instance() must exists.