org.jacorb.idl

Class SequenceType


public class SequenceType
extends VectorType

IDL sequences.

Version:
$Id: SequenceType.java,v 1.36 2004/05/06 12:39:58 nicolas Exp $

Author:
Gerald Brose

Field Summary

org.jacorb.idl.ConstExpr
max

Fields inherited from class org.jacorb.idl.TemplateTypeSpec

typedefd

Fields inherited from class org.jacorb.idl.TypeSpec

alias, type_spec

Fields inherited from class org.jacorb.idl.IdlSymbol

_id, enclosing_symbol, fileSeparator, included, inhibitionFlag, is_pseudo, omg_package_prefix, pack_name

Fields inherited from class org.jacorb.idl.runtime.symbol

parse_state, sym

Constructor Summary

SequenceType(int num)
class constructor

Method Summary

String
className()
Object
clone()
String
full_name()
static int
getNumber()
String
getTypeCodeExpression()
String
helperName()
String
holderName()
int
length()
void
parse()
The parsing phase.
void
print(PrintWriter _ps)
String
printReadStatement(String var_name, String streamname)
We have to distinguish between sequence types that have been explicitly declared as types with a typedef and those that are declared as anonymous types in structs or unions.
String
printWriteStatement(String var_name, String streamname)
void
setEnclosingSymbol(IdlSymbol s)
void
setPackage(String s)
TypeSpec
typeSpec()
since the sequence type's name depends on a declarator given in the typedef, the name varilabe has to be set explicitly by the TypeDef object before this sequence type can be used.

Methods inherited from class org.jacorb.idl.VectorType

elementTypeExpression, elementTypeName, elementTypeSpec, helperName, holderName, length, printReadExpression, setTypeSpec, toString, typeName

Methods inherited from class org.jacorb.idl.TemplateTypeSpec

basic, markTypeDefd, parse

Methods inherited from class org.jacorb.idl.TypeSpec

basic, clone, getIDLTypeName, getJavaTypeName, getTypeCodeExpression, getTypeCodeExpression, holderName, parse, print, printExtractExpression, printInsertExpression, printReadExpression, printReadStatement, printWriteStatement, setEnclosingSymbol, setPackage, set_constr, toString, typeName, typeSpec

Methods inherited from class org.jacorb.idl.IdlSymbol

accept, addImportedAlias, addImportedName, addImportedName, addImportedNameHolder, deEscapeName, escapeName, generateIncluded, getEnclosingSymbol, get_token, id, isEscaped, is_included, is_pseudo, name, new_num, omgPrefix, parse, print, printIdMethod, printImport, setEnclosingSymbol, setPackage, setPrintPhaseNames, set_name, set_pseudo, set_token

Field Details

max

public org.jacorb.idl.ConstExpr max

Constructor Details

SequenceType

public SequenceType(int num)
class constructor

Method Details

className

public String className()


clone

public Object clone()
Overrides:
clone in interface TypeSpec


full_name

public String full_name()

Returns:
fully scoped IDL identifier


getNumber

public static int getNumber()


getTypeCodeExpression

public String getTypeCodeExpression()
Overrides:
getTypeCodeExpression in interface TypeSpec

Returns:
a string for an expression of type TypeCode that describes this type


helperName

public String helperName()
Overrides:
helperName in interface VectorType


holderName

public String holderName()
Overrides:
holderName in interface VectorType


length

public int length()
Overrides:
length in interface VectorType


parse

public void parse()
The parsing phase.
Overrides:
parse in interface org.jacorb.idl.TemplateTypeSpec


print

public void print(PrintWriter _ps)
Overrides:
print in interface TypeSpec


printReadStatement

public String printReadStatement(String var_name,
                                 String streamname)
We have to distinguish between sequence types that have been explicitly declared as types with a typedef and those that are declared as anonymous types in structs or unions. In the latter case, we have to generate marshalling code in-line because there are no helpers for anonymous types
Overrides:
printReadStatement in interface TypeSpec


printWriteStatement

public String printWriteStatement(String var_name,
                                  String streamname)
Overrides:
printWriteStatement in interface TypeSpec


setEnclosingSymbol

public void setEnclosingSymbol(IdlSymbol s)
Overrides:
setEnclosingSymbol in interface TypeSpec


setPackage

public void setPackage(String s)
Overrides:
setPackage in interface TypeSpec


typeSpec

public TypeSpec typeSpec()
since the sequence type's name depends on a declarator given in the typedef, the name varilabe has to be set explicitly by the TypeDef object before this sequence type can be used.
Overrides:
typeSpec in interface TypeSpec