// C# classes
e.g :
fixedTHelper
|
public class fixedTHelper
{
///
/// Insert fixedT into an any
/// @param a an any
/// @param t fixedT value
///
public static void Insert(Org.Omg.CORBA.Any a, Org.Omg.CORBA.Fixed t )
{
a.Type(Type());
Write(a.Create_Output_Stream(),t);
}
///
/// Extract fixedT from an any
/// @param a an any
/// @return the extracted fixedT value
///
public static Org.Omg.CORBA.Fixed 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 fixedT 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(),"fixedT",orb.Create_Fixed_TC( (ushort)5, (short)2));
}
return _tc;
}
///
/// Return the fixedT IDL ID
/// @return an ID
///
public static string Id()
{
return _id;
}
private static string _id = "IDL:demo/grid/MyServer/fixedT:1.0";
///
/// Read fixedT from a marshalled stream
/// @param istream the input stream
/// @return the readed fixedT value
///
public static Org.Omg.CORBA.Fixed Read(Org.Omg.CORBA.Portable.InputStream istream)
{
Org.Omg.CORBA.Fixed _f = istream.Read_Fixed();
return _f.MovePointLeft(2);
}
///
/// Write fixedT into a marshalled stream
/// @param ostream the output stream
/// @param value fixedT value
///
public static void Write(Org.Omg.CORBA.Portable.OutputStream ostream, Org.Omg.CORBA.Fixed value)
{
if (value.scale != 2)
throw new Org.Omg.CORBA.DATA_CONVERSION();
ostream.Write_Fixed(value);
}
}
|