Public Member Functions | |
CP_Parser (bool inStripQuotes=false) | |
CP_Parser (const CP_String &inData, const CP_String &inSeperator=",", bool inStripQuotes=false) | |
CP_Parser (const CP_FileSystemSpec &inFile, const CP_String &inSeperator=",", bool inStripQuotes=false) | |
virtual | ~CP_Parser () |
CP_String | GetSeperator () |
void | SetSeperator (const CP_String &inSeperator) |
bool | Parse () |
bool | Parse (const CP_String &inData, const CP_String &inSeperator=",", bool inStripQuotes=false) |
bool | ParseFile (const CP_FileSystemSpec &inFileSpec, const CP_String &inSeperator=",") |
UInt32 | GetCount () |
bool | GetFieldData (UInt32 inFieldIndex, CP_String &inFieldData) |
bool | GetFieldData (UInt32 inFieldIndex, char *inBuffer, SInt32 inMaxBufferLength, SInt32 *inOutActualDataLength) |
CP_ParsedField * | GetField (UInt32 inFieldIndex) |
void | Reset () |
Protected Member Functions | |
bool | IsSeperator (char inchar) |
bool | LoadFile (const CP_FileSystemSpec &inFileSpec) |
Protected Attributes | |
CP_ParsedField_Array | fFields |
bool | fStripQuotes |
CP_String | fSeperator |
CP_String | fData |
|
Constructor.
|
|
Constructor.
|
|
Constructor.
|
|
Destructor. |
|
Return a CP_String containing the list of seperators that can be used with the data string for this class. |
|
Sets the seperators that can be recognized between field data. |
|
Parse the data contained in the data field. This will construct a list of CP_ParsedField object for every field seperated by a valid seperator that is contained in the fSeperator string data. Returns true if we were able to parse the string. |
|
Parse the data contained in the data field. This will construct a list of CP_ParsedField object for every field seperated by a valid seperator that is contained in the inSeperator string data. Returns true if we were able to parse the string.
|
|
Parse the data contained in the inFileSpec file. This will construct a list of CP_ParsedField object for every field seperated by a valid seperator that is contained in the file. Returns true if we were able to parse the string.
|
|
Return the number of fields found. |
|
Returns a fields data at inFieldIndex in the passed in CP_String. Returns true if that field exists.
|
|
Return the fields data into the passed in buffer. Returns true if the buffer has valid data.
|
|
Return the CP_ParsedField * at inFieldIndex.
|
|
Delete any previously parsed CP_ParsedField object. |
|
Return true if the passed in char is a valid seperator.
|
|
Load the field to be parsed contained in inFileSpec. Returns true if the file was able to be loaded.
|
|
List of the fields found. |
|
Flag to indicate how quotes are handled. |
|
A CP_String containing all of the valid seperators for the data to be parsed. |
|
A CP_String containing the data to parse. |