Ion C
C library for Ion
Loading...
Searching...
No Matches
ion_writer.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at:
7 *
8 * http://aws.amazon.com/apache2.0/
9 *
10 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
12 * language governing permissions and limitations under the License.
13 */
14
17#ifndef ION_WRITER_H_
18#define ION_WRITER_H_
19
20#include "ion_types.h"
21#include "ion_platform_config.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
124
125
132
139
145ION_API_EXPORT iERR ion_writer_options_add_shared_imports_symbol_tables(ION_WRITER_OPTIONS *options, ION_SYMBOL_TABLE **imports, SIZE imports_count);
146
152
161ION_API_EXPORT iERR ion_writer_open_buffer (hWRITER *p_hwriter
162 ,BYTE *buffer
163 ,SIZE buf_length
164 ,ION_WRITER_OPTIONS *p_options);
165
166
176ION_API_EXPORT iERR ion_writer_open_stream (hWRITER *p_hwriter
177 ,ION_STREAM_HANDLER fn_output_handler
178 ,void *handler_state
179 ,ION_WRITER_OPTIONS *p_options);
180
181ION_API_EXPORT iERR ion_writer_open (hWRITER *p_hwriter
182 ,ION_STREAM *p_stream
183 ,ION_WRITER_OPTIONS *p_options);
184
185ION_API_EXPORT iERR ion_writer_get_depth (hWRITER hwriter, SIZE *p_depth);
186
187ION_API_EXPORT iERR ion_writer_set_catalog (hWRITER hwriter, hCATALOG hcatalog);
188ION_API_EXPORT iERR ion_writer_get_catalog (hWRITER hwriter, hCATALOG *p_hcatalog);
189
198ION_API_EXPORT iERR ion_writer_set_symbol_table (hWRITER hwriter, hSYMTAB hsymtab);
199ION_API_EXPORT iERR ion_writer_get_symbol_table (hWRITER hwriter, hSYMTAB *p_hsymtab);
200
217ION_API_EXPORT iERR ion_writer_add_imported_tables (hWRITER hwriter, ION_COLLECTION *imports);
218
223ION_API_EXPORT iERR ion_writer_write_field_name (hWRITER hwriter, iSTRING name);
224
229ION_API_EXPORT iERR ion_writer_write_field_name_symbol(hWRITER hwriter, ION_SYMBOL *field_name);
230
231ION_API_EXPORT iERR ion_writer_clear_field_name (hWRITER hwriter);
232
236ION_API_EXPORT iERR ion_writer_add_annotation (hWRITER hwriter, iSTRING annotation);
237
238ION_API_EXPORT iERR ion_writer_add_annotation_symbol(hWRITER hwriter, ION_SYMBOL *annotation);
239ION_API_EXPORT iERR ion_writer_write_annotations (hWRITER hwriter, iSTRING p_annotations, SIZE count);
240ION_API_EXPORT iERR ion_writer_write_annotation_symbols(hWRITER hwriter, ION_SYMBOL *annotations, SIZE count);
241ION_API_EXPORT iERR ion_writer_clear_annotations (hWRITER hwriter);
242
243ION_API_EXPORT iERR ion_writer_write_null (hWRITER hwriter);
244ION_API_EXPORT iERR ion_writer_write_typed_null (hWRITER hwriter, ION_TYPE type);
245ION_API_EXPORT iERR ion_writer_write_bool (hWRITER hwriter, BOOL value);
246ION_API_EXPORT iERR ion_writer_write_int (hWRITER hwriter, int value);
247ION_API_EXPORT iERR ion_writer_write_int32 (hWRITER hwriter, int32_t value);
248ION_API_EXPORT iERR ion_writer_write_int64 (hWRITER hwriter, int64_t value);
249ION_API_EXPORT iERR ion_writer_write_long (hWRITER hwriter, long value);
250ION_API_EXPORT iERR ion_writer_write_ion_int (hWRITER hwriter, ION_INT *value);
251ION_API_EXPORT iERR ion_writer_write_double (hWRITER hwriter, double value);
252ION_API_EXPORT iERR ion_writer_write_float (hWRITER hwriter, float value);
253
257ION_API_EXPORT iERR ion_writer_write_decimal (hWRITER hwriter, decQuad *value);
258ION_API_EXPORT iERR ion_writer_write_ion_decimal (hWRITER hwriter, ION_DECIMAL *value);
259ION_API_EXPORT iERR ion_writer_write_timestamp (hWRITER hwriter, iTIMESTAMP value);
260ION_API_EXPORT iERR ion_writer_write_symbol (hWRITER hwriter, iSTRING p_value);
261ION_API_EXPORT iERR ion_writer_write_ion_symbol (hWRITER hwriter, ION_SYMBOL *symbol);
262ION_API_EXPORT iERR ion_writer_write_string (hWRITER hwriter, iSTRING p_value);
263ION_API_EXPORT iERR ion_writer_write_clob (hWRITER hwriter, BYTE *p_buf, SIZE length);
264ION_API_EXPORT iERR ion_writer_write_blob (hWRITER hwriter, BYTE *p_buf, SIZE length);
265
266ION_API_EXPORT iERR ion_writer_start_lob (hWRITER hwriter, ION_TYPE lob_type);
267ION_API_EXPORT iERR ion_writer_append_lob (hWRITER hwriter, BYTE *p_buf, SIZE length);
268ION_API_EXPORT iERR ion_writer_finish_lob (hWRITER hwriter);
269ION_API_EXPORT iERR ion_writer_start_container (hWRITER hwriter, ION_TYPE container_type);
270ION_API_EXPORT iERR ion_writer_finish_container (hWRITER hwriter);
271
272ION_API_EXPORT iERR ion_writer_write_one_value (hWRITER hwriter, hREADER hreader);
273ION_API_EXPORT iERR ion_writer_write_all_values (hWRITER hwriter, hREADER hreader);
274
281ION_API_EXPORT iERR ion_writer_flush (hWRITER hwriter, SIZE *p_bytes_flushed);
282
289ION_API_EXPORT iERR ion_writer_finish (hWRITER hwriter, SIZE *p_bytes_flushed);
290
296ION_API_EXPORT iERR ion_writer_close (hWRITER hwriter);
297
298#ifdef __cplusplus
299}
300#endif
301
302
303#endif
struct ion_type * ION_TYPE
Definition ion_types.h:69
ION_API_EXPORT iERR ion_writer_options_close_shared_imports(ION_WRITER_OPTIONS *options)
ION_API_EXPORT iERR ion_writer_options_add_shared_imports(ION_WRITER_OPTIONS *options, ION_COLLECTION *imports)
ION_API_EXPORT iERR ion_writer_open_buffer(hWRITER *p_hwriter, BYTE *buffer, SIZE buf_length, ION_WRITER_OPTIONS *p_options)
ION_API_EXPORT iERR ion_writer_options_add_shared_imports_symbol_tables(ION_WRITER_OPTIONS *options, ION_SYMBOL_TABLE **imports, SIZE imports_count)
ION_API_EXPORT iERR ion_writer_close(hWRITER hwriter)
ION_API_EXPORT iERR ion_writer_finish(hWRITER hwriter, SIZE *p_bytes_flushed)
ION_API_EXPORT iERR ion_writer_add_imported_tables(hWRITER hwriter, ION_COLLECTION *imports)
ION_API_EXPORT iERR ion_writer_flush(hWRITER hwriter, SIZE *p_bytes_flushed)
ION_API_EXPORT iERR ion_writer_open_stream(hWRITER *p_hwriter, ION_STREAM_HANDLER fn_output_handler, void *handler_state, ION_WRITER_OPTIONS *p_options)
ION_API_EXPORT iERR ion_writer_options_initialize_shared_imports(ION_WRITER_OPTIONS *options)
ION_API_EXPORT iERR ion_writer_add_annotation(hWRITER hwriter, iSTRING annotation)
ION_API_EXPORT iERR ion_writer_write_field_name(hWRITER hwriter, iSTRING name)
ION_API_EXPORT iERR ion_writer_write_decimal(hWRITER hwriter, decQuad *value)
ION_API_EXPORT iERR ion_writer_set_symbol_table(hWRITER hwriter, hSYMTAB hsymtab)
ION_API_EXPORT iERR ion_writer_write_field_name_symbol(hWRITER hwriter, ION_SYMBOL *field_name)
Definition ion_collection.h:72
Definition ion_decimal.h:89
Definition ion_int.h:100
Definition ion_string.h:40
Definition ion_symbol_table.h:34
Definition ion_timestamp.h:47
Definition ion_writer.h:28
ION_CATALOG * pcatalog
Definition ion_writer.h:89
BOOL indent_with_tabs
Definition ion_writer.h:44
BOOL pretty_print
Definition ion_writer.h:39
BOOL compact_floats
Definition ion_writer.h:116
SIZE temp_buffer_size
Definition ion_writer.h:79
BOOL json_downconvert
Definition ion_writer.h:121
BOOL small_containers_in_line
Definition ion_writer.h:54
SIZE max_container_depth
Definition ion_writer.h:69
SIZE max_annotation_count
Definition ion_writer.h:74
decContext * decimal_context
Definition ion_writer.h:109
BOOL flush_every_value
Definition ion_writer.h:64
SIZE indent_size
Definition ion_writer.h:49
BOOL supress_system_values
Definition ion_writer.h:59
BOOL escape_all_non_ascii
Definition ion_writer.h:34
SIZE allocation_page_size
Definition ion_writer.h:84
ION_COLLECTION encoding_psymbol_table
Definition ion_writer.h:99