#include <FileSink.h>
Inheritance diagram for FileSink:


Definition at line 57 of file FileSink.h.
Public Member Functions | |
| FileSink (const char *name) throw ( Exception ) | |
| Constructor by a file name. | |
| FileSink (const FileSink &fsink) throw ( Exception ) | |
| Copy constructor. | |
| virtual | ~FileSink (void) throw ( Exception ) |
| Destructor. | |
| virtual FileSink & | operator= (const FileSink &fs) throw ( Exception ) |
| Assignment operator. | |
| const char * | getFileName (void) const throw () |
| Get the file name this FileSink represents. | |
| virtual bool | exists (void) const throw () |
| Check for the existence of the file this FileSink represents. | |
| virtual bool | create (void) throw ( Exception ) |
| Create the file. | |
| virtual bool | open (void) throw ( Exception ) |
| Open the file. | |
| virtual bool | isOpen (void) const throw () |
| Check if the FileSink is open. | |
| virtual bool | canWrite (unsigned int sec, unsigned int usec) throw ( Exception ) |
| Check if the FileSink is ready to accept data. | |
| virtual unsigned int | write (const void *buf, unsigned int len) throw ( Exception ) |
| Write data to the FileSink. | |
| virtual void | flush (void) throw ( Exception ) |
| This is a no-op in this FileSink. | |
| virtual void | close (void) throw ( Exception ) |
| Close the FileSink. | |
Protected Member Functions | |
| FileSink (void) throw ( Exception ) | |
| Default constructor. | |
Protected Attributes | |
| int | fileDescriptor |
| Low-level file descriptor for the file represented by this object. | |
|
|
Default constructor. Always throws an Exception.
Definition at line 97 of file FileSink.h. |
|
|
Constructor by a file name.
Definition at line 112 of file FileSink.h. |
|
|
Copy constructor.
Definition at line 134 of file FileSink.cpp. References fileDescriptor. |
|
|
Destructor.
Definition at line 131 of file FileSink.h. |
|
||||||||||||
|
Check if the FileSink is ready to accept data. Blocks until the specified time for data to be available.
Implements Sink. Definition at line 241 of file FileSink.cpp. |
|
|
Close the FileSink.
Implements Sink. Definition at line 298 of file FileSink.cpp. References fileDescriptor, flush(), and isOpen(). |
|
|
Create the file.
Definition at line 200 of file FileSink.cpp. References isOpen(), and Reporter::reportEvent(). |
|
|
Check for the existence of the file this FileSink represents.
Definition at line 184 of file FileSink.cpp. |
|
|
This is a no-op in this FileSink.
Implements Sink. Definition at line 226 of file FileSink.h. Referenced by close(). |
|
|
Get the file name this FileSink represents.
Definition at line 152 of file FileSink.h. |
|
|
Check if the FileSink is open.
Implements Sink. Definition at line 190 of file FileSink.h. References fileDescriptor. |
|
|
Open the file. Truncates the file.
Implements Sink. Definition at line 222 of file FileSink.cpp. References fileDescriptor, and isOpen(). |
|
|
Assignment operator.
Definition at line 154 of file FileSink.cpp. References fileDescriptor, and Sink::operator=(). |
|
||||||||||||
|
Write data to the FileSink.
Implements Sink. Definition at line 271 of file FileSink.cpp. |
|
|
Low-level file descriptor for the file represented by this object.
Definition at line 89 of file FileSink.h. Referenced by close(), FileSink(), isOpen(), open(), and operator=(). |
1.4.1