|
hgl 0.5.42~wheezy
A compiler/interpreter suite for developing images (plugin development)
|
A simple exception safe writer for image output plugins. More...
#include "writer.h"
Public Member Functions | |
| Writer (const std::string &filename, const char *const suffix=0L) throw (ImageOutputException) | |
Constructs an Writer and initializes it for use. | |
| ~Writer () | |
| Closes the file. | |
| void | endWrite () |
| Indicates a successful end of write of the file. | |
| void | endWrite (bool noClose) |
| Indicates a successful end of write of the file. | |
| FILE * | getFile () const |
| Gets a pointer to the FILE structure of the file. | |
| int | getHandle () const |
| Gets the file handle of the file. | |
| operator FILE * () const | |
| Gets a pointer to the FILE structure of the file. | |
| Writer & | operator<< (const std::string &s) throw (ImageOutputException) |
| Writes a string into the file. | |
| Writer & | operator<< (float f) throw (ImageOutputException) |
| Writes a float into the file. | |
A simple exception safe writer for image output plugins.
| HGL::ImageOutput::Writer::Writer | ( | const std::string & | filename, |
| const char *const | suffix = 0L |
||
| ) | throw (ImageOutputException) |
Constructs an Writer and initializes it for use.
This writer opens the file or throws an ImageOutputException if it failed.
| ImageOutputException | if the file could not get created |
| filename | the filename or an empty string for output to stdout |
| suffix | appends suffix if not NULL and not given |
| HGL::ImageOutput::Writer::~Writer | ( | ) |
| void HGL::ImageOutput::Writer::endWrite | ( | ) |
Indicates a successful end of write of the file.
If no call to this function is done before Writer gets destroyed it will delete the file.
| void HGL::ImageOutput::Writer::endWrite | ( | bool | noClose | ) |
Indicates a successful end of write of the file.
If no call to this function is done before Writer gets destroyed it will delete the file.
| noClose | true if the file needs not to get closed, false otherwise |
| FILE* HGL::ImageOutput::Writer::getFile | ( | ) | const |
Gets a pointer to the FILE structure of the file.
| int HGL::ImageOutput::Writer::getHandle | ( | ) | const |
Gets the file handle of the file.
| HGL::ImageOutput::Writer::operator FILE * | ( | ) | const |
Gets a pointer to the FILE structure of the file.
| Writer& HGL::ImageOutput::Writer::operator<< | ( | const std::string & | s | ) | throw (ImageOutputException) |
Writes a string into the file.
| s | the string to write |
1.8.1.2