From: <syn...@us...> - 2009-12-22 11:35:53
|
Revision: 1066 http://loki-lib.svn.sourceforge.net/loki-lib/?rev=1066&view=rev Author: syntheticpp Date: 2009-12-22 11:35:46 +0000 (Tue, 22 Dec 2009) Log Message: ----------- make inheriting from Factory possible, thanks to Roland Pabel Modified Paths: -------------- trunk/include/loki/Factory.h Modified: trunk/include/loki/Factory.h =================================================================== --- trunk/include/loki/Factory.h 2009-12-14 17:01:10 UTC (rev 1065) +++ trunk/include/loki/Factory.h 2009-12-22 11:35:46 UTC (rev 1066) @@ -751,6 +751,7 @@ > class Factory : public FactoryErrorPolicy<IdentifierType, AbstractProduct> { + protected: typedef FactoryImpl< AbstractProduct, IdentifierType, CreatorParmTList > Impl; typedef typename Impl::Parm1 Parm1; @@ -771,6 +772,7 @@ typedef Functor<AbstractProduct*, CreatorParmTList> ProductCreator; + private: typedef AssocVector<IdentifierType, ProductCreator> IdToProductMap; IdToProductMap associations_; @@ -806,6 +808,11 @@ return associations_.erase(id) != 0; } + bool IsRegistered(const IdentifierType& id) + { + return associations_.find(id) != associations_.end(); + } + std::vector<IdentifierType> RegisteredIds() { std::vector<IdentifierType> ids; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |