Model Railroad System  2.2.1
Classes | Typedefs | Functions
TTSupport Namespace Reference

Time Table Support Namespace. More...

Classes

class  Cab
 This class maintains information about cabs. More...
 
struct  eqstr
 
struct  hash
 Option hash map, used for Print options. More...
 
class  Occupied
 This class records a train sitting on a storage track during a specified time frame. More...
 
class  PathName
 A Class that portably represents a pathname. More...
 
class  Station
 The Station class implements a station. More...
 
class  StationTimes
 Station times class, used by the LaTeX generator methods. More...
 
class  Stop
 This class implements a stop. More...
 
class  StorageTrack
 The StorageTrack class implements a storage track. More...
 
class  TimeRange
 The TimeRange class implements a range of times. More...
 
class  TimeTableSystem
 This is the main Time Table Class. More...
 
class  Train
 This class implements a train. More...
 

Typedefs

typedef vector< double > doubleVector
 A Vector of doubles. More...
 
typedef std::unordered_map< const char *, std::string, hash, eqstrOptionHashMap
 
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< StationStationVector
 Station Vector. More...
 
typedef vector< StopStopVector
 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...
 

Detailed Description

Time Table Support Namespace.

Author
Robert Heller <heller@deepsoft.com>

Tcl Package Provided

Ttclasses 1.0.2

Library Provided

libttclasses 1.0.2

Typedef Documentation

◆ doubleVector

typedef vector<double> TTSupport::doubleVector

A Vector of doubles.

Used as a vector of layover times.

Author
Robert Heller <heller@deepsoft.com>

◆ OptionHashMap

typedef std::unordered_map<const char*, std::string, hash, eqstr> TTSupport::OptionHashMap

◆ StringList

typedef list<string> TTSupport::StringList

List of strings.

This is a simple linked list of strings, used in various places.

Author
Robert Heller <heller@deepsoft.com>

◆ stringVector

typedef vector<string> TTSupport::stringVector

A Vector of strings.

Used as the list of path list in a PathName instance.

◆ TrainList

typedef list<Train*> TTSupport::TrainList

List of trains.

Simple linked list of trains, used for passing train lists around.

Author
Robert Heller <heller@deepsoft.com>

◆ TrainStationTimes

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.

Author
Robert Heller <heller@deepsoft.com>

◆ TrainTimesAtStation

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.

Author
Robert Heller <heller@deepsoft.com>

Function Documentation

◆ StringListFromString()

bool TTSupport::StringListFromString ( string  strlinList,
StringList result 
)

Convert a flat string to a list of strings.

Returns false if there was a syntax error.

Parameters
strlinListThe input string.
resultThe output list.
Author
Robert Heller <heller@deepsoft.com>

◆ StringListToString()

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.

Parameters
listThe list of strings.
Author
Robert Heller <heller@deepsoft.com>