e.g.
serversHelper
serversHolder
|
// J#
package demo.arrays.MyServerPackage;
/**
* Helper class for : servers
*
* @author TomORB J# Native Compiler
*/
public class serversHelper
{
/**
* Insert servers into an any
* @param a an any
* @param t servers value
*/
public static void insert(org.omg.CORBA.Any a, demo.arrays.MyServer[] t)
{
a.insert_Streamable(new demo.arrays.MyServerPackage.serversHolder(t));
}
/**
* Extract servers from an any
* @param a an any
* @return the extracted servers value
*/
public static demo.arrays.MyServer[] extract(org.omg.CORBA.Any a)
{
if (!a.type().equal(type()))
throw new org.omg.CORBA.MARSHAL();
return read(a.create_input_stream());
}
//
// Internal TypeCode value
//
private static org.omg.CORBA.TypeCode _tc = null;
/**
* Return the servers TypeCode
* @return a TypeCode
*/
public static org.omg.CORBA.TypeCode type()
{
if (_tc == null) {
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
_tc = orb.create_alias_tc(id(),"servers",orb.create_array_tc(2,demo.arrays.MyServerHelper.type()));
}
return _tc;
}
/**
* Return the servers IDL ID
* @return an ID
*/
public static java.lang.String id()
{
return _id;
}
private final static java.lang.String _id = "IDL:demo/arrays/MyServer/servers:1.0";
/**
* Read servers from a marshalled stream
* @param istream the input stream
* @return the readed servers value
*/
public static demo.arrays.MyServer[] read(org.omg.CORBA.portable.InputStream istream)
{
demo.arrays.MyServer[] new_one;
{
int size1 = 2;
new_one = new demo.arrays.MyServer[size1];
for (int i1=0; i1<new_one.length; i1++)
{
new_one[i1] = demo.arrays.MyServerHelper.read(istream);
}
}
return new_one;
}
/**
* Write servers into a marshalled stream
* @param ostream the output stream
* @param value servers value
*/
public static void write(org.omg.CORBA.portable.OutputStream ostream, demo.arrays.MyServer[] value)
{
if (value.length != 2)
throw new org.omg.CORBA.MARSHAL();
for (int i1=0; i1<value.length; i1++)
{
demo.arrays.MyServerHelper.write(ostream,value[i1]);
}
}
}
package demo.arrays.MyServerPackage;
/**
* Holder class for : servers
*
* @author TomORB J# Native Compiler
*/
final public class serversHolder
implements org.omg.CORBA.portable.Streamable
{
/**
* Internal servers value
*/
public demo.arrays.MyServer[] value;
/**
* Default constructor
*/
public serversHolder()
{ }
/**
* Constructor with value initialisation
* @param initial the initial value
*/
public serversHolder(demo.arrays.MyServer[] initial)
{
value = initial;
}
/**
* Read servers from a marshalled stream
* @param istream the input stream
*/
public void _read(org.omg.CORBA.portable.InputStream istream)
{
value = serversHelper.read(istream);
}
/**
* Write servers into a marshalled stream
* @param ostream the output stream
*/
public void _write(org.omg.CORBA.portable.OutputStream ostream)
{
serversHelper.write(ostream,value);
}
/**
* Return the servers TypeCode
* @return a TypeCode
*/
public org.omg.CORBA.TypeCode _type()
{
return serversHelper.type();
}
}
|