LibreOffice Module registry (master) 1
Public Member Functions | Private Types | 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, std::u16string_view keyName, RegKeyHandle *phNewKey)
 
RegError openKey (RegKeyHandle hKey, std::u16string_view keyName, RegKeyHandle *phOpenKey)
 
RegError closeKey (RegKeyHandle hKey)
 
RegError deleteKey (RegKeyHandle hKey, std::u16string_view keyName)
 
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, std::u16string_view keyName)
 
RegError deleteSubkeysAndValues (ORegKey *pKey)
 
RegError dumpValue (const OUString &sPath, const OUString &sName, sal_Int16 nSpace) const
 
RegError dumpKey (const OUString &sPath, const OUString &sName, sal_Int16 nSpace) const
 

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 { u"/" }
 

Friends

class ORegKey
 

Detailed Description

Definition at line 43 of file regimpl.hxx.

Member Typedef Documentation

◆ KeyMap

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

Definition at line 110 of file regimpl.hxx.

Constructor & Destructor Documentation

◆ ORegistry()

ORegistry::ORegistry ( )

Definition at line 420 of file regimpl.cxx.

References m_refCount.

Referenced by destroyRegistry().

◆ ~ORegistry()

ORegistry::~ORegistry ( )

Member Function Documentation

◆ acquire()

sal_uInt32 ORegistry::acquire ( )
inline

Definition at line 48 of file regimpl.hxx.

References m_refCount.

Referenced by acquire().

◆ acquireKey()

RegError ORegistry::acquireKey ( RegKeyHandle  hKey)

Definition at line 575 of file regimpl.cxx.

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

Referenced by acquireKey().

◆ closeKey()

RegError ORegistry::closeKey ( RegKeyHandle  hKey)

◆ closeRegistry()

RegError ORegistry::closeRegistry ( )

◆ createKey()

RegError ORegistry::createKey ( RegKeyHandle  hKey,
std::u16string_view  keyName,
RegKeyHandle phNewKey 
)

◆ deleteKey()

RegError ORegistry::deleteKey ( RegKeyHandle  hKey,
std::u16string_view  keyName 
)

◆ deleteSubkeysAndValues()

RegError ORegistry::deleteSubkeysAndValues ( ORegKey pKey)
private

◆ destroyRegistry()

RegError ORegistry::destroyRegistry ( const OUString &  name)

◆ dumpKey()

RegError ORegistry::dumpKey ( const OUString &  sPath,
const OUString &  sName,
sal_Int16  nSpace 
) const
private

◆ dumpRegistry()

RegError ORegistry::dumpRegistry ( RegKeyHandle  hKey) const

◆ dumpValue()

RegError ORegistry::dumpValue ( const OUString &  sPath,
const OUString &  sName,
sal_Int16  nSpace 
) const
private

◆ eraseKey()

RegError ORegistry::eraseKey ( ORegKey pKey,
std::u16string_view  keyName 
)
private

◆ getName()

const OUString & ORegistry::getName ( ) const
inline

Definition at line 92 of file regimpl.hxx.

References m_name.

Referenced by dumpRegistry(), and getName().

◆ getRootKey()

ORegKey * ORegistry::getRootKey ( )

Definition at line 849 of file regimpl.cxx.

References m_openKeyTable, and ROOT.

Referenced by closeKey(), and openRootKey().

◆ getStoreFile()

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

Definition at line 89 of file regimpl.hxx.

References m_file.

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

◆ initRegistry()

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

◆ isOpen()

bool ORegistry::isOpen ( ) const
inline

Definition at line 84 of file regimpl.hxx.

References m_isOpen.

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

◆ isReadOnly()

bool ORegistry::isReadOnly ( ) const
inline

◆ openKey()

RegError ORegistry::openKey ( RegKeyHandle  hKey,
std::u16string_view  keyName,
RegKeyHandle phOpenKey 
)

◆ release()

sal_uInt32 ORegistry::release ( )
inline

Definition at line 51 of file regimpl.hxx.

References m_refCount.

Referenced by closeRegistry(), and release().

◆ releaseKey()

RegError ORegistry::releaseKey ( RegKeyHandle  hKey)

Friends And Related Function Documentation

◆ ORegKey

friend class ORegKey
friend

Definition at line 95 of file regimpl.hxx.

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

Member Data Documentation

◆ m_file

store::OStoreFile ORegistry::m_file
private

◆ m_isOpen

bool ORegistry::m_isOpen
private

Definition at line 115 of file regimpl.hxx.

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

◆ m_mutex

osl::Mutex ORegistry::m_mutex
private

◆ m_name

OUString ORegistry::m_name
private

Definition at line 116 of file regimpl.hxx.

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

◆ m_openKeyTable

KeyMap ORegistry::m_openKeyTable
private

◆ m_readOnly

bool ORegistry::m_readOnly
private

Definition at line 114 of file regimpl.hxx.

Referenced by initRegistry(), and isReadOnly().

◆ m_refCount

sal_uInt32 ORegistry::m_refCount
private

Definition at line 112 of file regimpl.hxx.

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

◆ ROOT

constexpr OUStringLiteral ORegistry::ROOT { u"/" }
staticconstexprprivate

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