Version: 1.0.0
wxXmlConfig Class Reference

#include <xmlconf.h>

+ Inheritance diagram for wxXmlConfig:

Detailed Description

Definition at line 34 of file xmlconf.h.

Public Member Functions

 wxXmlConfig (const wxString &appName=wxEmptyString, const wxString &vendorName=wxEmptyString, const wxString &localFilename=wxEmptyString, const wxString &globalFilename=wxEmptyString, long style=wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE, const wxMBConv &conv=wxConvAuto())
 
virtual ~wxXmlConfig ()
 
virtual void SetPath (const wxString &strPath)
 
virtual const wxString & GetPath () const
 
virtual bool GetFirstGroup (wxString &str, long &lIndex) const
 
virtual bool GetNextGroup (wxString &str, long &lIndex) const
 
virtual bool GetFirstEntry (wxString &str, long &lIndex) const
 
virtual bool GetNextEntry (wxString &str, long &lIndex) const
 
virtual size_t GetNumberOfEntries (bool bRecursive=false) const
 
virtual size_t GetNumberOfGroups (bool bRecursive=false) const
 
virtual bool HasGroup (const wxString &strName) const
 
virtual bool HasEntry (const wxString &strName) const
 
virtual bool Flush (bool bCurrentOnly=false)
 
virtual bool RenameEntry (const wxString &oldName, const wxString &newName)
 
virtual bool RenameGroup (const wxString &oldName, const wxString &newName)
 
virtual bool DeleteEntry (const wxString &key, bool bGroupIfEmptyAlso=true)
 
virtual bool DeleteGroup (const wxString &key)
 
virtual bool DeleteAll ()
 

Static Public Member Functions

static wxString GetGlobalFileName (const wxChar *szFile)
 
static wxString GetLocalFileName (const wxChar *szFile)
 

Protected Member Functions

virtual bool DoReadString (const wxString &key, wxString *pStr) const
 
virtual bool DoReadLong (const wxString &key, long *pl) const
 
virtual bool DoWriteString (const wxString &key, const wxString &szValue)
 
virtual bool DoWriteLong (const wxString &key, long lValue)
 

Private Member Functions

void Init ()
 
void CleanUp ()
 
void Parse (const wxXmlDocument &xmlDocument, bool bLocal)
 
void SetRootPath ()
 
bool DoSetPath (const wxString &strPath, bool createMissingComponents)
 
void SetDirty ()
 
void ResetDirty ()
 
bool IsDirty ()
 
bool IsGroup (const wxXmlConfigGroup *group) const
 
bool IsEntry (const wxXmlConfigEntry *entry) const
 
wxXmlConfigEntryFindEntry (const wxString &key) const
 
wxXmlConfigEntryAddEntry (const wxString &key)
 
wxXmlConfigGroupFindGroup (const wxString &key) const
 
wxXmlConfigGroupAddGroup (const wxString &key)
 
 wxDECLARE_NO_COPY_CLASS (wxXmlConfig)
 
 wxDECLARE_ABSTRACT_CLASS (wxXmlConfig)
 

Static Private Member Functions

static wxString GetGlobalDir ()
 
static wxString GetLocalDir ()
 

Private Attributes

wxXmlDocument * m_xmlDoc
 
wxXmlConfigGroupm_pCurrentGroup
 
wxString m_strLocalFile
 
wxString m_strGlobalFile
 
wxString m_strPath
 
bool m_isDirty
 

Constructor & Destructor Documentation

◆ wxXmlConfig()

wxXmlConfig::wxXmlConfig ( const wxString &  appName = wxEmptyString,
const wxString &  vendorName = wxEmptyString,
const wxString &  localFilename = wxEmptyString,
const wxString &  globalFilename = wxEmptyString,
long  style = wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE,
const wxMBConv &  conv = wxConvAuto() 
)

◆ ~wxXmlConfig()

virtual wxXmlConfig::~wxXmlConfig ( )
virtual

Member Function Documentation

◆ AddEntry()

wxXmlConfigEntry* wxXmlConfig::AddEntry ( const wxString &  key)
private

◆ AddGroup()

wxXmlConfigGroup* wxXmlConfig::AddGroup ( const wxString &  key)
private

◆ CleanUp()

void wxXmlConfig::CleanUp ( )
private

◆ DeleteAll()

virtual bool wxXmlConfig::DeleteAll ( )
virtual

◆ DeleteEntry()

virtual bool wxXmlConfig::DeleteEntry ( const wxString &  key,
bool  bGroupIfEmptyAlso = true 
)
virtual

◆ DeleteGroup()

virtual bool wxXmlConfig::DeleteGroup ( const wxString &  key)
virtual

◆ DoReadLong()

virtual bool wxXmlConfig::DoReadLong ( const wxString &  key,
long *  pl 
) const
protectedvirtual

◆ DoReadString()

virtual bool wxXmlConfig::DoReadString ( const wxString &  key,
wxString *  pStr 
) const
protectedvirtual

◆ DoSetPath()

