| 64 | } |
| 65 | |
| 66 | void 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 | |
| 80 | void GraphStruct::modifyType(size_t id, DataType newTy, std::string newName, |
| 81 | bool updateReferences) { |
no test coverage detected