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

Method modifyType

libchigraph/src/GraphStruct.cpp:80–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void GraphStruct::modifyType(size_t id, DataType newTy, std::string newName,
81 bool updateReferences) {
82 assert(id < types().size() && newTy.valid() && !newName.empty());
83
84 // invalidate the cache
85 module().updateLastEditTime();
86
87 mTypes[id] = {std::move(newName), std::move(newTy)};
88
89 // invalidate the current DataType
90 mDataType = {};
91
92 if (updateReferences) { updateNodeReferences(); }
93}
94
95void GraphStruct::removeType(size_t id, bool updateReferences) {
96 assert(id < types().size());

Callers

nothing calls this directly

Calls 2

updateLastEditTimeMethod · 0.80
validMethod · 0.45

Tested by

no test coverage detected