Package
by Howard Dortch · in Torque Game Engine · 07/08/2004 (6:40 am) · 4 replies
I want to try to understand why I need to use packages. Package have some functions in it much like a class. Why can't the functions just be called? why wrap them in a package?
In the book( 3dgpaio ) "Packages can be used to dynamicly overload functions using the Parent::function()" I see in control/main.cs Parent::OnStart(); what onStart does it refer to as a parent? and why override the functionality why not just move it all in to one onStart() and just call it. Am I ramblinng out of control now? sorry.....
In the book( 3dgpaio ) "Packages can be used to dynamicly overload functions using the Parent::function()" I see in control/main.cs Parent::OnStart(); what onStart does it refer to as a parent? and why override the functionality why not just move it all in to one onStart() and just call it. Am I ramblinng out of control now? sorry.....
#2
How does a package know who it's parent is?
Like in root/main.cs there is an onStart()
In the common and control directories there are packages that have onStart() functions. I understand from the book that the main onStart() somehow automaticaly calls all other onStarts() but only if the Package has been loaded?
07/08/2004 (7:20 am)
Well it still has the look and feel of a class with no members just methods. Is that the gist of it?How does a package know who it's parent is?
Like in root/main.cs there is an onStart()
In the common and control directories there are packages that have onStart() functions. I understand from the book that the main onStart() somehow automaticaly calls all other onStarts() but only if the Package has been loaded?
#4
07/08/2004 (7:42 am)
The namespaces are linked so that if you call Parent:: it will find the right thing.
Torque Owner Brett Fattori
Does that help any?
- Brett