Skip to content
Snippets Groups Projects
Commit fcfe6d36 authored by Andreas Blakli's avatar Andreas Blakli
Browse files

La til kommentarer i stoppested.h.

parent ce690516
Branches
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment