Used to parse files delimited in the way found in a typical Complete Genomics export file. More...
#include <DelimitedFile.hpp>
| Public Types | |
| enum | FieldParserType { REQUIRED = 0, OPTIONAL = 1 } | 
| typedef DelimitedFileMetadata | Metadata | 
| typedef DelimitedLineParser::EmptyFieldHandling | EmptyFieldHandling | 
| Public Member Functions | |
| DelimitedFile (std::istream &in, char delimiter= '\t', EmptyFieldHandling emptyHandling=DelimitedLineParser::PROCESS_EMPTY_FIELDS) | |
| template<class Field > | |
| void | addField (const Field &parser, FieldParserType ft=REQUIRED) | 
| void | addAllFields (std::vector< std::string > &fields) | 
| bool | next () | 
| const Metadata & | getMetadata () const | 
| const std::vector< std::string > & | getColumnHeaders () const | 
| size_t | getFieldOffset (const std::string &fieldName) const | 
| bool | hasField (const std::string &fieldName) const | 
| DelimitedLineParser & | getDelimitedLineParser () | 
| const std::string & | getLine () const | 
Used to parse files delimited in the way found in a typical Complete Genomics export file.
Example:
string chromosome; uint32_t offset; DelimitedFile df(cin); df.addField(StringField("chromosome", &chromosome)); df.addField(ValueField<uint32_t>("offset", &offset)); while (df.next()) cout << chromosome << "\t" << offset << endl;
 1.6.2
 1.6.2