Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preference System #19

Closed
bbergen opened this issue Sep 2, 2015 · 0 comments
Closed

Preference System #19

bbergen opened this issue Sep 2, 2015 · 0 comments
Assignees
Labels

Comments

@bbergen
Copy link
Owner

bbergen commented Sep 2, 2015

From here on most of these SDL projects will likely have some sort of persistent preferences, for example sound settings, high scores, or preferred resolutions.

It doesn't make sense to have to write a system to read and write these preferences to the file system for each individual project.

Add a new tool to the common directory with a header and implementation that manages reading and writing of persistent preferences to the file system.

The system should:

  • Be encapsulated and hide its implementation
  • Be ignorant of the exact nature of the preferences
  • Be passed the location to read/write the preferences
  • Provide a simple api that provides the following functions:
    • write(prefs)
    • read(prefs)
    • get(prefs, key)
    • put(prefs, key, value)
  • As hinted at above, the preferences system should either function similarly to, or delegate to a hashmap behind the scenes.
@bbergen bbergen added the common label Sep 2, 2015
@bbergen bbergen self-assigned this Sep 7, 2015
@bbergen bbergen closed this as completed in 2a5e13e Sep 7, 2015
bbergen added a commit that referenced this issue Sep 7, 2015
bbergen added a commit that referenced this issue Sep 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant