Hesu-eco
/
limiteur_vitesse
premiere ebauche
Diff: recommendedspeed.hpp
- Revision:
- 10:f0b382368614
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/recommendedspeed.hpp Fri Nov 16 17:47:35 2018 +0000 @@ -0,0 +1,30 @@ +#ifndef RECOMMENDEDSPEED_HPP +#define RECOMMENDEDSPEED_HPP + +#include <vector> + +class Segment : public std::vector<float> +{ + public: + Segment(std::vector<float> vals); + + float getSpeed(); + void incrementIndex(); + + protected: + int currentIndex; +}; + +class Parcours : public std::vector<Segment> +{ + public: + Parcours(); + + Segment& getSegment(); + void incrementIndex(); + + protected: + int currentSegmentIndex; +}; + +#endif \ No newline at end of file