| 268 | } |
| 269 | |
| 270 | static void ApplyAddAttribute |
| 271 | ( |
| 272 | FILE *stream, // effects stream |
| 273 | GraphContext *gc // graph to operate on |
| 274 | ) { |
| 275 | //-------------------------------------------------------------------------- |
| 276 | // effect format: |
| 277 | // effect type |
| 278 | // attribute name |
| 279 | //-------------------------------------------------------------------------- |
| 280 | |
| 281 | // read attribute name length |
| 282 | size_t l; |
| 283 | fread_assert(&l, sizeof(l), stream); |
| 284 | |
| 285 | // read attribute name |
| 286 | const char attr[l]; |
| 287 | fread_assert(attr, l, stream); |
| 288 | |
| 289 | // attr should not exist |
| 290 | ASSERT(GraphContext_GetAttributeID(gc, attr) == ATTRIBUTE_ID_NONE); |
| 291 | |
| 292 | // add attribute |
| 293 | FindOrAddAttribute(gc, attr, false); |
| 294 | } |
| 295 | |
| 296 | // process Update_Edge effect |
| 297 | static void ApplyUpdateEdge |
no test coverage detected