Class GSObject

From TrainzOnline
(Redirected from GSObject)
Jump to: navigation, search


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.

Categories

Personal tools