diff options
author | Brad King <brad.king@kitware.com> | 2013-01-31 14:58:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-01-31 14:58:50 (GMT) |
commit | 118c32f8f211b0bb9a096fbb0711cacf2b68f057 (patch) | |
tree | d72f1f0bc3aeea7ab9c95f130f7de435fc2cf262 /Source/kwsys/Registry.hxx.in | |
parent | cf8645e82dbb7dff434b14bd127c5457745e4db8 (diff) | |
parent | f447db7f102519e09258f0bd06668a9ae572ec68 (diff) | |
download | CMake-118c32f8f211b0bb9a096fbb0711cacf2b68f057.zip CMake-118c32f8f211b0bb9a096fbb0711cacf2b68f057.tar.gz CMake-118c32f8f211b0bb9a096fbb0711cacf2b68f057.tar.bz2 |
Merge branch 'xcode-duplicate-flags-13354' into generator-toolset
Diffstat (limited to 'Source/kwsys/Registry.hxx.in')
-rw-r--r-- | Source/kwsys/Registry.hxx.in | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/Source/kwsys/Registry.hxx.in b/Source/kwsys/Registry.hxx.in deleted file mode 100644 index ed9b010..0000000 --- a/Source/kwsys/Registry.hxx.in +++ /dev/null @@ -1,107 +0,0 @@ -/*============================================================================ - KWSys - Kitware System Library - Copyright 2000-2009 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#ifndef @KWSYS_NAMESPACE@_Registry_hxx -#define @KWSYS_NAMESPACE@_Registry_hxx - -#include <@KWSYS_NAMESPACE@/Configure.h> - -#include <@KWSYS_NAMESPACE@/stl/string> - -namespace @KWSYS_NAMESPACE@ -{ - -class RegistryHelper; - -/** \class Registry - * \brief Portable registry class - * - * This class abstracts the storing of data that can be restored - * when the program executes again. On Win32 platform it is - * implemented using the registry and on unix as a file in - * the user's home directory. - */ -class @KWSYS_NAMESPACE@_EXPORT Registry -{ -public: - enum RegistryType - { -#ifdef _WIN32 - WIN32_REGISTRY, -#endif - FILE_REGISTRY - }; - -#ifdef _WIN32 - Registry(RegistryType registryType = WIN32_REGISTRY); -#else - Registry(RegistryType registryType = FILE_REGISTRY); -#endif - - virtual ~Registry(); - - //! Read a value from the registry. - bool ReadValue(const char *subkey, const char *key, const char **value); - - //! Delete a key from the registry. - bool DeleteKey(const char *subkey, const char *key); - - //! Delete a value from a given key. - bool DeleteValue(const char *subkey, const char *key); - - //! Set value in a given key. - bool SetValue(const char *subkey, const char *key, - const char *value); - - //! Open the registry at toplevel/subkey. - bool Open(const char *toplevel, const char *subkey, - int readonly); - - //! Close the registry. - bool Close(); - - //! Read from local or global scope. On Windows this mean from local machine - // or local user. On unix this will read from $HOME/.Projectrc or - // /etc/Project - void GlobalScopeOn() { this->SetGlobalScope(1); } - void GlobalScopeOff() { this->SetGlobalScope(0); } - void SetGlobalScope(bool b); - bool GetGlobalScope(); - - // Set or get the toplevel registry key. - void SetTopLevel(const char* tl); - const char* GetTopLevel(); - - // Return true if registry opened - bool GetOpened() { return m_Opened; } - - // Should the registry be locked? - bool GetLocked() { return m_Locked; } - - enum { - READONLY, - READWRITE - }; - - // Return true if the character is space. - int IsSpace(char c); - -private: - RegistryHelper* Helper; - - bool m_Opened; - - bool m_Locked; -}; // End Class: Registry - -} // namespace @KWSYS_NAMESPACE@ - -#endif |