![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpDynamicFactory.h>
Public Member Functions | |
| void | registerType (const std::string &key, const std::function< std::shared_ptr< T >(const nlohmann::json &)> &function) |
| void | registerTypeRaw (const std::string &key, const std::function< std::shared_ptr< T >(const std::string &)> function) |
| std::shared_ptr< T > | buildFromJson (const nlohmann::json &j) |
| void | setJsonKeyFinder (const std::function< std::string(const nlohmann::json &)> &finderFn) |
| virtual | ~vpDynamicFactory () |
Protected Member Functions | |
| vpDynamicFactory ()=default | |
Protected Attributes | |
| std::map< std::string, std::function< std::shared_ptr< T >(const nlohmann::json &)> > | m_jsonBuilders |
| std::map< std::string, std::function< std::shared_ptr< T >(const std::string &)> > | m_jsonRawBuilders |
| std::function< std::string(const nlohmann::json &)> | m_keyFinder |
Factory-type class that allows for the dynamic registration of subclasses.
| T | The subclass type |
Definition at line 55 of file vpDynamicFactory.h.
|
inlinevirtual |
Definition at line 101 of file vpDynamicFactory.h.
|
protecteddefault |
|
inline |
Definition at line 78 of file vpDynamicFactory.h.
References m_jsonBuilders, m_jsonRawBuilders, and m_keyFinder.
Referenced by vpRBTracker::loadConfiguration().
|
inline |
Definition at line 59 of file vpDynamicFactory.h.
References vpException::badValue, m_jsonBuilders, and m_jsonRawBuilders.
|
inline |
Definition at line 67 of file vpDynamicFactory.h.
References vpException::badValue, m_jsonBuilders, and m_jsonRawBuilders.
|
inline |
Definition at line 95 of file vpDynamicFactory.h.
References m_keyFinder.
|
protected |
Definition at line 107 of file vpDynamicFactory.h.
Referenced by buildFromJson(), registerType(), and registerTypeRaw().
|
protected |
Definition at line 108 of file vpDynamicFactory.h.
Referenced by buildFromJson(), registerType(), and registerTypeRaw().
|
protected |
Definition at line 110 of file vpDynamicFactory.h.
Referenced by buildFromJson(), and setJsonKeyFinder().