neoWidgets
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
Public Member Functions | Protected Member Functions | List of all members
neo::RegistryConfig Class Reference

Configuration that writes to the Window registry. More...

#include <Config.h>

Inheritance diagram for neo::RegistryConfig:
Inheritance graph
[legend]

Public Member Functions

 RegistryConfig ()
 Unusable until Open() is called.
 
 RegistryConfig (const tstring &subKey, HKEY topKey=HKEY_CURRENT_USER)
 Calls Open()
 
 RegistryConfig (RegistryConfig &&other)
 Move constructor.
 
bool Open (const tstring &subKey, HKEY topKey=HKEY_CURRENT_USER)
 
RegistryConfigoperator= (RegistryConfig &&other)
 Move assignment.
 
virtual bool Remove (const tstring &key)
 Remove a single value.
 
virtual bool RemoveEntireConfig ()
 Removes all values in the config, but the config can still used afterwards.
 
- Public Member Functions inherited from neo::Config
bool Read (const tstring &key, tstring &result) const
 Basic read function.
 
template<typename T >
bool Read (const tstring &key, T &result) const
 Extendable version of Read. More...
 
void RestoreWindowPosition (const tstring &key, HWND window)
 Convenience function for window position.
 
void SaveWindowPosition (const tstring &key, HWND window)
 Convenience function for window position.
 
bool Write (const tstring &key, const tstring &value)
 Basic write function.
 
template<typename T >
bool Write (const tstring &key, const T &value)
 Extendable version of Write. More...
 

Protected Member Functions

bool _GetStringImp (const tstring &key, tstring &result) const
 Every config value is internally saved as a string.
 
bool _SetStringImp (const tstring &key, const tstring &value)
 Every config value is internally saved as a string.
 

Additional Inherited Members

- Static Protected Member Functions inherited from neo::Config
static tstring FromUtf8 (const std::string &text)
 All config should be saved as UTF-8 for portability.
 
static std::string ToUtf8 (const tstring &text)
 All config should be saved as UTF-8 for portability.
 

Detailed Description

Configuration that writes to the Window registry.

Member Function Documentation

bool neo::RegistryConfig::Open ( const tstring &  subKey,
HKEY  topKey = HKEY_CURRENT_USER 
)
inline
Parameters
subKeyPath into the registry, e.g. "Software\\your company\\your app"
topKeyEntrypoint into the registry

The documentation for this class was generated from the following files: