summaryrefslogtreecommitdiff
path: root/factory.h
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2007-08-13 23:45:47 +0000
committerweidai <weidai11@users.noreply.github.com>2007-08-13 23:45:47 +0000
commite4943d865426ff23b3e7a1b72dd65216be291423 (patch)
tree2984b729a8b2d48768bfbc2db4dd6525eb95a01c /factory.h
parentedb72420216696fecf2e820b91153b2fcb702b48 (diff)
downloadcryptopp-git-e4943d865426ff23b3e7a1b72dd65216be291423.tar.gz
patch from Andrew Pitonyak to return factory names
Diffstat (limited to 'factory.h')
-rw-r--r--factory.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/factory.h b/factory.h
index ad8a84f0..a775a54c 100644
--- a/factory.h
+++ b/factory.h
@@ -65,6 +65,17 @@ public:
return factory->CreateObject();
}
+ // Return a vector containing the factory names. This is easier than returning an iterator.
+ // from Andrew Pitonyak
+ std::vector<std::string> GetFactoryNames() const
+ {
+ std::vector<std::string> names;
+ CPP_TYPENAME Map::const_iterator iter;
+ for (iter = m_map.begin(); iter != m_map.end(); ++iter)
+ names.push_back(iter->first);
+ return names;
+ }
+
CRYPTOPP_NOINLINE static ObjectFactoryRegistry<AbstractClass, instance> & Registry(CRYPTOPP_NOINLINE_DOTDOTDOT);
private: