Ruby 1.9.2p136(2010-12-25revision30365)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Defines | Typedefs | Enumerations

# ext/syck/yamlbyte.h File Reference

`#include <stddef.h>`
Include dependency graph for yamlbyte.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | yaml_instruction
## Defines
#define | YAMLBYTE_FINISH ((yamlbyte_char_t) 0)
#define | YAMLBYTE_DOCUMENT ((yamlbyte_char_t)'D')
#define | YAMLBYTE_DIRECTIVE ((yamlbyte_char_t)'V')
#define | YAMLBYTE_PAUSE ((yamlbyte_char_t)'P')
#define | YAMLBYTE_MAPPING ((yamlbyte_char_t)'M')
#define | YAMLBYTE_SEQUENCE ((yamlbyte_char_t)'Q')
#define | YAMLBYTE_END_BRANCH ((yamlbyte_char_t)'E')
#define | YAMLBYTE_SCALAR ((yamlbyte_char_t)'S')
#define | YAMLBYTE_CONTINUE ((yamlbyte_char_t)'C')
#define | YAMLBYTE_NEWLINE ((yamlbyte_char_t)'N')
#define | YAMLBYTE_NULLCHAR ((yamlbyte_char_t)'Z')
#define | YAMLBYTE_ANCHOR ((yamlbyte_char_t)'A')
#define | YAMLBYTE_ALIAS ((yamlbyte_char_t)'R')
#define | YAMLBYTE_TRANSFER ((yamlbyte_char_t)'T')
#define | YAMLBYTE_COMMENT ((yamlbyte_char_t)'c')
#define | YAMLBYTE_INDENT ((yamlbyte_char_t)'i')
#define | YAMLBYTE_STYLE ((yamlbyte_char_t)'s')
#define | YAMLBYTE_LINE_NUMBER ((yamlbyte_char_t)'#')
#define | YAMLBYTE_WHOLE_SCALAR ((yamlbyte_char_t)'<')
#define | YAMLBYTE_NOTICE ((yamlbyte_char_t)'!')
#define | YAMLBYTE_SPAN ((yamlbyte_char_t)')')
#define | YAMLBYTE_ALLOC ((yamlbyte_char_t)'@')
#define | YAMLBYTE_FLOW ((yamlbyte_char_t)'>')
#define | YAMLBYTE_LITERAL ((yamlbyte_char_t)'|')
#define | YAMLBYTE_BLOCK ((yamlbyte_char_t)'b')
#define | YAMLBYTE_PLAIN ((yamlbyte_char_t)'p')
#define | YAMLBYTE_INLINE_MAPPING ((yamlbyte_char_t)'{')
#define | YAMLBYTE_INLINE_SEQUENCE ((yamlbyte_char_t)'[')
#define | YAMLBYTE_SINGLE_QUOTED ((yamlbyte_char_t)39)
#define | YAMLBYTE_DOUBLE_QUOTED ((yamlbyte_char_t)'"')
#define | YAMLBYTE_PULL2PUSH(pull, producer, push, consumer, result)
## Typedefs
typedef unsigned char | yamlbyte_utf8_t
typedef unsigned short | yamlbyte_utf16_t
typedef void * | yamlbyte_consumer_t
typedef void * | yamlbyte_producer_t
typedef const yamlbyte_char_t * | yamlbyte_buff_t
typedef struct yaml_instruction * | yamlbyte_inst_t
typedef yamlbyte_result_t(* | yamlbyte_push_t )(yamlbyte_consumer_t self, yamlbyte_inst_t inst)
typedef yamlbyte_result_t(* | yamlbyte_pull_t )(yamlbyte_producer_t self, yamlbyte_inst_t *inst)
typedef yamlbyte_result_t(* | yamlbyte_pushbuff_t )(yamlbyte_consumer_t self, yamlbyte_buff_t buff)
typedef yamlbyte_result_t(* | yamlbyte_pullbuff_t )(yamlbyte_producer_t self, yamlbyte_buff_t *buff)
## Enumerations
enum | yamlbyte_result_t { YAMLBYTE_OK = 0, YAMLBYTE_E_MEMORY = 'M', YAMLBYTE_E_READ = 'R', YAMLBYTE_E_WRITE = 'W', YAMLBYTE_E_OTHER = '?', YAMLBYTE_E_PARSE = 'P', YAMLBYTE_MAX }

