FileDocCategorySizeDatePackage
IDL.javaAPI DocExample30222Tue Dec 08 01:21:00 GMT 1998oisoft.togetherx.scripts.idl

IDL.java

/*----------------------------------------------------------------------------
Copyright © 1998 Object International Software Ltd
----------------------------------------------------------------------------*/
package oisoft.togetherx.scripts.idl;

import java.io.File;
import java.util.Hashtable;
import java.util.Enumeration;
import java.util.StringTokenizer;

import oisoft.togetherx.scriptapi.APIManager;
import oisoft.togetherx.scriptapi.UML.UMLModel;
import oisoft.togetherx.scriptapi.UML.UMLLink;
import oisoft.togetherx.scriptapi.UML.UMLElement;
import oisoft.togetherx.scriptapi.UML.UMLPackage;
import oisoft.togetherx.scriptapi.UML.UMLOperation;
import oisoft.togetherx.scriptapi.UML.UMLAttribute;
import oisoft.togetherx.scriptapi.UML.UMLClassifier;
import oisoft.togetherx.scriptapi.UML.UMLAssociation;
import oisoft.togetherx.scriptapi.UML.UMLClassDiagram;
import oisoft.togetherx.scriptapi.UML.UMLProperty;
import oisoft.togetherx.scriptapi.UML.enums.UMLLinkEnumeration;
import oisoft.togetherx.scriptapi.UML.enums.UMLClassEnumeration;
import oisoft.togetherx.scriptapi.UML.enums.UMLOperationEnumeration;
import oisoft.togetherx.scriptapi.UML.enums.UMLInterfaceEnumeration;
import oisoft.togetherx.scriptapi.UML.enums.UMLAttributeEnumeration;
import oisoft.togetherx.scriptapi.UML.enums.UMLClassifierEnumeration;
import oisoft.togetherx.scriptapi.UML.enums.UMLClassDiagramEnumeration;
import oisoft.togetherx.scriptapi.UML.enums.UMLElementEnumeration;
import oisoft.togetherx.scriptapi.UML.enums.UMLPropertyEnumeration;

public class IDL {
  private String strAllElement = "All elements";
  private String strDiagram    = "Current diagram";
  private String strElement    = "Current element";

