Trouble writing a Factory



Hi Folks,

I've been trying to implement a factory Object in orbitcpp (like the
factory one in http://jmvanel.free.fr/corba/orbit-docs/examples/factory/
for C ORBit). This is obviously basic stuff, but I can't find the exact
code that I put in the Factory method implementation to return the
object that it creates.

There was a discussion about writing this example mentioned here:
http://sourceforge.net/mailarchive/message.php?msg_id=522349

The factory itself was created like this:

          Block_ns::BlockFactory_impl servant;
          CORBA::Object_var object = servant._this();

Doing something similar to this doesn't however match the prototype of
the method that the IDL compiler has created for me though. Also the
constructor for the exact type to be returned is protected, so that
isn't right either.

Any code snippets would be greatly appreciated,

Cheers,

Nick Glencross




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]