71 public ValueGen24 () |
71 public ValueGen24 () |
72 { |
72 { |
73 } // ctor |
73 } // ctor |
74 |
74 |
75 /** |
75 /** |
76 * <d62023> - delete constructor; helper is abstract |
76 * d62023 - delete constructor; helper is abstract |
77 **/ |
77 **/ |
78 protected void writeConstructor () |
78 protected void writeConstructor () |
79 { |
79 { |
80 } // writeConstructor |
80 } // writeConstructor |
81 |
81 |
82 /** |
82 /** |
83 * <d62023> - delete write_value from non-boxed helpers |
83 * <pre> |
84 * - delete _write from non-boxed helpers |
84 * d62023 - delete write_value from non-boxed helpers |
|
85 * - delete _write from non-boxed helpers |
|
86 * </pre> |
85 **/ |
87 **/ |
86 public void helperWrite (SymtabEntry entry, PrintWriter stream) |
88 public void helperWrite (SymtabEntry entry, PrintWriter stream) |
87 { |
89 { |
88 // REVISIT: Abstract/Custom?? |
90 // REVISIT: Abstract/Custom?? |
89 // per Simon mail 5/17/99 |
91 // per Simon mail 5/17/99 |
90 stream.println (" ((org.omg.CORBA_2_3.portable.OutputStream) ostream).write_value (value, id ());"); |
92 stream.println (" ((org.omg.CORBA_2_3.portable.OutputStream) ostream).write_value (value, id ());"); |
91 } // helperWrite |
93 } // helperWrite |
92 |
94 |
93 /** |
95 /** |
94 * <d62023> |
96 * d62023 |
95 **/ |
97 **/ |
96 public void helperRead (String entryName, SymtabEntry entry, PrintWriter stream) |
98 public void helperRead (String entryName, SymtabEntry entry, PrintWriter stream) |
97 { |
99 { |
98 // REVISIT: Abstract/Custom?? |
100 // REVISIT: Abstract/Custom?? |
99 // per Simon mail 5/17/99 |
101 // per Simon mail 5/17/99 |
100 stream.println (" return (" + entryName + ")((org.omg.CORBA_2_3.portable.InputStream) istream).read_value (id ());"); |
102 stream.println (" return (" + entryName + ")((org.omg.CORBA_2_3.portable.InputStream) istream).read_value (id ());"); |
101 } // helperRead |
103 } // helperRead |
102 |
104 |
103 /** |
105 /** |
104 * <d62023> - suppress initializers from mapped value; now generated in |
106 * d62023 - suppress initializers from mapped value; now generated in |
105 * the Helper class and Factory class |
107 * the Helper class and Factory class |
106 **/ |
108 **/ |
107 protected void writeInitializers () |
109 protected void writeInitializers () |
108 { |
110 { |
109 // override to do nothing |
111 // override to do nothing |
110 } // writeInitializers |
112 } // writeInitializers |
111 |
113 |
112 /** |
114 /** |
113 * <d62023> - Goes in mapped class, not Helper |
115 * d62023 - goes in mapped class, not Helper |
114 **/ |
116 **/ |
115 protected void writeTruncatable () // <d60929> |
117 protected void writeTruncatable () // <d60929> |
116 { |
118 { |
117 if (!v.isAbstract ()) { |
119 if (!v.isAbstract ()) { |
118 stream.println (" private static String[] _truncatable_ids = {"); |
120 stream.println (" private static String[] _truncatable_ids = {"); |
215 stream.println (); |
217 stream.println (); |
216 stream.println ("{"); |
218 stream.println ("{"); |
217 } // writeHeading |
219 } // writeHeading |
218 |
220 |
219 /** |
221 /** |
220 * <d62023> - private state maps to protected, not default |
222 * d62023 - private state maps to protected, not default |
221 **/ |
223 **/ |
222 protected void writeMembers () |
224 protected void writeMembers () |
223 { |
225 { |
224 // if the value type contains no data members, a null return is expected |
226 // if the value type contains no data members, a null return is expected |
225 if (v.state () == null) |
227 if (v.state () == null) |
243 } |
245 } |
244 stream.println(); |
246 stream.println(); |
245 } // writeMembers |
247 } // writeMembers |
246 |
248 |
247 /** |
249 /** |
248 * <d62023> Methods need to be abstract |
250 * d62023 - methods need to be abstract writeStreamable |
249 * writeStreamable |
|
250 **/ |
251 **/ |
251 protected void writeMethods () |
252 protected void writeMethods () |
252 { |
253 { |
253 // contained vector contains methods, attributes, const, enums, exceptions, |
254 // contained vector contains methods, attributes, const, enums, exceptions, |
254 // structs, unions, or typedefs that are declared inside the value object. |
255 // structs, unions, or typedefs that are declared inside the value object. |
292 if (!(v.isCustom () || v.isAbstract ())) |
293 if (!(v.isCustom () || v.isAbstract ())) |
293 writeStreamableMethods (); |
294 writeStreamableMethods (); |
294 } // writeMethods |
295 } // writeMethods |
295 |
296 |
296 /** |
297 /** |
297 * <d62023> Call super._read() |
298 * d62023 - call super._read() |
298 **/ |
299 **/ |
299 public int read (int index, String indent, String name, SymtabEntry entry, PrintWriter stream) |
300 public int read (int index, String indent, String name, SymtabEntry entry, PrintWriter stream) |
300 { |
301 { |
301 // First do the state members from concrete parent hierarchy |
302 // First do the state members from concrete parent hierarchy |
302 Vector vParents = ((ValueEntry) entry).derivedFrom (); |
303 Vector vParents = ((ValueEntry) entry).derivedFrom (); |
333 |
334 |
334 return index; |
335 return index; |
335 } // read |
336 } // read |
336 |
337 |
337 /** |
338 /** |
338 * <d62023> Call super._write() |
339 * d62023 - call super._write() |
339 **/ |
340 **/ |
340 public int write (int index, String indent, String name, SymtabEntry entry, PrintWriter stream) |
341 public int write (int index, String indent, String name, SymtabEntry entry, PrintWriter stream) |
341 { |
342 { |
342 // First do the state members from concrete parent hierarchy |
343 // First do the state members from concrete parent hierarchy |
343 Vector vParents = ((ValueEntry)entry).derivedFrom (); |
344 Vector vParents = ((ValueEntry)entry).derivedFrom (); |