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

GTL Part 2 : Jackpot!

Sign in to follow this  


So, work hasnt progressed as far as I would have hoped, certain 'issues' stopped me doing any work on it thus far (I had aimed to start tuesday but frankly, got a better offer of something todo [grin]), however it turns out this could be a good thing!

I was talking to Fruny earlier on IRC and he happened to mention a cool new library in boost, an IOStreams library.

"Big deal", you might think, "C++ already has one", and yes it does, however this builds on top of it enabling you filter content and treat different things as sources/sinks. For example you can compress/decompress data to a file on the fly using normal stream operations!

Having read around the library a bit I've decided that this truely is a gold mine. When it comes to loading data up all I need todo is select the right filter, drop it into the stream and then read like any other bit of data! The rest of the functionality would be encapslated in a class so its nicely out of the way and keep the main decoding code pretty stream lined.

From an extensibilty point of view this means you can literally add a class type and a tag to a table and the code will automagically look up the correct decoding filter.

This will also work seemlessly with custom stream based readers as this would hook into the chain AFTER the rest has taken place.

I've also been giving some thought to how this can interface with custom C streams, wrapping things in a custom stream class also seems like a good way forward here, this would allow functions which could take a file pointer, a custom reading function or a filter pointer and custom reading function, glue it into one standard stream interface and pass it down to the main code. At which point the filtering kicks in and all is good.

For custom C++ reader it will basically do the same thing, custom function, stream objects and with the addition of this custom boost::iostream object as well will probably be used.

Anyways, I need to investigate this library some more and then begin working on how to intergrate all the data reading function into sane classes with buffered reading.

Hopefully tomorrow I'll have some good news to report, if not expect more later next week [smile]
Sign in to follow this  


Recommended Comments

There are no comments to display.

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!