  private String stereotype        = "stereotype";
  private String idlCode           = "idlCode";
  private String stereotypeElement = "businessobject";
  public static String postfix     = "_bo";
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  public IDL( IDLOptioner optioner ){
    this.optioner = optioner;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  public void idlFabric ( APIManager apiManager, String idlSpecification ){
    this.apiManager = apiManager;
    this.idlSpecification = idlSpecification;

    UMLPackage rootPackage = apiManager.getUMLModel().getRootPackage();
    if ( rootPackage == null ){
      apiManager.createMessage("IDL", "Project is not loaded.", "");
      return;
    }
		 if ( rootPackage.getLanguage().equals(UMLElement.OCOBOL)){
      apiManager.createMessage("IDL", "Object Cobol not supported by this script.", "");
      return;
    }

    GenericIDLOptioner idlGenericOptioner = new GenericIDLOptioner();
    apiManager.customize(idlGenericOptioner);

    String strMode = idlGenericOptioner.getProcessedElements();

    javahashtable = optioner.getJavaToIdlTable();
    IDLhashtable  = getIdlhashtable();
    idlPathes     = new Hashtable();
    fillCppOperatorsSpecialNamesTable();

    File projectFile = rootPackage.getFile();
    projectPath = projectFile.getAbsolutePath();
    int pos = projectPath.lastIndexOf(File.separator);
    if (pos > 0) {
      projectPath = projectPath.substring(0,pos+1);
    }
    else{
      projectPath = "c:" + File.separator;
    }

    UMLModel model = apiManager.getUMLModel();
    if ( strMode.equals(strAllElement)){
      processingPackages( rootPackage );
    }
    else if ( strMode.equals(strDiagram)){
      UMLPackage umlPackage = model.getCurrentPackage();
      processingContentsClassDiagram( umlPackage );
    }
    else if ( strMode.equals(strElement)){
      UMLPackage umlPackage = model.getCurrentPackage();
      processingSelectedElements(umlPackage);
    }
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void processingSelectedElements( UMLPackage umlPackage ){
    UMLElementEnumeration elements = umlPackage.getSelectedElements();
    while( elements.hasMoreElements() ){
      UMLElement element = elements.getNextUMLElement();
      if ( element instanceof UMLClassifier ) {
        processingClassifier( (UMLClassifier) element);
      }
    }
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void processingPackages ( UMLPackage umlPackage ){
    processingContentsClassDiagram( umlPackage );
    UMLClassDiagramEnumeration classDiagrams = umlPackage.getClassDiagrams();
    while ( classDiagrams.hasMoreElements()){
      UMLPackage classDiagram = classDiagrams.getNextUMLClassDiagram();
      if (! classDiagram.hasProperty("$imported"))  processingPackages( classDiagram );
  	}
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void processingContentsClassDiagram( UMLPackage umlPackage ){
    // class processing
    UMLClassEnumeration classes = ((UMLClassDiagram)(umlPackage)).getClasses();
    while( classes.hasMoreElements() ){
      UMLClassifier classifier = (UMLClassifier) classes.getNextUMLClass();
      processingClassifier( classifier );
    }
    // interfaces processing
    UMLInterfaceEnumeration interfaces = ((UMLClassDiagram)(umlPackage)).getInterfaces();
    while( interfaces.hasMoreElements() ){
      UMLClassifier classifier = (UMLClassifier) interfaces.getNextUMLInterface();
      processingClassifier( classifier );
    }
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void processingClassifier( UMLClassifier umlClassifier ){
    String idlFileName = umlClassifier.getName();
    if ( getPropertyValue(umlClassifier, stereotype).equals(stereotypeElement )){

      if ( isProcessingClassifier(umlClassifier)) {
        language = umlClassifier.getLanguage();
        optioner.createBaseDataTables();
        outBuff      = new StringBuffer();
        exceptions   = new StringBuffer();

        // Generalization processing
        UMLLinkEnumeration links = umlClassifier.getOutgoingLinksByKind( UMLLink.GENERALIZATION );
        processingParents( links );

         // Implementation processing
        links = umlClassifier.getOutgoingLinksByKind( UMLLink.IMPLEMENTATION );
        processingParents( links );

        String parents = "";
        Enumeration files = optioner.getIncludeFiles().elements();
        while ( files.hasMoreElements()){
           parents += parents.equals("") ? "" : ", ";
           parents += (String) files.nextElement();
         }

        // operations processing
        processingOperations( umlClassifier, idlFileName );

        // attributes processing
        if ( idlSpecification.equals( idlCORBA )) processingAttributes( umlClassifier );

        // links processing
        if ( idlSpecification.equals( idlCORBA )) processingClassifierLinks( umlClassifier );
        optioner.putIdlFile( idlFileName );

        // create IDL file for the current class or interface
        if ( language.equals( UMLElement.JAVA )){
          outputDirectory = projectPath;
        }
        else{
          File curentFile = umlClassifier.getFile();
          String fullPath = curentFile.getAbsolutePath();

          String localPath = "";
          String localPackages = umlClassifier.getQualifiedName();

          if (! localPackages.equals("")) {
            StringTokenizer token = new StringTokenizer( localPackages, ".");
            while ( token.hasMoreElements()) {
              localPath += File.separator + token.nextToken() ;
            }
            int position = fullPath.lastIndexOf( localPath );
            if (position > 0){
              outputDirectory = fullPath.substring(0, position) + File.separator;
            }
            else{
              outputDirectory = getOutputPath(fullPath,idlFileName);
            }
          }
          else{
              outputDirectory = getOutputPath(fullPath,idlFileName);
          }
        }
        if ( optioner.creationIdlFile( language, outputDirectory, idlFileName, parents )){
          idlPathes.put( outputDirectory, outputDirectory);  // adding idls path
          optioner.setPackages( umlClassifier.getQualifiedName() );
          optioner.genereateIdlFileTitle();
          if ( idlSpecification.equals( idlCORBA )){
            String propertyValue = getPropertyValue(umlClassifier, idlCode);
            if (! propertyValue.equals("")){
              processingTag(propertyValue);
            }
          }
          optioner.closeIdlFile( outBuff, exceptions );
        }
      }
    }
  }
  //--------------------------------------------------------------------------

	 //--------------------------------------------------------------------------
	 private void processingTag( String idlCode ){
    StringTokenizer token = new StringTokenizer(idlCode, "\n");
    String stringValue = "";
    while ( token.hasMoreElements()) {
     stringValue += startPositionOnString + token.nextToken();
    }
    outBuff.insert(0,stringValue);
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private boolean isProcessingClassifier( UMLClassifier umlClassifier ){
    String name = umlClassifier.getName();
    if ( name.endsWith( postfix )){
       return true;
    }
    else {
      String message = " businessobject class should have "+ postfix +" postfix.";
      apiManager.createMessage("IDL",name + message,"");
      return false;
    }
  }
	 //--------------------------------------------------------------------------

	 //--------------------------------------------------------------------------
	 private String getPropertyValue( UMLClassifier umlClassifier, String propertyName ){
		 UMLPropertyEnumeration properties = umlClassifier.getDocProperties();
		 while ( properties.hasMoreElements() ){
			 UMLProperty property  = properties.getNextUMLProperty();
			 String name   = property.getPropertyName();
			 String value  = property.getPropertyValue();
			 if (( name != null ) && ( name.equals(propertyName))) {
				 if ( value != null) return value;
				 else return "";
			 }
		 }
		 return "";
	 }
	 //--------------------------------------------------------------------------

	 //--------------------------------------------------------------------------
   private void processingOperations( UMLClassifier umlClassifier, String idlFileName ){
		 UMLOperationEnumeration operations = umlClassifier.getOperations();
		 Hashtable listOperations = new Hashtable();
		 //if ( operations.hasMoreElements()){
			 //addComponentToOutputBuf( "Operations", "" );
//    }
    while( operations.hasMoreElements()){
      UMLOperation umlOperation = operations.getNextUMLOperation();
      if ( isPublic( umlOperation.getVisibility())){
        memberName = findOperator( umlOperation.getName()).trim();
        if (( memberName.equals(idlFileName)) ||
            ( memberName.equals( "~" + idlFileName ))){
          apiManager.createMessage("IDL", "Constructor/destructor "+ idlFileName +" not mapped to IDL.", "");
				 }
				 else{
					 String operationName = memberName;
					 String type = umlOperation.getTypeExpression().trim();
					 if ( type.equals("")) setCompositionType("void");
					 else processingType( type, "" );
					 String operationType = getCompositionType();


					 String strNameClash = findOperator( umlOperation.getName() );
					 String strName = (String)IDLhashtable.get(strNameClash);
					 //Check for use of IDL keyword
					 if (strName == null) strName = strNameClash;
					 //Check if operation has already been defined
					 //No overloading in IDL
					 if (listOperations.containsKey(strName)) {
             apiManager.createMessage("IDL", "Overloaded operation "+ strName +" not mapped to IDL.", "");
					 }
					 else {

						 listOperations.put(strName,strName);
						 String exception = idlSpecification.equals( idlCORBA ) ? processingException( umlOperation ) : "";
						 String parameters    = processingParameters( umlOperation.getParameterList());
						 String operation     = optioner.getOperationDeclaration(operationType, operationName, parameters, exception);

						 // write operations data to output buffer
						 addComponentToOutputBuf( "", operation );
					 }
				 }
			 }
    }
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void processingAttributes( UMLClassifier umlClassifier ){
    UMLAttributeEnumeration attributes = umlClassifier.getAttributes();
//    if ( attributes.hasMoreElements() )
//      addComponentToOutputBuf( "Attributes", "" );
    while( attributes.hasMoreElements() ){
      UMLAttribute umlAttribute = attributes.getNextUMLAttribute();
      if ( isPublic ( umlAttribute.getVisibility())){

        //Check for use of IDL keyword
				 String name = (String)IDLhashtable.get(umlAttribute.getName());
        String type = umlAttribute.getTypeExpression();
        String initialValue = umlAttribute.getInitialValue();
        processingType( type, initialValue );
        String attributeDeclaration = umlAttribute.isConst() ? "const " : optioner.getAttributeTitle();
        attributeDeclaration +=  getCompositionType() + " " + name + ";";
        addComponentToOutputBuf( "", attributeDeclaration );
      }
    }
  }
  //--------------------------------------------------------------------------

	 //--------------------------------------------------------------------------
	 private String processingException( UMLOperation umlOperation ){
		 UMLClassifierEnumeration umlExceptions = umlOperation.getThrownExceptions();
		 String exception = "";
		 while( umlExceptions.hasMoreElements() ){
			 UMLClassifier umlException = umlExceptions.getNextUMLClassifier();
			 String exceptionName = umlException.getName();

			 String exceptionType = "";
			 if ( language.equals( UMLElement.CPP )){
				 exceptionType = optioner.getConvertedCppType( exceptionName );
			 }
			 else{
				 exceptionType = (String)javahashtable.get( exceptionName );
			 }
			 if ( exceptionType == null) {
				 if ( exceptionName.endsWith( postfix )){
					 int position = exceptionName.lastIndexOf( postfix );
					 exceptionName = exceptionName.substring(0,position);
				 }
				 else continue;
			 }
			 exception += exception.equals("") ? " raises(" : ", ";
			 exception += exceptionName;
			 exceptions.append( "  exception " + exceptionName + " {" + strEOL );
			 exceptions.append( "  };" + strEOL );
		 }
		 if (! exception.equals("")) exception += ")";
	 return exception;
	 }
	 //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void processingType( String memberType, String initialValue ){
    setCompositionType("");
    if ((! memberType.equals("")) && ( memberType != null )){
      StringTokenizer tokens = new StringTokenizer( memberType, optioner.getDelimiters());
      String type = "";
      while ( tokens.hasMoreTokens()){
        String token = tokens.nextToken();
				 if ( language.equals( UMLElement.CPP )){
           optioner.convertCppToIdlType( token );
           type = optioner.getIdlType();
        }
        else {
          convertJavaToIdlType(token);
          type = getIdlType();
        }

        if (! type.equals("")){
          int position = type.lastIndexOf( postfix );
          if ( position > 0 ) type = type.substring(0,position);
          if ( getCompositionType().equals("")) setCompositionType( type );
          else addCompositionType( " " + type );
        }
      }
      processingArray( getCompositionType(), memberType, initialValue );
    }
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void processingArray( String convertType, String memberType, String initialValue ){
     int openBrace  = memberType.indexOf("[");
     int closeBrace = memberType.indexOf("]");
		 if (( openBrace >= 0 ) && ( closeBrace >= 0 )){
      arrayAttribute = true;
			 int iCountElements = 0;
			 try{
				 if( openBrace != ( closeBrace - 1 )){
           String countElements = memberType.substring( openBrace+1, closeBrace );
					 Integer integerCountElements = new Integer( iCountElements );
					 iCountElements = integerCountElements.intValue();
				 }
			 }
			 catch(NumberFormatException e){
				 System.out.println("Integer Exception");
				 e.printStackTrace();
			 }
			 if ( initialValue != null ){
         StringTokenizer tokens = new StringTokenizer( initialValue, "," );
				 iCountElements = tokens.countTokens();
       }
       String type = optioner.getArrayDeclaration( iCountElements, convertType, getMemberName());
       setCompositionType( type );
     }
     else arrayAttribute = false;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void convertJavaToIdlType( String type ){
    StringTokenizer tokens = new StringTokenizer( type, "[" );
    type = tokens.nextToken();
    int iPoint = type.lastIndexOf(".");
    if ( iPoint >= 0 ){
      type = type.substring( iPoint + 1 );
    }
    convertedType = (String) javahashtable.get( type );
    if ( convertedType == null ){
      StringTokenizer strTokenType = new StringTokenizer( type, "*&[]" );
      convertedType = strTokenType.nextToken();
      optioner.putIncludeFile( convertedType );
    }
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private String processingParameters( String parameters ){
    String idlParameters = "";
    StringTokenizer tokens = new StringTokenizer( parameters, "," );
    while ( tokens.hasMoreTokens()){
      String token = tokens.nextToken();
      if (! idlParameters.equals("")) idlParameters += ", ";
      String parameter = processingParameter( token );
      idlParameters   +=  parameter;
    }
    return idlParameters;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private String processingParameter( String parameter ){
    String idlParameter = "";
    String memberType = "";
    int finishSpace = parameter.lastIndexOf( " " );
    int startSpace  = parameter.indexOf( " " );
    if (( startSpace > 0 ) && ( startSpace != finishSpace )){
      String type = parameter.substring(0, finishSpace);
      StringTokenizer token = new StringTokenizer(type, " ");
      while ( token.hasMoreElements()) memberType += token.nextToken();
    }
    else {
      int startPosition = (startSpace == finishSpace) ? 0 : startSpace + 1;
      memberType = parameter.substring( startPosition, finishSpace );
    }
    memberName = findOperator( parameter.substring( finishSpace+1 ));
    processingType( memberType, "" );
    return optioner.getParameterModificator(memberName, memberType,arrayAttribute) + getCompositionType() + " " + memberName;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void processingClassifierLinks ( UMLClassifier classifier ){
    UMLLinkEnumeration links = classifier.getOutgoingLinksByKind( UMLAssociation.ASSOCIATION );
    processingLinks( links, "Association links" );
    links = classifier.getOutgoingLinksByKind( UMLAssociation.AGGREGATION );
    processingLinks( links, "Aggregation links" );
    links = classifier.getOutgoingLinksByKind( UMLAssociation.COMPOSITION );
    processingLinks( links, "Composition links" );
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void processingLinks( UMLLinkEnumeration links, String linkType ){
    // write links title to output buffer
    //if ( links.hasMoreElements() ) addComponentToOutputBuf( linkType, "" );
    while ( links.hasMoreElements() ){
      UMLLink umlLink = links.getNextUMLLink();
      UMLAssociation umlAssociation = ( UMLAssociation )umlLink;
      processingAssociation( umlAssociation );
    }
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void processingAssociation( UMLAssociation associations ){
    UMLAttribute umlAttribute = associations.getAttribute();
    if ( isPublic ( umlAttribute.getVisibility())){
      String destinationName = umlAttribute.getName();
      processingType( umlAttribute.getTypeExpression(), "" );

      StringTokenizer token = new StringTokenizer( compositionIdlType, " " );
      String destinationType = token.nextToken();
//    optioner.putIncludeFile( destinationType );
      String link = optioner.getAttributeTitle() + destinationType + " " + destinationName + ";";
    // write link data to output buffer
      addComponentToOutputBuf( "", link );
    }
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void processingParents( UMLLinkEnumeration links ){
    while ( links.hasMoreElements() ){
      UMLLink umlLink = links.getNextUMLLink();
      String linkDestinationName = umlLink.getLinkDestination().getName();
      optioner.putIncludeFile( linkDestinationName );
    }
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  public void setCompositionType( String type ){
    compositionIdlType = type;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  public void addCompositionType( String type ){
    compositionIdlType += type;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  public String getCompositionType(){
    return compositionIdlType;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  public String getMemberName(){
    return memberName;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private String getIdlType(){
    if ( convertedType == null ) return "";
    else return convertedType;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void setParameterModificator(String parameterModificator){
    this.parameterModificator = parameterModificator;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private String getParameterModificator(){
    if ( parameterModificator == null ) return "";
    else return parameterModificator;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void addComponentToOutputBuf( String componentType, String componentName ){
    if ( ! componentType.equals("")){
      outBuff.append( strEOL );
      outBuff.append( startPositionOnString + "// " + componentType + strEOL );
      outBuff.append( strEOL );
    }
    else if ( ! componentName.equals("")) {
      if ( optioner.isCorrectType() ){
        outBuff.append( startPositionOnString + componentName + strEOL );
      }
      else{
        optioner.setCorrectType( true );
      }
    }
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private void fillCppOperatorsSpecialNamesTable(){
    String[] cppGrammar = { "operator++","operator==","operator--" };
    String[] idlGrammar = { "operatorInc", "operatorEqu", "operatorDec" };
    cppOperatorNames = new Hashtable();
    for ( int i=0; i < cppGrammar.length; i++ ){
      cppOperatorNames.put( cppGrammar[i], idlGrammar[i] );
    }
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private String findOperator ( String operationName ) {
    int iPos = operationName.indexOf("operator");
    if ( iPos >= 0 ){
      String operatorName = operationName.substring( iPos );
      String convertOperator = (String) cppOperatorNames.get( operatorName );
      operationName = operationName.substring( 0, iPos );
      operationName += ( convertOperator == null ) ? "operator" : convertOperator;
    }
  return operationName;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private boolean isPublic ( String visibility ){
    return (visibility.equals(UMLElement.PUBLIC));
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private String getOutputPath ( String fullPath, String idlFileName ){
    String outPath = "";
    int position = fullPath.lastIndexOf( File.separator );
    if ( position > 0 ) {
      outPath = fullPath.substring(0, position) + File.separator;
    }
    else {
      apiManager.createMessage("IDL","Path of "+ idlFileName +" class(interfase) is unknown .IDL interface is creating to c:" + File.separator +".", "");
      outPath = "c:" + File.separator;
    }
    return outPath;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
  private Hashtable getIdlhashtable(){
    IDLhashtable = new Hashtable();
    for ( int i=0; i < idlKeywordstoIDLGrammar.length; i++ ){
      IDLhashtable.put( idlKeywordstoIDLGrammar[i][0], idlKeywordstoIDLGrammar[i][1]);
    }
    return IDLhashtable;
  }
  //--------------------------------------------------------------------------

  //--------------------------------------------------------------------------
    private String[][] idlKeywordstoIDLGrammar = {
    { "any",       "any_"       },
    { "double",    "double_"    },
    { "interface", "interface_" },
    { "readonly",  "readonly_"  },
    { "unsigned",  "unsigned_"  },
    { "attribute", "attribute_" },
    { "enum",      "enum_"      },
    { "long",      "long_"      },
    { "sequence",  "sequence_"  },
    { "union",     "union_"     },
    { "boolean",   "boolean_"   },
    { "exception", "exception_" },
    { "module",    "module_"    },
    { "short",     "short_"     },
    { "void",      "void_"      },
    { "case",      "case_"      },
    { "FALSE",     "FALSE_"     },
    { "Object",    "Object_"    },
    { "string",    "string_"    },
    { "wchar",     "wchar_"     },
    { "char",      "char_"      },
    { "fixed",     "fixed_"     },
    { "octet",     "octet_"     },
    { "struct",    "struct_"    },
    { "wstring",   "wstring_"   },
    { "const",     "const_"     },
    { "float",     "float_"     },
    { "oneway",    "oneway_"    },
    { "switch",    "switch_"    },
    { "context",   "context_"   },
    { "in",        "in_"        },
    { "out",       "out_"       },
    { "TRUE",      "TRUE_"      },
    { "default",   "default_"   },
    { "inout",     "inout_"     },
		 { "raises",    "raises_"    },
		 { "typedef",   "typedef_"}};


  private  IDLOptioner optioner;
  private  Hashtable cppOperatorNames;
  private  Hashtable javahashtable;
  private  Hashtable IDLhashtable;
  private  Hashtable idlPathes;

  private static final String idlCOM   = "COM";
  private static final String idlCORBA = "CORBA";

  private  String language;
  private  String idlSpecification;
  private  String memberName;
  private  String convertedType;
  private  String compositionIdlType;
  private  String outputDirectory;
  private  String projectPath;
  private  String parameterModificator = "";
  private  String startPositionOnString = "    ";

  private  APIManager apiManager;
  private  boolean arrayAttribute;
  private  StringBuffer outBuff;
  private  StringBuffer exceptions;

  protected static String strEOL = System.getProperty("line.separator");
  //--------------------------------------------------------------------------
}