## Define Documentation

#define YAMLBYTE_ALIAS ((yamlbyte_char_t)'R')

Definition at line 41 of file yamlbyte.h.

Referenced by bytestring_extend().

#define YAMLBYTE_ALLOC ((yamlbyte_char_t)'@')

Definition at line 52 of file yamlbyte.h.

#define YAMLBYTE_ANCHOR ((yamlbyte_char_t)'A')

Definition at line 40 of file yamlbyte.h.

Referenced by bytestring_extend(), and syck_yaml2byte_handler().

#define YAMLBYTE_BLOCK ((yamlbyte_char_t)'b')

Definition at line 57 of file yamlbyte.h.

#define YAMLBYTE_COMMENT ((yamlbyte_char_t)'c')

Definition at line 44 of file yamlbyte.h.

#define YAMLBYTE_CONTINUE ((yamlbyte_char_t)'C')

Definition at line 37 of file yamlbyte.h.

Referenced by syck_yaml2byte_handler().

#define YAMLBYTE_DIRECTIVE ((yamlbyte_char_t)'V')

Definition at line 31 of file yamlbyte.h.

#define YAMLBYTE_DOCUMENT ((yamlbyte_char_t)'D')

Definition at line 30 of file yamlbyte.h.

#define YAMLBYTE_DOUBLE_QUOTED ((yamlbyte_char_t)'"')

Definition at line 62 of file yamlbyte.h.

#define YAMLBYTE_END_BRANCH ((yamlbyte_char_t)'E')

Definition at line 35 of file yamlbyte.h.

Referenced by syck_yaml2byte_handler().

#define YAMLBYTE_FINISH ((yamlbyte_char_t) 0)

Definition at line 29 of file yamlbyte.h.

#define YAMLBYTE_FLOW ((yamlbyte_char_t)'>')

Definition at line 55 of file yamlbyte.h.

#define YAMLBYTE_INDENT ((yamlbyte_char_t)'i')

Definition at line 45 of file yamlbyte.h.

#define YAMLBYTE_INLINE_MAPPING ((yamlbyte_char_t)'{')

Definition at line 59 of file yamlbyte.h.

#define YAMLBYTE_INLINE_SEQUENCE ((yamlbyte_char_t)'[')

Definition at line 60 of file yamlbyte.h.

#define YAMLBYTE_LINE_NUMBER ((yamlbyte_char_t)'#')

Definition at line 48 of file yamlbyte.h.

#define YAMLBYTE_LITERAL ((yamlbyte_char_t)'|')

Definition at line 56 of file yamlbyte.h.

#define YAMLBYTE_MAPPING ((yamlbyte_char_t)'M')

Definition at line 33 of file yamlbyte.h.

Referenced by syck_yaml2byte_handler().

#define YAMLBYTE_NEWLINE ((yamlbyte_char_t)'N')

Definition at line 38 of file yamlbyte.h.

Referenced by syck_yaml2byte_handler().

#define YAMLBYTE_NOTICE ((yamlbyte_char_t)'!')

Definition at line 50 of file yamlbyte.h.

#define YAMLBYTE_NULLCHAR ((yamlbyte_char_t)'Z')

Definition at line 39 of file yamlbyte.h.

Referenced by syck_yaml2byte_handler().

#define YAMLBYTE_PAUSE ((yamlbyte_char_t)'P')

Definition at line 32 of file yamlbyte.h.

#define YAMLBYTE_PLAIN ((yamlbyte_char_t)'p')

Definition at line 58 of file yamlbyte.h.

