Yes, this is already nice design we have there. The diagram is clear,
the architecture also.
For this Entry class, I think the use of such a "builder" pattern
would actually fit well in this case.
I would also not be in favor to choose the packaging system in a
configuration as it is possible to use
multiple packaging system in the same application. And since you are
using a singleton for the pluginmanager we also can not specialize
this class.
An idea of what you could do is to replace the string by a small
"packagetype" class which could contain:
-package name
-package version
-other infos?
Then if you do not want to provide the string everytime you call the
function, you would just need to instanciate this packagetype class at
the beginning of
your application and always refer to the class anytime you call the
getPackagingSystem function.
On Jul 13, 10:08 pm, Adrien Grandemange <
itsmea...@gmail.com> wrote:
> Well, I didn't dig the details as I said, because I wanted to have a fast
> example to support the general architecture. I'm sure we can improve this a
> lot.
>
> About the entries, that was precisely my idea. In fact, I also thought about
> doing something like Qt's QVariant class, for those who know it.
>
> About choosing the packaging system in a configuration, why not, but I was
> thinking of the mods programs which could use many packaging systems at
> once. You can easily make the configuration part in your own program, it
> doesn't have to be part of the API.
>
> There is a serious problem about how to locate the actual files in an
> unified manner though.
> Maybe a solution would be to use URLs with a convenience class to handle the
> different parts of the URL. Possible example:
> "lba1://myLba1InstallationFolder/scene", where the scheme would refer to a
> game engine and it's specific packaging layout, the domain name would
> reference a particular dataset, like for example if we work with lba1, a
> specific installation folder for LBA1 (the domain name would have been
> registered before by another part of the API), and the last part would
> reference a particular package.
>