Functions | Variables

ext/psych/emitter.c File Reference

#include <psych.h>
Include dependency graph for emitter.c:

Go to the source code of this file.

Functions

static void emit (yaml_emitter_t *emitter, yaml_event_t *event)
static int writer (void *ctx, unsigned char *buffer, size_t size)
static void dealloc (yaml_emitter_t *emitter)
static VALUE allocate (VALUE klass)
static VALUE initialize (VALUE self, VALUE io)
static VALUE start_stream (VALUE self, VALUE encoding)
static VALUE end_stream (VALUE self)
static VALUE start_document (VALUE self, VALUE version, VALUE tags, VALUE imp)
static VALUE end_document (VALUE self, VALUE imp)
static VALUE scalar (VALUE self, VALUE value, VALUE anchor, VALUE tag, VALUE plain, VALUE quoted, VALUE style)
static VALUE start_sequence (VALUE self, VALUE anchor, VALUE tag, VALUE implicit, VALUE style)
static VALUE end_sequence (VALUE self)
static VALUE start_mapping (VALUE self, VALUE anchor, VALUE tag, VALUE implicit, VALUE style)
static VALUE end_mapping (VALUE self)
static VALUE alias (VALUE self, VALUE anchor)
static VALUE set_canonical (VALUE self, VALUE style)
static VALUE canonical (VALUE self)
static VALUE set_indentation (VALUE self, VALUE level)
static VALUE indentation (VALUE self)
void Init_psych_emitter ()

Variables

VALUE cPsychEmitter
static ID id_write

Function Documentation

static VALUE alias ( VALUE  self,
VALUE  anchor 
) [static]

Definition at line 318 of file emitter.c.

References Data_Get_Struct, emit(), NIL_P, NULL, and StringValuePtr.

static VALUE allocate ( VALUE  klass  )  [static]

Definition at line 26 of file emitter.c.

References Data_Wrap_Struct, dealloc(), and malloc.

Referenced by Init_psych_emitter().

static VALUE canonical ( VALUE  self  )  [static]

Definition at line 352 of file emitter.c.

References Data_Get_Struct, and Qfalse.

Referenced by Init_psych_emitter().

static void dealloc ( yaml_emitter_t *  emitter  )  [static]

Definition at line 20 of file emitter.c.

References free.

Referenced by allocate().

static void emit ( yaml_emitter_t *  emitter,
yaml_event_t *  event 
) [static]
static VALUE end_document ( VALUE  self,
VALUE  imp 
) [static]

Definition at line 161 of file emitter.c.

References Data_Get_Struct, and emit().

Referenced by Init_psych_emitter().

static VALUE end_mapping ( VALUE  self  )  [static]

Definition at line 299 of file emitter.c.

References Data_Get_Struct, and emit().

Referenced by Init_psych_emitter().

static VALUE end_sequence ( VALUE  self  )  [static]

Definition at line 249 of file emitter.c.

References Data_Get_Struct, and emit().

Referenced by Init_psych_emitter().

static VALUE end_stream ( VALUE  self  )  [static]

Definition at line 76 of file emitter.c.

References Data_Get_Struct, and emit().

Referenced by Init_psych_emitter().

static VALUE indentation ( VALUE  self  )  [static]

Definition at line 378 of file emitter.c.

References Data_Get_Struct, and INT2NUM().

Referenced by Init_psych_emitter().

void Init_psych_emitter (  ) 
static VALUE initialize ( VALUE  self,
VALUE  io 
) [static]

Definition at line 40 of file emitter.c.

References Data_Get_Struct, and writer().

Referenced by Init_psych_emitter().

static VALUE scalar ( VALUE  self,
VALUE  value,
VALUE  anchor,
VALUE  tag,
VALUE  plain,
VALUE  quoted,
VALUE  style 
) [static]

Definition at line 181 of file emitter.c.

References Check_Type, Data_Get_Struct, emit(), NIL_P, NULL, NUM2INT, RSTRING_LEN, StringValuePtr, and T_STRING.

Referenced by Init_psych_emitter().

static VALUE set_canonical ( VALUE  self,
VALUE  style 
) [static]

Definition at line 338 of file emitter.c.

References Data_Get_Struct, and Qtrue.

Referenced by Init_psych_emitter().

static VALUE set_indentation ( VALUE  self,
VALUE  level 
) [static]

Definition at line 364 of file emitter.c.

References Data_Get_Struct, and NUM2INT.

Referenced by Init_psych_emitter().

static VALUE start_document ( VALUE  self,
VALUE  version,
VALUE  tags,
VALUE  imp 
) [static]
static VALUE start_mapping ( VALUE  self,
VALUE  anchor,
VALUE  tag,
VALUE  implicit,
VALUE  style 
) [static]

Definition at line 269 of file emitter.c.

References Data_Get_Struct, emit(), NIL_P, NULL, NUM2INT, and StringValuePtr.

Referenced by Init_psych_emitter().

static VALUE start_sequence ( VALUE  self,
VALUE  anchor,
VALUE  tag,
VALUE  implicit,
VALUE  style 
) [static]

Definition at line 219 of file emitter.c.

References Data_Get_Struct, emit(), NIL_P, NULL, NUM2INT, and StringValuePtr.

Referenced by Init_psych_emitter().

static VALUE start_stream ( VALUE  self,
VALUE  encoding 
) [static]

Definition at line 56 of file emitter.c.

References Check_Type, Data_Get_Struct, emit(), NUM2INT, and T_FIXNUM.

Referenced by Init_psych_emitter().

static int writer ( void *  ctx,
unsigned char *  buffer,
size_t  size 
) [static]

Definition at line 12 of file emitter.c.

References id_write, NUM2INT, rb_funcall(), and rb_str_new().

Referenced by initialize().


Variable Documentation

Definition at line 3 of file emitter.c.

Referenced by Init_psych_emitter().

ID id_write [static]

Definition at line 4 of file emitter.c.

Referenced by Init_psych_emitter(), and writer().