bool wxXmlConfig::DoSetPath ( const wxString &  strPath,
bool  createMissingComponents 
)
private

◆ DoWriteLong()

virtual bool wxXmlConfig::DoWriteLong ( const wxString &  key,
long  lValue 
)
protectedvirtual

◆ DoWriteString()

virtual bool wxXmlConfig::DoWriteString ( const wxString &  key,
const wxString &  szValue 
)
protectedvirtual

◆ FindEntry()

wxXmlConfigEntry* wxXmlConfig::FindEntry ( const wxString &  key) const
private

◆ FindGroup()

wxXmlConfigGroup* wxXmlConfig::FindGroup ( const wxString &  key) const
private

◆ Flush()

virtual bool wxXmlConfig::Flush ( bool  bCurrentOnly = false)
virtual

◆ GetFirstEntry()

virtual bool wxXmlConfig::GetFirstEntry ( wxString &  str,
long &  lIndex 
) const
virtual

◆ GetFirstGroup()

virtual bool wxXmlConfig::GetFirstGroup ( wxString &  str,
long &  lIndex 
) const
virtual

◆ GetGlobalDir()

static wxString wxXmlConfig::GetGlobalDir ( )
staticprivate

◆ GetGlobalFileName()

static wxString wxXmlConfig::GetGlobalFileName ( const wxChar *  szFile)
static

◆ GetLocalDir()

static wxString wxXmlConfig::GetLocalDir ( )
staticprivate

◆ GetLocalFileName()

static wxString wxXmlConfig::GetLocalFileName ( const wxChar *  szFile)
static

◆ GetNextEntry()

virtual bool wxXmlConfig::GetNextEntry ( wxString &  str,
long &  lIndex 
) const
virtual

◆ GetNextGroup()

virtual bool wxXmlConfig::GetNextGroup ( wxString &  str,
long &  lIndex 
) const
virtual

◆ GetNumberOfEntries()

virtual size_t wxXmlConfig::GetNumberOfEntries ( bool  bRecursive = false) const
virtual

◆ GetNumberOfGroups()

virtual size_t wxXmlConfig::GetNumberOfGroups ( bool  bRecursive = false) const
virtual

◆ GetPath()

virtual const wxString& wxXmlConfig::GetPath ( ) const
inlinevirtual

Definition at line 53 of file xmlconf.h.

◆ HasEntry()

virtual bool wxXmlConfig::HasEntry ( const wxString &  strName) const
virtual

◆ HasGroup()

virtual bool wxXmlConfig::HasGroup ( const wxString &  strName) const
virtual

◆ Init()

void wxXmlConfig::Init ( )
private

◆ IsDirty()

bool wxXmlConfig::IsDirty ( )
inlineprivate

Definition at line 105 of file xmlconf.h.

◆ IsEntry()

bool wxXmlConfig::IsEntry ( const wxXmlConfigEntry entry) const
private

◆ IsGroup()

bool wxXmlConfig::IsGroup ( const wxXmlConfigGroup group) const
private

◆ Parse()

void wxXmlConfig::Parse ( const wxXmlDocument &  xmlDocument,
bool  bLocal 
)
private

◆ RenameEntry()

virtual bool wxXmlConfig::RenameEntry ( const wxString &  oldName,
const wxString &  newName 
)
virtual

◆ RenameGroup()

virtual bool wxXmlConfig::RenameGroup ( const wxString &  oldName,
const wxString &  newName 
)
virtual

◆ ResetDirty()

void wxXmlConfig::ResetDirty ( )
inlineprivate

Definition at line 104 of file xmlconf.h.

◆ SetDirty()

void wxXmlConfig::SetDirty ( )
inlineprivate

Definition at line 103 of file xmlconf.h.

◆ SetPath()

virtual void wxXmlConfig::SetPath ( const wxString &  strPath)
virtual

◆ SetRootPath()

void wxXmlConfig::SetRootPath ( )
private

◆ wxDECLARE_ABSTRACT_CLASS()

wxXmlConfig::wxDECLARE_ABSTRACT_CLASS ( wxXmlConfig  )
private

◆ wxDECLARE_NO_COPY_CLASS()

wxXmlConfig::wxDECLARE_NO_COPY_CLASS ( wxXmlConfig  )
private

Member Data Documentation

◆ m_isDirty

bool wxXmlConfig::m_isDirty
private

Definition at line 120 of file xmlconf.h.

◆ m_pCurrentGroup

wxXmlConfigGroup* wxXmlConfig::m_pCurrentGroup
private

Definition at line 116 of file xmlconf.h.

◆ m_strGlobalFile

wxString wxXmlConfig::m_strGlobalFile
private

Definition at line 118 of file xmlconf.h.

◆ m_strLocalFile

wxString wxXmlConfig::m_strLocalFile
private

Definition at line 117 of file xmlconf.h.

◆ m_strPath

wxString wxXmlConfig::m_strPath
private

Definition at line 119 of file xmlconf.h.

◆ m_xmlDoc

wxXmlDocument* wxXmlConfig::m_xmlDoc
private

Definition at line 115 of file xmlconf.h.