org.jacorb.idl
Class ArrayTypeSpec
java.lang.Object
org.jacorb.idl.runtime.symbol
org.jacorb.idl.IdlSymbol
org.jacorb.idl.TypeSpec
org.jacorb.idl.SimpleTypeSpec
org.jacorb.idl.TemplateTypeSpec
org.jacorb.idl.VectorType
org.jacorb.idl.ArrayTypeSpec
public class ArrayTypeSpec
- extends VectorType
- Version:
- $Id: ArrayTypeSpec.java,v 1.33 2007/02/06 22:50:35 andre.spiegel Exp $
- Author:
- Gerald Brose
Method Summary |
java.lang.String |
className()
|
java.lang.Object |
clone()
clone this ArrayTypeSpec. |
int |
getTCKind()
|
java.lang.String |
getTypeCodeExpression()
|
java.lang.String |
helperName()
|
java.lang.String |
holderName()
|
int |
length()
|
void |
markTypeDefd()
we have to be able to distinguish between explicitly typedef'd
type names and anonymously defined type names |
void |
parse()
empty parse |
void |
print(java.io.PrintWriter _ps)
|
void |
printExtractResult(java.io.PrintWriter ps,
java.lang.String resultname,
java.lang.String anyname,
java.lang.String resulttype)
Prints the java-commands to extract the contents of the Any anyname
into a variable resultname with the type resulttype |
void |
printInsertIntoAny(java.io.PrintWriter ps,
java.lang.String anyname,
java.lang.String varname)
Prints the java-commands to insert the variable varname into
the Any anyname |
java.lang.String |
printReadStatement(java.lang.String var_name,
java.lang.String streamname)
|
java.lang.String |
printWriteStatement(java.lang.String var_name,
java.lang.String streamname)
|
void |
setEnclosingSymbol(IdlSymbol s)
|
void |
setPackage(java.lang.String s)
|
TypeSpec |
typeSpec()
|
Methods inherited from class org.jacorb.idl.IdlSymbol |
addImportedAlias, addImportedName, addImportedName, addImportedNameHolder, deEscapeName, escapeName, generateIncluded, get_token, getEnclosingSymbol, getFullName, id, is_included, is_pseudo, isEscaped, name, new_num, omgPrefix, printClassComment, printIdMethod, printImport, set_name, set_pseudo, set_token, setPrintPhaseNames |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
dims
public int[] dims
ArrayTypeSpec
public ArrayTypeSpec(int num,
TypeSpec elem,
ArrayDeclarator ad,
java.lang.String pack_name)
clone
public java.lang.Object clone()
- clone this ArrayTypeSpec. The cloned object will not be parsed again.
- Overrides:
clone
in class TypeSpec
setEnclosingSymbol
public void setEnclosingSymbol(IdlSymbol s)
- Overrides:
setEnclosingSymbol
in class TypeSpec
typeSpec
public TypeSpec typeSpec()
- Overrides:
typeSpec
in class TypeSpec
setPackage
public void setPackage(java.lang.String s)
- Overrides:
setPackage
in class TypeSpec
markTypeDefd
public void markTypeDefd()
- we have to be able to distinguish between explicitly typedef'd
type names and anonymously defined type names
- Overrides:
markTypeDefd
in class TemplateTypeSpec
parse
public void parse()
throws ParseException
- Description copied from class:
IdlSymbol
- empty parse
- Overrides:
parse
in class TemplateTypeSpec
- Throws:
ParseException
getTypeCodeExpression
public java.lang.String getTypeCodeExpression()
- Overrides:
getTypeCodeExpression
in class TypeSpec
- Returns:
- a string for an expression of type TypeCode that
describes this type
Array and sequence types always have this expression inlined in
their containing classes because arrays and sequences can be
locally defined (e,g, in a struct) without there being helper
classes (so Helper.type() is not an option)
getTCKind
public int getTCKind()
- Overrides:
getTCKind
in class VectorType
helperName
public java.lang.String helperName()
- Specified by:
helperName
in class VectorType
holderName
public java.lang.String holderName()
- Specified by:
holderName
in class VectorType
className
public java.lang.String className()
length
public int length()
- Specified by:
length
in class VectorType
- Returns:
- the length of this array or sequence. For
multi-dimensional vectors, this is the outermost dimension.
For open sequences, this length is 0.
printReadStatement
public java.lang.String printReadStatement(java.lang.String var_name,
java.lang.String streamname)
- Overrides:
printReadStatement
in class TypeSpec
printWriteStatement
public java.lang.String printWriteStatement(java.lang.String var_name,
java.lang.String streamname)
- Overrides:
printWriteStatement
in class TypeSpec
print
public void print(java.io.PrintWriter _ps)
- Overrides:
print
in class TypeSpec
printInsertIntoAny
public void printInsertIntoAny(java.io.PrintWriter ps,
java.lang.String anyname,
java.lang.String varname)
- Description copied from class:
TypeSpec
- Prints the java-commands to insert the variable varname into
the Any anyname
- Overrides:
printInsertIntoAny
in class VectorType
- Parameters:
ps
- Stream, the commands shall be written toanyname
- Name of the Any into which the variable shall be insertedvarname
- Name of the variable which shall be inserted
printExtractResult
public void printExtractResult(java.io.PrintWriter ps,
java.lang.String resultname,
java.lang.String anyname,
java.lang.String resulttype)
- Description copied from class:
TypeSpec
- Prints the java-commands to extract the contents of the Any anyname
into a variable resultname with the type resulttype
- Overrides:
printExtractResult
in class VectorType
- Parameters:
ps
- Stream, the commands shall be written toresultname
- Name of the result variableanyname
- Name of the Any holding the resultresulttype
- Type of the result variable