owlps/owlps-positioning/src/topologyreadercsv.hh
Matteo Cypriani 338e4f7dcd [Positioning] Code cleaning around CSV data reading
CSVFileReader: Add function read_point3d().

Point3D: Add function set_coordinates(float[3]).

posexcept: Rename malformed_topology -> malformed_input_data.

TopologyReaderCSV:
- Use CSVFileReader::read_point3d() instead of the custom read_point().
- Rename occurrences of malformed_topology.
2011-03-16 14:36:24 +01:00

37 lines
854 B
C++

#ifndef _OWLPS_POSITIONING_TOPOLOGYREADERCSV_HH_
#define _OWLPS_POSITIONING_TOPOLOGYREADERCSV_HH_
class Point3D ;
#include "csvfilereader.hh"
#include <string>
/// \brief Reads and registers to the Stock Area and Waypoint lists
/// from CSV files
/**
* CSV format for areas is:
* Building name;Room name;X1;Y1;Z1;X2;Y2;Z2
*
* CSV format for waypoints is:
* X;Y;Z;Building name #1[;Building name #2[…[;Building name \#n]]]
*/
class TopologyReaderCSV
{
protected:
CSVFileReader areas_file ;
CSVFileReader waypoints_file ;
void read_topology(void) ;
void process_area_line(void) ;
void process_waypoint_line(void) ;
public:
TopologyReaderCSV(const std::string &areas_file_name,
const std::string &waypoints_file_name) ;
~TopologyReaderCSV(void) {}
} ;
#endif // _OWLPS_POSITIONING_TOPOLOGYREADERCSV_HH_