Model Railroad System
2.2.2
|
Time Table Support Namespace. More...
Classes | |
struct | hash |
Option hash map, used for Print options. More... | |
struct | eqstr |
class | StationTimes |
Station times class, used by the LaTeX generator methods. More... | |
class | TimeTableSystem |
This is the main Time Table Class. More... | |
class | Occupied |
This class records a train sitting on a storage track during a specified time frame. More... | |
class | TimeRange |
The TimeRange class implements a range of times. More... | |
class | StorageTrack |
The StorageTrack class implements a storage track. More... | |
class | Station |
The Station class implements a station. More... | |
class | Stop |
This class implements a stop. More... | |
class | Train |
This class implements a train. More... | |
class | Cab |
This class maintains information about cabs. More... | |
class | PathName |
A Class that portably represents a pathname. More... | |
Typedefs | |
typedef vector< double > | doubleVector |
A Vector of doubles. More... | |
typedef std::unordered_map< const char *, std::string, hash, eqstr > | OptionHashMap |
typedef list< Train * > | TrainList |
List of trains. More... | |
typedef map< string, StationTimes, less< string > > | TrainStationTimes |
Map of station times, indexed by train number. More... | |
typedef map< int, TrainStationTimes, less< int > > | TrainTimesAtStation |
Map of maps of station times, indexed by station index. More... | |
typedef list< string > | StringList |
List of strings. More... | |
typedef map< TimeRange, Occupied, less< TimeRange > > | OccupiedMap |
The Occupied Map type, ordered by time ranges. More... | |
typedef map< string, StorageTrack, less< string > > | StorageTrackMap |
Storage track map. More... | |
typedef vector< Station > | StationVector |
Station Vector. More... | |
typedef vector< Stop > | StopVector |
A vector of stops. More... | |
typedef map< string, Train *, less< string > > | TrainNumberMap |
Train number map, indexed by train number (symbol). More... | |
typedef map< string, Cab *, less< string > > | CabNameMap |
Cab name map, cabs indexed by name. More... | |
typedef vector< string > | stringVector |
A Vector of strings. More... | |
Functions | |
const char * | StringListToString (const StringList &list) |
Convert a list of strings to a flat string. More... | |
bool | StringListFromString (string strlinList, StringList &result) |
Convert a flat string to a list of strings. More... | |
Time Table Support Namespace.
Ttclasses 1.0.2
libttclasses 1.0.2
typedef vector<double> TTSupport::doubleVector |
A Vector of doubles.
Used as a vector of layover times.
typedef std::unordered_map<const char*, std::string, hash, eqstr> TTSupport::OptionHashMap |
typedef list<string> TTSupport::StringList |
List of strings.
This is a simple linked list of strings, used in various places.
typedef vector<string> TTSupport::stringVector |
A Vector of strings.
Used as the list of path list in a PathName instance.
typedef list<Train*> TTSupport::TrainList |
List of trains.
Simple linked list of trains, used for passing train lists around.
typedef map<string,StationTimes,less<string> > TTSupport::TrainStationTimes |
Map of station times, indexed by train number.
These are the individual rows of the time table. The train number (symbol) is the column index. Each of these rows is for a single station. This is a sparse vector, since not all trains stop at (or go past) all stations. The ommited elements result in blank cells in the output table.
typedef map<int, TrainStationTimes,less<int> > TTSupport::TrainTimesAtStation |
Map of maps of station times, indexed by station index.
This is the whole time table. The station index is the row index. This is a sparse vector, since not all trains stop at (or go past) all stations. The ommited elements result in blank cells in the output table.
bool TTSupport::StringListFromString | ( | string | strlinList, |
StringList & | result | ||
) |
Convert a flat string to a list of strings.
Returns false if there was a syntax error.
strlinList | The input string. |
result | The output list. |
const char* TTSupport::StringListToString | ( | const StringList & | list | ) |
Convert a list of strings to a flat string.
The result is comma separated and each string is enclosed in quote characters ("
). If a string contains a quote character or a backslash, the character is quoted with a backslash.
list | The list of strings. |