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

Method AddModuleToComponent

core/metadata.cc:163–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163void Pipeline::AddModuleToComponent(Module *m, const struct Attribute *attr) {
164 ScopeComponent &component = scope_components_.back();
165
166 // Module has already been added to current scope component.
167 if (std::find(component.modules().begin(), component.modules().end(), m) !=
168 component.modules().end()) {
169 return;
170 }
171
172 if (component.modules().empty()) {
173 component.set_attr_id(get_attr_id(attr));
174 component.set_size(attr->size);
175 }
176 component.add_module(m);
177}
178
179const struct Attribute *Pipeline::FindAttr(Module *m,
180 const struct Attribute *attr) const {

Callers

nothing calls this directly

Calls 7

get_attr_idFunction · 0.85
emptyMethod · 0.80
set_attr_idMethod · 0.80
set_sizeMethod · 0.80
add_moduleMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected