LibreOffice Module registry (master)  1
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
ORegistry Class Reference

#include <regimpl.hxx>

Collaboration diagram for ORegistry:
[legend]

Public Member Functions

 ORegistry ()
 
sal_uInt32 acquire ()
 
sal_uInt32 release ()
 
RegError initRegistry (const OUString &name, RegAccessMode accessMode, bool bCreate=false)
 
RegError closeRegistry ()
 
RegError destroyRegistry (const OUString &name)
 
RegError acquireKey (RegKeyHandle hKey)
 
RegError releaseKey (RegKeyHandle hKey)
 
RegError createKey (RegKeyHandle hKey, const OUString &keyName, RegKeyHandle *phNewKey)
 
RegError openKey (RegKeyHandle hKey, const OUString &keyName, RegKeyHandle *phOpenKey)
 
RegError closeKey (RegKeyHandle hKey)
 
RegError deleteKey (RegKeyHandle hKey, const OUString &keyName)
 
RegError loadKey (RegKeyHandle hKey, const OUString &regFileName, bool bWarnings, bool bReport)
 
RegError dumpRegistry (RegKeyHandle hKey) const
 
 ~ORegistry ()
 
bool isReadOnly () const
 
bool isOpen () const
 
ORegKeygetRootKey ()
 
const store::OStoreFilegetStoreFile () const
 
const OUString & getName () const
 

Private Types

typedef std::unordered_map< OUString, ORegKey * > KeyMap
 

Private Member Functions

RegError eraseKey (ORegKey *pKey, const OUString &keyName)
 
RegError deleteSubkeysAndValues (ORegKey *pKey)
 
RegError loadAndSaveKeys (ORegKey *pTargetKey, ORegKey *pSourceKey, const OUString &keyName, sal_uInt32 nCut, bool bWarnings, bool bReport)
 
RegError dumpValue (const OUString &sPath, const OUString &sName, sal_Int16 nSpace) const
 
RegError dumpKey (const OUString &sPath, const OUString &sName, sal_Int16 nSpace) const
 

Static Private Member Functions

static RegError loadAndSaveValue (ORegKey *pTargetKey, ORegKey const *pSourceKey, const OUString &valueName, sal_uInt32 nCut, bool bWarnings, bool bReport)
 
static RegError checkBlop (store::OStoreStream &rValue, const OUString &sTargetPath, sal_uInt32 srcValueSize, sal_uInt8 const *pSrcBuffer, bool bReport)
 
static RegError mergeModuleValue (store::OStoreStream &rTargetValue, RegistryTypeReader const &reader, RegistryTypeReader const &reader2)
 

Private Attributes

sal_uInt32 m_refCount
 
osl::Mutex m_mutex
 
bool m_readOnly
 
bool m_isOpen
 
OUString m_name
 
store::OStoreFile m_file
 
KeyMap m_openKeyTable
 

Static Private Attributes

static constexpr OUStringLiteral ROOT
 

Friends

class ORegKey
 

Detailed Description

Definition at line 42 of file regimpl.hxx.

Member Typedef Documentation

typedef std::unordered_map< OUString, ORegKey* > ORegistry::KeyMap
private

Definition at line 138 of file regimpl.hxx.

Constructor & Destructor Documentation

ORegistry::ORegistry ( )

Definition at line 422 of file regimpl.cxx.

References m_refCount.

Referenced by destroyRegistry(), and loadKey().

ORegistry::~ORegistry ( )

Member Function Documentation

sal_uInt32 ORegistry::acquire ( )
inline

Definition at line 47 of file regimpl.hxx.

References m_refCount.

Referenced by acquire().

RegError ORegistry::acquireKey ( RegKeyHandle  hKey)

Definition at line 577 of file regimpl.cxx.

References ORegKey::acquire(), INVALID_KEY, m_mutex, NO_ERROR, and REG_GUARD.

Referenced by acquireKey().

