Re: [Plib-devel] Exposed bitmap loaders in SSG?
Brought to you by:
sjbaker
From: Jan R. <slo...@gm...> - 2007-01-08 18:21:50
|
Am Sun, 07 Jan 2007 12:56:43 -0600 schrieb steve <sjb...@ai...>: > We certainly want a way for the application to ASK what formats > we support - or whether we support a specific format - but we > certainly don't want to have a specific class for each image > format that is exposed to the application (although internally > to the library, that makes a lot of sense). Steve, actually I never thought about exposing the loader subclasses. You call a non-class loader function that determines the file type and creates an object of the matching sub-class, then it returns a base-class-pointer. To the application this is pretty much the same as directly creating an object of the piImage class by calling the ctor which then dispatches the task of loading the pixel data to a matching function. If the library uses a set of non-class loader functions or if it uses subclasses of a generic loader class shouldn't bother the user in any way. Maybe it would be an elegant solution to use a family of classes, but maybe it's not worth the effort of converting the existing loader code from SSG. I'll start with a very simple "pi" library that only supports one or two image formats and upload the source code to my webspace for a design review. Then we can decide if this is the way to go before converting the rest of the loaders. Kind regards, Jan R. -- Jan Reucker email: jan dot reucker at web dot de web: http://www.reucker-online.de |