e.g.
serversHelper
|
// C#
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.Type(Type());
Write(a.Create_Output_Stream(),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 string Id()
{
return _id;
}
private static 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 size2 =2;
new_one = new demo.arrays.MyServer[size2];
for (int i2=0; i2 < new_one.Length; i2++)
{
new_one[i2] = 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 i2=0; i2 < value.Length; i2++)
{
demo.arrays.MyServerHelper.Write(ostream,value[i2]);
}
}
}
|