Ruby
2.0.0p247(2013-06-27revision41674)
|
The emitter structure. More...
#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 (' ', '-', '?', ':')? | |
int | open_ended |
If an explicit document end is required? | |
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. |
The emitter structure.
All members are internal. Manage the structure using the yaml_emitter_
family of functions.
Is it an alias?
Definition at line 1693 of file yaml.h.
Referenced by yaml_emitter_analyze_anchor(), and yaml_emitter_process_anchor().
The anchor value.
Definition at line 1689 of file yaml.h.
Referenced by yaml_emitter_analyze_anchor(), yaml_emitter_analyze_event(), yaml_emitter_anchor_node(), yaml_emitter_dump_node(), and yaml_emitter_process_anchor().
struct { ... } yaml_emitter_s::anchor_data |
Anchor analysis.
Referenced by yaml_emitter_analyze_anchor(), yaml_emitter_analyze_event(), yaml_emitter_check_simple_key(), and yaml_emitter_process_anchor().
The anchor length.
Definition at line 1691 of file yaml.h.
Referenced by yaml_emitter_analyze_anchor(), yaml_emitter_analyze_event(), yaml_emitter_check_simple_key(), and yaml_emitter_process_anchor().
struct { ... } * yaml_emitter_s::anchors |
The information associated with the document nodes.
Referenced by yaml_emitter_anchor_node(), yaml_emitter_delete_document_and_anchors(), and yaml_emitter_dump_node().
The number of indentation spaces.
Definition at line 1607 of file yaml.h.
Referenced by indentation(), yaml_emitter_emit_stream_start(), yaml_emitter_increase_indent(), and yaml_emitter_write_block_scalar_hints().
The preferred width of the output lines.
Definition at line 1609 of file yaml.h.
Referenced by line_width(), yaml_emitter_emit_flow_mapping_key(), yaml_emitter_emit_flow_mapping_value(), yaml_emitter_emit_flow_sequence_item(), yaml_emitter_emit_stream_start(), yaml_emitter_write_double_quoted_scalar(), yaml_emitter_write_folded_scalar(), yaml_emitter_write_plain_scalar(), and yaml_emitter_write_single_quoted_scalar().
Can the scalar be expressed in the literal or folded styles?
Definition at line 1723 of file yaml.h.
Referenced by yaml_emitter_analyze_scalar(), and yaml_emitter_select_scalar_style().
Can the scalar be expressed in the block plain style?
Definition at line 1719 of file yaml.h.
Referenced by yaml_emitter_analyze_scalar(), and yaml_emitter_select_scalar_style().
unsigned char* yaml_emitter_s::buffer |
struct { ... } yaml_emitter_s::buffer |
The working buffer.
If the output is in the canonical style?
Definition at line 1605 of file yaml.h.
Referenced by canonical(), yaml_emitter_analyze_event(), yaml_emitter_emit_document_start(), yaml_emitter_emit_flow_mapping_key(), yaml_emitter_emit_flow_mapping_value(), yaml_emitter_emit_flow_sequence_item(), yaml_emitter_emit_mapping_start(), yaml_emitter_emit_sequence_start(), and yaml_emitter_select_scalar_style().
The current column.
Definition at line 1678 of file yaml.h.
Referenced by yaml_emitter_emit_flow_mapping_key(), yaml_emitter_emit_flow_mapping_value(), yaml_emitter_emit_flow_sequence_item(), yaml_emitter_emit_stream_start(), yaml_emitter_write_double_quoted_scalar(), yaml_emitter_write_folded_scalar(), yaml_emitter_write_indent(), yaml_emitter_write_plain_scalar(), and yaml_emitter_write_single_quoted_scalar().
The currently emitted document.
Definition at line 1756 of file yaml.h.
Referenced by yaml_emitter_anchor_node(), yaml_emitter_delete_document_and_anchors(), and yaml_emitter_dump_node().
The stream encoding.
Definition at line 1593 of file yaml.h.
Referenced by yaml_emitter_emit_stream_start().
unsigned char* yaml_emitter_s::end |
int* yaml_emitter_s::end |
Error type.
Definition at line 1533 of file yaml.h.
Referenced by yaml_emitter_append_tag_directive().
struct { ... } yaml_emitter_s::events |
The event queue.
Referenced by yaml_emitter_check_empty_mapping(), yaml_emitter_check_empty_sequence(), yaml_emitter_check_simple_key(), and yaml_emitter_need_more_events().
The current flow level.
Definition at line 1664 of file yaml.h.
Referenced by yaml_emitter_emit_flow_mapping_key(), yaml_emitter_emit_flow_sequence_item(), yaml_emitter_emit_mapping_start(), yaml_emitter_emit_sequence_start(), and yaml_emitter_select_scalar_style().
Can the scalar be expessed in the flow plain style?
Definition at line 1717 of file yaml.h.
Referenced by yaml_emitter_analyze_scalar(), and yaml_emitter_select_scalar_style().
The tag handle.
Definition at line 1699 of file yaml.h.
Referenced by yaml_emitter_analyze_event(), yaml_emitter_analyze_tag(), yaml_emitter_process_tag(), and yaml_emitter_select_scalar_style().
The tag handle length.
Definition at line 1701 of file yaml.h.
Referenced by yaml_emitter_analyze_event(), yaml_emitter_analyze_tag(), yaml_emitter_check_simple_key(), yaml_emitter_process_tag(), and yaml_emitter_select_scalar_style().
The head of the event queue.
Definition at line 1635 of file yaml.h.
Referenced by yaml_emitter_check_empty_mapping(), yaml_emitter_check_empty_sequence(), yaml_emitter_check_simple_key(), and yaml_emitter_need_more_events().
The current indentation level.
Definition at line 1661 of file yaml.h.
Referenced by yaml_emitter_emit_block_mapping_key(), yaml_emitter_emit_block_sequence_item(), yaml_emitter_emit_flow_mapping_key(), yaml_emitter_emit_flow_sequence_item(), yaml_emitter_emit_scalar(), yaml_emitter_emit_stream_start(), yaml_emitter_increase_indent(), and yaml_emitter_write_indent().
If the last character was an indentation character (' ', '-', '?', ':')?
Definition at line 1682 of file yaml.h.
Referenced by yaml_emitter_emit_block_sequence_item(), yaml_emitter_emit_stream_start(), yaml_emitter_write_anchor(), yaml_emitter_write_double_quoted_scalar(), yaml_emitter_write_folded_scalar(), yaml_emitter_write_indent(), yaml_emitter_write_indicator(), yaml_emitter_write_literal_scalar(), yaml_emitter_write_plain_scalar(), yaml_emitter_write_single_quoted_scalar(), yaml_emitter_write_tag_content(), and yaml_emitter_write_tag_handle().
struct { ... } yaml_emitter_s::indents |
The stack of indentation levels.
Referenced by yaml_emitter_emit_block_mapping_key(), yaml_emitter_emit_block_sequence_item(), yaml_emitter_emit_flow_mapping_key(), yaml_emitter_emit_flow_sequence_item(), yaml_emitter_emit_scalar(), and yaml_emitter_increase_indent().
unsigned char* yaml_emitter_s::last |
The last assigned anchor id.
Definition at line 1753 of file yaml.h.
Referenced by yaml_emitter_anchor_node(), and yaml_emitter_delete_document_and_anchors().
size_t yaml_emitter_s::length |
The scalar length.
Definition at line 1713 of file yaml.h.
Referenced by yaml_emitter_analyze_event(), yaml_emitter_analyze_scalar(), yaml_emitter_check_simple_key(), yaml_emitter_process_scalar(), and yaml_emitter_select_scalar_style().
The current line.
Definition at line 1676 of file yaml.h.
Referenced by yaml_emitter_emit_stream_start().
The preferred line break.
Definition at line 1613 of file yaml.h.
Referenced by yaml_emitter_emit_stream_start().
Is it a mapping context?
Definition at line 1671 of file yaml.h.
Referenced by yaml_emitter_emit_block_sequence_item(), and yaml_emitter_emit_node().
Does the scalar contain line breaks?
Definition at line 1715 of file yaml.h.
Referenced by yaml_emitter_analyze_scalar(), yaml_emitter_check_simple_key(), and yaml_emitter_select_scalar_style().
If an explicit document end is required?
Definition at line 1684 of file yaml.h.
Referenced by yaml_emitter_emit_document_start(), yaml_emitter_write_block_scalar_hints(), yaml_emitter_write_indicator(), and yaml_emitter_write_plain_scalar().
union { ... } yaml_emitter_s::output |
Standard (string or file) output data.
Referenced by yaml_file_write_handler(), and yaml_string_write_handler().
unsigned char* yaml_emitter_s::pointer |
const char* yaml_emitter_s::problem |
struct { ... } yaml_emitter_s::raw_buffer |
The raw buffer.
The number of references.
Definition at line 1745 of file yaml.h.
Referenced by yaml_emitter_anchor_node().
Is it the document root context?
Definition at line 1667 of file yaml.h.
Referenced by yaml_emitter_emit_node(), and yaml_emitter_write_plain_scalar().
struct { ... } yaml_emitter_s::scalar_data |
Scalar analysis.
Referenced by yaml_emitter_analyze_event(), yaml_emitter_analyze_scalar(), yaml_emitter_check_simple_key(), yaml_emitter_process_scalar(), and yaml_emitter_select_scalar_style().
Is it a sequence context?
Definition at line 1669 of file yaml.h.
Referenced by yaml_emitter_emit_node().
If the node has been emitted?
Definition at line 1749 of file yaml.h.
Referenced by yaml_emitter_delete_document_and_anchors(), and yaml_emitter_dump_node().
Is it a simple mapping key context?
Definition at line 1673 of file yaml.h.
Referenced by yaml_emitter_emit_node(), yaml_emitter_process_scalar(), and yaml_emitter_select_scalar_style().
Can the scalar be expressed in the single quoted style?
Definition at line 1721 of file yaml.h.
Referenced by yaml_emitter_analyze_scalar(), and yaml_emitter_select_scalar_style().
size_t yaml_emitter_s::size |
size_t* yaml_emitter_s::size_written |
The beginning of the buffer.
Definition at line 1571 of file yaml.h.
Referenced by yaml_emitter_analyze_tag(), and yaml_emitter_append_tag_directive().
unsigned char* yaml_emitter_s::start |
The current emitter state.
Definition at line 1626 of file yaml.h.
Referenced by yaml_emitter_emit_alias(), yaml_emitter_emit_block_mapping_key(), yaml_emitter_emit_block_sequence_item(), yaml_emitter_emit_document_end(), yaml_emitter_emit_document_start(), yaml_emitter_emit_flow_mapping_key(), yaml_emitter_emit_flow_sequence_item(), yaml_emitter_emit_mapping_start(), yaml_emitter_emit_scalar(), yaml_emitter_emit_sequence_start(), yaml_emitter_emit_stream_start(), and yaml_emitter_state_machine().
struct { ... } yaml_emitter_s::states |
The stack of states.
Referenced by yaml_emitter_emit_alias(), yaml_emitter_emit_block_mapping_key(), yaml_emitter_emit_block_mapping_value(), yaml_emitter_emit_block_sequence_item(), yaml_emitter_emit_document_content(), yaml_emitter_emit_flow_mapping_key(), yaml_emitter_emit_flow_mapping_value(), yaml_emitter_emit_flow_sequence_item(), and yaml_emitter_emit_scalar().
struct { ... } yaml_emitter_s::string |
String output data.
Referenced by yaml_string_write_handler().
The output style.
Definition at line 1725 of file yaml.h.
Referenced by yaml_emitter_process_scalar(), and yaml_emitter_select_scalar_style().
The tag suffix.
Definition at line 1703 of file yaml.h.
Referenced by yaml_emitter_analyze_event(), yaml_emitter_analyze_tag(), yaml_emitter_process_tag(), and yaml_emitter_select_scalar_style().
The tag suffix length.
Definition at line 1705 of file yaml.h.
Referenced by yaml_emitter_analyze_event(), yaml_emitter_analyze_tag(), yaml_emitter_check_simple_key(), and yaml_emitter_process_tag().
struct { ... } yaml_emitter_s::tag_data |
Tag analysis.
Referenced by yaml_emitter_analyze_event(), yaml_emitter_analyze_tag(), yaml_emitter_check_simple_key(), yaml_emitter_process_tag(), and yaml_emitter_select_scalar_style().
struct { ... } yaml_emitter_s::tag_directives |
The list of tag directives.
Referenced by yaml_emitter_analyze_tag(), yaml_emitter_append_tag_directive(), and yaml_emitter_emit_document_end().
The tail of the event queue.
Definition at line 1637 of file yaml.h.
Referenced by yaml_emitter_check_empty_mapping(), yaml_emitter_check_empty_sequence(), and yaml_emitter_need_more_events().
The top of the stack.
Definition at line 1622 of file yaml.h.
Referenced by yaml_emitter_analyze_tag(), and yaml_emitter_append_tag_directive().
int* yaml_emitter_s::top |
Allow unescaped non-ASCII characters?
Definition at line 1611 of file yaml.h.
Referenced by yaml_emitter_analyze_scalar(), and yaml_emitter_write_double_quoted_scalar().
The scalar value.
Definition at line 1711 of file yaml.h.
Referenced by yaml_emitter_analyze_event(), yaml_emitter_analyze_scalar(), and yaml_emitter_process_scalar().
If the last character was a whitespace?
Definition at line 1680 of file yaml.h.
Referenced by yaml_emitter_emit_stream_start(), yaml_emitter_write_anchor(), yaml_emitter_write_double_quoted_scalar(), yaml_emitter_write_folded_scalar(), yaml_emitter_write_indent(), yaml_emitter_write_indicator(), yaml_emitter_write_literal_scalar(), yaml_emitter_write_plain_scalar(), yaml_emitter_write_single_quoted_scalar(), yaml_emitter_write_tag_content(), and yaml_emitter_write_tag_handle().