45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
/*
|
|
* This file is part of the Owl Positioning System (OwlPS) project.
|
|
* It is subject to the copyright notice and license terms in the
|
|
* COPYRIGHT.t2t file found in the top-level directory of this
|
|
* distribution and at
|
|
* http://code.lm7.fr/p/owlps/source/tree/master/COPYRIGHT.t2t
|
|
* No part of the OwlPS Project, including this file, may be copied,
|
|
* modified, propagated, or distributed except according to the terms
|
|
* contained in the COPYRIGHT.t2t file; the COPYRIGHT.t2t file must be
|
|
* distributed along with this file, either separately or by replacing
|
|
* this notice by the COPYRIGHT.t2t file's contents.
|
|
*/
|
|
|
|
|
|
#ifndef _OWLPS_POSITIONING_CSVFILEREADER_HH_
|
|
#define _OWLPS_POSITIONING_CSVFILEREADER_HH_
|
|
|
|
#include "textfilereader.hh"
|
|
#include "csvstringreader.hh"
|
|
|
|
/// Reads a CSV file, line by line, field by field
|
|
class CSVFileReader: public TextFileReader, public CSVStringReader
|
|
{
|
|
protected:
|
|
std::string current_line ;
|
|
|
|
void print_error_cast(void) const ;
|
|
|
|
public:
|
|
CSVFileReader(const std::string &filename,
|
|
const char _separator = ';'):
|
|
TextFileReader(filename), CSVStringReader(_separator) {}
|
|
|
|
|
|
/** @name Operations */
|
|
//@{
|
|
/// Loads the first next non-blank line
|
|
bool next_line(void) ;
|
|
//@}
|
|
} ;
|
|
|
|
|
|
|
|
#endif // _OWLPS_POSITIONING_CSVFILEREADER_HH_
|