excercise 2 done

This commit is contained in:
2025-12-12 22:48:54 +01:00
parent a60e3de86a
commit 27259a12e0
123 changed files with 2946 additions and 1 deletions

View File

@@ -0,0 +1,87 @@
package GraphicsApp;
/**
* GraphicsApp/GraphicalObjectHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from Graphics.idl
* Tuesday, November 11, 2025 6:46:29 PM CET
*/
// GraphicalShape object extends Shape
abstract public class GraphicalObjectHelper
{
private static String _id = "IDL:GraphicsApp/GraphicalObject:1.0";
public static void insert (org.omg.CORBA.Any a, GraphicsApp.GraphicalObject that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static GraphicsApp.GraphicalObject extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
__typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (GraphicsApp.GraphicalObjectHelper.id (), "GraphicalObject");
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static GraphicsApp.GraphicalObject read (org.omg.CORBA.portable.InputStream istream)
{
return narrow (istream.read_Object (_GraphicalObjectStub.class));
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, GraphicsApp.GraphicalObject value)
{
ostream.write_Object ((org.omg.CORBA.Object) value);
}
public static GraphicsApp.GraphicalObject narrow (org.omg.CORBA.Object obj)
{
if (obj == null)
return null;
else if (obj instanceof GraphicsApp.GraphicalObject)
return (GraphicsApp.GraphicalObject)obj;
else if (!obj._is_a (id ()))
throw new org.omg.CORBA.BAD_PARAM ();
else
{
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
GraphicsApp._GraphicalObjectStub stub = new GraphicsApp._GraphicalObjectStub ();
stub._set_delegate(delegate);
return stub;
}
}
public static GraphicsApp.GraphicalObject unchecked_narrow (org.omg.CORBA.Object obj)
{
if (obj == null)
return null;
else if (obj instanceof GraphicsApp.GraphicalObject)
return (GraphicsApp.GraphicalObject)obj;
else
{
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
GraphicsApp._GraphicalObjectStub stub = new GraphicsApp._GraphicalObjectStub ();
stub._set_delegate(delegate);
return stub;
}
}
}