route.h
来自「GPS Manager is a GUI for downloading, or」· C头文件 代码 · 共 72 行
H
72 行
#ifndef ROUTE_H#define ROUTE_H#include <string>#include <vector>#include "waypoint.h"namespace gpsmgr{ class Route { public: typedef std::vector<Waypoint> Waypoints; public: Route(); Route(const std::string& name, const std::string& comment); template <class ItrType> Route(ItrType begin, ItrType end, const std::string& name, const std::string& comment); // accessors std::string name() const; std::string comment() const; Waypoints& waypoints(); const Waypoints& waypoints() const; // mutators void setName(const std::string& name); void setComment(const std::string& comment); template <class ItrType> void setWaypoint(ItrType begin, ItrType end); private: std::string mName; std::string mComment; Waypoints mWaypoints; }; ////////////////////////////// // TEMPLATE IMPLEMENTATIONS // ////////////////////////////// template <class ItrType> Route::Route(ItrType begin, ItrType end, const std::string& name, const std::string& comment) : mName (name), mComment (comment), mWaypoints (begin, end) {} template <class ItrType> void Route::setWaypoint(ItrType begin, ItrType end) { mWaypoints.assign(begin, end); } }#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?