1 20 21 package org.jacorb.idl; 22 23 27 28 import java.io.PrintWriter ; 29 30 public class Value 31 extends TypeDeclaration 32 { 33 private Value value; 34 35 public Value( int num ) 36 { 37 super( num ); 38 pack_name = ""; 39 } 40 41 public Object clone() 42 { 43 return value.clone(); 44 } 45 46 public void setValue( Value value ) 47 { 48 this.value = value; 49 } 50 51 public TypeDeclaration declaration() 52 { 53 return value; 54 }; 55 56 public String typeName() 57 { 58 return value.typeName(); 59 } 60 61 62 66 67 public String getTypeCodeExpression() 68 { 69 return value.getTypeCodeExpression(); 70 } 71 72 public boolean basic() 73 { 74 return value.basic(); 75 } 76 77 public void setPackage( String s ) 78 { 79 s = parser.pack_replace( s ); 80 value.setPackage( s ); 81 } 82 83 public void set_included( boolean i ) 84 { 85 included = i; 86 value.set_included( i ); 87 } 88 89 public void parse() 90 { 91 value.parse(); 92 } 93 94 public String holderName() 95 { 96 return value.holderName(); 97 } 98 99 public void print( PrintWriter ps ) 100 { 101 value.print( ps ); 102 } 103 104 public String toString() 105 { 106 return value.toString(); 107 } 108 109 public void setEnclosingSymbol( IdlSymbol s ) 110 { 111 if( enclosing_symbol != null && enclosing_symbol != s ) 112 { 113 logger.error("was " + enclosing_symbol.getClass().getName() + " now: " + s.getClass().getName() ); 114 throw new RuntimeException ( "Compiler Error: trying to reassign container for " + name ); 115 } 116 if( s == null ) 117 throw new RuntimeException ( "Compiler Error: enclosing symbol is null!"); 118 119 enclosing_symbol = s; 120 value.setEnclosingSymbol( s ); 121 } 122 123 public String printReadExpression( String streamname ) 124 { 125 return value.printReadExpression( streamname ); 126 } 127 128 public String printReadStatement( String var_name, String streamname ) 129 { 130 return value.printReadStatement( var_name, streamname ); 131 } 132 133 public String printWriteStatement( String var_name, String streamname ) 134 { 135 return value.printWriteStatement( var_name, streamname ); 136 } 137 138 140 141 public void accept( IDLTreeVisitor visitor ) 142 { 143 value.accept( visitor ); 144 } 145 146 147 } 148 | Popular Tags |