yaml_alias_data_s | This structure holds aliases data |
yaml_document_s | The document structure |
yaml_emitter_s | The emitter structure |
yaml_event_s | The event structure |
yaml_mark_s | The pointer position |
yaml_node_pair_s | An element of a mapping node |
yaml_node_s | The node structure |
yaml_parser_s | The parser structure |
yaml_simple_key_s | This structure holds information about a potential simple key |
yaml_tag_directive_s | The tag directive data |
yaml_token_s | The token structure |
yaml_version_directive_s | The version directive data |
yaml.h | Public interface for libyaml |
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation: +
+
+ +
+
+ +
+
+
Data Structures | |
struct | yaml_version_directive_s |
The version directive data. More... | |
struct | yaml_tag_directive_s |
The tag directive data. More... | |
struct | yaml_mark_s |
The pointer position. More... | |
Typedefs | |
+typedef unsigned char | yaml_char_t |
The character type (UTF-8 octet). | |
+typedef yaml_version_directive_s | yaml_version_directive_t |
The version directive data. | |
+typedef yaml_tag_directive_s | yaml_tag_directive_t |
The tag directive data. | |
+typedef enum yaml_encoding_e | yaml_encoding_t |
The stream encoding. | |
+typedef enum yaml_break_e | yaml_break_t |
Line break types. | |
+typedef enum yaml_error_type_e | yaml_error_type_t |
Many bad things could happen with the parser and emitter. | |
+typedef yaml_mark_s | yaml_mark_t |
The pointer position. | |
Enumerations | |
enum | yaml_encoding_e { + YAML_ANY_ENCODING, + + YAML_UTF8_ENCODING, + + YAML_UTF16LE_ENCODING, + + YAML_UTF16BE_ENCODING + + } |
The stream encoding. More... | |
enum | yaml_break_e { + YAML_ANY_BREAK, + + YAML_CR_BREAK, + + YAML_LN_BREAK, + + YAML_CRLN_BREAK + + } |
Line break types. More... | |
enum | yaml_error_type_e { + YAML_NO_ERROR, + + YAML_MEMORY_ERROR, + + YAML_READER_ERROR, + + YAML_SCANNER_ERROR, + + YAML_PARSER_ERROR, + + YAML_COMPOSER_ERROR, + + YAML_WRITER_ERROR, + + YAML_EMITTER_ERROR + + } |
Many bad things could happen with the parser and emitter. More... |
enum yaml_encoding_e | +
enum yaml_break_e | +
enum yaml_error_type_e | +
+Many bad things could happen with the parser and emitter. +
+
+
Data Structures | |
struct | yaml_emitter_s |
The emitter structure. More... | |
Typedefs | |
typedef int | yaml_write_handler_t (void *data, unsigned char *buffer, size_t size) |
The prototype of a write handler. | |
+typedef enum yaml_emitter_state_e | yaml_emitter_state_t |
The emitter states. | |
typedef yaml_emitter_s | yaml_emitter_t |
The emitter structure. | |
Enumerations | |
enum | yaml_emitter_state_e { + YAML_EMIT_STREAM_START_STATE, + + YAML_EMIT_FIRST_DOCUMENT_START_STATE, + + YAML_EMIT_DOCUMENT_START_STATE, + + YAML_EMIT_DOCUMENT_CONTENT_STATE, + + YAML_EMIT_DOCUMENT_END_STATE, + + YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE, + + YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE, + + YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE, + + YAML_EMIT_FLOW_MAPPING_KEY_STATE, + + YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE, + + YAML_EMIT_FLOW_MAPPING_VALUE_STATE, + + YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE, + + YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE, + + YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE, + + YAML_EMIT_BLOCK_MAPPING_KEY_STATE, + + YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE, + + YAML_EMIT_BLOCK_MAPPING_VALUE_STATE, + + YAML_EMIT_END_STATE + + } |
The emitter states. More... | |
Functions | |
int | yaml_emitter_initialize (yaml_emitter_t *emitter) |
Initialize an emitter. | |
void | yaml_emitter_delete (yaml_emitter_t *emitter) |
Destroy an emitter. | |
void | yaml_emitter_set_output_string (yaml_emitter_t *emitter, unsigned char *output, size_t size, size_t *size_written) |
Set a string output. | |
void | yaml_emitter_set_output_file (yaml_emitter_t *emitter, FILE *file) |
Set a file output. | |
void | yaml_emitter_set_output (yaml_emitter_t *emitter, yaml_write_handler_t *handler, void *data) |
Set a generic output handler. | |
void | yaml_emitter_set_encoding (yaml_emitter_t *emitter, yaml_encoding_t encoding) |
Set the output encoding. | |
void | yaml_emitter_set_canonical (yaml_emitter_t *emitter, int canonical) |
Set if the output should be in the "canonical" format as in the YAML specification. | |
void | yaml_emitter_set_indent (yaml_emitter_t *emitter, int indent) |
Set the intendation increment. | |
void | yaml_emitter_set_width (yaml_emitter_t *emitter, int width) |
Set the preferred line width. | |
void | yaml_emitter_set_unicode (yaml_emitter_t *emitter, int unicode) |
Set if unescaped non-ASCII characters are allowed. | |
void | yaml_emitter_set_break (yaml_emitter_t *emitter, yaml_break_t line_break) |
Set the preferred line break. | |
int | yaml_emitter_emit (yaml_emitter_t *emitter, yaml_event_t *event) |
Emit an event. | |
int | yaml_emitter_open (yaml_emitter_t *emitter) |
Start a YAML stream. | |
int | yaml_emitter_close (yaml_emitter_t *emitter) |
Finish a YAML stream. | |
int | yaml_emitter_dump (yaml_emitter_t *emitter, yaml_document_t *document) |
Emit a YAML document. | |
int | yaml_emitter_flush (yaml_emitter_t *emitter) |
Flush the accumulated characters to the output. |
typedef int yaml_write_handler_t(void *data, unsigned char *buffer, size_t size) | +
+The prototype of a write handler. +
+The write handler is called when the emitter needs to flush the accumulated characters to the output. The handler should write size bytes of the buffer to the output.
+
[in,out] | data | A pointer to an application data specified by yaml_emitter_set_output(). |
[in] | buffer | The buffer with bytes to be written. |
[in] | size | The size of the buffer. |
1
. If the handler failed, the returned value should be 0
. typedef struct yaml_emitter_s yaml_emitter_t | +
+The emitter structure. +
+All members are internal. Manage the structure using the yaml_emitter_
family of functions.
+
+
enum yaml_emitter_state_e | +
+The emitter states. +
+
+
int yaml_emitter_initialize | +( | +yaml_emitter_t * | +emitter | +) | ++ |
+Initialize an emitter. +
+This function creates a new emitter object. An application is responsible for destroying the object using the yaml_emitter_delete() function.
+
[out] | emitter | An empty parser object. |
1
if the function succeeded, 0
on error. void yaml_emitter_delete | +( | +yaml_emitter_t * | +emitter | +) | ++ |
+Destroy an emitter. +
+
[in,out] | emitter | An emitter object. |
void yaml_emitter_set_output_string | +( | +yaml_emitter_t * | +emitter, | +|
+ | + | unsigned char * | +output, | +|
+ | + | size_t | +size, | +|
+ | + | size_t * | +size_written | + |
+ | ) | ++ |
+Set a string output. +
+The emitter will write the output characters to the output buffer of the size size. The emitter will set size_written to the number of written bytes. If the buffer is smaller than required, the emitter produces the YAML_WRITE_ERROR error.
+
[in,out] | emitter | An emitter object. |
[in] | output | An output buffer. |
[in] | size | The buffer size. |
[in] | size_written | The pointer to save the number of written bytes. |
void yaml_emitter_set_output_file | +( | +yaml_emitter_t * | +emitter, | +|
+ | + | FILE * | +file | + |
+ | ) | ++ |
+Set a file output. +
+file should be a file object open for writing. The application is responsible for closing the file.
+
[in,out] | emitter | An emitter object. |
[in] | file | An open file. |
void yaml_emitter_set_output | +( | +yaml_emitter_t * | +emitter, | +|
+ | + | yaml_write_handler_t * | +handler, | +|
+ | + | void * | +data | + |
+ | ) | ++ |
+Set a generic output handler. +
+
[in,out] | emitter | An emitter object. |
[in] | handler | A write handler. |
[in] | data | Any application data for passing to the write handler. |
void yaml_emitter_set_encoding | +( | +yaml_emitter_t * | +emitter, | +|
+ | + | yaml_encoding_t | +encoding | + |
+ | ) | ++ |
+Set the output encoding. +
+
[in,out] | emitter | An emitter object. |
[in] | encoding | The output encoding. |
void yaml_emitter_set_canonical | +( | +yaml_emitter_t * | +emitter, | +|
+ | + | int | +canonical | + |
+ | ) | ++ |
+Set if the output should be in the "canonical" format as in the YAML specification. +
+
[in,out] | emitter | An emitter object. |
[in] | canonical | If the output is canonical. |
void yaml_emitter_set_indent | +( | +yaml_emitter_t * | +emitter, | +|
+ | + | int | +indent | + |
+ | ) | ++ |
+Set the intendation increment. +
+
[in,out] | emitter | An emitter object. |
[in] | indent | The indentation increment (1 < . < 10). |
void yaml_emitter_set_width | +( | +yaml_emitter_t * | +emitter, | +|
+ | + | int | +width | + |
+ | ) | ++ |
+Set the preferred line width. +
+-1
means unlimited.
+
[in,out] | emitter | An emitter object. |
[in] | width | The preferred line width. |
void yaml_emitter_set_unicode | +( | +yaml_emitter_t * | +emitter, | +|
+ | + | int | +unicode | + |
+ | ) | ++ |
+Set if unescaped non-ASCII characters are allowed. +
+
[in,out] | emitter | An emitter object. |
[in] | unicode | If unescaped Unicode characters are allowed. |
void yaml_emitter_set_break | +( | +yaml_emitter_t * | +emitter, | +|
+ | + | yaml_break_t | +line_break | + |
+ | ) | ++ |
+Set the preferred line break. +
+
[in,out] | emitter | An emitter object. |
[in] | line_break | The preferred line break. |
int yaml_emitter_emit | +( | +yaml_emitter_t * | +emitter, | +|
+ | + | yaml_event_t * | +event | + |
+ | ) | ++ |
+Emit an event. +
+The event object may be generated using the yaml_parser_parse() function. The emitter takes the responsibility for the event object and destroys its content after it is emitted. The event object is destroyed even if the function fails.
+
[in,out] | emitter | An emitter object. |
[in,out] | event | An event object. |
1
if the function succeeded, 0
on error. int yaml_emitter_open | +( | +yaml_emitter_t * | +emitter | +) | ++ |
+Start a YAML stream. +
+This function should be used before yaml_emitter_dump() is called.
+
[in,out] | emitter | An emitter object. |
1
if the function succeeded, 0
on error. int yaml_emitter_close | +( | +yaml_emitter_t * | +emitter | +) | ++ |
+Finish a YAML stream. +
+This function should be used after yaml_emitter_dump() is called.
+
[in,out] | emitter | An emitter object. |
1
if the function succeeded, 0
on error. int yaml_emitter_dump | +( | +yaml_emitter_t * | +emitter, | +|
+ | + | yaml_document_t * | +document | + |
+ | ) | ++ |
+Emit a YAML document. +
+The documen object may be generated using the yaml_parser_load() function or the yaml_document_initialize() function. The emitter takes the responsibility for the document object and destoys its content after it is emitted. The document object is destroyedeven if the function fails.
+
[in,out] | emitter | An emitter object. |
[in,out] | document | A document object. |
1
if the function succeeded, 0
on error. int yaml_emitter_flush | +( | +yaml_emitter_t * | +emitter | +) | ++ |
+Flush the accumulated characters to the output. +
+
[in,out] | emitter | An emitter object. |
1
if the function succeeded, 0
on error. +
Data Structures | |
struct | yaml_event_s |
The event structure. More... | |
Typedefs | |
+typedef enum yaml_event_type_e | yaml_event_type_t |
Event types. | |
+typedef yaml_event_s | yaml_event_t |
The event structure. | |
Enumerations | |
enum | yaml_event_type_e { + YAML_NO_EVENT, + + YAML_STREAM_START_EVENT, + + YAML_STREAM_END_EVENT, + + YAML_DOCUMENT_START_EVENT, + + YAML_DOCUMENT_END_EVENT, + + YAML_ALIAS_EVENT, + + YAML_SCALAR_EVENT, + + YAML_SEQUENCE_START_EVENT, + + YAML_SEQUENCE_END_EVENT, + + YAML_MAPPING_START_EVENT, + + YAML_MAPPING_END_EVENT + + } |
Event types. More... | |
Functions | |
int | yaml_stream_start_event_initialize (yaml_event_t *event, yaml_encoding_t encoding) |
Create the STREAM-START event. | |
int | yaml_stream_end_event_initialize (yaml_event_t *event) |
Create the STREAM-END event. | |
int | yaml_document_start_event_initialize (yaml_event_t *event, yaml_version_directive_t *version_directive, yaml_tag_directive_t *tag_directives_start, yaml_tag_directive_t *tag_directives_end, int implicit) |
Create the DOCUMENT-START event. | |
int | yaml_document_end_event_initialize (yaml_event_t *event, int implicit) |
Create the DOCUMENT-END event. | |
int | yaml_alias_event_initialize (yaml_event_t *event, yaml_char_t *anchor) |
Create an ALIAS event. | |
int | yaml_scalar_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, yaml_char_t *value, int length, int plain_implicit, int quoted_implicit, yaml_scalar_style_t style) |
Create a SCALAR event. | |
int | yaml_sequence_start_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, int implicit, yaml_sequence_style_t style) |
Create a SEQUENCE-START event. | |
int | yaml_sequence_end_event_initialize (yaml_event_t *event) |
Create a SEQUENCE-END event. | |
int | yaml_mapping_start_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, int implicit, yaml_mapping_style_t style) |
Create a MAPPING-START event. | |
int | yaml_mapping_end_event_initialize (yaml_event_t *event) |
Create a MAPPING-END event. | |
void | yaml_event_delete (yaml_event_t *event) |
Free any memory allocated for an event object. |
enum yaml_event_type_e | +
+Event types. +
+
+
int yaml_stream_start_event_initialize | +( | +yaml_event_t * | +event, | +|
+ | + | yaml_encoding_t | +encoding | + |
+ | ) | ++ |
+Create the STREAM-START event. +
+
[out] | event | An empty event object. |
[in] | encoding | The stream encoding. |
1
if the function succeeded, 0
on error. int yaml_stream_end_event_initialize | +( | +yaml_event_t * | +event | +) | ++ |
+Create the STREAM-END event. +
+
[out] | event | An empty event object. |
1
if the function succeeded, 0
on error. int yaml_document_start_event_initialize | +( | +yaml_event_t * | +event, | +|
+ | + | yaml_version_directive_t * | +version_directive, | +|
+ | + | yaml_tag_directive_t * | +tag_directives_start, | +|
+ | + | yaml_tag_directive_t * | +tag_directives_end, | +|
+ | + | int | +implicit | + |
+ | ) | ++ |
+Create the DOCUMENT-START event. +
+The implicit argument is considered as a stylistic parameter and may be ignored by the emitter.
+
[out] | event | An empty event object. |
[in] | version_directive | The YAML directive value or NULL . |
[in] | tag_directives_start | The beginning of the TAG directives list. |
[in] | tag_directives_end | The end of the TAG directives list. |
[in] | implicit | If the document start indicator is implicit. |
1
if the function succeeded, 0
on error. int yaml_document_end_event_initialize | +( | +yaml_event_t * | +event, | +|
+ | + | int | +implicit | + |
+ | ) | ++ |
+Create the DOCUMENT-END event. +
+The implicit argument is considered as a stylistic parameter and may be ignored by the emitter.
+
[out] | event | An empty event object. |
[in] | implicit | If the document end indicator is implicit. |
1
if the function succeeded, 0
on error. int yaml_alias_event_initialize | +( | +yaml_event_t * | +event, | +|
+ | + | yaml_char_t * | +anchor | + |
+ | ) | ++ |
+Create an ALIAS event. +
+
[out] | event | An empty event object. |
[in] | anchor | The anchor value. |
1
if the function succeeded, 0
on error. int yaml_scalar_event_initialize | +( | +yaml_event_t * | +event, | +|
+ | + | yaml_char_t * | +anchor, | +|
+ | + | yaml_char_t * | +tag, | +|
+ | + | yaml_char_t * | +value, | +|
+ | + | int | +length, | +|
+ | + | int | +plain_implicit, | +|
+ | + | int | +quoted_implicit, | +|
+ | + | yaml_scalar_style_t | +style | + |
+ | ) | ++ |
+Create a SCALAR event. +
+The style argument may be ignored by the emitter.
+Either the tag attribute or one of the plain_implicit and quoted_implicit flags must be set.
+
[out] | event | An empty event object. |
[in] | anchor | The scalar anchor or NULL . |
[in] | tag | The scalar tag or NULL . |
[in] | value | The scalar value. |
[in] | length | The length of the scalar value. |
[in] | plain_implicit | If the tag may be omitted for the plain style. |
[in] | quoted_implicit | If the tag may be omitted for any non-plain style. |
[in] | style | The scalar style. |
1
if the function succeeded, 0
on error. int yaml_sequence_start_event_initialize | +( | +yaml_event_t * | +event, | +|
+ | + | yaml_char_t * | +anchor, | +|
+ | + | yaml_char_t * | +tag, | +|
+ | + | int | +implicit, | +|
+ | + | yaml_sequence_style_t | +style | + |
+ | ) | ++ |
+Create a SEQUENCE-START event. +
+The style argument may be ignored by the emitter.
+Either the tag attribute or the implicit flag must be set.
+
[out] | event | An empty event object. |
[in] | anchor | The sequence anchor or NULL . |
[in] | tag | The sequence tag or NULL . |
[in] | implicit | If the tag may be omitted. |
[in] | style | The sequence style. |
1
if the function succeeded, 0
on error. int yaml_sequence_end_event_initialize | +( | +yaml_event_t * | +event | +) | ++ |
+Create a SEQUENCE-END event. +
+
[out] | event | An empty event object. |
1
if the function succeeded, 0
on error. int yaml_mapping_start_event_initialize | +( | +yaml_event_t * | +event, | +|
+ | + | yaml_char_t * | +anchor, | +|
+ | + | yaml_char_t * | +tag, | +|
+ | + | int | +implicit, | +|
+ | + | yaml_mapping_style_t | +style | + |
+ | ) | ++ |
+Create a MAPPING-START event. +
+The style argument may be ignored by the emitter.
+Either the tag attribute or the implicit flag must be set.
+
[out] | event | An empty event object. |
[in] | anchor | The mapping anchor or NULL . |
[in] | tag | The mapping tag or NULL . |
[in] | implicit | If the tag may be omitted. |
[in] | style | The mapping style. |
1
if the function succeeded, 0
on error. int yaml_mapping_end_event_initialize | +( | +yaml_event_t * | +event | +) | ++ |
+Create a MAPPING-END event. +
+
[out] | event | An empty event object. |
1
if the function succeeded, 0
on error. void yaml_event_delete | +( | +yaml_event_t * | +event | +) | ++ |
+Free any memory allocated for an event object. +
+
[in,out] | event | An event object. |
+
Defines | |
+#define | YAML_DECLARE(type) type |
The public API declaration. |
Data Structures | |
struct | yaml_node_pair_s |
An element of a mapping node. More... | |
struct | yaml_node_s |
The node structure. More... | |
struct | yaml_document_s |
The document structure. More... | |
Defines | |
+#define | YAML_NULL_TAG "tag:yaml.org,2002:null" |
The tag !!null with the only possible value: null . | |
+#define | YAML_BOOL_TAG "tag:yaml.org,2002:bool" |
The tag !!bool with the values: true and falce . | |
+#define | YAML_STR_TAG "tag:yaml.org,2002:str" |
The tag !!str for string values. | |
+#define | YAML_INT_TAG "tag:yaml.org,2002:int" |
The tag !!int for integer values. | |
+#define | YAML_FLOAT_TAG "tag:yaml.org,2002:float" |
The tag !!float for float values. | |
+#define | YAML_TIMESTAMP_TAG "tag:yaml.org,2002:timestamp" |
The tag !!timestamp for date and time values. | |
+#define | YAML_SEQ_TAG "tag:yaml.org,2002:seq" |
The tag !!seq is used to denote sequences. | |
+#define | YAML_MAP_TAG "tag:yaml.org,2002:map" |
The tag !!map is used to denote mapping. | |
+#define | YAML_DEFAULT_SCALAR_TAG YAML_STR_TAG |
The default scalar tag is !!str . | |
+#define | YAML_DEFAULT_SEQUENCE_TAG YAML_SEQ_TAG |
The default sequence tag is !!seq . | |
+#define | YAML_DEFAULT_MAPPING_TAG YAML_MAP_TAG |
The default mapping tag is !!map . | |
Typedefs | |
+typedef enum yaml_node_type_e | yaml_node_type_t |
Node types. | |
+typedef yaml_node_s | yaml_node_t |
The forward definition of a document node structure. | |
+typedef int | yaml_node_item_t |
An element of a sequence node. | |
+typedef yaml_node_pair_s | yaml_node_pair_t |
An element of a mapping node. | |
+typedef yaml_document_s | yaml_document_t |
The document structure. | |
Enumerations | |
enum | yaml_node_type_e { + YAML_NO_NODE, + + YAML_SCALAR_NODE, + + YAML_SEQUENCE_NODE, + + YAML_MAPPING_NODE + + } |
Node types. More... | |
Functions | |
int | yaml_document_initialize (yaml_document_t *document, yaml_version_directive_t *version_directive, yaml_tag_directive_t *tag_directives_start, yaml_tag_directive_t *tag_directives_end, int start_implicit, int end_implicit) |
Create a YAML document. | |
void | yaml_document_delete (yaml_document_t *document) |
Delete a YAML document and all its nodes. | |
yaml_node_t * | yaml_document_get_node (yaml_document_t *document, int index) |
Get a node of a YAML document. | |
yaml_node_t * | yaml_document_get_root_node (yaml_document_t *document) |
Get the root of a YAML document node. | |
int | yaml_document_add_scalar (yaml_document_t *document, yaml_char_t *tag, yaml_char_t *value, int length, yaml_scalar_style_t style) |
Create a SCALAR node and attach it to the document. | |
int | yaml_document_add_sequence (yaml_document_t *document, yaml_char_t *tag, yaml_sequence_style_t style) |
Create a SEQUENCE node and attach it to the document. | |
int | yaml_document_add_mapping (yaml_document_t *document, yaml_char_t *tag, yaml_mapping_style_t style) |
Create a MAPPING node and attach it to the document. | |
int | yaml_document_append_sequence_item (yaml_document_t *document, int sequence, int item) |
Add an item to a SEQUENCE node. | |
int | yaml_document_append_mapping_pair (yaml_document_t *document, int mapping, int key, int value) |
Add a pair of a key and a value to a MAPPING node. |
enum yaml_node_type_e | +
+
int yaml_document_initialize | +( | +yaml_document_t * | +document, | +|
+ | + | yaml_version_directive_t * | +version_directive, | +|
+ | + | yaml_tag_directive_t * | +tag_directives_start, | +|
+ | + | yaml_tag_directive_t * | +tag_directives_end, | +|
+ | + | int | +start_implicit, | +|
+ | + | int | +end_implicit | + |
+ | ) | ++ |
+Create a YAML document. +
+
[out] | document | An empty document object. |
[in] | version_directive | The YAML directive value or NULL . |
[in] | tag_directives_start | The beginning of the TAG directives list. |
[in] | tag_directives_end | The end of the TAG directives list. |
[in] | start_implicit | If the document start indicator is implicit. |
[in] | end_implicit | If the document end indicator is implicit. |
1
if the function succeeded, 0
on error. void yaml_document_delete | +( | +yaml_document_t * | +document | +) | ++ |
+Delete a YAML document and all its nodes. +
+
[in,out] | document | A document object. |
yaml_node_t* yaml_document_get_node | +( | +yaml_document_t * | +document, | +|
+ | + | int | +index | + |
+ | ) | ++ |
+Get a node of a YAML document. +
+The pointer returned by this function is valid until any of the functions modifying the documents are called.
+
[in] | document | A document object. |
[in] | index | The node id. |
NULL
if node_id
is out of range. yaml_node_t* yaml_document_get_root_node | +( | +yaml_document_t * | +document | +) | ++ |
+Get the root of a YAML document node. +
+The root object is the first object added to the document.
+The pointer returned by this function is valid until any of the functions modifying the documents are called.
+An empty document produced by the parser signifies the end of a YAML stream.
+
[in] | document | A document object. |
NULL
if the document is empty. int yaml_document_add_scalar | +( | +yaml_document_t * | +document, | +|
+ | + | yaml_char_t * | +tag, | +|
+ | + | yaml_char_t * | +value, | +|
+ | + | int | +length, | +|
+ | + | yaml_scalar_style_t | +style | + |
+ | ) | ++ |
+Create a SCALAR node and attach it to the document. +
+The style argument may be ignored by the emitter.
+
[in,out] | document | A document object. |
[in] | tag | The scalar tag. |
[in] | value | The scalar value. |
[in] | length | The length of the scalar value. |
[in] | style | The scalar style. |
0
on error. int yaml_document_add_sequence | +( | +yaml_document_t * | +document, | +|
+ | + | yaml_char_t * | +tag, | +|
+ | + | yaml_sequence_style_t | +style | + |
+ | ) | ++ |
+Create a SEQUENCE node and attach it to the document. +
+The style argument may be ignored by the emitter.
+
[in,out] | document | A document object. |
[in] | tag | The sequence tag. |
[in] | style | The sequence style. |
0
on error. int yaml_document_add_mapping | +( | +yaml_document_t * | +document, | +|
+ | + | yaml_char_t * | +tag, | +|
+ | + | yaml_mapping_style_t | +style | + |
+ | ) | ++ |
+Create a MAPPING node and attach it to the document. +
+The style argument may be ignored by the emitter.
+
[in,out] | document | A document object. |
[in] | tag | The sequence tag. |
[in] | style | The sequence style. |
0
on error. int yaml_document_append_sequence_item | +( | +yaml_document_t * | +document, | +|
+ | + | int | +sequence, | +|
+ | + | int | +item | + |
+ | ) | ++ |
+Add an item to a SEQUENCE node. +
+
[in,out] | document | A document object. |
[in] | sequence | The sequence node id. |
[in] | item | The item node id. |
1
if the function succeeded, 0
on error. int yaml_document_append_mapping_pair | +( | +yaml_document_t * | +document, | +|
+ | + | int | +mapping, | +|
+ | + | int | +key, | +|
+ | + | int | +value | + |
+ | ) | ++ |
+Add a pair of a key and a value to a MAPPING node. +
+
[in,out] | document | A document object. |
[in] | mapping | The mapping node id. |
[in] | key | The key node id. |
[in] | value | The value node id. |
1
if the function succeeded, 0
on error. +
typedef int yaml_read_handler_t(void *data, unsigned char *buffer, size_t size, size_t *size_read) | +
+The prototype of a read handler. +
+The read handler is called when the parser needs to read more bytes from the source. The handler should write not more than size bytes to the buffer. The number of written bytes should be set to the length variable.
+
[in,out] | data | A pointer to an application data specified by yaml_parser_set_input(). |
[out] | buffer | The buffer to write the data from the source. |
[in] | size | The size of the buffer. |
[out] | size_read | The actual number of bytes read from the source. |
1
. If the handler failed, the returned value should be 0
. On EOF, the handler should set the size_read to 0
and return 1
. typedef struct yaml_parser_s yaml_parser_t | +
+The parser structure. +
+All members are internal. Manage the structure using the yaml_parser_
family of functions.
+
+
enum yaml_parser_state_e | +
+The states of the parser. +
+
+
int yaml_parser_initialize | +( | +yaml_parser_t * | +parser | +) | ++ |
+Initialize a parser. +
+This function creates a new parser object. An application is responsible for destroying the object using the yaml_parser_delete() function.
+
[out] | parser | An empty parser object. |
1
if the function succeeded, 0
on error. void yaml_parser_delete | +( | +yaml_parser_t * | +parser | +) | ++ |
+Destroy a parser. +
+
[in,out] | parser | A parser object. |
void yaml_parser_set_input_string | +( | +yaml_parser_t * | +parser, | +|
+ | + | const unsigned char * | +input, | +|
+ | + | size_t | +size | + |
+ | ) | ++ |
+Set a string input. +
+Note that the input pointer must be valid while the parser object exists. The application is responsible for destroing input after destroying the parser.
+
[in,out] | parser | A parser object. |
[in] | input | A source data. |
[in] | size | The length of the source data in bytes. |
void yaml_parser_set_input_file | +( | +yaml_parser_t * | +parser, | +|
+ | + | FILE * | +file | + |
+ | ) | ++ |
+Set a file input. +
+file should be a file object open for reading. The application is responsible for closing the file.
+
[in,out] | parser | A parser object. |
[in] | file | An open file. |
void yaml_parser_set_input | +( | +yaml_parser_t * | +parser, | +|
+ | + | yaml_read_handler_t * | +handler, | +|
+ | + | void * | +data | + |
+ | ) | ++ |
+Set a generic input handler. +
+
[in,out] | parser | A parser object. |
[in] | handler | A read handler. |
[in] | data | Any application data for passing to the read handler. |
void yaml_parser_set_encoding | +( | +yaml_parser_t * | +parser, | +|
+ | + | yaml_encoding_t | +encoding | + |
+ | ) | ++ |
+Set the source encoding. +
+
[in,out] | parser | A parser object. |
[in] | encoding | The source encoding. |
int yaml_parser_scan | +( | +yaml_parser_t * | +parser, | +|
+ | + | yaml_token_t * | +token | + |
+ | ) | ++ |
+Scan the input stream and produce the next token. +
+Call the function subsequently to produce a sequence of tokens corresponding to the input stream. The initial token has the type YAML_STREAM_START_TOKEN
while the ending token has the type YAML_STREAM_END_TOKEN
.
+An application is responsible for freeing any buffers associated with the produced token object using the yaml_token_delete
function.
+An application must not alternate the calls of yaml_parser_scan() with the calls of yaml_parser_parse() or yaml_parser_load(). Doing this will break the parser.
+
[in,out] | parser | A parser object. |
[out] | token | An empty token object. |
1
if the function succeeded, 0
on error. int yaml_parser_parse | +( | +yaml_parser_t * | +parser, | +|
+ | + | yaml_event_t * | +event | + |
+ | ) | ++ |
+Parse the input stream and produce the next parsing event. +
+Call the function subsequently to produce a sequence of events corresponding to the input stream. The initial event has the type YAML_STREAM_START_EVENT
while the ending event has the type YAML_STREAM_END_EVENT
.
+An application is responsible for freeing any buffers associated with the produced event object using the yaml_event_delete() function.
+An application must not alternate the calls of yaml_parser_parse() with the calls of yaml_parser_scan() or yaml_parser_load(). Doing this will break the parser.
+
[in,out] | parser | A parser object. |
[out] | event | An empty event object. |
1
if the function succeeded, 0
on error. int yaml_parser_load | +( | +yaml_parser_t * | +parser, | +|
+ | + | yaml_document_t * | +document | + |
+ | ) | ++ |
+Parse the input stream and produce the next YAML document. +
+Call this function subsequently to produce a sequence of documents constituting the input stream.
+If the produced document has no root node, it means that the document end has been reached.
+An application is responsible for freeing any data associated with the produced document object using the yaml_document_delete() function.
+An application must not alternate the calls of yaml_parser_load() with the calls of yaml_parser_scan() or yaml_parser_parse(). Doing this will break the parser.
+
[in,out] | parser | A parser object. |
[out] | document | An empty document object. |
1
if the function succeeded, 0
on error. +
Typedefs | |
+typedef enum yaml_scalar_style_e | yaml_scalar_style_t |
Scalar styles. | |
+typedef enum yaml_sequence_style_e | yaml_sequence_style_t |
Sequence styles. | |
+typedef enum yaml_mapping_style_e | yaml_mapping_style_t |
Mapping styles. | |
Enumerations | |
enum | yaml_scalar_style_e { + YAML_ANY_SCALAR_STYLE, + + YAML_PLAIN_SCALAR_STYLE, + + YAML_SINGLE_QUOTED_SCALAR_STYLE, + + YAML_DOUBLE_QUOTED_SCALAR_STYLE, + + YAML_LITERAL_SCALAR_STYLE, + + YAML_FOLDED_SCALAR_STYLE + + } |
Scalar styles. More... | |
enum | yaml_sequence_style_e { + YAML_ANY_SEQUENCE_STYLE, + + YAML_BLOCK_SEQUENCE_STYLE, + + YAML_FLOW_SEQUENCE_STYLE + + } |
Sequence styles. More... | |
enum | yaml_mapping_style_e { + YAML_ANY_MAPPING_STYLE, + + YAML_BLOCK_MAPPING_STYLE, + + YAML_FLOW_MAPPING_STYLE + + } |
Mapping styles. More... |
enum yaml_scalar_style_e | +
+Scalar styles. +
+
enum yaml_sequence_style_e | +
enum yaml_mapping_style_e | +
+
enum yaml_token_type_e | +
+Token types. +
+
+
void yaml_token_delete | +( | +yaml_token_t * | +token | +) | ++ |
+Free any memory allocated for a token object. +
+
[in,out] | token | A token object. |
+
Functions | |
const char * | yaml_get_version_string (void) |
Get the library version as a string. | |
void | yaml_get_version (int *major, int *minor, int *patch) |
Get the library version numbers. |
const char* yaml_get_version_string | +( | +void | ++ | ) | ++ |
+Get the library version as a string. +
+
"X.Y.Z"
, where X
is the major version number, Y
is a minor version number, and Z
is the patch version number. void yaml_get_version | +( | +int * | +major, | +|
+ | + | int * | +minor, | +|
+ | + | int * | +patch | + |
+ | ) | ++ |
+Get the library version numbers. +
+
[out] | major | Major version number. |
[out] | minor | Minor version number. |
[out] | patch | Patch version number. |
+
+
+#include <yaml.h>
+
+
Data Fields | |
+yaml_char_t * | anchor |
The anchor. | |
+int | index |
The node id. | |
+yaml_mark_t | mark |
The anchor mark. |
+
+#include <yaml.h>
+
+
Data Fields | |
+struct { | |
yaml_node_t * start | |
The beginning of the stack. | |
yaml_node_t * end | |
The end of the stack. | |
yaml_node_t * top | |
The top of the stack. | |
} | nodes |
The document nodes. | |
+yaml_version_directive_t * | version_directive |
The version directive. | |
+struct { | |
yaml_tag_directive_t * start | |
The beginning of the tag directives list. | |
yaml_tag_directive_t * end | |
The end of the tag directives list. | |
} | tag_directives |
The list of tag directives. | |
+int | start_implicit |
Is the document start indicator implicit? | |
+int | end_implicit |
Is the document end indicator implicit? | |
+yaml_mark_t | start_mark |
The beginning of the document. | |
+yaml_mark_t | end_mark |
The end of the document. |
+
+#include <yaml.h>
+
+
Data Fields | |
+unsigned char * | buffer |
The buffer pointer. | |
+size_t | size |
The buffer size. | |
+size_t * | size_written |
The number of written bytes. | |
+struct { | |
unsigned char * buffer | |
The buffer pointer. | |
size_t size | |
The buffer size. | |
size_t * size_written | |
The number of written bytes. | |
} | string |
String output data. | |
+FILE * | file |
File output data. | |
+yaml_char_t * | start |
The beginning of the buffer. | |
+yaml_char_t * | end |
The end of the buffer. | |
+yaml_char_t * | pointer |
The current position of the buffer. | |
+yaml_char_t * | last |
The last filled position of the buffer. | |
+unsigned char * | start |
The beginning of the buffer. | |
+unsigned char * | end |
The end of the buffer. | |
+unsigned char * | pointer |
The current position of the buffer. | |
+unsigned char * | last |
The last filled position of the buffer. | |
+yaml_emitter_state_t * | start |
The beginning of the stack. | |
+yaml_emitter_state_t * | end |
The end of the stack. | |
+yaml_emitter_state_t * | top |
The top of the stack. | |
+yaml_event_t * | start |
The beginning of the event queue. | |
+yaml_event_t * | end |
The end of the event queue. | |
+yaml_event_t * | head |
The head of the event queue. | |
+yaml_event_t * | tail |
The tail of the event queue. | |
+int * | start |
The beginning of the stack. | |
+int * | end |
The end of the stack. | |
+int * | top |
The top of the stack. | |
+yaml_tag_directive_t * | start |
The beginning of the list. | |
+yaml_tag_directive_t * | end |
The end of the list. | |
+yaml_tag_directive_t * | top |
The top of the list. | |
+yaml_char_t * | anchor |
The anchor value. | |
+size_t | anchor_length |
The anchor length. | |
+int | alias |
Is it an alias? | |
+yaml_char_t * | handle |
The tag handle. | |
+size_t | handle_length |
The tag handle length. | |
+yaml_char_t * | suffix |
The tag suffix. | |
+size_t | suffix_length |
The tag suffix length. | |
+yaml_char_t * | value |
The scalar value. | |
+size_t | length |
The scalar length. | |
+int | multiline |
Does the scalar contain line breaks? | |
+int | flow_plain_allowed |
Can the scalar be expessed in the flow plain style? | |
+int | block_plain_allowed |
Can the scalar be expressed in the block plain style? | |
+int | single_quoted_allowed |
Can the scalar be expressed in the single quoted style? | |
+int | block_allowed |
Can the scalar be expressed in the literal or folded styles? | |
+yaml_scalar_style_t | style |
The output style. | |
+int | references |
The number of references. | |
+int | anchor |
The anchor id. | |
+int | serialized |
If the node has been emitted? | |
Error handling | |
+yaml_error_type_t | error |
Error type. | |
+const char * | problem |
Error description. | |
Writer stuff | |
+yaml_write_handler_t * | write_handler |
Write handler. | |
+void * | write_handler_data |
A pointer for passing to the white handler. | |
+union { | |
struct { | |
unsigned char * buffer | |
The buffer pointer. | |
size_t size | |
The buffer size. | |
size_t * size_written | |
The number of written bytes. | |
} string | |
String output data. | |
FILE * file | |
File output data. | |
} | output |
Standard (string or file) output data. | |
+struct { | |
yaml_char_t * start | |
The beginning of the buffer. | |
yaml_char_t * end | |
The end of the buffer. | |
yaml_char_t * pointer | |
The current position of the buffer. | |
yaml_char_t * last | |
The last filled position of the buffer. | |
} | buffer |
The working buffer. | |
+struct { | |
unsigned char * start | |
The beginning of the buffer. | |
unsigned char * end | |
The end of the buffer. | |
unsigned char * pointer | |
The current position of the buffer. | |
unsigned char * last | |
The last filled position of the buffer. | |
} | raw_buffer |
The raw buffer. | |
+yaml_encoding_t | encoding |
The stream encoding. | |
Emitter stuff | |
+int | canonical |
If the output is in the canonical style? | |
+int | best_indent |
The number of indentation spaces. | |
+int | best_width |
The preferred width of the output lines. | |
+int | unicode |
Allow unescaped non-ASCII characters? | |
+yaml_break_t | line_break |
The preferred line break. | |
+struct { | |
yaml_emitter_state_t * start | |
The beginning of the stack. | |
yaml_emitter_state_t * end | |
The end of the stack. | |
yaml_emitter_state_t * top | |
The top of the stack. | |
} | states |
The stack of states. | |
+yaml_emitter_state_t | state |
The current emitter state. | |
+struct { | |
yaml_event_t * start | |
The beginning of the event queue. | |
yaml_event_t * end | |
The end of the event queue. | |
yaml_event_t * head | |
The head of the event queue. | |
yaml_event_t * tail | |
The tail of the event queue. | |
} | events |
The event queue. | |
+struct { | |
int * start | |
The beginning of the stack. | |
int * end | |
The end of the stack. | |
int * top | |
The top of the stack. | |
} | indents |
The stack of indentation levels. | |
+struct { | |
yaml_tag_directive_t * start | |
The beginning of the list. | |
yaml_tag_directive_t * end | |
The end of the list. | |
yaml_tag_directive_t * top | |
The top of the list. | |
} | tag_directives |
The list of tag directives. | |
+int | indent |
The current indentation level. | |
+int | flow_level |
The current flow level. | |
+int | root_context |
Is it the document root context? | |
+int | sequence_context |
Is it a sequence context? | |
+int | mapping_context |
Is it a mapping context? | |
+int | simple_key_context |
Is it a simple mapping key context? | |
+int | line |
The current line. | |
+int | column |
The current column. | |
+int | whitespace |
If the last character was a whitespace? | |
+int | indention |
If the last character was an indentation character (' ', '-', '?', ':')? | |
+struct { | |
yaml_char_t * anchor | |
The anchor value. | |
size_t anchor_length | |
The anchor length. | |
int alias | |
Is it an alias? | |
} | anchor_data |
Anchor analysis. | |
+struct { | |
yaml_char_t * handle | |
The tag handle. | |
size_t handle_length | |
The tag handle length. | |
yaml_char_t * suffix | |
The tag suffix. | |
size_t suffix_length | |
The tag suffix length. | |
} | tag_data |
Tag analysis. | |
+struct { | |
yaml_char_t * value | |
The scalar value. | |
size_t length | |
The scalar length. | |
int multiline | |
Does the scalar contain line breaks? | |
int flow_plain_allowed | |
Can the scalar be expessed in the flow plain style? | |
int block_plain_allowed | |
Can the scalar be expressed in the block plain style? | |
int single_quoted_allowed | |
Can the scalar be expressed in the single quoted style? | |
int block_allowed | |
Can the scalar be expressed in the literal or folded styles? | |
yaml_scalar_style_t style | |
The output style. | |
} | scalar_data |
Scalar analysis. | |
Dumper stuff | |
+int | opened |
If the stream was already opened? | |
+int | closed |
If the stream was already closed? | |
+struct { | |
int references | |
The number of references. | |
int anchor | |
The anchor id. | |
int serialized | |
If the node has been emitted? | |
} | anchors |
The information associated with the document nodes. | |
+int | last_anchor_id |
The last assigned anchor id. | |
+yaml_document_t * | document |
The currently emitted document. |
+All members are internal. Manage the structure using the yaml_emitter_
family of functions.
+
+
+#include <yaml.h>
+
+
Data Fields | |
+yaml_event_type_t | type |
The event type. | |
+union { | |
struct { | |
yaml_encoding_t encoding | |
The document encoding. | |
} stream_start | |
The stream parameters (for YAML_STREAM_START_EVENT ). | |
struct { | |
yaml_version_directive_t * version_directive | |
The version directive. | |
struct { | |
yaml_tag_directive_t * start | |
The beginning of the tag directives list. | |
yaml_tag_directive_t * end | |
The end of the tag directives list. | |
} tag_directives | |
The list of tag directives. | |
int implicit | |
Is the document indicator implicit? | |
} document_start | |
The document parameters (for YAML_DOCUMENT_START_EVENT ). | |
struct { | |
int implicit | |
Is the document end indicator implicit? | |
} document_end | |
The document end parameters (for YAML_DOCUMENT_END_EVENT ). | |
struct { | |
yaml_char_t * anchor | |
The anchor. | |
} alias | |
The alias parameters (for YAML_ALIAS_EVENT ). | |
struct { | |
yaml_char_t * anchor | |
The anchor. | |
yaml_char_t * tag | |
The tag. | |
yaml_char_t * value | |
The scalar value. | |
size_t length | |
The length of the scalar value. | |
int plain_implicit | |
Is the tag optional for the plain style? | |
int quoted_implicit | |
Is the tag optional for any non-plain style? | |
yaml_scalar_style_t style | |
The scalar style. | |
} scalar | |
The scalar parameters (for YAML_SCALAR_EVENT ). | |
struct { | |
yaml_char_t * anchor | |
The anchor. | |
yaml_char_t * tag | |
The tag. | |
int implicit | |
Is the tag optional? | |
yaml_sequence_style_t style | |
The sequence style. | |
} sequence_start | |
The sequence parameters (for YAML_SEQUENCE_START_EVENT ). | |
struct { | |
yaml_char_t * anchor | |
The anchor. | |
yaml_char_t * tag | |
The tag. | |
int implicit | |
Is the tag optional? | |
yaml_mapping_style_t style | |
The mapping style. | |
} mapping_start | |
The mapping parameters (for YAML_MAPPING_START_EVENT ). | |
} | data |
The event data. | |
+yaml_mark_t | start_mark |
The beginning of the event. | |
+yaml_mark_t | end_mark |
The end of the event. |
+
+#include <yaml.h>
+
+
Data Fields | |
+size_t | index |
The position index. | |
+size_t | line |
The position line. | |
+size_t | column |
The position column. |
+
+#include <yaml.h>
+
+
Data Fields | |
+int | key |
The key of the element. | |
+int | value |
The value of the element. |
+
+#include <yaml.h>
+
+
Data Fields | |
+yaml_node_type_t | type |
The node type. | |
+yaml_char_t * | tag |
The node tag. | |
+union { | |
struct { | |
yaml_char_t * value | |
The scalar value. | |
size_t length | |
The length of the scalar value. | |
yaml_scalar_style_t style | |
The scalar style. | |
} scalar | |
The scalar parameters (for YAML_SCALAR_NODE ). | |
struct { | |
struct { | |
yaml_node_item_t * start | |
The beginning of the stack. | |
yaml_node_item_t * end | |
The end of the stack. | |
yaml_node_item_t * top | |
The top of the stack. | |
} items | |
The stack of sequence items. | |
yaml_sequence_style_t style | |
The sequence style. | |
} sequence | |
The sequence parameters (for YAML_SEQUENCE_NODE ). | |
struct { | |
struct { | |
yaml_node_pair_t * start | |
The beginning of the stack. | |
yaml_node_pair_t * end | |
The end of the stack. | |
yaml_node_pair_t * top | |
The top of the stack. | |
} pairs | |
The stack of mapping pairs (key, value). | |
yaml_mapping_style_t style | |
The mapping style. | |
} mapping | |
The mapping parameters (for YAML_MAPPING_NODE ). | |
} | data |
The node data. | |
+yaml_mark_t | start_mark |
The beginning of the node. | |
+yaml_mark_t | end_mark |
The end of the node. |
+
+#include <yaml.h>
+
+
Data Fields | |
+const unsigned char * | start |
The string start pointer. | |
+const unsigned char * | end |
The string end pointer. | |
+const unsigned char * | current |
The string current position. | |
+struct { | |
const unsigned char * start | |
The string start pointer. | |
const unsigned char * end | |
The string end pointer. | |
const unsigned char * current | |
The string current position. | |
} | string |
String input data. | |
+FILE * | file |
File input data. | |
+yaml_char_t * | start |
The beginning of the buffer. | |
+yaml_char_t * | end |
The end of the buffer. | |
+yaml_char_t * | pointer |
The current position of the buffer. | |
+yaml_char_t * | last |
The last filled position of the buffer. | |
+unsigned char * | start |
The beginning of the buffer. | |
+unsigned char * | end |
The end of the buffer. | |
+unsigned char * | pointer |
The current position of the buffer. | |
+unsigned char * | last |
The last filled position of the buffer. | |
+yaml_token_t * | start |
The beginning of the tokens queue. | |
+yaml_token_t * | end |
The end of the tokens queue. | |
+yaml_token_t * | head |
The head of the tokens queue. | |
+yaml_token_t * | tail |
The tail of the tokens queue. | |
+int * | start |
The beginning of the stack. | |
+int * | end |
The end of the stack. | |
+int * | top |
The top of the stack. | |
+yaml_simple_key_t * | start |
The beginning of the stack. | |
+yaml_simple_key_t * | end |
The end of the stack. | |
+yaml_simple_key_t * | top |
The top of the stack. | |
+yaml_parser_state_t * | start |
The beginning of the stack. | |
+yaml_parser_state_t * | end |
The end of the stack. | |
+yaml_parser_state_t * | top |
The top of the stack. | |
+yaml_mark_t * | start |
The beginning of the stack. | |
+yaml_mark_t * | end |
The end of the stack. | |
+yaml_mark_t * | top |
The top of the stack. | |
+yaml_tag_directive_t * | start |
The beginning of the list. | |
+yaml_tag_directive_t * | end |
The end of the list. | |
+yaml_tag_directive_t * | top |
The top of the list. | |
+yaml_alias_data_t * | start |
The beginning of the list. | |
+yaml_alias_data_t * | end |
The end of the list. | |
+yaml_alias_data_t * | top |
The top of the list. | |
Error handling | |
+yaml_error_type_t | error |
Error type. | |
+const char * | problem |
Error description. | |
+size_t | problem_offset |
The byte about which the problem occured. | |
+int | problem_value |
The problematic value (-1 is none). | |
+yaml_mark_t | problem_mark |
The problem position. | |
+const char * | context |
The error context. | |
+yaml_mark_t | context_mark |
The context position. | |
Reader stuff | |
+yaml_read_handler_t * | read_handler |
Read handler. | |
+void * | read_handler_data |
A pointer for passing to the read handler. | |
+union { | |
struct { | |
const unsigned char * start | |
The string start pointer. | |
const unsigned char * end | |
The string end pointer. | |
const unsigned char * current | |
The string current position. | |
} string | |
String input data. | |
FILE * file | |
File input data. | |
} | input |
Standard (string or file) input data. | |
+int | eof |
EOF flag. | |
+struct { | |
yaml_char_t * start | |
The beginning of the buffer. | |
yaml_char_t * end | |
The end of the buffer. | |
yaml_char_t * pointer | |
The current position of the buffer. | |
yaml_char_t * last | |
The last filled position of the buffer. | |
} | buffer |
The working buffer. | |
+size_t | unread |
+struct { | |
unsigned char * start | |
The beginning of the buffer. | |
unsigned char * end | |
The end of the buffer. | |
unsigned char * pointer | |
The current position of the buffer. | |
unsigned char * last | |
The last filled position of the buffer. | |
} | raw_buffer |
The raw buffer. | |
+yaml_encoding_t | encoding |
The input encoding. | |
+size_t | offset |
The offset of the current position (in bytes). | |
+yaml_mark_t | mark |
The mark of the current position. | |
Scanner stuff | |
+int | stream_start_produced |
Have we started to scan the input stream? | |
+int | stream_end_produced |
Have we reached the end of the input stream? | |
+int | flow_level |
The number of unclosed '[' and '{' indicators. | |
+struct { | |
yaml_token_t * start | |
The beginning of the tokens queue. | |
yaml_token_t * end | |
The end of the tokens queue. | |
yaml_token_t * head | |
The head of the tokens queue. | |
yaml_token_t * tail | |
The tail of the tokens queue. | |
} | tokens |
The tokens queue. | |
+size_t | tokens_parsed |
The number of tokens fetched from the queue. | |
+int | token_available |
+struct { | |
int * start | |
The beginning of the stack. | |
int * end | |
The end of the stack. | |
int * top | |
The top of the stack. | |
} | indents |
The indentation levels stack. | |
+int | indent |
The current indentation level. | |
+int | simple_key_allowed |
May a simple key occur at the current position? | |
+struct { | |
yaml_simple_key_t * start | |
The beginning of the stack. | |
yaml_simple_key_t * end | |
The end of the stack. | |
yaml_simple_key_t * top | |
The top of the stack. | |
} | simple_keys |
The stack of simple keys. | |
Parser stuff | |
+struct { | |
yaml_parser_state_t * start | |
The beginning of the stack. | |
yaml_parser_state_t * end | |
The end of the stack. | |
yaml_parser_state_t * top | |
The top of the stack. | |
} | states |
The parser states stack. | |
+yaml_parser_state_t | state |
The current parser state. | |
+struct { | |
yaml_mark_t * start | |
The beginning of the stack. | |
yaml_mark_t * end | |
The end of the stack. | |
yaml_mark_t * top | |
The top of the stack. | |
} | marks |
The stack of marks. | |
+struct { | |
yaml_tag_directive_t * start | |
The beginning of the list. | |
yaml_tag_directive_t * end | |
The end of the list. | |
yaml_tag_directive_t * top | |
The top of the list. | |
} | tag_directives |
The list of TAG directives. | |
Dumper stuff | |
+struct { | |
yaml_alias_data_t * start | |
The beginning of the list. | |
yaml_alias_data_t * end | |
The end of the list. | |
yaml_alias_data_t * top | |
The top of the list. | |
} | aliases |
The alias data. | |
+yaml_document_t * | document |
The currently parsed document. |
+All members are internal. Manage the structure using the yaml_parser_
family of functions.
+
+
+#include <yaml.h>
+
+
Data Fields | |
+int | possible |
Is a simple key possible? | |
+int | required |
Is a simple key required? | |
+size_t | token_number |
The number of the token. | |
+yaml_mark_t | mark |
The position mark. |
+
+#include <yaml.h>
+
+
Data Fields | |
+yaml_char_t * | handle |
The tag handle. | |
+yaml_char_t * | prefix |
The tag prefix. |
+
+#include <yaml.h>
+
+
Data Fields | |
+yaml_token_type_t | type |
The token type. | |
+union { | |
struct { | |
yaml_encoding_t encoding | |
The stream encoding. | |
} stream_start | |
The stream start (for YAML_STREAM_START_TOKEN ). | |
struct { | |
yaml_char_t * value | |
The alias value. | |
} alias | |
The alias (for YAML_ALIAS_TOKEN ). | |
struct { | |
yaml_char_t * value | |
The anchor value. | |
} anchor | |
The anchor (for YAML_ANCHOR_TOKEN ). | |
struct { | |
yaml_char_t * handle | |
The tag handle. | |
yaml_char_t * suffix | |
The tag suffix. | |
} tag | |
The tag (for YAML_TAG_TOKEN ). | |
struct { | |
yaml_char_t * value | |
The scalar value. | |
size_t length | |
The length of the scalar value. | |
yaml_scalar_style_t style | |
The scalar style. | |
} scalar | |
The scalar value (for YAML_SCALAR_TOKEN ). | |
struct { | |
int major | |
The major version number. | |
int minor | |
The minor version number. | |
} version_directive | |
The version directive (for YAML_VERSION_DIRECTIVE_TOKEN ). | |
struct { | |
yaml_char_t * handle | |
The tag handle. | |
yaml_char_t * prefix | |
The tag prefix. | |
} tag_directive | |
The tag directive (for YAML_TAG_DIRECTIVE_TOKEN ). | |
} | data |
The token data. | |
+yaml_mark_t | start_mark |
The beginning of the token. | |
+yaml_mark_t | end_mark |
The end of the token. |
+
+#include <yaml.h>
+
+
Data Fields | |
+int | major |
The major version number. | |
+int | minor |
The minor version number. |
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
Data Structures | |
struct | yaml_version_directive_s |
The version directive data. More... | |
struct | yaml_tag_directive_s |
The tag directive data. More... | |
struct | yaml_mark_s |
The pointer position. More... | |
struct | yaml_token_s |
The token structure. More... | |
struct | yaml_event_s |
The event structure. More... | |
struct | yaml_node_pair_s |
An element of a mapping node. More... | |
struct | yaml_node_s |
The node structure. More... | |
struct | yaml_document_s |
The document structure. More... | |
struct | yaml_simple_key_s |
This structure holds information about a potential simple key. More... | |
struct | yaml_alias_data_s |
This structure holds aliases data. More... | |
struct | yaml_parser_s |
The parser structure. More... | |
struct | yaml_emitter_s |
The emitter structure. More... | |
Defines | |
+#define | YAML_DECLARE(type) type |
The public API declaration. | |
+#define | YAML_NULL_TAG "tag:yaml.org,2002:null" |
The tag !!null with the only possible value: null . | |
+#define | YAML_BOOL_TAG "tag:yaml.org,2002:bool" |
The tag !!bool with the values: true and falce . | |
+#define | YAML_STR_TAG "tag:yaml.org,2002:str" |
The tag !!str for string values. | |
+#define | YAML_INT_TAG "tag:yaml.org,2002:int" |
The tag !!int for integer values. | |
+#define | YAML_FLOAT_TAG "tag:yaml.org,2002:float" |
The tag !!float for float values. | |
+#define | YAML_TIMESTAMP_TAG "tag:yaml.org,2002:timestamp" |
The tag !!timestamp for date and time values. | |
+#define | YAML_SEQ_TAG "tag:yaml.org,2002:seq" |
The tag !!seq is used to denote sequences. | |
+#define | YAML_MAP_TAG "tag:yaml.org,2002:map" |
The tag !!map is used to denote mapping. | |
+#define | YAML_DEFAULT_SCALAR_TAG YAML_STR_TAG |
The default scalar tag is !!str . | |
+#define | YAML_DEFAULT_SEQUENCE_TAG YAML_SEQ_TAG |
The default sequence tag is !!seq . | |
+#define | YAML_DEFAULT_MAPPING_TAG YAML_MAP_TAG |
The default mapping tag is !!map . | |
Typedefs | |
+typedef unsigned char | yaml_char_t |
The character type (UTF-8 octet). | |
+typedef yaml_version_directive_s | yaml_version_directive_t |
The version directive data. | |
+typedef yaml_tag_directive_s | yaml_tag_directive_t |
The tag directive data. | |
+typedef enum yaml_encoding_e | yaml_encoding_t |
The stream encoding. | |
+typedef enum yaml_break_e | yaml_break_t |
Line break types. | |
+typedef enum yaml_error_type_e | yaml_error_type_t |
Many bad things could happen with the parser and emitter. | |
+typedef yaml_mark_s | yaml_mark_t |
The pointer position. | |
+typedef enum yaml_scalar_style_e | yaml_scalar_style_t |
Scalar styles. | |
+typedef enum yaml_sequence_style_e | yaml_sequence_style_t |
Sequence styles. | |
+typedef enum yaml_mapping_style_e | yaml_mapping_style_t |
Mapping styles. | |
+typedef enum yaml_token_type_e | yaml_token_type_t |
Token types. | |
+typedef yaml_token_s | yaml_token_t |
The token structure. | |
+typedef enum yaml_event_type_e | yaml_event_type_t |
Event types. | |
+typedef yaml_event_s | yaml_event_t |
The event structure. | |
+typedef enum yaml_node_type_e | yaml_node_type_t |
Node types. | |
+typedef yaml_node_s | yaml_node_t |
The forward definition of a document node structure. | |
+typedef int | yaml_node_item_t |
An element of a sequence node. | |
+typedef yaml_node_pair_s | yaml_node_pair_t |
An element of a mapping node. | |
+typedef yaml_document_s | yaml_document_t |
The document structure. | |
typedef int | yaml_read_handler_t (void *data, unsigned char *buffer, size_t size, size_t *size_read) |
The prototype of a read handler. | |
+typedef yaml_simple_key_s | yaml_simple_key_t |
This structure holds information about a potential simple key. | |
+typedef enum yaml_parser_state_e | yaml_parser_state_t |
The states of the parser. | |
+typedef yaml_alias_data_s | yaml_alias_data_t |
This structure holds aliases data. | |
typedef yaml_parser_s | yaml_parser_t |
The parser structure. | |
typedef int | yaml_write_handler_t (void *data, unsigned char *buffer, size_t size) |
The prototype of a write handler. | |
+typedef enum yaml_emitter_state_e | yaml_emitter_state_t |
The emitter states. | |
typedef yaml_emitter_s | yaml_emitter_t |
The emitter structure. | |
Enumerations | |
enum | yaml_encoding_e { + YAML_ANY_ENCODING, + + YAML_UTF8_ENCODING, + + YAML_UTF16LE_ENCODING, + + YAML_UTF16BE_ENCODING + + } |
The stream encoding. More... | |
enum | yaml_break_e { + YAML_ANY_BREAK, + + YAML_CR_BREAK, + + YAML_LN_BREAK, + + YAML_CRLN_BREAK + + } |
Line break types. More... | |
enum | yaml_error_type_e { + YAML_NO_ERROR, + + YAML_MEMORY_ERROR, + + YAML_READER_ERROR, + + YAML_SCANNER_ERROR, + + YAML_PARSER_ERROR, + + YAML_COMPOSER_ERROR, + + YAML_WRITER_ERROR, + + YAML_EMITTER_ERROR + + } |
Many bad things could happen with the parser and emitter. More... | |
enum | yaml_scalar_style_e { + YAML_ANY_SCALAR_STYLE, + + YAML_PLAIN_SCALAR_STYLE, + + YAML_SINGLE_QUOTED_SCALAR_STYLE, + + YAML_DOUBLE_QUOTED_SCALAR_STYLE, + + YAML_LITERAL_SCALAR_STYLE, + + YAML_FOLDED_SCALAR_STYLE + + } |
Scalar styles. More... | |
enum | yaml_sequence_style_e { + YAML_ANY_SEQUENCE_STYLE, + + YAML_BLOCK_SEQUENCE_STYLE, + + YAML_FLOW_SEQUENCE_STYLE + + } |
Sequence styles. More... | |
enum | yaml_mapping_style_e { + YAML_ANY_MAPPING_STYLE, + + YAML_BLOCK_MAPPING_STYLE, + + YAML_FLOW_MAPPING_STYLE + + } |
Mapping styles. More... | |
enum | yaml_token_type_e { + YAML_NO_TOKEN, + + YAML_STREAM_START_TOKEN, + + YAML_STREAM_END_TOKEN, + + YAML_VERSION_DIRECTIVE_TOKEN, + + YAML_TAG_DIRECTIVE_TOKEN, + + YAML_DOCUMENT_START_TOKEN, + + YAML_DOCUMENT_END_TOKEN, + + YAML_BLOCK_SEQUENCE_START_TOKEN, + + YAML_BLOCK_MAPPING_START_TOKEN, + + YAML_BLOCK_END_TOKEN, + + YAML_FLOW_SEQUENCE_START_TOKEN, + + YAML_FLOW_SEQUENCE_END_TOKEN, + + YAML_FLOW_MAPPING_START_TOKEN, + + YAML_FLOW_MAPPING_END_TOKEN, + + YAML_BLOCK_ENTRY_TOKEN, + + YAML_FLOW_ENTRY_TOKEN, + + YAML_KEY_TOKEN, + + YAML_VALUE_TOKEN, + + YAML_ALIAS_TOKEN, + + YAML_ANCHOR_TOKEN, + + YAML_TAG_TOKEN, + + YAML_SCALAR_TOKEN + + } |
Token types. More... | |
enum | yaml_event_type_e { + YAML_NO_EVENT, + + YAML_STREAM_START_EVENT, + + YAML_STREAM_END_EVENT, + + YAML_DOCUMENT_START_EVENT, + + YAML_DOCUMENT_END_EVENT, + + YAML_ALIAS_EVENT, + + YAML_SCALAR_EVENT, + + YAML_SEQUENCE_START_EVENT, + + YAML_SEQUENCE_END_EVENT, + + YAML_MAPPING_START_EVENT, + + YAML_MAPPING_END_EVENT + + } |
Event types. More... | |
enum | yaml_node_type_e { + YAML_NO_NODE, + + YAML_SCALAR_NODE, + + YAML_SEQUENCE_NODE, + + YAML_MAPPING_NODE + + } |
Node types. More... | |
enum | yaml_parser_state_e { + YAML_PARSE_STREAM_START_STATE, + + YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE, + + YAML_PARSE_DOCUMENT_START_STATE, + + YAML_PARSE_DOCUMENT_CONTENT_STATE, + + YAML_PARSE_DOCUMENT_END_STATE, + + YAML_PARSE_BLOCK_NODE_STATE, + + YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE, + + YAML_PARSE_FLOW_NODE_STATE, + + YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE, + + YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE, + + YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE, + + YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE, + + YAML_PARSE_BLOCK_MAPPING_KEY_STATE, + + YAML_PARSE_BLOCK_MAPPING_VALUE_STATE, + + YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE, + + YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE, + + YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE, + + YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE, + + YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE, + + YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE, + + YAML_PARSE_FLOW_MAPPING_KEY_STATE, + + YAML_PARSE_FLOW_MAPPING_VALUE_STATE, + + YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE, + + YAML_PARSE_END_STATE + + } |
The states of the parser. More... | |
enum | yaml_emitter_state_e { + YAML_EMIT_STREAM_START_STATE, + + YAML_EMIT_FIRST_DOCUMENT_START_STATE, + + YAML_EMIT_DOCUMENT_START_STATE, + + YAML_EMIT_DOCUMENT_CONTENT_STATE, + + YAML_EMIT_DOCUMENT_END_STATE, + + YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE, + + YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE, + + YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE, + + YAML_EMIT_FLOW_MAPPING_KEY_STATE, + + YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE, + + YAML_EMIT_FLOW_MAPPING_VALUE_STATE, + + YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE, + + YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE, + + YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE, + + YAML_EMIT_BLOCK_MAPPING_KEY_STATE, + + YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE, + + YAML_EMIT_BLOCK_MAPPING_VALUE_STATE, + + YAML_EMIT_END_STATE + + } |
The emitter states. More... | |
Functions | |
const char * | yaml_get_version_string (void) |
Get the library version as a string. | |
void | yaml_get_version (int *major, int *minor, int *patch) |
Get the library version numbers. | |
void | yaml_token_delete (yaml_token_t *token) |
Free any memory allocated for a token object. | |
int | yaml_stream_start_event_initialize (yaml_event_t *event, yaml_encoding_t encoding) |
Create the STREAM-START event. | |
int | yaml_stream_end_event_initialize (yaml_event_t *event) |
Create the STREAM-END event. | |
int | yaml_document_start_event_initialize (yaml_event_t *event, yaml_version_directive_t *version_directive, yaml_tag_directive_t *tag_directives_start, yaml_tag_directive_t *tag_directives_end, int implicit) |
Create the DOCUMENT-START event. | |
int | yaml_document_end_event_initialize (yaml_event_t *event, int implicit) |
Create the DOCUMENT-END event. | |
int | yaml_alias_event_initialize (yaml_event_t *event, yaml_char_t *anchor) |
Create an ALIAS event. | |
int | yaml_scalar_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, yaml_char_t *value, int length, int plain_implicit, int quoted_implicit, yaml_scalar_style_t style) |
Create a SCALAR event. | |
int | yaml_sequence_start_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, int implicit, yaml_sequence_style_t style) |
Create a SEQUENCE-START event. | |
int | yaml_sequence_end_event_initialize (yaml_event_t *event) |
Create a SEQUENCE-END event. | |
int | yaml_mapping_start_event_initialize (yaml_event_t *event, yaml_char_t *anchor, yaml_char_t *tag, int implicit, yaml_mapping_style_t style) |
Create a MAPPING-START event. | |
int | yaml_mapping_end_event_initialize (yaml_event_t *event) |
Create a MAPPING-END event. | |
void | yaml_event_delete (yaml_event_t *event) |
Free any memory allocated for an event object. | |
int | yaml_document_initialize (yaml_document_t *document, yaml_version_directive_t *version_directive, yaml_tag_directive_t *tag_directives_start, yaml_tag_directive_t *tag_directives_end, int start_implicit, int end_implicit) |
Create a YAML document. | |
void | yaml_document_delete (yaml_document_t *document) |
Delete a YAML document and all its nodes. | |
yaml_node_t * | yaml_document_get_node (yaml_document_t *document, int index) |
Get a node of a YAML document. | |
yaml_node_t * | yaml_document_get_root_node (yaml_document_t *document) |
Get the root of a YAML document node. | |
int | yaml_document_add_scalar (yaml_document_t *document, yaml_char_t *tag, yaml_char_t *value, int length, yaml_scalar_style_t style) |
Create a SCALAR node and attach it to the document. | |
int | yaml_document_add_sequence (yaml_document_t *document, yaml_char_t *tag, yaml_sequence_style_t style) |
Create a SEQUENCE node and attach it to the document. | |
int | yaml_document_add_mapping (yaml_document_t *document, yaml_char_t *tag, yaml_mapping_style_t style) |
Create a MAPPING node and attach it to the document. | |
int | yaml_document_append_sequence_item (yaml_document_t *document, int sequence, int item) |
Add an item to a SEQUENCE node. | |
int | yaml_document_append_mapping_pair (yaml_document_t *document, int mapping, int key, int value) |
Add a pair of a key and a value to a MAPPING node. | |
int | yaml_parser_initialize (yaml_parser_t *parser) |
Initialize a parser. | |
void | yaml_parser_delete (yaml_parser_t *parser) |
Destroy a parser. | |
void | yaml_parser_set_input_string (yaml_parser_t *parser, const unsigned char *input, size_t size) |
Set a string input. | |
void | yaml_parser_set_input_file (yaml_parser_t *parser, FILE *file) |
Set a file input. | |
void | yaml_parser_set_input (yaml_parser_t *parser, yaml_read_handler_t *handler, void *data) |
Set a generic input handler. | |
void | yaml_parser_set_encoding (yaml_parser_t *parser, yaml_encoding_t encoding) |
Set the source encoding. | |
int | yaml_parser_scan (yaml_parser_t *parser, yaml_token_t *token) |
Scan the input stream and produce the next token. | |
int | yaml_parser_parse (yaml_parser_t *parser, yaml_event_t *event) |
Parse the input stream and produce the next parsing event. | |
int | yaml_parser_load (yaml_parser_t *parser, yaml_document_t *document) |
Parse the input stream and produce the next YAML document. | |
int | yaml_emitter_initialize (yaml_emitter_t *emitter) |
Initialize an emitter. | |
void | yaml_emitter_delete (yaml_emitter_t *emitter) |
Destroy an emitter. | |
void | yaml_emitter_set_output_string (yaml_emitter_t *emitter, unsigned char *output, size_t size, size_t *size_written) |
Set a string output. | |
void | yaml_emitter_set_output_file (yaml_emitter_t *emitter, FILE *file) |
Set a file output. | |
void | yaml_emitter_set_output (yaml_emitter_t *emitter, yaml_write_handler_t *handler, void *data) |
Set a generic output handler. | |
void | yaml_emitter_set_encoding (yaml_emitter_t *emitter, yaml_encoding_t encoding) |
Set the output encoding. | |
void | yaml_emitter_set_canonical (yaml_emitter_t *emitter, int canonical) |
Set if the output should be in the "canonical" format as in the YAML specification. | |
void | yaml_emitter_set_indent (yaml_emitter_t *emitter, int indent) |
Set the intendation increment. | |
void | yaml_emitter_set_width (yaml_emitter_t *emitter, int width) |
Set the preferred line width. | |
void | yaml_emitter_set_unicode (yaml_emitter_t *emitter, int unicode) |
Set if unescaped non-ASCII characters are allowed. | |
void | yaml_emitter_set_break (yaml_emitter_t *emitter, yaml_break_t line_break) |
Set the preferred line break. | |
int | yaml_emitter_emit (yaml_emitter_t *emitter, yaml_event_t *event) |
Emit an event. | |
int | yaml_emitter_open (yaml_emitter_t *emitter) |
Start a YAML stream. | |
int | yaml_emitter_close (yaml_emitter_t *emitter) |
Finish a YAML stream. | |
int | yaml_emitter_dump (yaml_emitter_t *emitter, yaml_document_t *document) |
Emit a YAML document. | |
int | yaml_emitter_flush (yaml_emitter_t *emitter) |
Flush the accumulated characters to the output. |
+Include the header file with the code:
#include <yaml.h>
+