RegError ORegistry::checkBlop ( store::OStoreStream rValue,
const OUString &  sTargetPath,
sal_uInt32  srcValueSize,
sal_uInt8 const *  pSrcBuffer,
bool  bReport 
)
staticprivate
RegError ORegistry::closeKey ( RegKeyHandle  hKey)
RegError ORegistry::closeRegistry ( )
RegError ORegistry::createKey ( RegKeyHandle  hKey,
const OUString &  keyName,
RegKeyHandle phNewKey 
)
RegError ORegistry::deleteKey ( RegKeyHandle  hKey,
const OUString &  keyName 
)
RegError ORegistry::deleteSubkeysAndValues ( ORegKey pKey)
private
RegError ORegistry::destroyRegistry ( const OUString &  name)
RegError ORegistry::dumpKey ( const OUString &  sPath,
const OUString &  sName,
sal_Int16  nSpace 
) const
private
RegError ORegistry::dumpRegistry ( RegKeyHandle  hKey) const
RegError ORegistry::dumpValue ( const OUString &  sPath,
const OUString &  sName,
sal_Int16  nSpace 
) const
private
RegError ORegistry::eraseKey ( ORegKey pKey,
const OUString &  keyName 
)
private
const OUString& ORegistry::getName ( ) const
inline

Definition at line 96 of file regimpl.hxx.

References m_name.

Referenced by dumpRegistry(), and getName().

ORegKey * ORegistry::getRootKey ( )

Definition at line 1248 of file regimpl.cxx.

References m_openKeyTable, and ROOT.

Referenced by closeKey(), and openRootKey().

const store::OStoreFile& ORegistry::getStoreFile ( ) const
inline

Definition at line 93 of file regimpl.hxx.

References m_file.

Referenced by ORegKey::getStoreFile(), and ORegKey::getValueInfo().

RegError ORegistry::initRegistry ( const OUString &  name,
RegAccessMode  accessMode,
bool  bCreate = false 
)
bool ORegistry::isOpen ( ) const
inline

Definition at line 88 of file regimpl.hxx.

References m_isOpen.

Referenced by closeRegistry(), destroyRegistry(), dumpRegistry(), getName(), mergeKey(), and openRootKey().

bool ORegistry::isReadOnly ( ) const
inline
RegError ORegistry::loadAndSaveKeys ( ORegKey pTargetKey,
ORegKey pSourceKey,
const OUString &  keyName,
sal_uInt32  nCut,
bool  bWarnings,
bool  bReport 
)
private
RegError ORegistry::loadAndSaveValue ( ORegKey pTargetKey,
ORegKey const *  pSourceKey,
const OUString &  valueName,
sal_uInt32  nCut,
bool  bWarnings,
bool  bReport 
)
staticprivate
RegError ORegistry::loadKey ( RegKeyHandle  hKey,
const OUString &  regFileName,
bool  bWarnings,
bool  bReport 
)
RegError ORegistry::mergeModuleValue ( store::OStoreStream rTargetValue,
RegistryTypeReader const &  reader,
RegistryTypeReader const &  reader2 
)
staticprivate
RegError ORegistry::openKey ( RegKeyHandle  hKey,
const OUString &  keyName,
RegKeyHandle phOpenKey 
)
sal_uInt32 ORegistry::release ( )
inline

Definition at line 50 of file regimpl.hxx.

References m_refCount.

Referenced by closeRegistry(), and release().

RegError ORegistry::releaseKey ( RegKeyHandle  hKey)

Friends And Related Function Documentation

friend class ORegKey
friend

Definition at line 99 of file regimpl.hxx.

Referenced by createKey(), initRegistry(), and openKey().

Member Data Documentation

store::OStoreFile ORegistry::m_file
private
bool ORegistry::m_isOpen
private

Definition at line 143 of file regimpl.hxx.

Referenced by closeRegistry(), destroyRegistry(), initRegistry(), and isOpen().

osl::Mutex ORegistry::m_mutex
private
OUString ORegistry::m_name
private

Definition at line 144 of file regimpl.hxx.

Referenced by destroyRegistry(), getName(), and initRegistry().

KeyMap ORegistry::m_openKeyTable
private
bool ORegistry::m_readOnly
private

Definition at line 142 of file regimpl.hxx.

Referenced by initRegistry(), and isReadOnly().

sal_uInt32 ORegistry::m_refCount
private

Definition at line 140 of file regimpl.hxx.

Referenced by acquire(), destroyRegistry(), and release().

constexpr OUStringLiteral ORegistry::ROOT
staticprivate

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