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

Method ModuleBuilder

core/module.h:107–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105class ModuleBuilder {
106 public:
107 ModuleBuilder(
108 std::function<Module *()> module_generator, const std::string &class_name,
109 const std::string &name_template, const std::string &help_text,
110 const gate_idx_t igates, const gate_idx_t ogates, const Commands &cmds,
111 std::function<CommandResponse(Module *, const google::protobuf::Any &)>
112 init_func)
113 : module_generator_(module_generator),
114 num_igates_(igates),
115 num_ogates_(ogates),
116 class_name_(class_name),
117 name_template_(name_template),
118 help_text_(help_text),
119 cmds_(cmds),
120 init_func_(init_func) {}
121
122 static bool RegisterModuleClass(std::function<Module *()> module_generator,
123 const std::string &class_name,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected