Ruby  1.9.3p551(2014-11-13revision48407)
Functions | Variables
emitter.c File Reference
#include <psych.h>

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 (void *ptr)
 
static VALUE allocate (VALUE klass)
 
static VALUE initialize (int argc, VALUE *argv, VALUE self)
 
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)
 
static VALUE line_width (VALUE self)
 
static VALUE set_line_width (VALUE self, VALUE width)
 
void Init_psych_emitter ()
 

Variables

VALUE cPsychEmitter
 
static ID id_write
 
static ID id_line_width
 
static ID id_indentation
 
static ID id_canonical
 

Function Documentation

static VALUE alias ( VALUE  self,
VALUE  anchor 
)
static
static VALUE allocate ( VALUE  klass)
static

Definition at line 32 of file emitter.c.

References Data_Wrap_Struct(), dealloc(), and xmalloc.

Referenced by Init_psych_emitter().

static VALUE canonical ( VALUE  self)
static

Definition at line 446 of file emitter.c.

References Data_Get_Struct, Qfalse, and Qtrue.

Referenced by Init_psych_emitter(), and initialize().

static void dealloc ( void ptr)
static

Definition at line 23 of file emitter.c.

References xfree.

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 197 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 386 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 319 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 100 of file emitter.c.

References Data_Get_Struct, and emit().

Referenced by Init_psych_emitter().

static VALUE indentation ( VALUE  self)
static

Definition at line 473 of file emitter.c.

References Data_Get_Struct, and INT2NUM().

Referenced by Init_psych_emitter().

void Init_psych_emitter ( )
static VALUE initialize ( int  argc,
VALUE argv,
VALUE  self 
)
static
static VALUE line_width ( VALUE  self)
static

Definition at line 485 of file emitter.c.

References Data_Get_Struct, and INT2NUM().

Referenced by Init_psych_emitter(), and initialize().

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

Definition at line 432 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 459 of file emitter.c.

References Data_Get_Struct, level, and NUM2INT.

Referenced by Init_psych_emitter().

static VALUE set_line_width ( VALUE  self,
VALUE  width 
)
static

Definition at line 497 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
static VALUE start_sequence ( VALUE  self,
VALUE  anchor,
VALUE  tag,
VALUE  implicit,
VALUE  style 
)
static
static VALUE start_stream ( VALUE  self,
VALUE  encoding 
)
static

Definition at line 80 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 15 of file emitter.c.

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

Referenced by initialize().

Variable Documentation

VALUE cPsychEmitter

Definition at line 3 of file emitter.c.

Referenced by Init_psych_emitter().

ID id_canonical
static

Definition at line 7 of file emitter.c.

Referenced by Init_psych_emitter(), and initialize().

ID id_indentation
static

Definition at line 6 of file emitter.c.

Referenced by Init_psych_emitter(), and initialize().

ID id_line_width
static

Definition at line 5 of file emitter.c.

Referenced by Init_psych_emitter(), and initialize().

ID id_write
static

Definition at line 4 of file emitter.c.

Referenced by Init_psych_emitter(), and writer().