-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStation.h
37 lines (31 loc) · 807 Bytes
/
Station.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//AUTORE: Alberto Penzo
#ifndef STATION_H
#define STATION_H
#include "Treno.h"
#include <iostream>
#include <vector>
#include <string>
#include <queue>
class Station
{
public:
virtual ~Station() {}
virtual bool has_space();
virtual int get_distance() const;
virtual std::string get_name() const;
virtual std::string get_type() const;
virtual void add_train();
virtual void remove_train();
virtual void add_to_parking(const Treno &tr);
virtual Treno &remove_from_parking();
virtual bool is_parking_empty();
protected:
Station(int distance_origin, const std::string &name, const std::string &type);
private:
int distance_to_origin;
std::string station_name;
const std::string type;
int free_tracks;
std::queue<Treno> parking_lot;
};
#endif