MCPcopy Create free account
hub / github.com/chigraph/chigraph / removeStruct

Method removeStruct

libchigraph/src/GraphModule.cpp:995–1008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

993}
994
995bool GraphModule::removeStruct(boost::string_view name) {
996 // invalidate the cache
997 updateLastEditTime();
998
999 for (auto iter = structs().begin(); iter != structs().end(); ++iter) {
1000 if ((*iter)->name() == name) {
1001 mStructs.erase(iter);
1002 return true;
1003 }
1004 }
1005
1006 // TODO: remove referencing nodes
1007 return false;
1008}
1009
1010void GraphModule::removeStruct(GraphStruct* tyToDel) {
1011 assert(&tyToDel->module() == this);

Callers 1

Calls 4

beginMethod · 0.80
endMethod · 0.80
getMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected