64 |
extends org.omg.CORBA.portable.OutputStream |
extends org.omg.CORBA.portable.OutputStream |
65 |
{ |
{ |
66 |
/** |
/** |
67 |
* Writes an abstract interface to the stream. An abstract interface can |
* Writes an abstract interface to the stream. An abstract interface can be |
68 |
* be eithe CORBA object or value type and is written as a union with |
* eithe CORBA object or value type and is written as a union with the boolean |
69 |
* the boolean discriminator (false for objects, true for value types). |
* discriminator (false for objects, true for value types). |
70 |
* |
* |
71 |
* The object from value is separated by fact that all values implement |
* The object from value is separated by fact that all values implement the |
72 |
* the {@link ValueBase} interface. Also, the passed parameter is treated |
* {@link ValueBase} interface. Also, the passed parameter is treated as value |
73 |
* as value it it does not implement CORBA Object. |
* it it does not implement CORBA Object. |
74 |
* |
* |
75 |
* @param an_interface an abstract interface to write. |
* @param an_interface an abstract interface to write. |
76 |
*/ |
*/ |
77 |
public void write_abstract_interface(java.lang.Object an_interface) |
public void write_abstract_interface(java.lang.Object an_interface) |
78 |
{ |
{ |
79 |
boolean isValue = |
boolean isObject = !(an_interface instanceof ValueBase) |
80 |
an_interface instanceof ValueBase || |
&& an_interface instanceof org.omg.CORBA.Object; |
|
(!(an_interface instanceof org.omg.CORBA.Object)); |
|
81 |
|
|
82 |
write_boolean(isValue); |
write_boolean(isObject); |
83 |
|
|
84 |
if (isValue) |
if (isObject) |
|
write_value((ValueBase) an_interface); |
|
|
else |
|
85 |
write_Object((org.omg.CORBA.Object) an_interface); |
write_Object((org.omg.CORBA.Object) an_interface); |
86 |
|
else |
87 |
|
write_value((Serializable) an_interface); |
88 |
|
|
89 |
} |
} |
90 |
|
|
91 |
/** |
/** |
92 |
* Writes a value type into the output stream. |
* Writes a value type into the output stream. |
93 |
* |
* |
94 |
* The value type must implement either {@link CustomValue} |
* The value type must implement either {@link CustomValue} (for user-defined |
95 |
* (for user-defined writing method) or {@link StramableValue} |
* writing method) or {@link StramableValue} (for standard writing using code, |
96 |
* (for standard writing using code, generated by IDL compiler). |
* generated by IDL compiler). |
97 |
* |
* |
98 |
* The written record will have a repository id, matching the |
* The written record will have a repository id, matching the class of the |
99 |
* class of the passed object. The codebase will not be written. |
* passed object. The codebase will not be written. |
100 |
* |
* |
101 |
* @param value a value type object to write. |
* @param value a value type object to write. |
102 |
*/ |
*/ |
103 |
public void write_value(Serializable value) |
public void write_value(Serializable value) |
124 |
* Writes a value type into the output stream, stating it is an |
* Writes a value type into the output stream, stating it is an |
125 |
* instance of the given class. The written record |
* instance of the given class. The written record |
126 |
* will have a repository id, matching the passed class. |
* will have a repository id, matching the passed class. |
127 |
* The codebase will not be written. |
* The codebase will not be written. It the object |
128 |
|
* being written is an instance of the different class, this results |
129 |
|
* writing two Id inheritance hierarchy. |
130 |
* |
* |
131 |
* The value type must implement either {@link CustomValue} |
* The value type must implement either {@link CustomValue} |
132 |
* (for user-defined writing method) or {@link StramableValue} |
* (for user-defined writing method) or {@link StramableValue} |
140 |
} |
} |
141 |
|
|
142 |
/** |
/** |
143 |
* Writes a value type into the output stream, |
* Writes a value type into the output stream, stating it has the given |
144 |
* stating it has the given repository id. |
* repository id. |
145 |
* |
* |
146 |
* The value type must implement either {@link CustomValue} |
* The value type must implement either {@link CustomValue} (for user-defined |
147 |
* (for user-defined writing method) or {@link StramableValue} |
* writing method) or {@link StramableValue} (for standard writing using code, |
148 |
* (for standard writing using code, generated by IDL compiler). |
* generated by IDL compiler). |
149 |
* |
* |
150 |
* @param repository_id a repository id of the value type. |
* @param repository_id a repository id of the value type. |
151 |
* |
* |
152 |
* @param value a value type object to write. |
* @param value a value type object to write. |
153 |
*/ |
*/ |
154 |
public void write_value(Serializable value, String repository_id) |
public void write_value(Serializable value, String repository_id) |