
This is not a full review, just a few comments: The supplied documentation mentions nothing about the lifetime of a factory. There are two features that I would need from a factory system like this. First, the ability to register and unregister factories. I would suggest explicit registration that returns a shared_ptr to the factory function, while keeping weak_ptr to it. This way, if the factory serves a type that is defined in a DLL, it can be automatically unregistered when the DLL is unloaded. Second, I would prefer the factory table to not be global, instead its type can be documented so it is up to the client code to decide if they want it to be global or not. Finally, it's worth mentioning that in the presence of DLLs using type_info directly is unsafe, since dereferencing a pointer that points a type_info object obtained from a DLL causes a crash if the DLL is unloaded. -- Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode On Dec 17, 2007 2:22 AM, John Torjo <john.groups@torjo.com> wrote:
Hi all,
Today starts the formal Fast-Track review of the Boost.Functional/Factory library.
*Description*
Factories are callback mechanisms for constructors, so we provide two function objects, boost::value_factory and boost::factory, that encasulate object construction through direct application of the constructor or operator new, respectively. These templates make other facilities that operate on function objects (such as standard algorithms, Boost.Bind, Boost.Function, or Fusion functional adapters) applicable to constructors.
*Author*
Tobias Schwinger
*Download*
Get it from here: http://www.boost-consulting.com/vault/index.php?action=downloadfile&filename=factory.zip&directory=X-Files&
Read documentation online here: http://torjo.com/tobias/
What to include in Review Comments ==================================
Your comments may be brief or lengthy, but basically the Review Manager needs your evaluation of the library. If you identify problems along the way, please note if they are minor, serious, or showstoppers.
Here are some questions you might want to answer in your review:
* What is your evaluation of the design? * What is your evaluation of the implementation? * What is your evaluation of the documentation? * What is your evaluation of the potential usefulness of the library? * Did you try to use the library? With what compiler? Did you have any problems? * How much effort did you put into your evaluation? A glance? A quick reading? In-depth study? * Are you knowledgeable about the problem domain?
And finally, every review should answer this question:
* Do you think the library should be accepted as a Boost library? Be sure to say this explicitly so that your other comments don't obscure your overall opinion.
Best, John Torjo - Review Manager -
-- http://John.Torjo.com -- C++ expert ... call me only if you want things done right
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost