Class GSObject
From TrainzOnline
(Difference between revisions)
(→Categories) |
m (Change link to library reference, not language reference) |
||
(2 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | *[[TrainzScript | + | *[[TrainzScript Library Reference|API Hierarchy]] |
**GSObject | **GSObject | ||
Latest revision as of 23:37, 28 December 2020
- API Hierarchy
- GSObject
A generic empty parent class. The GSObject class is an empty class with no methods or data members. It is used as a generic parent class so that a variety of other classes can all be used as parameters to a function.
Quite a few Trainz classes now fall under the GSObject hierarchy. Classes that directly inherit from GSObject are:
- Asset
- GameObject
- HTMLPropertyHandler
- IndustryTrainController
- KUID
- KUIDList
- LoadingReport
- Menu
- Permit
- ProductFilter
- ProductQueue
- Soup
- StringTable
- TrainTimetable
Any child class of the classes listed above can also be considered a GSObject. When accessing a GSObject from a parameter, be sure to cast the object to the class you want to use and then verify that cast object before use.
Currently there is only one major usage of GSObject in the Trainz API and that is as a generic object parameter array for the Library.LibraryCall() method.