Class GSObject

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
m
Line 1: Line 1:
*[[TrainzScript Langage Reference|API Hierarchy]]
+
*[[TrainzScript Language Reference|API Hierarchy]]
 
**GSObject
 
**GSObject
  

Revision as of 02:20, 10 February 2010


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