Motr  M0
m0_xcode_field Struct Reference

#include <xcode.h>

Collaboration diagram for m0_xcode_field:
Collaboration graph

Data Fields

const char * xf_name
 
const struct m0_xcode_typexf_type
 
uint64_t xf_tag
 
int(* xf_opaque )(const struct m0_xcode_obj *par, const struct m0_xcode_type **out)
 
uint32_t xf_offset
 
void * xf_decor [M0_XCODE_DECOR_MAX]
 
int(* xf_read )(const struct m0_xcode_cursor *it, struct m0_xcode_obj *obj, const char *str)
 

Detailed Description

Field of data-type.

Definition at line 249 of file xcode.h.

Field Documentation

◆ xf_decor

void* xf_decor[M0_XCODE_DECOR_MAX]

"Decorations" are used by xcode users to associate additional information with introspection elements.

See also
m0_xcode_decor_register()
m0_xcode_type::xct_decor[]

Definition at line 293 of file xcode.h.

◆ xf_name

const char* xf_name

Field name.

Definition at line 251 of file xcode.h.

◆ xf_offset

uint32_t xf_offset

Byte offset of this field from the beginning of the object.

Definition at line 285 of file xcode.h.

◆ xf_opaque

int(* xf_opaque) (const struct m0_xcode_obj *par, const struct m0_xcode_type **out)

Fields with m0_xcode_type::xf_type == &M0_XT_OPAQUE are "opaque" fields. An opaque field corresponds to a pointer. m0_xcode_type::xf_opaque() is called by the xcode to follow the pointer. This function returns (in its "out" parameter) a type of the object pointed to. "par" parameter refers to the parent object to which the field belongs.

Definition at line 280 of file xcode.h.

◆ xf_read

int(* xf_read) (const struct m0_xcode_cursor *it, struct m0_xcode_obj *obj, const char *str)

Definition at line 294 of file xcode.h.

◆ xf_tag

uint64_t xf_tag

Tag, associated with this field.

Tag is used in the following ways:

- if first field of a SEQUENCE type has type VOID, its tag is
  used as a count of element in the sequence;

- tag of the only field of ARRAY type is the number of elements
  in the array;

- tag of non-first field of a UNION type is used to determine
  when the field is actually present in the object: the field is
  present iff its tag equals the discriminator of the union.

  The discriminator is the value of the first field of the
  union.

Definition at line 271 of file xcode.h.

◆ xf_type

const struct m0_xcode_type* xf_type

Field type.

Definition at line 253 of file xcode.h.


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