#define YAMLBYTE_PULL2PUSH | ( |  | pull,
|  |  | producer,
|  |  | push,
|  |  | consumer,
|  |  | result
| ) |  |

Value:

    do {                                                         \
            yamlbyte_pullbuff_t _pull = (pull);                              \
            yamlbyte_pushbuff_t _push = (push);                              \
            yamlbyte_result_t _result = YAMLBYTE_OK;                         \
            yamlbyte_producer_t _producer = (producer);                  \
            yamlbyte_consumer_t _consumer = (consumer);                  \
            while(1) {                                               \
                yamlbyte_buff_t buff = NULL;                           \
                _result = _pull(_producer,&buff);                    \
                if(YAMLBYTE_OK != result || NULL == buff)                \
                    break;                                           \
                _result = _push(_consumer,buff);                     \
                if(YAMLBYTE_OK != result)                                \
                    break;                                           \
            }                                                        \
            (result) = _result;                                      \
        } while(0)

Definition at line 152 of file yamlbyte.h.

#define YAMLBYTE_SCALAR ((yamlbyte_char_t)'S')

Definition at line 36 of file yamlbyte.h.

Referenced by syck_yaml2byte_handler().

#define YAMLBYTE_SEQUENCE ((yamlbyte_char_t)'Q')

Definition at line 34 of file yamlbyte.h.

Referenced by syck_yaml2byte_handler().

#define YAMLBYTE_SINGLE_QUOTED ((yamlbyte_char_t)39)

Definition at line 61 of file yamlbyte.h.

#define YAMLBYTE_SPAN ((yamlbyte_char_t)')')

Definition at line 51 of file yamlbyte.h.

#define YAMLBYTE_STYLE ((yamlbyte_char_t)'s')

Definition at line 46 of file yamlbyte.h.

#define YAMLBYTE_TRANSFER ((yamlbyte_char_t)'T')

Definition at line 42 of file yamlbyte.h.

Referenced by syck_yaml2byte_handler().

#define YAMLBYTE_WHOLE_SCALAR ((yamlbyte_char_t)'<')

Definition at line 49 of file yamlbyte.h.

## Typedef Documentation

typedef const yamlbyte_char_t* yamlbyte_buff_t

Definition at line 88 of file yamlbyte.h.

typedef void* yamlbyte_consumer_t

Definition at line 74 of file yamlbyte.h.

typedef struct yaml_instruction * yamlbyte_inst_t

typedef void* yamlbyte_producer_t

Definition at line 75 of file yamlbyte.h.

typedef yamlbyte_result_t(* yamlbyte_pull_t)(yamlbyte_producer_t self, yamlbyte_inst_t *inst)

Definition at line 118 of file yamlbyte.h.

typedef yamlbyte_result_t(* yamlbyte_pullbuff_t)(yamlbyte_producer_t self, yamlbyte_buff_t *buff)

Definition at line 145 of file yamlbyte.h.

typedef yamlbyte_result_t(* yamlbyte_push_t)(yamlbyte_consumer_t self, yamlbyte_inst_t inst)

Definition at line 105 of file yamlbyte.h.

typedef yamlbyte_result_t(* yamlbyte_pushbuff_t)(yamlbyte_consumer_t self, yamlbyte_buff_t buff)

Definition at line 132 of file yamlbyte.h.

typedef unsigned short yamlbyte_utf16_t

Definition at line 14 of file yamlbyte.h.

typedef unsigned char yamlbyte_utf8_t

Definition at line 13 of file yamlbyte.h.

## Enumeration Type Documentation

enum yamlbyte_result_t

Enumerator:

  YAMLBYTE_OK |
  YAMLBYTE_E_MEMORY |
  YAMLBYTE_E_READ |
  YAMLBYTE_E_WRITE |
  YAMLBYTE_E_OTHER |
  YAMLBYTE_E_PARSE |
  YAMLBYTE_MAX |

Definition at line 78 of file yamlbyte.h.