libcruft-util/win32/registry.hpp

35 lines
726 B
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright 2015 Danny Robson <danny@nerdcruft.net>
*/
#ifndef __UTIL_WIN32_REGISTRY_HPP
#define __UTIL_WIN32_REGISTRY_HPP
#include <windows.h>
#include <set>
#include <string>
namespace util::win32 {
class key {
public:
key (HKEY root, const char *child, REGSAM rights = KEY_READ);
~key ();
template <typename T>
T data (const char *name = nullptr) const;
std::set<std::string>
values (void) const;
private:
HKEY m_handle;
};
}
#endif