|
Model Railroad System 2.2.2
|
Tcl Helper functions. More...
Functions | |
| TimeTableSystem * | NewCreateTimeTable (const char *name, int timescale, int timeinterval) |
| Tcl constructor to create a new TimeTable. More... | |
| TimeTableSystem * | OldCreateTimeTable (const char *filename, char **outmessage) |
| Tcl constructor to create a time table system from an existing file. More... | |
| int | ForEveryStation (Tcl_Interp *interp, TimeTableSystem *timetable, Tcl_Obj *variable, Tcl_Obj *body) |
| Tcl looping construct for Stations. More... | |
| int | ForEveryCab (Tcl_Interp *interp, TimeTableSystem *timetable, Tcl_Obj *variable, Tcl_Obj *body) |
| Tcl looping construct for Cabs. More... | |
| int | ForEveryTrain (Tcl_Interp *interp, TimeTableSystem *timetable, Tcl_Obj *variable, Tcl_Obj *body) |
| Tcl looping construct for Trains. More... | |
| int | ForEveryNote (Tcl_Interp *interp, TimeTableSystem *timetable, Tcl_Obj *variable, Tcl_Obj *body) |
| Tcl looping construct for notes. More... | |
| int | ForEveryPrintOption (Tcl_Interp *interp, TimeTableSystem *timetable, Tcl_Obj *variable, Tcl_Obj *body) |
| Tcl looping construct for print options. More... | |
| int | TT_StringListToList (Tcl_Interp *interp, const char *stringList) |
| Tcl function to convert a serialized string list to a Tcl list. More... | |
| int | TT_ListToStringListString (Tcl_Interp *interp, Tcl_Obj *list) |
| Tcl function to convert a Tcl list to a serialized string list. More... | |
Variables | |
| apply int | Tcl_Result { int TTSupport::ForEveryStation } |
Tcl Helper functions.
These are top level Tcl support functions for the TimeTableSystem class. They are only available from Tcl, C++ programs have other API functions, including overloaded constructors and iterator methods.
| int ForEveryCab | ( | Tcl_Interp * | interp, |
| TimeTableSystem * | timetable, | ||
| Tcl_Obj * | variable, | ||
| Tcl_Obj * | body | ||
| ) |
Tcl looping construct for Cabs.
Tcl looping construct that loops over the cabs in timetable, setting variable to the Cab pointer and evaluates body.
| timetable | The time table object. |
| variable | The loop variable. |
| body | The body script. |
| int ForEveryNote | ( | Tcl_Interp * | interp, |
| TimeTableSystem * | timetable, | ||
| Tcl_Obj * | variable, | ||
| Tcl_Obj * | body | ||
| ) |
Tcl looping construct for notes.
Tcl looping construct that loops over the notes in timetable, setting variable to the note string and evaluates body.
| timetable | The time table object. |
| variable | The loop variable. |
| body | The body script. |
| int ForEveryPrintOption | ( | Tcl_Interp * | interp, |
| TimeTableSystem * | timetable, | ||
| Tcl_Obj * | variable, | ||
| Tcl_Obj * | body | ||
| ) |
Tcl looping construct for print options.
Tcl looping construct that loops over the stations in timetable, setting variable to the print option key and evaluates body.
| timetable | The time table object. |
| variable | The loop variable. |
| body | The body script. |
| int ForEveryStation | ( | Tcl_Interp * | interp, |
| TimeTableSystem * | timetable, | ||
| Tcl_Obj * | variable, | ||
| Tcl_Obj * | body | ||
| ) |
Tcl looping construct for Stations.
Tcl looping construct that loops over the stations in timetable, setting variable to the Station pointer and evaluates body.
| timetable | The time table object. |
| variable | The loop variable. |
| body | The body script. |
| int ForEveryTrain | ( | Tcl_Interp * | interp, |
| TimeTableSystem * | timetable, | ||
| Tcl_Obj * | variable, | ||
| Tcl_Obj * | body | ||
| ) |
Tcl looping construct for Trains.
Tcl looping construct that loops over the stations in timetable, setting variable to the Train pointer and evaluates body.
| timetable | The time table object. |
| variable | The loop variable. |
| body | The body script. |
| TimeTableSystem * NewCreateTimeTable | ( | const char * | name, |
| int | timescale, | ||
| int | timeinterval | ||
| ) |
Tcl constructor to create a new TimeTable.
Tcl constructor to create a new TimeTable. Calls the new time table constructor.
| name | The name of the time table system. |
| timescale | Number of time units per 24 hours. There are 1440 minutes in 24 hours. |
| timeinterval | The tick frequency in time units. |
| TimeTableSystem * OldCreateTimeTable | ( | const char * | filename, |
| char ** | outmessage | ||
| ) |
Tcl constructor to create a time table system from an existing file.
Tcl constructor to create a time table system from an existing file. The file is read in and the class is properly initialized from the data in the file.
| filename | The name of the file to load. |
| int TT_ListToStringListString | ( | Tcl_Interp * | interp, |
| Tcl_Obj * | list | ||
| ) |
Tcl function to convert a Tcl list to a serialized string list.
Used to convert Tcl lists to a form that the C++ code can deal with portably.
| list | A Tcl list. |
| int TT_StringListToList | ( | Tcl_Interp * | interp, |
| const char * | stringList | ||
| ) |
Tcl function to convert a serialized string list to a Tcl list.
Used to convert serialized C++ string lists to a Tcl list.
| stringList | A serialized string list. |
| apply int Tcl_Result { int TTSupport::ForEveryStation } |