Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

JDCSVParseMachine Class Reference

#import <JDCSVParseMachine.h>

List of all members.

Public Member Functions

(void) - parseStream:withFieldFactory:

Detailed Description

Jeff Disher
The machine facade which encapsulates all the complexity in the underlying parser. A factory implementing the JDCSVParserDelegate concrete protocol is required to actually use the machine since it contains the logic that this general-purpose parser will call out to so that the user-code can do what is required with the data in its situation.

Member Function Documentation

- (void) parseStream: (NSInputStream *)  stream
withFieldFactory: (NSObject< JDCSVParserDelegate > *)  factory

stream The NSInputStream from which the data will be read for the parse operation (note that the calling code is responsible for opening and closing the stream)
factory The JDCSVParserDelegate concrete protocol implementation which will receive the callbacks from the parsing machine as the stream is read
Once one has a valid factory, this is the only method to interact with the parser. This method will synchronously read the stream, sending callbacks to the factory when externally useful events occur (fields being read, records being completed, errors, etc), and returning once the stream is exhausted (run to EOF).

The documentation for this class was generated from the following file:
Generated on Sun Jun 10 16:41:27 2012 for JDCSVParser by  doxygen 1.4.3