2012-02-06 16:44:09 +01:00
|
|
|
/*
|
2013-05-29 18:43:35 +02:00
|
|
|
* 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
|
2013-06-22 23:30:17 +02:00
|
|
|
* this notice by the COPYRIGHT.t2t file's contents.
|
2012-02-06 16:44:09 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2010-04-02 15:49:22 +02:00
|
|
|
#ifndef _OWLPS_POSITIONING_TOPOLOGYREADERCSV_HH_
|
|
|
|
#define _OWLPS_POSITIONING_TOPOLOGYREADERCSV_HH_
|
|
|
|
|
|
|
|
class Point3D ;
|
|
|
|
|
|
|
|
#include "csvfilereader.hh"
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2013-06-04 00:39:10 +02:00
|
|
|
/// Reads and registers to the Stock Area and Waypoint lists from CSV
|
|
|
|
/// files
|
2010-04-02 15:49:22 +02:00
|
|
|
/**
|
2010-04-13 10:47:10 +02:00
|
|
|
* CSV format for areas is:
|
2010-04-02 15:49:22 +02:00
|
|
|
* Building name;Room name;X1;Y1;Z1;X2;Y2;Z2
|
2010-04-13 10:47:10 +02:00
|
|
|
*
|
|
|
|
* CSV format for waypoints is:
|
2010-06-22 09:19:29 +02:00
|
|
|
* X;Y;Z;Building name #1[;Building name #2[…[;Building name \#n]]]
|
2010-04-02 15:49:22 +02:00
|
|
|
*/
|
|
|
|
class TopologyReaderCSV
|
|
|
|
{
|
|
|
|
protected:
|
2010-04-13 10:47:10 +02:00
|
|
|
CSVFileReader areas_file ;
|
|
|
|
CSVFileReader waypoints_file ;
|
2010-04-02 15:49:22 +02:00
|
|
|
|
|
|
|
void read_topology(void) ;
|
2010-04-13 10:47:10 +02:00
|
|
|
void process_area_line(void) ;
|
|
|
|
void process_waypoint_line(void) ;
|
2010-04-02 15:49:22 +02:00
|
|
|
|
|
|
|
public:
|
2010-04-13 10:47:10 +02:00
|
|
|
TopologyReaderCSV(const std::string &areas_file_name,
|
|
|
|
const std::string &waypoints_file_name) ;
|
2010-04-02 15:49:22 +02:00
|
|
|
|
|
|
|
~TopologyReaderCSV(void) {}
|
|
|
|
} ;
|
|
|
|
|
|
|
|
#endif // _OWLPS_POSITIONING_TOPOLOGYREADERCSV_HH_
|