owlps/owlps-positioner/topologyreadercsv.hh

51 lines
1.4 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
* https://code.lm7.fr/mcy/owlps/src/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_TOPOLOGYREADERCSV_HH_
#define _OWLPS_POSITIONING_TOPOLOGYREADERCSV_HH_
class Point3D ;
#include "csvfilereader.hh"
#include <string>
/// 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_