1 20 21 package org.jacorb.idl; 22 23 27 28 class ValueBase 29 extends BaseType 30 { 31 public ValueBase( int num ) 32 { 33 super( num ); 34 } 35 36 public Object clone() 37 { 38 return this; 39 } 40 41 public String typeName() 42 { 43 return "java.io.Serializable"; 44 } 45 46 public TypeSpec typeSpec() 47 { 48 return this; 49 } 50 51 public void setPackage( String s ) 52 { 53 s = parser.pack_replace( s ); 54 } 55 56 public boolean basic() 57 { 58 return true; 59 } 60 61 public void set_constr( TypeDeclaration td ) 62 { 63 } 64 65 public void parse() 66 { 67 } 68 69 public String toString() 70 { 71 return typeName(); 72 } 73 74 77 public String getTypeCodeExpression() 78 { 79 return "org.omg.CORBA.ORB.init().create_value_tc(\"" + id() + 80 "\",\"ValueBase\", org.omg.CORBA.VM_NONE.value, org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_null), new org.omg.CORBA.ValueMember[]{} )"; 81 } 82 83 public String id() 84 { 85 return "IDL:omg.org/CORBA/ValueBase:1.0"; 86 } 87 88 public void print( java.io.PrintWriter ps ) 89 { 90 } 91 92 public String holderName() 93 { 94 return typeName() + "Holder"; 95 } 96 97 public String printReadExpression( String streamname ) 98 { 99 return "((org.omg.CORBA_2_3.portable.InputStream)" + streamname + ").read_value()"; 100 } 101 102 public String printWriteStatement( String var_name, String streamname ) 103 { 104 return "((org.omg.CORBA_2_3.portable.OutputStream)" + streamname + 105 ").write_value(" + var_name + ");"; 106 } 107 108 109 } 110 111 112 113 | Popular Tags |