Volksdata 1.0b7
RDF library
Loading...
Searching...
No Matches

Codec structure. More...

#include <codec.h>

Collaboration diagram for VOLK_Codec:

Data Fields

char name [16]
 Name of the codec.
char mimetype [32]
 MIME type associated with the codec.
char extension [8]
 Serialized file extension.
term_enc_fn_t encode_term
 Term encoder function.
gr_encode_init_fn_t encode_graph_init
 Graph encoder initialization.
gr_encode_iter_fn_t encode_graph_iter
 Graph encoder iteration.
gr_encode_done_fn_t encode_graph_done
 Graph encoder finalization.
term_decode_fn_t decode_term
 Term decoder function.
gr_decode_fn_t decode_graph
 Graph decoder function.

Detailed Description

Codec structure.

An instance of this structure is usually defined at compile time (see examples in "include/codec_*.h" and "src/codec_*.c") and should have the following defined:

  • name: A brief (16-char max), human-readable to identify the codec.
  • mimetype: MIME type (32-char max) associated with the codec.
  • extension: File extension associated with the serialized file.
  • encode_term: Encode a single term.
  • encode_graph_init: Initialize a graph decoding loop.
  • encode_graph_iter: Run one iteration of encoding on one or more triples.
  • encode_graph_done: Finalize the encoding loop and free the support data.
  • decode_term: Decode a single term.
  • decode_graph: Decode a RDF document into a graph.

For documentation on the individual encoding and decoding callbacks, see the related function prototypes.

Definition at line 318 of file codec.h.

Field Documentation

◆ name

char VOLK_Codec::name[16]

Name of the codec.

Definition at line 319 of file codec.h.

◆ mimetype

char VOLK_Codec::mimetype[32]

MIME type associated with the codec.

Definition at line 320 of file codec.h.

◆ extension

char VOLK_Codec::extension[8]

Serialized file extension.

Definition at line 321 of file codec.h.

◆ encode_term

term_enc_fn_t VOLK_Codec::encode_term

Term encoder function.

Definition at line 324 of file codec.h.

◆ encode_graph_init

gr_encode_init_fn_t VOLK_Codec::encode_graph_init

Graph encoder initialization.

Definition at line 326 of file codec.h.

◆ encode_graph_iter

gr_encode_iter_fn_t VOLK_Codec::encode_graph_iter

Graph encoder iteration.

Definition at line 327 of file codec.h.

◆ encode_graph_done

gr_encode_done_fn_t VOLK_Codec::encode_graph_done

Graph encoder finalization.

Definition at line 328 of file codec.h.

◆ decode_term

term_decode_fn_t VOLK_Codec::decode_term

Term decoder function.

Definition at line 331 of file codec.h.

◆ decode_graph

gr_decode_fn_t VOLK_Codec::decode_graph

Graph decoder function.

Definition at line 332 of file codec.h.


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