UJO Data Object Notation  0.9.1
C API
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
UJO Writer: Write ujo data.

Functions

ujoError ujo_new_memory_writer (ujo_writer **w)
 Create a new memory writer. More...
 
ujoError ujo_new_file_writer (ujo_writer **w, const char *filename)
 Create a new file writer. More...
 
ujoError ujo_free_writer (ujo_writer *w)
 Dispose a writer object. More...
 
ujoError ujo_writer_get_type (ujo_writer *w, ujoAccessType *type)
 Get the type of a writer object. More...
 
ujoError ujo_writer_get_buffer (ujo_writer *w, ujoByte **buffer, size_t *bytes)
 Access the writer memory buffer. More...
 
ujoError ujo_writer_list_open (ujo_writer *w)
 Open a list. More...
 
ujoError ujo_writer_list_close (ujo_writer *w)
 Close a list. More...
 
ujoError ujo_writer_map_open (ujo_writer *w)
 Open a map. More...
 
ujoError ujo_writer_map_close (ujo_writer *w)
 Close a map. More...
 
ujoError ujo_writer_add_int64 (ujo_writer *w, int64_t value)
 Write a 64bit signed integer. More...
 
ujoError ujo_writer_add_int32 (ujo_writer *w, int32_t value)
 Write a 32bit signed integer. More...
 
ujoError ujo_writer_add_int16 (ujo_writer *w, int16_t value)
 Write a 16bit signed integer. More...
 
ujoError ujo_writer_add_int8 (ujo_writer *w, int8_t value)
 Write a 8bit signed integer. More...
 
ujoError ujo_writer_add_none (ujo_writer *w)
 Write None value. More...
 
ujoError ujo_writer_add_null (ujo_writer *w, ujoTypeId type)
 Write Null value. More...
 
ujoError ujo_writer_add_float16 (ujo_writer *w, float32_t value)
 Write a 16bit float value. More...
 
ujoError ujo_writer_add_float32 (ujo_writer *w, float32_t value)
 Write a 32bit float value. More...
 
ujoError ujo_writer_add_float64 (ujo_writer *w, float64_t value)
 Write a 64bit float value. More...
 
ujoError ujo_writer_add_bool (ujo_writer *w, ujoBool value)
 Write a boolean value. More...
 
ujoError ujo_writer_add_uint64 (ujo_writer *w, uint64_t value)
 Write a 64bit unsigned integer. More...
 
ujoError ujo_writer_add_uint32 (ujo_writer *w, uint32_t value)
 Write a 32bit unsigned integer. More...
 
ujoError ujo_writer_add_uint16 (ujo_writer *w, uint16_t value)
 Write a 16bit unsigned integer. More...
 
ujoError ujo_writer_add_uint8 (ujo_writer *w, uint8_t value)
 Write a 8bit unsigned integer. More...
 
ujoError ujo_writer_add_uxtime (ujo_writer *w, int64_t t)
 Write a Unix date/time. More...
 
ujoError ujo_writer_add_date (ujo_writer *w, const ujoDateTime dt)
 Write a date structure. More...
 
ujoError ujo_writer_add_time (ujo_writer *w, const ujoDateTime dt)
 Write a time structure. More...
 
ujoError ujo_writer_add_timestamp (ujo_writer *w, const ujoDateTime dt)
 Write a timestamp structure. More...
 
ujoError ujo_writer_add_string_c (ujo_writer *w, const char *s)
 Write a \x00 terminated c string;. More...
 
ujoError ujo_writer_add_string_u8 (ujo_writer *w, const uint8_t *s, size_t n)
 Write a unicode UTF-8 string. More...
 
ujoError ujo_writer_add_string_u16 (ujo_writer *w, const uint16_t *s, size_t n)
 Write a unicode UTF-16 string. More...
 
ujoError ujo_writer_add_string_u32 (ujo_writer *w, const uint32_t *s, size_t n)
 Write a unicode UTF-32 string. More...
 
ujoError ujo_writer_add_binary (ujo_writer *w, uint8_t t, const uint8_t *d, uint32_t n)
 Write binary data. More...
 
ujoError ujo_writer_table_open (ujo_writer *w)
 Open a table. More...
 
ujoError ujo_writer_table_end_columns (ujo_writer *w)
 End of table columns. More...
 
ujoError ujo_writer_table_close (ujo_writer *w)
 Close a table. More...
 

Detailed Description

The writer object creates a new document and writes the data to destination depending on the writer type.