⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 track.h

📁 gps mgr
💻 H
字号:
#ifndef TRACK_H#define TRACK_H#include "datatypes.h"#include "latlon.h"#include <string>#include <vector>namespace gpsmgr{    //--------------------------------------------------------------------------    class TrackPoint    {    public:	TrackPoint();	TrackPoint(const LatLon& pos,		   DistFt altitude,		   UnixTime time);	const LatLon& position() const;	void setPosition(const LatLon& pos);	DistFt altitude() const;	void setAltitude(DistFt alt);	UnixTime time() const;	void setTime(UnixTime time);	    private:	LatLon mPosition;	DistFt mAltitude;	UnixTime mTime;    };    //--------------------------------------------------------------------------    class Track    {    public:	typedef vector<TrackPoint> PointList;	Track();	Track(const string& name,	      const string& comment);		template <class ItrType>	Track(ItrType begin,	      ItrType end,	      const string& name,	      const string& comment);	const PointList& points() const;	PointList& points();	template <class ItrType>	void setPoints(ItrType begin, ItrType end);	const string& name() const;	void setName(const string& name);	const string& comment() const;	void setComment(const string& comment);	    private:	PointList mTrackList;	string mName;	string mComment;    };    bool operator==(const TrackPoint& lhs, const TrackPoint& rhs);    bool operator==(const Track& lhs, const Track& rhs);    bool operator<(const TrackPoint& lhs, const TrackPoint& rhs);    bool operator<(const Track& lhs, const Track& rhs);    ///////////////////////////////    // TEMPLATE IMPLEMENTATAIONS //    ///////////////////////////////    template <class ItrType>    Track::Track(ItrType begin,		 ItrType end,		 const string& name,		 const string& comment) :	mTrackList (begin, end),	mName (name),	mComment (comment)    {}        template <class ItrType>    void Track::setPoints(ItrType begin, ItrType end)    {	mTrackList.assign(begin, end);    }}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -