LibreOffice Module registry (master) 1
Public Member Functions | Private Attributes | Friends | List of all members
Registry Class Referencefinal

The Registry provides the functionality to read and write information in a registry file. More...

#include <registry.hxx>

Collaboration diagram for Registry:
[legend]

Public Member Functions

 Registry ()
 Default constructor. More...
 
 Registry (const Registry &toCopy)
 Copy constructor. More...
 
 Registry (Registry &&other) noexcept
 
 ~Registry ()
 Destructor. The Destructor close the registry if it is open. More...
 
Registryoperator= (const Registry &toAssign)
 Assign operator. More...
 
Registryoperator= (Registry &&other)
 
bool isValid () const
 checks if the registry points to a valid registry data file. More...
 
bool isReadOnly () const
 returns the access mode of the registry. More...
 
RegError openRootKey (RegistryKey &rRootKey)
 opens the root key of the registry. More...
 
OUString getName ()
 returns the name of the current registry data file. More...
 
RegError create (const OUString &registryName)
 creates a new registry with the specified name and creates a root key. More...
 
RegError open (const OUString &registryName, RegAccessMode accessMode)
 opens a registry with the specified name. More...
 
RegError close ()
 closes explicitly the current registry data file. More...
 
RegError destroy (const OUString &registryName)
 destroys a registry. More...
 
const Registry_ApigetApi () const
 returns the used registry Api. More...
 

Private Attributes

const Registry_Apim_pApi
 stores the used and initialized registry Api. More...
 
RegHandle m_hImpl
 stores the handle of the underlying registry file on which most of the functions work. More...
 

Friends

class RegistryKey
 
class RegistryKeyArray
 
class RegistryKeyNames
 

Detailed Description

The Registry provides the functionality to read and write information in a registry file.

The class is implemented inline and use a C-Api.

Definition at line 81 of file registry.hxx.

Constructor & Destructor Documentation

◆ Registry() [1/3]

Registry::Registry ( )
inline

Default constructor.

Definition at line 938 of file registry.hxx.

◆ Registry() [2/3]

Registry::Registry ( const Registry toCopy)
inline

Copy constructor.

Definition at line 943 of file registry.hxx.

References m_hImpl, and m_pApi.

◆ Registry() [3/3]

Registry::Registry ( Registry &&  other)
inlinenoexcept

Definition at line 91 of file registry.hxx.

◆ ~Registry()

Registry::~Registry ( )
inline

Destructor. The Destructor close the registry if it is open.

Definition at line 952 of file registry.hxx.

References m_hImpl, and m_pApi.

Member Function Documentation

◆ close()

RegError Registry::close ( )
inline

closes explicitly the current registry data file.

Definition at line 1005 of file registry.hxx.

References m_hImpl, m_pApi, NO_ERROR, and RegError.

◆ create()

RegError Registry::create ( const OUString &  registryName)
inline

creates a new registry with the specified name and creates a root key.

Parameters
registryNamespecifies the name of the new registry.
Returns
RegError::NO_ERROR if succeeds else an error code.

Definition at line 990 of file registry.hxx.

References m_hImpl, and m_pApi.

◆ destroy()

RegError Registry::destroy ( const OUString &  registryName)
inline

destroys a registry.

Parameters
registryNamespecifies a registry name, if the name is an empty string the registry itself will be destroyed.
Returns
RegError::NO_ERROR if succeeds else an error code.

Definition at line 1013 of file registry.hxx.

References m_hImpl, m_pApi, NO_ERROR, and RegError.

◆ getApi()

const Registry_Api * Registry::getApi ( ) const
inline

returns the used registry Api.

Definition at line 161 of file registry.hxx.

References m_pApi.

Referenced by RegistryValueList< ValueType >::~RegistryValueList().

◆ getName()

OUString Registry::getName ( )
inline

returns the name of the current registry data file.

Definition at line 983 of file registry.hxx.

References m_hImpl, and m_pApi.

Referenced by RegistryKey::getRegistryName().

◆ isReadOnly()

bool Registry::isReadOnly ( ) const
inline

returns the access mode of the registry.

Returns
TRUE if the access mode is readonly else FALSE.

Definition at line 974 of file registry.hxx.

References m_hImpl, and m_pApi.

◆ isValid()

bool Registry::isValid ( ) const
inline

◆ open()

RegError Registry::open ( const OUString &  registryName,
RegAccessMode  accessMode 
)
inline

opens a registry with the specified name.

If the registry already points to a valid registry, the old registry will be closed.

Parameters
registryNamespecifies a registry name.
accessModespecifies the access mode for the registry, RegAccessMode::READONLY or RegAccessMode::READWRITE.
Returns
RegError::NO_ERROR if succeeds else an error code.

Definition at line 997 of file registry.hxx.

References m_hImpl, and m_pApi.

◆ openRootKey()

RegError Registry::openRootKey ( RegistryKey rRootKey)
inline

opens the root key of the registry.

Parameters
rRootKeyreference to a RegistryKey which is filled with the rootkey.
Returns
RegError::NO_ERROR if succeeds else an error code.

Definition at line 977 of file registry.hxx.

References m_hImpl, RegistryKey::m_hImpl, and m_pApi.

◆ operator=() [1/2]

Registry & Registry::operator= ( const Registry toAssign)
inline

Assign operator.

Definition at line 958 of file registry.hxx.

References m_hImpl, and m_pApi.

◆ operator=() [2/2]

Registry & Registry::operator= ( Registry &&  other)
inline

Definition at line 100 of file registry.hxx.

References m_hImpl, and m_pApi.

Friends And Related Function Documentation

◆ RegistryKey

friend class RegistryKey
friend

Definition at line 156 of file registry.hxx.

◆ RegistryKeyArray

friend class RegistryKeyArray
friend

Definition at line 157 of file registry.hxx.

◆ RegistryKeyNames

friend class RegistryKeyNames
friend

Definition at line 158 of file registry.hxx.

Member Data Documentation

◆ m_hImpl

RegHandle Registry::m_hImpl
private

stores the handle of the underlying registry file on which most of the functions work.

Definition at line 167 of file registry.hxx.

Referenced by close(), create(), destroy(), getName(), isReadOnly(), isValid(), open(), openRootKey(), operator=(), Registry(), and ~Registry().

◆ m_pApi

const Registry_Api* Registry::m_pApi
private

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