From ead67fddf4e393d1255ae4b5d693e69298ac2297 Mon Sep 17 00:00:00 2001 From: syntheticpp Date: Tue, 22 Dec 2009 11:35:46 +0000 Subject: [PATCH] make inheriting from Factory possible, thanks to Roland Pabel git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1066 7ec92016-0320-0410-acc4-a06ded1c099a --- include/loki/Factory.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/loki/Factory.h b/include/loki/Factory.h index 95c71d1..74734e0 100644 --- a/include/loki/Factory.h +++ b/include/loki/Factory.h @@ -751,6 +751,7 @@ template > class Factory : public FactoryErrorPolicy { + protected: typedef FactoryImpl< AbstractProduct, IdentifierType, CreatorParmTList > Impl; typedef typename Impl::Parm1 Parm1; @@ -771,6 +772,7 @@ template typedef Functor ProductCreator; + private: typedef AssocVector IdToProductMap; IdToProductMap associations_; @@ -806,6 +808,11 @@ template return associations_.erase(id) != 0; } + bool IsRegistered(const IdentifierType& id) + { + return associations_.find(id) != associations_.end(); + } + std::vector RegisteredIds() { std::vector ids;