static Examples_ByteSeq_Storage
impl_Examples_ByteSeq_Storage__create(PortableServer_POA poa,
				      CORBA_Environment * ev)
{
   Examples_ByteSeq_Storage retval;
   impl_POA_Examples_ByteSeq_Storage *newservant;
   PortableServer_ObjectId *objid;

   newservant = g_new0(impl_POA_Examples_ByteSeq_Storage, 1);
   newservant->servant.vepv = &impl_Examples_ByteSeq_Storage_vepv;
   newservant->poa =
      (PortableServer_POA) CORBA_Object_duplicate((CORBA_Object) poa, ev);

   POA_Examples_ByteSeq_Storage__init((PortableServer_Servant) newservant,
				      ev);
   /* Before servant is going to be activated all
    * private attributes must be initialized.  */

   /* ------ init private attributes here ------ */
   newservant->chunk = ORBit_sequence_alloc (TC_CORBA_sequence_CORBA_octet, 64);   /* ------ ---------- end ------------- ------ */

   objid = PortableServer_POA_activate_object(poa, newservant, ev);
   CORBA_free(objid);
   retval = PortableServer_POA_servant_to_reference(poa, newservant, ev);

   return retval;
}
Example #2
0
static void
test_ORBit_sequence (void) {
	gpointer seq 
		= ORBit_sequence_alloc (TC_CORBA_sequence_CORBA_octet,
					1000);
	CORBA_free (seq); 
}
Example #3
0
static Test_LargeSeq_LargeData*
impl_Test_LargeSeq_get(impl_POA_Test_LargeSeq *servant,
const CORBA_long dataSize,
CORBA_Environment *ev)
{
Test_LargeSeq_LargeData* retval;
 /* ------   insert method code here   ------ */
 /* ------ ---------- end ------------ ------ */
CORBA_long i=0;
retval = ORBit_sequence_alloc (TC_Test_LargeSeq_LargeData, dataSize);
for(i=0; i<dataSize; i++)
  {
    ORBit_sequence_index(retval, i) = (CORBA_long) 0xAAAAAAAA;
  }

return retval;
}
static Examples_ByteSeq_Chunk *
impl_Examples_ByteSeq_Storage_get(impl_POA_Examples_ByteSeq_Storage * servant,
				  CORBA_Environment * ev)
{
   Examples_ByteSeq_Chunk *retval;

   /* ------   insert method code here   ------ */
   fprintf (stderr, "-");

   retval = ORBit_sequence_alloc (TC_CORBA_sequence_CORBA_octet,
                                  servant->chunk->_length);

   {
           CORBA_long i=0;
           for (i = 0; i < servant->chunk->_length; ++i)
                   ORBit_sequence_index (retval, i)
                           = ORBit_sequence_index (servant->chunk, i);
   }
   /* ------ ---------- end ------------ ------ */

   return retval;
}