This is the bare functionality (intended to be inherited from along with ProgramBase or some derivative) for a program that might generate an output file. More...
#include "withOutputFile.h"
Public Member Functions | |
WithOutputFile (bool allow_last_param, bool allow_stdout, bool binary_output) | |
void | close_output () |
Closes the output stream previously opened by get_output(). More... | |
std::ostream & | get_output () |
Returns an output stream that corresponds to the user's intended egg file output–either stdout, or the named output file. More... | |
Filename | get_output_filename () const |
If has_output_filename() returns true, this is the filename that the user specified. More... | |
bool | has_output_filename () const |
Returns true if the user specified an output filename, false otherwise (e.g. More... | |
This is the bare functionality (intended to be inherited from along with ProgramBase or some derivative) for a program that might generate an output file.
This provides the has_output_filename() and get_output_filename() methods.
Definition at line 29 of file withOutputFile.h.
void WithOutputFile::close_output | ( | ) |
Closes the output stream previously opened by get_output().
A subsequent call to get_output() will open a new stream.
Definition at line 106 of file withOutputFile.cxx.
std::ostream & WithOutputFile::get_output | ( | ) |
Returns an output stream that corresponds to the user's intended egg file output–either stdout, or the named output file.
Definition at line 50 of file withOutputFile.cxx.
Referenced by DXFPoints::done_entity(), and EggWriter::write_egg_file().
Filename WithOutputFile::get_output_filename | ( | ) | const |
If has_output_filename() returns true, this is the filename that the user specified.
Otherwise, it returns the empty string.
Definition at line 131 of file withOutputFile.cxx.
Referenced by ImageWriter::write_image().
bool WithOutputFile::has_output_filename | ( | ) | const |
Returns true if the user specified an output filename, false otherwise (e.g.
the output file is implicitly stdout).
Definition at line 122 of file withOutputFile.cxx.