diff options
Diffstat (limited to 'week09/Exercise3/Train.h')
| -rw-r--r-- | week09/Exercise3/Train.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/week09/Exercise3/Train.h b/week09/Exercise3/Train.h new file mode 100644 index 0000000..6b90477 --- /dev/null +++ b/week09/Exercise3/Train.h @@ -0,0 +1,29 @@ +#pragma once +#include <iostream> + +class Train { + char model[128]; + unsigned railID; + char* regionsFileName; + char* currentRegion; + + void free(); + void copyFrom(const Train& other); + + void setCurrentRegion(std::ifstream& inFile); + +public: + Train(); + ~Train(); + Train(const Train& other); + Train& operator=(const Train& other); + Train(Train&& other); + Train& operator=(Train&& other); + + Train(const char model[127], unsigned railID, const char* regionsFileName); + + void TransferNextRegion(); + void SwitchRailLine(unsigned railID, const char* regionsFileName); + + friend class TrainNetwork; +}; |
