undo node add label
| 467 | |
| 468 | // undo node add label |
| 469 | void UndoLog_AddLabels |
| 470 | ( |
| 471 | UndoLog log, // undo log |
| 472 | Node *node, // updated node |
| 473 | LabelID *label_ids, // added labels |
| 474 | size_t labels_count // number of removed labels |
| 475 | ) { |
| 476 | ASSERT(node != NULL); |
| 477 | ASSERT(label_ids != NULL); |
| 478 | |
| 479 | UndoOp op; |
| 480 | |
| 481 | op.type = UNDO_SET_LABELS; |
| 482 | op.labels_op.node = *node; |
| 483 | op.labels_op.label_ids = array_new(LabelID, labels_count); |
| 484 | memcpy(op.labels_op.label_ids, label_ids, sizeof(LabelID)*labels_count); |
| 485 | op.labels_op.labels_count = labels_count; |
| 486 | UNDOLOG_ADD_OP(log, op); |
| 487 | } |
| 488 | |
| 489 | // undo node remove label |
| 490 | void UndoLog_RemoveLabels |