MCPcopy Create free account
hub / github.com/NetSys/bess / DeregisterModuleClass

Method DeregisterModuleClass

core/module.cc:58–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58bool ModuleBuilder::DeregisterModuleClass(const std::string &class_name) {
59 // Check if the module builder exists
60 auto it = all_module_builders_holder().find(class_name);
61 if (it == all_module_builders_holder().end()) {
62 return false;
63 }
64
65 // Check if any module of the class still exists
66 const ModuleBuilder *builder = &(it->second);
67 if (ModuleGraph::HasModuleOfClass(builder))
68 return false;
69
70 all_module_builders_holder().erase(it);
71 return true;
72}
73
74std::map<std::string, ModuleBuilder> &ModuleBuilder::all_module_builders_holder(
75 bool reset) {

Callers

nothing calls this directly

Calls 1

endMethod · 0.45

Tested by

no test coverage detected