A class that parses delimited lines. More...
#include <DelimitedLineParser.hpp>
| Public Types | |
| enum | EmptyFieldHandling { PROCESS_EMPTY_FIELDS = 0, SKIP_EMPTY_FIELDS = 1 } | 
| Enumeration to describe how empty fields are handled in DelimitedLineParser::parseLine().More... | |
| typedef std::vector < boost::shared_ptr < DelimitedFieldParser > > | Fields | 
| Public Member Functions | |
| DelimitedLineParser () | |
| Construct a DelimitedLineParser with no fields. | |
| template<class Field > | |
| DelimitedLineParser & | addField (const Field &field) | 
| Adds another DelimitedFieldParser to this DelimitedLineParser. | |
| template<class Field > | |
| DelimitedLineParser & | setField (size_t offset, const Field &field) | 
| Overrides the DelimitedFieldParser at a given field offset. | |
| void | parseLine (std::string &line, char delimiter= '\t', EmptyFieldHandling emptyHandling=PROCESS_EMPTY_FIELDS) | 
| Parses the given line. | |
| const Fields & | getFields () const | 
| Provides read-only access to the list of currently defined fields. | |
| Friends | |
| class | DelimitedFile | 
A class that parses delimited lines.
Enumeration to describe how empty fields are handled in DelimitedLineParser::parseLine().
| DelimitedLineParser& cgatools::util::DelimitedLineParser::addField | ( | const Field & | field | ) |  [inline] | 
Adds another DelimitedFieldParser to this DelimitedLineParser.
The DelimitedFieldParsers must be added in order from left to right.
| void cgatools::util::DelimitedLineParser::parseLine | ( | std::string & | line, | |
| char | delimiter = '\t', | |||
| EmptyFieldHandling | emptyHandling = PROCESS_EMPTY_FIELDS | |||
| ) | 
Parses the given line.
During processing, the delimiter character is modified to be a null, but the line is returned to its original self when the function returns.
 1.6.2
 1.6.2