FlatFileColumnParseResult Class Reference

Result of scanning for a column in a flat file format buffer. More...

#include <FlatFileParser.h>

List of all members.

Public Types

enum  DelimiterType { NO_DELIM = 0, FIELD_DELIM, ROW_DELIM, MAX_LENGTH }
 Delimiter type encountered during column parse. More...

Public Member Functions

void setResult (DelimiterType type, char *buffer, uint size)
 Sets the fields of a column parse result, based on the result type and the size of the column.

Public Attributes

DelimiterType type
 Delimiter type encountered during parsing.
uint size
 Size of column parsed.
char * next
 Reference to the next column to be parsed.


Detailed Description

Result of scanning for a column in a flat file format buffer.

Definition at line 37 of file FlatFileParser.h.


Member Enumeration Documentation

enum FlatFileColumnParseResult::DelimiterType

Delimiter type encountered during column parse.

Enumerator:
NO_DELIM  No delimiter was found, or delimiter was uncertain.
FIELD_DELIM  Field delimiter was found.
ROW_DELIM  Row delimiter was found.
MAX_LENGTH  Parser read up to maximum length of field.

Definition at line 41 of file FlatFileParser.h.

00041                        {
00043         NO_DELIM = 0,
00045         FIELD_DELIM,
00047         ROW_DELIM,
00049         MAX_LENGTH
00050     };


Member Function Documentation

void FlatFileColumnParseResult::setResult ( DelimiterType  type,
char *  buffer,
uint  size 
)

Sets the fields of a column parse result, based on the result type and the size of the column.

Definition at line 30 of file FlatFileParser.cpp.

References FIELD_DELIM, MAX_LENGTH, next, NO_DELIM, and ROW_DELIM.

Referenced by FlatFileParser::scanColumn(), and FlatFileParser::scanFixedColumn().

00032 {
00033     this->type = type;
00034     this->size = size;
00035 
00036     next = buffer + size;
00037     switch (type) {
00038     case NO_DELIM:
00039     case MAX_LENGTH:
00040         break;
00041     case FlatFileColumnParseResult::FIELD_DELIM:
00042     case FlatFileColumnParseResult::ROW_DELIM:
00043         next++;
00044         break;
00045     default:
00046         permAssert(false);
00047     }
00048 }


Member Data Documentation

DelimiterType FlatFileColumnParseResult::type

Delimiter type encountered during parsing.

Definition at line 55 of file FlatFileParser.h.

Referenced by FlatFileExecStreamTest::checkColumnScan(), and FlatFileParser::scanRow().

uint FlatFileColumnParseResult::size

Size of column parsed.

Definition at line 60 of file FlatFileParser.h.

Referenced by FlatFileExecStreamTest::checkColumnScan(), and FlatFileParser::scanRow().

char* FlatFileColumnParseResult::next

Reference to the next column to be parsed.

Definition at line 65 of file FlatFileParser.h.

Referenced by FlatFileExecStreamTest::checkColumnScan(), FlatFileParser::scanRow(), and setResult().


The documentation for this class was generated from the following files:
Generated on Mon Jun 22 04:00:32 2009 for Fennel by  doxygen 1.5.1