On 12/13/04 at 7:03 PM Paul Surgeon wrote:

>On Sunday, 12 December 2004 23:13, Curtis L. Olson wrote:
>> You might want to check first if plib has this functionality already, or
>> putting it in plib's file/directory handling library might be more
>> appropriate.  The purpose of SGPath is to be a platform independent path
>> name abstraction.  If we create a mkdir function, I think it should
>> probably go somewhere else.
>Ok, SGPath is a bad place to put it in.
>I checked plib and found that it has no mkdir functionality at all.
>In fact plib doesn't even have a file handling library.
>However I don't like the idea of adding this to plib because I rely on
>for the path name abstraction and I don't want to have to add SGPath to
>How hard would it be to get something totally new added to plib which most

>other users will consider as unnecessary?

FWIW, wxWidgets has a class for storing user data in a cross platform
manner that abstracts out all the platform differences.  From the app point
of view all you have is something like:

wxConfig* myPrefs = new wxConfig;

bool useSpectralHighlights =
myPrefs->Read("/Rendering/UseSpectralHighlights", true);


The values get transparently stored in either the registry on Windows, or
hidden files on Linux, as appropriate.  I think there exists the option to
use file storage instead of the registry on Windows.  I would have thought
that a similar cross platform class for storing program state and
gui-menu-set user prefs would be a logical addition to plib - I would have
thought that most cross platform games would find this useful.  Whether it
would get accepted though is another matter - I guess you could ask on
their lists.  You could probably lift the code from wxWidgets as well ;-)

Cheers - Dave

This message has been scanned but we cannot guarantee that it and any
attachments are free from viruses or other damaging content: you are
advised to perform your own checks.  Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

Flightgear-devel mailing list

Reply via email to