GDBaseNSTaskOperation Class Reference

The GDBaseNSTaskOperation is a base operation class that executes an NSTask, and can read and store the stdout, and stderr for use after the task executes. More...

#import <GDBaseNSTaskOperation.h>

Inheritance diagram for GDBaseNSTaskOperation:
GDOperation

List of all members.

Public Member Functions

(void) - initializeTask
 Creates the NSTask and stores it into the task property.
(void) - main
 Thread entry point.
(void) - readSTDERR
 Reads the standard error from the NSTask.
(void) - readSTDOUT
 Reads the standard out from the NSTask.
(void) - writeFileForInput
 Writes the file contents to the desired file.
(void) - prepareTask
 A hook you should override to prepate the task instance with it's launch path, arguments, etc.
(void) - updateArguments
 A helper to update the arguments.
(void) - validateTerminationStatus
 A hook you can use to do something with the taskTerminationStatus variable.
(void) - taskComplete
 A hook you should override to do something when this task is complete.

Protected Attributes

BOOL writesFileForTaskInput
 Whether or not a file should be written before the task (not operation) executes.
BOOL readsSTOUT
 Whether or not this task should read standard out.
BOOL readsSTERR
 Whether or not this task should read standard error.
int taskTerminationStatus
 The task's termination status.
NSStringwriteFileContents
 The file contents to write if writesFileForTaskInput is needed.
NSStringfilePathToWriteTo
 The filepath to write to if writesFileForTaskInput is needed.
NSStringEncoding stringEncoding
 The file content encoding.
NSStringstout
 UTF8 String container for the standard out contents.
NSStringsterr
 UTF8 String container for the standard error contents.
NSMutableArray * args
 Task arguments.
NSTask * task
 The NSTask instance used to execute this task.

Detailed Description

The GDBaseNSTaskOperation is a base operation class that executes an NSTask, and can read and store the stdout, and stderr for use after the task executes.


Member Function Documentation

- (void) taskComplete  

A hook you should override to do something when this task is complete.

This method is still executing as part of the operation but after this method finishes the thread will exit.

- (void) updateArguments  

A helper to update the arguments.

All this does is set args on the task.

 [task setArguments:args];

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Properties Defines