#import <HBOutputRedirect.h>
List of all members.
Detailed Description
This class is used to redirect stdout and stderr outputs. It is never created directly; stdoutRedirect and stderrRedirect class methods should be use instead.
- Note:
- Redirection is done by replacing
_write functions for stdout and stderr streams. Because of this messages written by NSLog(), for example are not redirected. I consider this a good thing, but if more universal redirecting is needed, it can be done at file descriptor level.
Member Function Documentation
| - (void) addListener: |
|
(id) |
aListener |
|
|
Adds specified object as listener for this output. Method stdoutRedirect: or stderrRedirect: of the listener is called to redirect the output.
| - (void) forwardOutput: |
|
(NSData *) |
data |
|
|
| - (id) initWithStream: |
|
(FILE *) |
aStream |
| selector: |
|
(SEL) |
aSelector | |
|
|
| | |
| - (void) removeListener: |
|
(id) |
aListener |
|
|
Stops forwarding for this output to the specified listener object.
Member Data Documentation
Selector that is called on listeners to forward the output.
Set that contains all registered listeners for this output.
- (NSLock*) lock [protected] |
- (int(* oldWriteFunc)(void *, const char *, int)) [protected] |
Pointer to old write function for the stream.
Output stream (stdout or stderr) redirected by this object.
The documentation for this class was generated from the following files: