J
JHenstay
I have a "Generic Application Class" which does tasks such as setup
and register the window, etc. The general idea was I could make a
child class of this for my project and inherit all of the necesary
methods. This works fine. My question is in regards to things like
"DirectX" and "Networking". As far as I can tell, I guess I have 2
options in order to implement these things:
1 - Make classes that sit in the hierarchy between my "Generic
Application Class" and my "Application Class" which handle all of the
aspects of these things, like initializing DirectX, Connecting to a
remote server, etc. Then my "Application Class" would just inherit
these methods and call them as needed.
2 - Make independent classes like a "NetworkObject Class" or a
"DirectXObject Class" and just have my "Application Class" create
instances of each of these things and call the methods on the
instantiated objects as needed.
I was leaning toward going with Option 1 because each application
would only require one of each of these type classes (DirectX and
Networking) so I thought that would make more sense.
I just want to know if I am thinking through this properly or am I
heading down the wrong learning path?
Any advice is greatly appreciated.
Thanks!
-JH
and register the window, etc. The general idea was I could make a
child class of this for my project and inherit all of the necesary
methods. This works fine. My question is in regards to things like
"DirectX" and "Networking". As far as I can tell, I guess I have 2
options in order to implement these things:
1 - Make classes that sit in the hierarchy between my "Generic
Application Class" and my "Application Class" which handle all of the
aspects of these things, like initializing DirectX, Connecting to a
remote server, etc. Then my "Application Class" would just inherit
these methods and call them as needed.
2 - Make independent classes like a "NetworkObject Class" or a
"DirectXObject Class" and just have my "Application Class" create
instances of each of these things and call the methods on the
instantiated objects as needed.
I was leaning toward going with Option 1 because each application
would only require one of each of these type classes (DirectX and
Networking) so I thought that would make more sense.
I just want to know if I am thinking through this properly or am I
heading down the wrong learning path?
Any advice is greatly appreciated.
Thanks!
-JH