|
object factories in slice
Hello all,
I've found in the overview web pages an interesting way to play with objects factories
----
interface Invoice {
void addItems(ItemSeq items);
void submit();
};
interface InvoiceFactory {
Invoice* create();
};
----
that makes the usage of factories very simple (this is the python sample)
----
# Create a proxy for the invoice factory object.
proxy = communicator.stringToProxy("InvoiceFactory:tcp -p 9000")
# Narrow the proxy to the proper type.
factory = Biz.InvoiceFactoryPrx.checkedCast(proxy)
# Use the factory to obtain a proxy for a new invoice object.
invoice = factory.create()
----
Unfortunately, I'm not able to find in the documentation and in the samples other usages of this technique: is it possible to have more details (perhaps a working server implementation) ?
Thanks in advance
/gp
|