
A factory of non-pointer types? I'm confused - the example you describe appears to create the objects on the heap, thus pointers are involved somewhere. As soon as you right myns::myclass&, you are basically using a pointer. Could you try and describe your use cases a little bit more clearly, and also take a look at the Extension documentation at http://boost-extension.redshoelace.com/docs/boost/extension/index.html? Let me apologize for the still incomplete reflection documentation. Jeremy Pack __________
There is a way to use value-based types (with non-pointers) even from
shared libraries.
I think you didn't read
the paper I linked.
It's ok to have factories with types which are pointers to base
classes. But I'd like
to be able to use a factories to register types with no pointer in its
creation so that I can use
non-pointer factories with my own non-intrusive interfaces. I know it
sounds weird.
If you want to understand why I want this, take a look at the paper I
linked and these ones:
run-time concepts:
http://www.emarcus.org/papers/oops2008-marcus.pdf
mixing objects and generic programming:
http://www.emarcus.org/papers/MPOOL2007-marcus.pdf
Pseudo-code.
With this technique your examples could become (but they don't need to):
//This is the object that takes the role of interface
class any_animal {
void get_name(); ...
};
factory
Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users