Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gruppe44-PROG1003-2022
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Blakli
Gruppe44-PROG1003-2022
Commits
fcfe6d36
Commit
fcfe6d36
authored
3 years ago
by
Andreas Blakli
Browse files
Options
Downloads
Patches
Plain Diff
La til kommentarer i stoppested.h.
parent
ce690516
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stoppested.h
+20
-11
20 additions, 11 deletions
stoppested.h
with
20 additions
and
11 deletions
stoppested.h
+
20
−
11
View file @
fcfe6d36
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment