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
This commit is contained in:
parent
21fadb7917
commit
ead67fddf4
1 changed files with 7 additions and 0 deletions
|
@ -751,6 +751,7 @@ template <typename AP, typename Id, typename P1 >
|
|||
>
|
||||
class Factory : public FactoryErrorPolicy<IdentifierType, AbstractProduct>
|
||||
{
|
||||
protected:
|
||||
typedef FactoryImpl< AbstractProduct, IdentifierType, CreatorParmTList > Impl;
|
||||
|
||||
typedef typename Impl::Parm1 Parm1;
|
||||
|
@ -771,6 +772,7 @@ template <typename AP, typename Id, typename P1 >
|
|||
|
||||
typedef Functor<AbstractProduct*, CreatorParmTList> ProductCreator;
|
||||
|
||||
private:
|
||||
typedef AssocVector<IdentifierType, ProductCreator> IdToProductMap;
|
||||
|
||||
IdToProductMap associations_;
|
||||
|
@ -806,6 +808,11 @@ template <typename AP, typename Id, typename P1 >
|
|||
return associations_.erase(id) != 0;
|
||||
}
|
||||
|
||||
bool IsRegistered(const IdentifierType& id)
|
||||
{
|
||||
return associations_.find(id) != associations_.end();
|
||||
}
|
||||
|
||||
std::vector<IdentifierType> RegisteredIds()
|
||||
{
|
||||
std::vector<IdentifierType> ids;
|
||||
|
|
Loading…
Reference in a new issue