diff options
author | weidai <weidai11@users.noreply.github.com> | 2007-08-13 23:45:47 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2007-08-13 23:45:47 +0000 |
commit | e4943d865426ff23b3e7a1b72dd65216be291423 (patch) | |
tree | 2984b729a8b2d48768bfbc2db4dd6525eb95a01c /factory.h | |
parent | edb72420216696fecf2e820b91153b2fcb702b48 (diff) | |
download | cryptopp-git-e4943d865426ff23b3e7a1b72dd65216be291423.tar.gz |
patch from Andrew Pitonyak to return factory names
Diffstat (limited to 'factory.h')
-rw-r--r-- | factory.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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: |