PixelLightAPI  .
RegistryWindows.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: RegistryWindows.h                              *
00003  *
00004  *  Copyright (C) 2002-2011 The PixelLight Team (http://www.pixellight.org/)
00005  *
00006  *  This file is part of PixelLight.
00007  *
00008  *  PixelLight is free software: you can redistribute it and/or modify
00009  *  it under the terms of the GNU Lesser General Public License as published by
00010  *  the Free Software Foundation, either version 3 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  PixelLight is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016  *  GNU Lesser General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU Lesser General Public License
00019  *  along with PixelLight. If not, see <http://www.gnu.org/licenses/>.
00020 \*********************************************************/
00021 
00022 
00023 #ifndef __PLCORE_REGISTRY_WINDOWS_H__
00024 #define __PLCORE_REGISTRY_WINDOWS_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include "PLCore/PLCoreWindowsIncludes.h"
00032 #include "PLCore/Registry/RegistryImpl.h"
00033 
00034 
00035 //[-------------------------------------------------------]
00036 //[ Namespace                                             ]
00037 //[-------------------------------------------------------]
00038 namespace PLCore {
00039 
00040 
00041 //[-------------------------------------------------------]
00042 //[ Classes                                               ]
00043 //[-------------------------------------------------------]
00044 /**
00045 *  @brief
00046 *    Windows 'Registry' implementation
00047 */
00048 class RegistryWindows : public RegistryImpl {
00049 
00050 
00051     //[-------------------------------------------------------]
00052     //[ Friends                                               ]
00053     //[-------------------------------------------------------]
00054     friend class Registry;
00055 
00056 
00057     //[-------------------------------------------------------]
00058     //[ Private functions                                     ]
00059     //[-------------------------------------------------------]
00060     private:
00061         /**
00062         *  @brief
00063         *    Constructor
00064         */
00065         RegistryWindows();
00066 
00067         /**
00068         *  @brief
00069         *    Destructor
00070         */
00071         virtual ~RegistryWindows();
00072 
00073 
00074     //[-------------------------------------------------------]
00075     //[ Private virtual RegistryImpl functions                ]
00076     //[-------------------------------------------------------]
00077     private:
00078         virtual uint32 GetRegistryType() const override;
00079         virtual bool Open(uint32 nKey, const String &sSubKey, uint32 nAccess) override;
00080         virtual bool Create(uint32 nKey, const String &sSubKey, uint32 nAccess) override;
00081         virtual bool Delete() override;
00082         virtual void Close() override;
00083         virtual uint32 GetOpenKey() const override;
00084         virtual String GetOpenSubKey() const override;
00085         virtual uint32 GetOpenAccessMode() const override;
00086         virtual uint32 GetNumOfSubKeys() const override;
00087         virtual String GetSubKey(uint32 nIndex) const override;
00088         virtual uint32 GetNumOfValues() const override;
00089         virtual String GetValue(uint32 nIndex) const override;
00090         virtual uint32 GetValueType(const String &sName) const override;
00091         virtual String GetValueString(const String &sName) const override;
00092         virtual uint32 GetValueDWord(const String &sName) const override;
00093         virtual uint32 GetValueBinary(const String &sName, uint8 *pBuffer, uint32 nSize) const override;
00094         virtual bool SetValueString(const String &sName, const String &sValue) override;
00095         virtual bool SetValueDWord(const String &sName, uint32 nValue) override;
00096         virtual bool SetValueBinary(const String &sName, const uint8 *pBuffer, uint32 nSize) override;
00097         virtual void Flush() override;
00098 
00099 
00100     //[-------------------------------------------------------]
00101     //[ Private data                                          ]
00102     //[-------------------------------------------------------]
00103     private:
00104         uint32  m_nKey;     /**< Registry key (type: "Registry::EKey") */
00105         String  m_sSubKey;  /**< Sub key */
00106         uint32  m_nAccess;  /**< Access modes */
00107         HKEY    m_hKey;     /**< Windows registry key handle */
00108 
00109 
00110 };
00111 
00112 
00113 //[-------------------------------------------------------]
00114 //[ Namespace                                             ]
00115 //[-------------------------------------------------------]
00116 } // PLCore
00117 
00118 
00119 #endif // __PLCORE_REGISTRY_WINDOWS_H__


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:00
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported