diff --git a/stoppested.h b/stoppested.h index 526e211847220ae8d4efe5b1db86f70cbd660c51..2226fd2653abee1c1db9d0e9bba76338d6cd0932 100644 --- a/stoppested.h +++ b/stoppested.h @@ -9,41 +9,50 @@ #include "hjelpeFunksjoner.h" #include "konstanter.h" #include "lesData3.h" -//#include "stoppesteder.h" +/** + * Stoppested klasse. + * + * Har datamedlemmene: + * navn - String med navnet på stoppestedet + * indexNaboStoppene - Liste over nabostoppene sine indekser. + * antallMinutterTilNaboStopp - Liste over tiden mellom nabostoppene. + */ class Stoppested { private: HjelpeFunksjoner hjelp; + // Navnet på stoppestedet std::string navn; + // Liste over nabostoppene sine indekser std::vector<int> indexNaboStoppene; + // Liste over tiden mellom nabostoppene std::vector<int> antallMinutterTilNaboStopp; public: Stoppested(); - Stoppested(const std::string & navn, const bool & leggeTilTid); - Stoppested(const int & index, const std::string & navn); + Stoppested(const std::string& navn, const bool& leggeTilTid); + Stoppested(const int& index, const std::string& navn); ~Stoppested(); - // void ny(); void skrivData(); void skrivNavn(); void lesData(); std::string hentNavn(); void skrivDataMedNaboer(std::vector<Stoppested*> alleStoppesteder); int hentTidNaboStopp(); - int hentNaboStoppIndex(const bool & siste); - void leggTilNaboStopp(const int & index, const int & minutter); + int hentNaboStoppIndex(const bool& siste); + void leggTilNaboStopp(const int& index, const int& minutter); void lesTid(); - void leggTilIndex(const int & index); - void leggTilTid(const int & minutter); + void leggTilIndex(const int& index); + void leggTilTid(const int& minutter); void slettVectorer(); int hentIndex(); void fjernForsteNabo(); void fjernSisteNabo(); - void leggTilNaboFremst(const int & index, const int & tid); - void leggTilNaboBakerst(const int & index, const int & tid); + void leggTilNaboFremst(const int& index, const int& tid); + void leggTilNaboBakerst(const int& index, const int& tid); int hentAntallStoppestedVector(); int hentTidForsteNabo(); void lesFraFil(std::ifstream& inn); - void skrivTilFil(std::ofstream & ut); + void skrivTilFil(std::ofstream& ut); }; #endif //__STOPPESTED_H \ No newline at end of file