Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Reusable class for saving / loading application settings [modified]

Reusable class for saving / loading application settings [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
windows-adminxmljsonoopperformance
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rolf Kristensen
    wrote on last edited by
    #1

    Hi ya I need a good class for saving / loading application settings. I have the following demands for how it should be built: 1) It should be able to handle groups of settings (One group for each view in the application) 2) It should maintain the settings in memory. 3) It should provide an open interface, so one can attach any serialization / deserialization logic (registry-, ini-, xml-file, etc.) 4) It should not have a restricting license like GPL or similar I can find lots of articles about saving to ini-files, registry-files, xml-files, etc. But I haven't found an article that makes the abstraction I want. Please let me know

    modified on Saturday, February 14, 2009 9:51 AM

    H C R 3 Replies Last reply
    0
    • R Rolf Kristensen

      Hi ya I need a good class for saving / loading application settings. I have the following demands for how it should be built: 1) It should be able to handle groups of settings (One group for each view in the application) 2) It should maintain the settings in memory. 3) It should provide an open interface, so one can attach any serialization / deserialization logic (registry-, ini-, xml-file, etc.) 4) It should not have a restricting license like GPL or similar I can find lots of articles about saving to ini-files, registry-files, xml-files, etc. But I haven't found an article that makes the abstraction I want. Please let me know

      modified on Saturday, February 14, 2009 9:51 AM

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Did you think about your question you need to a class for save application settings of your program you need to make it yourself I think you found your answer previous(ini files,xml files and registry) you need to make a class for them then you need to shift your parameters to that class.

      Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

      R 1 Reply Last reply
      0
      • H Hamid Taebi

        Did you think about your question you need to a class for save application settings of your program you need to make it yourself I think you found your answer previous(ini files,xml files and registry) you need to make a class for them then you need to shift your parameters to that class.

        Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

        R Offline
        R Offline
        Rolf Kristensen
        wrote on last edited by
        #3

        I'm not asking for help to invent the wheel, but asking for help to find an article / library that can provide the implemention of the wheel I need. I rather want to reuse than to remake it myself.

        modified on Saturday, February 14, 2009 11:06 AM

        1 Reply Last reply
        0
        • R Rolf Kristensen

          Hi ya I need a good class for saving / loading application settings. I have the following demands for how it should be built: 1) It should be able to handle groups of settings (One group for each view in the application) 2) It should maintain the settings in memory. 3) It should provide an open interface, so one can attach any serialization / deserialization logic (registry-, ini-, xml-file, etc.) 4) It should not have a restricting license like GPL or similar I can find lots of articles about saving to ini-files, registry-files, xml-files, etc. But I haven't found an article that makes the abstraction I want. Please let me know

          modified on Saturday, February 14, 2009 9:51 AM

          C Offline
          C Offline
          CPallini
          wrote on last edited by
          #4

          Good idea: develop it and write a good article about. :)

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          R 1 Reply Last reply
          0
          • C CPallini

            Good idea: develop it and write a good article about. :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            R Offline
            R Offline
            Rolf Kristensen
            wrote on last edited by
            #5

            Thank you for the encouragement :)

            1 Reply Last reply
            0
            • R Rolf Kristensen

              Hi ya I need a good class for saving / loading application settings. I have the following demands for how it should be built: 1) It should be able to handle groups of settings (One group for each view in the application) 2) It should maintain the settings in memory. 3) It should provide an open interface, so one can attach any serialization / deserialization logic (registry-, ini-, xml-file, etc.) 4) It should not have a restricting license like GPL or similar I can find lots of articles about saving to ini-files, registry-files, xml-files, etc. But I haven't found an article that makes the abstraction I want. Please let me know

              modified on Saturday, February 14, 2009 9:51 AM

              R Offline
              R Offline
              Rolf Kristensen
              wrote on last edited by
              #6

              Think I have found the main building block, that satisfies most of my needs: * Can save to the registry * Can save to an ini-file * Can save to an xml-file And it has a reasonable license requirements: * You are allowed to include the source code in any product (commercial, shareware, freeware or otherwise) when your product is released in binary form. * You are allowed to modify the source code in any way you want except you cannot modify the copyright details at the top of each module. * If you want to distribute source code with your application, then you are only allowed to distribute versions released by the author. This is to maintain a single distribution point for the source code. http://www.naughter.com/appsettings.html All I need now is to create my in-memory configuration-class, and make a thin wrapper around the AppSettings class.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups