sensorstream.h
Go to the documentation of this file.
1 #ifndef SENSORSTREAM_H
2 #define SENSORSTREAM_H
3 
4 #include <istream>
5 #include "sensorlog.h"
6 
7 namespace GMapping {
9  public:
10  SensorStream(const SensorMap& sensorMap);
11  virtual ~SensorStream();
12  virtual operator bool() const=0;
13  virtual bool rewind() = 0 ;
14  virtual SensorStream& operator >>(const SensorReading*&) = 0;
15  inline const SensorMap& getSensorMap() const {return m_sensorMap; }
16  protected:
18  static SensorReading* parseReading(std::istream& is, const SensorMap& smap);
19  static OdometryReading* parseOdometry(std::istream& is, const OdometrySensor* );
20  static RangeReading* parseRange(std::istream& is, const RangeSensor* );
21 };
22 
24  public:
25  InputSensorStream(const SensorMap& sensorMap, std::istream& is);
26  virtual operator bool() const;
27  virtual bool rewind();
28  virtual SensorStream& operator >>(const SensorReading*&);
29 
30  //virtual SensorStream& operator >>(SensorLog*& log);
31  protected:
32  std::istream& m_inputStream;
33 };
34 
36  public:
37  LogSensorStream(const SensorMap& sensorMap, const SensorLog* log);
38  virtual operator bool() const;
39  virtual bool rewind();
40  virtual SensorStream& operator >>(const SensorReading*&);
41  protected:
42  const SensorLog* m_log;
43  SensorLog::const_iterator m_cursor;
44 };
45 
46 };
47 #endif
const SensorMap & m_sensorMap
Definition: sensorstream.h:17
SensorStream(const SensorMap &sensorMap)
const SensorLog * m_log
Definition: sensorstream.h:42
static SensorReading * parseReading(std::istream &is, const SensorMap &smap)
static OdometryReading * parseOdometry(std::istream &is, const OdometrySensor *)
virtual SensorStream & operator>>(const SensorReading *&)=0
std::istream & m_inputStream
Definition: sensorstream.h:32
const SensorMap & getSensorMap() const
Definition: sensorstream.h:15
virtual bool rewind()=0
std::map< std::string, Sensor * > SensorMap
Definition: sensor.h:19
ifstream is(argv[c])
SensorLog::const_iterator m_cursor
Definition: sensorstream.h:43
static RangeReading * parseRange(std::istream &is, const RangeSensor *)


openslam_gmapping
Author(s): Giorgio Grisetti, Cyrill Stachniss, Wolfram Burgard
autogenerated on Mon Jun 10 2019 14:04:22