output_file Class Reference
#include <file.h>
Detailed Description
The
output_file class is used to represent the state of an
output stream to a regular file.
Definition at line 32 of file file.h.
Constructor & Destructor Documentation
virtual output_file::~output_file |
( |
|
) |
[virtual] |
output_file::output_file |
( |
const nstring & |
file_name, |
|
|
bool |
binary = false | |
|
) |
| | [private] |
The constructor. It is private on purpose, use one of the open class methods instead.
- Parameters:
-
| file_name | The name of the file to be opened for output. (Make absolutely sure it is not NULL or empty.) |
| binary | Whether the file is binary (true) or text (false). |
output_file::output_file |
( |
|
) |
[private] |
The default constructor. Do not use.
output_file::output_file |
( |
const output_file & |
|
) |
[private] |
The copy constructor. Do not use.
Member Function Documentation
The open class method is used to open an output file.
- Parameters:
-
| fn | The path name of the file to be opened. If the poijnter is NULL or the string is empty, the standard output is used. |
| binary | Wherther or not the file is binary. Defaults to false (i.e. text). |
The text_open class method is used to open a text output file.
- Parameters:
-
| fn | The path name of the file to be opened. If the poijnter is NULL or the string is empty, the standard output is used. |
Definition at line 74 of file file.h.
The text_open class method is used to open a text output file.
- Parameters:
-
| fn | The path name of the file to be opened. If the poijnter is NULL or the string is empty, the standard output is used. |
Definition at line 87 of file file.h.
The binary_open class method is used to open a binary output file.
- Parameters:
-
| fn | The path name of the file to be opened. If the poijnter is NULL or the string is empty, the standard output is used. |
Definition at line 100 of file file.h.
The binary_open class method is used to open a binary output file.
- Parameters:
-
| fn | The path name of the file to be opened. If the poijnter is NULL or the string is empty, the standard output is used. |
Definition at line 113 of file file.h.
nstring output_file::filename |
( |
|
) |
const [protected, virtual] |
The filename method is used to obtain the filename of this output.
Implements output.
const char* output_file::type_name |
( |
|
) |
const [protected, virtual] |
The type_name method is used to determine the name of this output device or file or type.
Implements output.
long output_file::ftell_inner |
( |
|
) |
const [protected, virtual] |
The ftell_inner method is used to determine the current file position, without taking the buffering into account.
Implements output.
void output_file::write_inner |
( |
const void * |
data, |
|
|
size_t |
length | |
|
) |
| | [protected, virtual] |
The write_inner method is used write data to the output, without taking the buffering into account.
Implements output.
void output_file::end_of_line_inner |
( |
|
) |
[protected, 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.
Implements output.
int output_file::page_width |
( |
|
) |
const [protected, virtual] |
The page_width method is used to obtain the width of the page of the output device.
Reimplemented from output.
int output_file::page_length |
( |
|
) |
const [protected, virtual] |
The page_length method is used to obtain the length of the page of the output device.
Reimplemented from output.
The assignment operator. Do not use.
Field Documentation
The file_name instance variable is used to remember the name of the file opened for writing.
Definition at line 145 of file file.h.
The fd instance variable is used to remember the number of the file descriptor opened for writing.
Definition at line 151 of file file.h.
The bol instance variable is used to remember whether or not we are at the start of a line.
Definition at line 157 of file file.h.
The pos instance variable is used to remember the current position in the output file.
Definition at line 163 of file file.h.
The documentation for this class was generated from the following file: