LibreOffice Module tools (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Config Class Reference

#include <config.hxx>

Collaboration diagram for Config:
[legend]

Public Member Functions

 Config (const OUString &rFileName)
 
 ~Config ()
 
void SetGroup (const OString &rGroup)
 
const OString & GetGroup () const
 
void DeleteGroup (std::string_view rGroup)
 
OString GetGroupName (sal_uInt16 nGroup) const
 
sal_uInt16 GetGroupCount () const
 
bool HasGroup (std::string_view rGroup) const
 
OString ReadKey (const OString &rKey) const
 
OString ReadKey (const OString &rKey, const OString &rDefault) const
 
void WriteKey (const OString &rKey, const OString &rValue)
 
void DeleteKey (std::string_view rKey)
 
OString GetKeyName (sal_uInt16 nKey) const
 
OString ReadKey (sal_uInt16 nKey) const
 
sal_uInt16 GetKeyCount () const
 
void Flush ()
 

Private Member Functions

TOOLS_DLLPRIVATE bool ImplUpdateConfig () const
 
TOOLS_DLLPRIVATE ImplGroupDataImplGetGroup () const
 
 Config (const Config &rConfig)=delete
 
Configoperator= (const Config &rConfig)=delete
 

Private Attributes

OUString maFileName
 
OString maGroupName
 
std::unique_ptr< ImplConfigDatampData
 
ImplGroupDatampActGroup
 
sal_uInt32 mnDataUpdateId
 

Detailed Description

Definition at line 29 of file config.hxx.

Constructor & Destructor Documentation

◆ Config() [1/2]

Config::Config ( const OUString &  rFileName)

◆ ~Config()

Config::~Config ( )

Definition at line 632 of file config.cxx.

References Flush(), ImplDeleteConfigData(), mpData, and SAL_INFO.

◆ Config() [2/2]

Config::Config ( const Config rConfig)
privatedelete

Member Function Documentation

◆ DeleteGroup()

void Config::DeleteGroup ( std::string_view  rGroup)

◆ DeleteKey()

void Config::DeleteKey ( std::string_view  rKey)

Definition at line 828 of file config.cxx.

References ImplGetGroup(), ImplUpdateConfig(), mpData, and ImplGroupData::mpFirstKey.

◆ Flush()

void Config::Flush ( void  )

Definition at line 940 of file config.cxx.

References ImplWriteConfig(), and mpData.

Referenced by ~Config().

◆ GetGroup()

const OString & Config::GetGroup ( ) const
inline

Definition at line 46 of file config.hxx.

Referenced by GetKeyCount(), GetKeyName(), ReadKey(), and WriteKey().

◆ GetGroupCount()

sal_uInt16 Config::GetGroupCount ( ) const

Definition at line 717 of file config.cxx.

References mpData, and ImplGroupData::mpNext.

◆ GetGroupName()

OString Config::GetGroupName ( sal_uInt16  nGroup) const

Definition at line 697 of file config.cxx.

References ImplGroupData::maGroupName, mpData, and ImplGroupData::mpNext.

◆ GetKeyCount()

sal_uInt16 Config::GetKeyCount ( ) const

Definition at line 866 of file config.cxx.

References GetGroup(), ImplGetGroup(), maFileName, ImplGroupData::mpFirstKey, nCount, and SAL_INFO.

◆ GetKeyName()

OString Config::GetKeyName ( sal_uInt16  nKey) const

Definition at line 888 of file config.cxx.

References GetGroup(), ImplGetGroup(), maFileName, ImplGroupData::mpFirstKey, and SAL_INFO.

◆ HasGroup()

bool Config::HasGroup ( std::string_view  rGroup) const

Definition at line 730 of file config.cxx.

References ImplGroupData::maGroupName, mpData, and ImplGroupData::mpNext.

◆ ImplGetGroup()

ImplGroupData * Config::ImplGetGroup ( ) const
private

◆ ImplUpdateConfig()

bool Config::ImplUpdateConfig ( ) const
private

◆ operator=()

Config & Config::operator= ( const Config rConfig)
privatedelete

◆ ReadKey() [1/3]

OString Config::ReadKey ( const OString &  rKey) const

Definition at line 749 of file config.cxx.

References ReadKey().

Referenced by ReadKey().

◆ ReadKey() [2/3]

OString Config::ReadKey ( const OString &  rKey,
const OString &  rDefault 
) const

Definition at line 754 of file config.cxx.

References GetGroup(), ImplGetGroup(), maFileName, ImplGroupData::mpFirstKey, and SAL_INFO.

◆ ReadKey() [3/3]

OString Config::ReadKey ( sal_uInt16  nKey) const

Definition at line 914 of file config.cxx.

References GetGroup(), ImplGetGroup(), maFileName, ImplGroupData::mpFirstKey, and SAL_INFO.

◆ SetGroup()

void Config::SetGroup ( const OString &  rGroup)

Definition at line 640 of file config.cxx.

References maGroupName, mnDataUpdateId, and mpData.

◆ WriteKey()

void Config::WriteKey ( const OString &  rKey,
const OString &  rValue 
)

Member Data Documentation

◆ maFileName

OUString Config::maFileName
private

Definition at line 32 of file config.hxx.

Referenced by Config(), GetKeyCount(), GetKeyName(), ImplUpdateConfig(), ReadKey(), and WriteKey().

◆ maGroupName

OString Config::maGroupName
private

Definition at line 33 of file config.hxx.

Referenced by ImplGetGroup(), and SetGroup().

◆ mnDataUpdateId

sal_uInt32 Config::mnDataUpdateId
private

Definition at line 36 of file config.hxx.

Referenced by Config(), DeleteGroup(), ImplGetGroup(), and SetGroup().

◆ mpActGroup

ImplGroupData* Config::mpActGroup
private

Definition at line 35 of file config.hxx.

Referenced by Config(), and ImplGetGroup().

◆ mpData

std::unique_ptr<ImplConfigData> Config::mpData
private

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