| 36 | } |
| 37 | |
| 38 | void GraphEncodeContext_Reset(GraphEncodeContext *ctx) { |
| 39 | ASSERT(ctx != NULL); |
| 40 | |
| 41 | _GraphEncodeContext_ResetHeader(ctx); |
| 42 | |
| 43 | ctx->offset = 0; |
| 44 | ctx->keys_processed = 0; |
| 45 | ctx->state = ENCODE_STATE_INIT; |
| 46 | ctx->multiple_edges_src_id = 0; |
| 47 | ctx->multiple_edges_dest_id = 0; |
| 48 | ctx->multiple_edges_array = NULL; |
| 49 | ctx->current_relation_matrix_id = 0; |
| 50 | ctx->multiple_edges_current_index = 0; |
| 51 | |
| 52 | Config_Option_get(Config_VKEY_MAX_ENTITY_COUNT, &ctx->vkey_entity_count); |
| 53 | |
| 54 | // Avoid leaks in case or reset during encodeing. |
| 55 | if(ctx->datablock_iterator != NULL) { |
| 56 | DataBlockIterator_Free(ctx->datablock_iterator); |
| 57 | ctx->datablock_iterator = NULL; |
| 58 | } |
| 59 | |
| 60 | // Avoid leaks in case or reset during encodeing. |
| 61 | RG_MatrixTupleIter_detach(&ctx->matrix_tuple_iterator); |
| 62 | } |
| 63 | |
| 64 | void GraphEncodeContext_InitHeader |
| 65 | ( |
no test coverage detected