Version: 1.0.0
wxDatabaseConfig Class Reference

#include <dbconf.h>

+ Inheritance diagram for wxDatabaseConfig:

Detailed Description

Definition at line 14 of file dbconf.h.

Classes

struct  dbentry
 

Public Member Functions

 wxDatabaseConfig (const wxString &appName=wxEmptyString, const wxString &vendorName=wxEmptyString, const wxString &viewName=wxEmptyString, const wxString &settingsConf=wxEmptyString, long style=0, const wxMBConv &conv=wxConvAuto())
 
virtual ~wxDatabaseConfig ()
 
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 ()
 

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 Types

typedef std::vector< dbentrydbentries
 

Private Member Functions

void CleanUp ()
 
wxPreparedStatementPrepareStatement (const wxString &strQuery)
 
wxPreparedStatementExecuteStatement (wxPreparedStatement *pStatement, dbentries *pEntries=NULL)
 
void DatabaseErrorCheck (wxDatabaseErrorReporter *reporter)
 
void ProcessException (wxDatabaseException &e, bool fail=true)
 
void SetRootPath (dbentry &entry)
 
bool FindEntries (const wxString &nameORpath, dbentries &entries)
 
bool AddEntry (dbentry &parent, const wxString &name, const wxString *value=NULL)
 
bool WriteEntry (dbentry &entry, const wxString &name, const wxString &value)
 
void GetChildren (dbentry &parent, dbentries *groups=NULL, dbentries *entries=NULL, bool recursive=false)
 
 wxDECLARE_NO_COPY_CLASS (wxDatabaseConfig)
 
 wxDECLARE_ABSTRACT_CLASS (wxDatabaseConfig)
 

Private Attributes

wxDatabaseConfigm_self
 
wxDatabasem_pDatabase
 
wxPreparedStatementm_pStatementSqlAddEntry
 
wxPreparedStatementm_pStatementSqlDelEntry
 
wxPreparedStatementm_pStatementSqlEditEntry
 
wxPreparedStatementm_pStatementSqlFindEntries
 
wxPreparedStatementm_pStatementSqlDropAll
 
dbentry m_entry
 
wxString m_viewName
 
wxString m_settingsConf
 
dbentries m_groups
 
dbentries m_entries
 

Member Typedef Documentation

◆ dbentries

typedef std::vector<dbentry> wxDatabaseConfig::dbentries
private

Definition at line 80 of file dbconf.h.

Constructor & Destructor Documentation

◆ wxDatabaseConfig()

wxDatabaseConfig::wxDatabaseConfig ( const wxString &  appName = wxEmptyString,
const wxString &  vendorName = wxEmptyString,
const wxString &  viewName = wxEmptyString,
const wxString &  settingsConf = wxEmptyString,
long  style = 0,
const wxMBConv &  conv = wxConvAuto() 
)

◆ ~wxDatabaseConfig()

virtual wxDatabaseConfig::~wxDatabaseConfig ( )
virtual

Member Function Documentation

◆ AddEntry()

bool wxDatabaseConfig::AddEntry ( dbentry parent,
const wxString &  name,
const wxString *  value = NULL 
)
private

◆ CleanUp()

void wxDatabaseConfig::CleanUp ( )
private

◆ DatabaseErrorCheck()

void wxDatabaseConfig::DatabaseErrorCheck ( wxDatabaseErrorReporter reporter)
private

◆ DeleteAll()

virtual bool wxDatabaseConfig::DeleteAll ( )
virtual

◆ DeleteEntry()

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

◆ DeleteGroup()

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

◆ DoReadLong()

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

◆ DoReadString()

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

◆ DoWriteLong()

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

◆ DoWriteString()

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

◆ ExecuteStatement()

wxPreparedStatement* wxDatabaseConfig::ExecuteStatement ( wxPreparedStatement pStatement,
dbentries pEntries = NULL 
)
private

◆ FindEntries()

bool wxDatabaseConfig::FindEntries ( const wxString &  nameORpath,
dbentries entries 
)
private

◆ Flush()

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

◆ GetChildren()

void wxDatabaseConfig::GetChildren ( dbentry parent,
dbentries groups = NULL,
dbentries entries = NULL,
bool  recursive = false 
)
private

◆ GetFirstEntry()

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

◆ GetFirstGroup()

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

◆ GetNextEntry()

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

◆ GetNextGroup()

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

◆ GetNumberOfEntries()

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

◆ GetNumberOfGroups()

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

◆ GetPath()

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

Definition at line 38 of file dbconf.h.

◆ HasEntry()

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

◆ HasGroup()

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

◆ PrepareStatement()

wxPreparedStatement* wxDatabaseConfig::PrepareStatement ( const wxString &  strQuery)
private

◆ ProcessException()

void wxDatabaseConfig::ProcessException ( wxDatabaseException &  e,
bool  fail = true 
)
private

◆ RenameEntry()

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

◆ RenameGroup()

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

◆ SetPath()

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

◆ SetRootPath()

void wxDatabaseConfig::SetRootPath ( dbentry entry)
private

◆ WriteEntry()

bool wxDatabaseConfig::WriteEntry ( dbentry entry,
const wxString &  name,
const wxString &  value 
)
private

◆ wxDECLARE_ABSTRACT_CLASS()

wxDatabaseConfig::wxDECLARE_ABSTRACT_CLASS ( wxDatabaseConfig  )
private

◆ wxDECLARE_NO_COPY_CLASS()

wxDatabaseConfig::wxDECLARE_NO_COPY_CLASS ( wxDatabaseConfig  )
private

Member Data Documentation

◆ m_entries

dbentries wxDatabaseConfig::m_entries
private

Definition at line 118 of file dbconf.h.

◆ m_entry

dbentry wxDatabaseConfig::m_entry
private

Definition at line 110 of file dbconf.h.

◆ m_groups

dbentries wxDatabaseConfig::m_groups
private

Definition at line 117 of file dbconf.h.

◆ m_pDatabase

wxDatabase* wxDatabaseConfig::m_pDatabase
private

Definition at line 90 of file dbconf.h.

◆ m_pStatementSqlAddEntry

wxPreparedStatement* wxDatabaseConfig::m_pStatementSqlAddEntry
private

Definition at line 91 of file dbconf.h.

◆ m_pStatementSqlDelEntry

wxPreparedStatement* wxDatabaseConfig::m_pStatementSqlDelEntry
private

Definition at line 92 of file dbconf.h.

◆ m_pStatementSqlDropAll

wxPreparedStatement* wxDatabaseConfig::m_pStatementSqlDropAll
private

Definition at line 96 of file dbconf.h.

◆ m_pStatementSqlEditEntry

wxPreparedStatement* wxDatabaseConfig::m_pStatementSqlEditEntry
private

Definition at line 93 of file dbconf.h.

◆ m_pStatementSqlFindEntries

wxPreparedStatement* wxDatabaseConfig::m_pStatementSqlFindEntries
private

Definition at line 94 of file dbconf.h.

◆ m_self

wxDatabaseConfig* wxDatabaseConfig::m_self
private

Definition at line 82 of file dbconf.h.

◆ m_settingsConf

wxString wxDatabaseConfig::m_settingsConf
private

Definition at line 112 of file dbconf.h.

◆ m_viewName

wxString wxDatabaseConfig::m_viewName
private

Definition at line 111 of file dbconf.h.