Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    455
  • comments
    639
  • views
    424764

GTL : Work in progress

Sign in to follow this  
_the_phantom_

130 views

I figured as its been a while I should probably do an update on the GTL progress post-Washu.

The restructuring is infact totally done in that everything is inside the classes.

Now, I've been asked why I did this, the reasoning is it infact makes more sense. The access functions which existed before did work based on being able to get at the public data to manipulate it, so they should be prefered to accessing the data correctly.

However, given that they work with the data it makes sense to have them as part of the class (OO theory 101 - Classes are data and functions which act on them). This also allows me to hide everything from the users, if you took a look at the header file now you'd see a struct with functions and no members with the magic being pulled off else where hidden away from the end user's eyes.

Technically speaking, the functions could be added back in and I might well do so, the only difference is they will call into the class todo the work.

The DLL aspect has been a mild nightmare and in the end I decided that trying to produce a DLL which you could compile on one C++ compiler and use from another was just too much work and general hastle.

Something I still need to look at is the idea of callbacks via functors over a DLL boundry. Something tells me this is going to be VERY bad karma but I need to test to make sure. However, for static linking they should work fine and just require an include of an extra header to get the benifits.

Other than that, it now compiles more or less cleanly at warning level 3, after a bit of working to stop the compiler complaining about not using the secure CRT (sorry MS, not this time... ).

I've also rejiggled the code internally a bit, cleaning up the huge main source file and splitting stuff around as needed.

As for changing the design, well it was only beta 1 and never been afraid to change a design as soon as it becomes apprent that a "better" one has come along [wink]

Oh, and Encapsulation is generally a good thing, not bloating the interface and coupling are the things you need to beware of [smile]
Sign in to follow this  


1 Comment


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!