MCPcopy Create free account
hub / github.com/BabitMF/bmf / createAlgorithmInstance

Method createAlgorithmInstance

bmf_lite/src/algorithm/bmf_contrib_algorithm.cpp:25–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23ContribAlgorithmFactory::~ContribAlgorithmFactory() {}
24
25IAlgorithmInterface *
26ContribAlgorithmFactory::createAlgorithmInstance(int algorithm_type) {
27 auto it = func_mp_.find(algorithm_type);
28 if (it != func_mp_.end()) {
29 return it->second();
30 }
31 return nullptr;
32}
33
34bool ContribAlgorithmFactory::registerCreator(
35 int algorithm_type, std::function<IAlgorithmInterface *()> pfunc) {

Callers 1

Calls 1

endMethod · 0.80

Tested by

no test coverage detected