#include <output.h>

| Public Types | |
| typedef aegis_shared_ptr< output > | pointer | 
| typedef void(* | delete_callback_ty )(output *, void *) | 
| Public Member Functions | |
| virtual | ~output () | 
| virtual nstring | filename () const =0 | 
| long | ftell () const | 
| void | write (const void *data, size_t nbytes) | 
| void | flush () | 
| virtual int | page_width () const | 
| virtual int | page_length () const | 
| void | end_of_line () | 
| virtual const char * | type_name () const =0 | 
| void | fputc (char c) | 
| void | fputs (const char *str) | 
| void | fputs_xml (const char *str, bool paragraphs=false) | 
| void | fputs (string_ty *str) | 
| void | fputs_xml (string_ty *str, bool paragraphs=false) | 
| void | fputs (const nstring &str) | 
| void | fputs_xml (const nstring &str, bool paragraphs=false) | 
| void | fprintf (const char *fmt,...) | 
| void | vfprintf (const char *fmt, va_list) | 
| void | register_delete_callback (functor::pointer fp) | 
| void | unregister_delete_callback (functor::pointer fp) | 
| Protected Member Functions | |
| output () | |
| Private Member Functions | |
| virtual long | ftell_inner () const =0 | 
| virtual void | write_inner (const void *data, size_t length)=0 | 
| virtual void | end_of_line_inner ()=0 | 
| virtual void | flush_inner () | 
| void | overflow (char c) | 
| output (const output &) | |
| output & | operator= (const output &) | 
| Private Attributes | |
| functor_stack | callback | 
| unsigned char * | buffer | 
| size_t | buffer_size | 
| unsigned char * | buffer_position | 
| unsigned char * | buffer_end | 
Definition at line 39 of file output.h.
| typedef aegis_shared_ptr<output> output::pointer | 
| typedef void(* output::delete_callback_ty)(output *, void *) | 
| virtual output::~output | ( | ) |  [virtual] | 
The destructor.
| output::output | ( | ) |  [protected] | 
The default constructor. May only be called by derived classes.
| output::output | ( | const output & | ) |  [private] | 
The copy constructor. Do not use.
| virtual nstring output::filename | ( | ) | const  [pure virtual] | 
The filename method is used to obtain the filename of this output.
Implemented in output_base64, output_bit_bucket, output_bzip2, output_cpio, output_cpio_child, output_cpio_child2, output_file, output_gzip, output_indent, output_memory, output_pager, output_prefix, output_quoted_printable, output_stdout, output_tee, output_to_wide, and output_uuencode.
| long output::ftell | ( | ) | const | 
The ftell method is used to determine the current file position of the output.
| void output::write | ( | const void * | data, | |
| size_t | nbytes | |||
| ) | 
The write method is used to write date to the output.
| void output::flush | ( | ) | 
The flush method is used to ensure that any buffered data is written to the output.
| virtual int output::page_width | ( | ) | const  [virtual] | 
The page_width method is used to obtain the width of the page of the output device.
Reimplemented in output_base64, output_bit_bucket, output_bzip2, output_file, output_gzip, output_indent, output_prefix, output_quoted_printable, output_stdout, output_tee, output_to_wide, and output_uuencode.
| virtual int output::page_length | ( | ) | const  [virtual] | 
The page_length method is used to obtain the length of the page of the output device.
Reimplemented in output_base64, output_bit_bucket, output_bzip2, output_file, output_gzip, output_indent, output_prefix, output_quoted_printable, output_stdout, output_tee, output_to_wide, and output_uuencode.
| void output::end_of_line | ( | ) | 
The end_of_line method is used to ensure that the current output position is at the beginning of a line.
| virtual const char* output::type_name | ( | ) | const  [pure virtual] | 
The type_name method is used to determine the name of this output device or file or type.
Implemented in output_base64, output_bit_bucket, output_bzip2, output_cpio, output_cpio_child, output_cpio_child2, output_file, output_gzip, output_indent, output_memory, output_pager, output_prefix, output_quoted_printable, output_stdout, output_tee, output_to_wide, and output_uuencode.
| void output::fputc | ( | char | c | ) |  [inline] | 
| void output::fputs | ( | const char * | str | ) | 
The fputs method is used to write a NUL terminated string to the output stream.
| str | The string to be written out. | 
| void output::fputs_xml | ( | const char * | str, | |
| bool | paragraphs = false | |||
| ) | 
The fputs method is used to write a NUL terminated string to the output stream, encoding any XML special characters (e.g. "<" becomes "<", etc).
| str | The string to be written out. | |
| paragraphs | If true, insert | 
| void output::fputs | ( | string_ty * | str | ) | 
The fputs method is used to write a string to the output stream.
| str | The string to be written out. | 
| void output::fputs_xml | ( | string_ty * | str, | |
| bool | paragraphs = false | |||
| ) | 
The fputs_xml method is used to write a string to the output stream, encoding any XML special characters (e.g. "<" becomes "<", etc).
| str | The string to be written out. | |
| paragraphs | If true, insert | 
| void output::fputs | ( | const nstring & | str | ) | 
The fputs method is used to write a string to the output stream.
| str | The string to be written out. | 
| void output::fputs_xml | ( | const nstring & | str, | |
| bool | paragraphs = false | |||
| ) | 
The fputs_xml method is used to write a string to the output stream, encoding any XML special characters (e.g. "<" becomes "<", etc).
| str | The string to be written out. | |
| paragraphs | If true, insert | 
| void output::fprintf | ( | const char * | fmt, | |
| ... | ||||
| ) | 
The fprintf method produces output according to a format as described in the printf(3) man page.
| void output::vfprintf | ( | const char * | fmt, | |
| va_list | ||||
| ) | 
The vfprintf method is equivalent to the fprintf method, except that it is called with a va_list instead of a variable number of arguments. This method does not call the va_end macro. Consequently, the value of ap is undefined after the call. The application should call va_end(ap) itself afterwards.
| void output::register_delete_callback | ( | functor::pointer | fp | ) | 
The register_delete_callback method is used to set the callback functor to be called by the destructor.
| void output::unregister_delete_callback | ( | functor::pointer | fp | ) | 
The unregister_delete_callback method is used to forget a callback functor to be called by the destructor.
| virtual long output::ftell_inner | ( | ) | const  [private, pure virtual] | 
The ftell_inner method is used to determine the current file position, without taking the buffering into account.
Implemented in output_base64, output_bit_bucket, output_bzip2, output_cpio, output_cpio_child, output_cpio_child2, output_file, output_gzip, output_indent, output_memory, output_pager, output_prefix, output_quoted_printable, output_stdout, output_tee, output_to_wide, and output_uuencode.
| virtual void output::write_inner | ( | const void * | data, | |
| size_t | length | |||
| ) |  [private, pure virtual] | 
The write_inner method is used write data to the output, without taking the buffering into account.
Implemented in output_base64, output_bit_bucket, output_bzip2, output_cpio, output_cpio_child, output_cpio_child2, output_file, output_gzip, output_indent, output_memory, output_pager, output_prefix, output_quoted_printable, output_stdout, output_tee, output_to_wide, and output_uuencode.
| virtual void output::end_of_line_inner | ( | ) |  [private, pure virtual] | 
The end_of_line_inner method is used to ensure that the current output position is at the beginning of a line, without taking the buffering into account.
Implemented in output_base64, output_bit_bucket, output_bzip2, output_cpio, output_cpio_child, output_cpio_child2, output_file, output_gzip, output_indent, output_memory, output_pager, output_prefix, output_quoted_printable, output_stdout, output_tee, output_to_wide, and output_uuencode.
| virtual void output::flush_inner | ( | ) |  [private, virtual] | 
The flush_inner method is called by the flush method once all the data has been written. The default implementation does nothing.
Reimplemented in output_cpio_child2, output_pager, output_prefix, output_quoted_printable, output_tee, and output_to_wide.
| void output::overflow | ( | char | c | ) |  [private] | 
The overflow mwthod is used by the fputc method when the buffer is full. It write the buffer to the output, and then adds the single character to the buffer.
| functor_stack output::callback  [private] | 
| unsigned char* output::buffer  [private] | 
The buffer instance variable is used to remember the base of a dynamically allocated array of characters used to buffer the data, to minimize the number of systems calls required.
Reimplemented in output_cpio_child2, and output_memory.
| size_t output::buffer_size  [private] | 
| unsigned char* output::buffer_position  [private] | 
| unsigned char* output::buffer_end  [private] | 
 1.5.5
 1.5.5