NeTrainSim 0.1.1 beta
The Open-Source Network Trains Simulator
 
Loading...
Searching...
No Matches
trainslist.h
Go to the documentation of this file.
1#ifndef NeTrainSim_trainsList_h
2#define NeTrainSim_trainsList_h
3
4#include <fstream>
5#include <iostream>
6#include <sstream>
7#include <string>
8#include "../util/vector.h"
9#include <regex>
10#include "train.h"
11
12namespace TrainsList {
13
33 Vector<std::tuple<
34 int, double, double,
35 int, double, double,
36 double, double, int>>,
37 Vector<std::tuple<int, int, double, double,
38 double, double,
39 double, int>>,
40 bool>> readTrainsFile(const std::string& fileName);
41
49 Vector<std::tuple<std::string, Vector<int>, double, double,
50 Vector<std::tuple<
51 int, double, double,
52 int, double, double,
53 double, double, int>>,
54 Vector<std::tuple<int, int, double, double,
55 double, double,
56 double, int>>,
57 bool>> &trainRecords);
58
65Vector<std::shared_ptr<Train>> ReadAndGenerateTrains(const std::string& fileName);
66
74 bool writeTrainsFile(Vector<std::tuple<std::string, Vector<int>, double,
75 double,
76 Vector<std::tuple<
77 int, double, double,
78 int, double, double,
79 double, double, int>>,
80 Vector<std::tuple<int, int, double,
81 double,
82 double, double,
83 double, int>>,
84 bool>> trains, const std::string& fileName);
85
86
87
88};
89
90#endif // !NeTrainSim_trainsList_h
A vector.
Definition vector.h:24
Definition trainslist.h:12
Vector< std::tuple< std::string, Vector< int >, double, double, Vector< std::tuple< int, double, double, int, double, double, double, double, int > >, Vector< std::tuple< int, int, double, double, double, double, double, int > >, bool > > readTrainsFile(const std::string &fileName)
Reads a trains file and returns the train records.
Definition trainslist.cpp:26
bool writeTrainsFile(Vector< std::tuple< std::string, Vector< int >, double, double, Vector< std::tuple< int, double, double, int, double, double, double, double, int > >, Vector< std::tuple< int, int, double, double, double, double, double, int > >, bool > > trains, const std::string &fileName)
Writes the train records to a trains file.
Definition trainslist.cpp:270
Vector< std::shared_ptr< Train > > ReadAndGenerateTrains(const std::string &fileName)
Reads a trains file, generates trains from the train records, and returns the generated trains.
Definition trainslist.cpp:263
Vector< std::shared_ptr< Train > > generateTrains(Vector< std::tuple< std::string, Vector< int >, double, double, Vector< std::tuple< int, double, double, int, double, double, double, double, int > >, Vector< std::tuple< int, int, double, double, double, double, double, int > >, bool > > &trainRecords)
Generates a Vector of trains from the given train records.
Definition trainslist.cpp:190