HGL::ImageOutput::Writer Class Reference
[Image output plugins]
A simple exception safe writer for image output plugins.
More...
#include <writer.h>
List of all members.
Public Member Functions |
| | Writer (const std::string &filename, const char *suffix=0L) throw (ImageOutputException) |
| | Constructs an Writer and initializes it for use.
|
| | ~Writer () |
| | Closes the file.
|
| void | endWrite (bool noClose) |
| | Indicates a successful end of write of the file.
|
| void | endWrite () |
| | 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<< (float f) throw (ImageOutputException) |
| | Writes a float into the file.
|
| Writer & | operator<< (const std::string &s) throw (ImageOutputException) |
| | Writes a string into the file.
|
Detailed Description
A simple exception safe writer for image output plugins.
- Author:
- Heiko Schäfer <heiko@hgl.rangun.de> BSD License
- Since:
- 0.4.52
- Examples:
-
exampleoutput.cpp.
Constructor & Destructor Documentation
| HGL::ImageOutput::Writer::Writer |
( |
const std::string & |
filename, |
|
|
const char * |
suffix = 0L | |
|
) |
| | throw (ImageOutputException) |
Constructs an Writer and initializes it for use.
This writer opens the file or throws an ImageOutputException if it failed.
- Exceptions:
-
- Parameters:
-
| filename | the filename or an empty string for output to stdout |
| suffix | appends suffix if not NULL and not given |
- Since:
- 0.4.52
| HGL::ImageOutput::Writer::~Writer |
( |
|
) |
|
Closes the file.
If no call to Writer::endWrite was done, it will remove the file.
- Since:
- 0.4.52
Member Function Documentation
| 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.
- Parameters:
-
| noClose | true if the file needs not to get closed, false otherwise |
- Since:
- 0.5.17
| 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.
- Since:
- 0.4.52
| FILE* HGL::ImageOutput::Writer::getFile |
( |
|
) |
const |
Gets a pointer to the FILE structure of the file.
- Returns:
- a pointer to the FILE structure of the file
- Since:
- 0.4.52
| int HGL::ImageOutput::Writer::getHandle |
( |
|
) |
const |
Gets the file handle of the file.
- Returns:
- int the file handle
- Since:
- 0.4.52
| HGL::ImageOutput::Writer::operator FILE * |
( |
|
) |
const |
Gets a pointer to the FILE structure of the file.
- Returns:
- a pointer to the FILE structure of the file
- Since:
- 0.5.4
Writes a float into the file.
- Parameters:
-
- Returns:
- reference to the Writer to concatenate this operator
- Since:
- 0.5.2
Writes a string into the file.
- Parameters:
-
- Returns:
- reference to the Writer to concatenate this operator
- Since:
- 0.4.70