Motr  M0
m0_xcode_ctx Struct Reference

#include <xcode.h>

Collaboration diagram for m0_xcode_ctx:
Collaboration graph

Data Fields

enum m0_xcode_endianness xcx_end
 
struct m0_bufvec_cursor xcx_buf
 
struct m0_xcode_cursor xcx_it
 
void *(* xcx_alloc )(struct m0_xcode_cursor *, size_t)
 
void(* xcx_free )(struct m0_xcode_cursor *ctx)
 
int(* xcx_iter )(const struct m0_xcode_cursor *it)
 
void(* xcx_iter_end )(const struct m0_xcode_cursor *it)
 

Detailed Description

xcoding context.

The context contains information about attributes of xcoding operation and its progress.

Definition at line 577 of file xcode.h.

Field Documentation

◆ xcx_alloc

void*(* xcx_alloc) (struct m0_xcode_cursor *, size_t)

Allocation function used by decoding to allocate the topmost object and all its non-inline sub-objects (arrays and opaque sub-objects).

Definition at line 600 of file xcode.h.

◆ xcx_buf

struct m0_bufvec_cursor xcx_buf

Current point in the buffer vector.

The cursor points to the where encoding will write the next byte and from where decoding will read the next byte.

It should be initialised with m0_bufvec_cursor_init() prior to m0_xcode_encode() or m0_xcode_decode() call. The size of the cursors buffer should be not less than the size of serialised structure representation.

Definition at line 591 of file xcode.h.

◆ xcx_end

enum m0_xcode_endianness xcx_end

Endianness of serialized representation.

Definition at line 579 of file xcode.h.

◆ xcx_free

void(* xcx_free) (struct m0_xcode_cursor *ctx)

Definition at line 601 of file xcode.h.

◆ xcx_it

struct m0_xcode_cursor xcx_it

State of the iteration through object tree.

Definition at line 595 of file xcode.h.

◆ xcx_iter

int(* xcx_iter) (const struct m0_xcode_cursor *it)

This function is called every time type is traversed with m0_xcode_next().

Definition at line 606 of file xcode.h.

◆ xcx_iter_end

void(* xcx_iter_end) (const struct m0_xcode_cursor *it)

This function is called when xcode.c:ctx_walk() function called from m0_xcode_encode(), m0_xcode_decode(), m0_xcode_length() ends processing of given xcode context and xcode object embeded into it.

Definition at line 612 of file xcode.h.


The documentation for this struct was generated from the following file: