Simple C Expat Wrapper (SCEW)  1.1.7
printer.h
Go to the documentation of this file.
1 
57 #ifndef PRINTER_H_0901162234
58 #define PRINTER_H_0901162234
59 
60 #include "export.h"
61 
62 #include "writer.h"
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif /* __cplusplus */
67 
73 typedef struct scew_printer scew_printer;
74 
75 
97 extern SCEW_API scew_printer* scew_printer_create (scew_writer *writer);
98 
107 extern SCEW_API void scew_printer_free (scew_printer *printer);
108 
109 
128 extern SCEW_API void scew_printer_set_indented (scew_printer *printer,
129  scew_bool indented);
130 
142 extern SCEW_API void scew_printer_set_indentation (scew_printer *printer,
143  unsigned int spaces);
144 
145 
165 extern SCEW_API scew_writer* scew_printer_set_writer (scew_printer *printer,
166  scew_writer *writer);
180 extern SCEW_API scew_bool scew_printer_print_tree (scew_printer *printer,
181  scew_tree const *tree);
182 
196 extern SCEW_API scew_bool
198  scew_element const *element);
199 
213 extern SCEW_API scew_bool
215  scew_element const *element);
216 
231 extern SCEW_API scew_bool
233  scew_element const *element);
234 
248 extern SCEW_API scew_bool
250  scew_attribute const *attribute);
251 
252 #ifdef __cplusplus
253 }
254 #endif /* __cplusplus */
255 
256 #endif /* PRINTER_H_0901162234 */
SCEW_API scew_writer * scew_printer_set_writer(scew_printer *printer, scew_writer *writer)
Sets the given SCEW writer to the specified printer.
SCEW_API scew_bool scew_printer_print_element_children(scew_printer *printer, scew_element const *element)
Prints the given SCEW element children to the specified printer.
SCEW_API void scew_printer_set_indentation(scew_printer *printer, unsigned int spaces)
Sets the number of spaces to use when indenting output for the given SCEW printer.
SCEW shared library support.
SCEW_API scew_bool scew_printer_print_element(scew_printer *printer, scew_element const *element)
Prints the given SCEW element to the specified printer.
SCEW_API scew_printer * scew_printer_create(scew_writer *writer)
Creates a new SCEW printer that will use the given writer by default.
unsigned char scew_bool
This should be defined using stdbool.h when C99 is available.
Definition: bool.h:35
struct scew_attribute scew_attribute
This is the type declaration for SCEW attributes.
Definition: element.h:63
SCEW_API scew_bool scew_printer_print_element_attributes(scew_printer *printer, scew_element const *element)
Prints the given SCEW element attributes to the specified printer.
SCEW_API scew_bool scew_printer_print_tree(scew_printer *printer, scew_tree const *tree)
Prints the given SCEW tree to the specified printer.
struct scew_writer scew_writer
This is the type delcaration for SCEW writers.
Definition: writer.h:69
SCEW writer common functions.
struct scew_printer scew_printer
This is the type delcaration for the SCEW printer.
Definition: printer.h:73
SCEW_API void scew_printer_free(scew_printer *printer)
Frees the given SCEW printer.
SCEW_API void scew_printer_set_indented(scew_printer *printer, scew_bool indented)
Tells whether the output sent to the given SCEW printer should be indented or not.
struct scew_tree scew_tree
This is the type delcaration for XML trees.
Definition: tree.h:73
SCEW_API scew_bool scew_printer_print_attribute(scew_printer *printer, scew_attribute const *attribute)
Prints the given SCEW attribute to the specified printer.
struct scew_element scew_element
This is the type delcaration for SCEW elements.
Definition: element.h:56