package org.jacorb.ir.gui.typesystem.remote;

import org.omg.CORBA.*;

/**
 * This class was generated by a SmartGuide.
 * 
 */
public class IRParameter extends IRNodeWithType 
{
    private ParameterDescription parDesc;

    /**
     * IRParameter constructor comment.
     */
    protected IRParameter() {
	super();
    }
    /**
     * IRParameter constructor comment.
     * @param irObject org.omg.CORBA.IRObject
     */
    protected IRParameter(org.omg.CORBA.ParameterDescription parDesc) {
	setName(parDesc.name);
	setAssociatedTypeSystemNode(RemoteTypeSystem.createTypeSystemNode(parDesc.type_def));		
	this.parDesc = parDesc;
    }
    public ParameterMode getMode() {
	return parDesc.mode;
    }	
    /**
     * This method was created by a SmartGuide.
     * @return org.omg.CORBA.TypeCode
     */
    public TypeCode getTypeCode() {
	return parDesc.type;
    }

    public String getInstanceNodeTypeName ( ) {
	String result = super.getInstanceNodeTypeName();
	String suffix = null;
	switch (parDesc.mode.value()) {
        case ParameterMode._PARAM_IN:
            suffix = "in";
            break;
        case ParameterMode._PARAM_OUT:
            suffix = "out";
            break;
        case ParameterMode._PARAM_INOUT:
            suffix = "inout";
            break;
        default:
	}
	if (suffix!=null) {
            result = suffix + " " + result;
	}
	return result;
    }

    public static String nodeTypeName() {
	return "";
    }


}











