39 lines
788 B
C++
39 lines
788 B
C++
#ifndef _OWLPS_POSITIONING_INPUTLOGCSV_HH_
|
|
#define _OWLPS_POSITIONING_INPUTLOGCSV_HH_
|
|
|
|
#include "inputlogmedium.hh"
|
|
#include "outputfilemedium.hh"
|
|
|
|
/// Log \link Request requests \endlink to a CSV file
|
|
/**
|
|
* CSV format is the same as the one read by InputCSV.
|
|
*/
|
|
class InputLogCSV: public InputLogMedium, public OutputFileMedium
|
|
{
|
|
protected:
|
|
const std::string request_to_csv(const Request &request) const ;
|
|
|
|
public:
|
|
InputLogCSV(const std::string &filename):
|
|
OutputFileMedium(filename) {}
|
|
|
|
/** @name Operations */
|
|
//@{
|
|
bool log_request(const Request &request) ;
|
|
//@}
|
|
} ;
|
|
|
|
|
|
|
|
/* *** Operations *** */
|
|
|
|
|
|
inline bool InputLogCSV::log_request(const Request &request)
|
|
{
|
|
return write_string_to_file(request_to_csv(request)) ;
|
|
}
|
|
|
|
|
|
|
|
#endif // _OWLPS_POSITIONING_INPUTLOGCSV_HH_
|