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

Method addType

libchigraph/src/GraphStruct.cpp:66–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void GraphStruct::addType(DataType ty, std::string name, size_t addBefore, bool updateReferences) {
67 assert(addBefore <= types().size() && ty.valid());
68
69 // invalidate the cache
70 module().updateLastEditTime();
71
72 mTypes.emplace_back(name, ty);
73
74 // invalidate the current DataType
75 mDataType = {};
76
77 if (updateReferences) { updateNodeReferences(); }
78}
79
80void GraphStruct::modifyType(size_t id, DataType newTy, std::string newName,
81 bool updateReferences) {

Callers 1

jsonToGraphStructFunction · 0.80

Calls 2

updateLastEditTimeMethod · 0.80
validMethod · 0.45

Tested by

no test coverage detected