owlps/owlps-positioning/inputcsv.hh

48 lines
652 B
C++

#ifndef _OWLPS_POSITIONING_INPUTCSV_HH_
#define _OWLPS_POSITIONING_INPUTCSV_HH_
#include "inputmedium.hh"
#include <string>
#include <fstream>
class InputCSV: public InputMedium
{
protected:
std::string input_file_name ;
std::ifstream input_file ;
public:
InputCSV(const std::string &filename = "") ;
bool eof(void) const ;
const Request& get_next_request(void) ;
operator bool(void) const ;
} ;
/*** Accesseurs lecture ***/
inline bool InputCSV::eof() const
{
return input_file.eof() ;
}
/*** Opérateurs ***/
inline InputCSV::operator bool() const
{
return input_file ;
}
#endif // _OWLPS_POSITIONING_INPUTCSV_HH_