#include <AnyConfig.h>
Inheritance diagram for AnyConfig::AcMySQLConfig::
Public Methods | |
AcMySQLConfig () | |
Constructor method. More... | |
virtual | ~AcMySQLConfig () |
Destructor method. More... | |
virtual bool | copyTo (AcWriteableConfig *pWriteableConfig) |
Copy this configuration to another configuration. More... | |
virtual AcConfiguration* | createFromSection (const char *section) |
Extract a sub-configuration containing only the indicated section. More... | |
virtual void | display () |
Mostly for debugging purposes, write out the configuration to stdout. More... | |
virtual bool | getSectionStr (const char *pSection, const char *pKey, CString &rValue) |
Like getStr() but can fetch keys from another section than the current one. More... | |
virtual bool | getStr (const char *pKey, CString &rValue) |
Retrieve a string from the configuration for the specified key. More... | |
virtual bool | initialize (AcConfiguration &parentConfig) |
Initialize the configuration using another, probably more primitive, parent configuration. More... | |
virtual bool | initRequired () |
Returns true if the derived AcConfiguration requires to be initialized. More... | |
virtual bool | keyExists (const char *pKey) |
Check if a given key exists. More... | |
virtual void | setSectionStr (const char *pSection, const char *pKey, const char *pValue) |
Like setStr() but can set keys in another section than the current one. More... | |
virtual void | setStr (const char *pKey, const char *pValue) |
Set the configuration item to the passed string value. More... | |
bool | GetKeepconn () const |
Returns the value of member '_keepconn'. More... | |
void | SetKeepconn (bool keepconn) |
Set the value of member '_keepconn' to 'keepconn'. More... | |
Protected Methods | |
virtual void* | query (const char *pKey, const char *pSection) |
Perform the query to obtain the value for the key. More... | |
virtual void | release (void *pRes) |
Release the result of a MySQL query. More... | |
Protected Attributes | |
bool | _keepconn |
void* | _hdl |
CString | _database |
CString | _hostname |
CString | _password |
CString | _cfgtable |
CString | _username |
Private Methods | |
void | ConstructorInclude () |
Method which must be called first in a constructor. More... | |
void | DestructorInclude () |
Method which must be called first in a destructor. More... |
|
Constructor method.
|
|
Destructor method.
|
|
Method which must be called first in a constructor.
Reimplemented from AnyConfig::AcWriteableConfig. |
|
Method which must be called first in a destructor.
Reimplemented from AnyConfig::AcWriteableConfig. |
|
Returns the value of member '_keepconn'.
|
|
Set the value of member '_keepconn' to 'keepconn'.
|
|
Copy this configuration to another configuration.
This method is specifically handy when the source configuration comes from a text file and the destination configuration is AcMemConfig, which offers much more functionality. Along the same lines, this method can be used to save an AcMemConfig in a file. If the target configuration already has filled-in items, the result of this operation is undefined. Some derived classes may end up containing a merged result of the old and the new values (AcMemConfig, AcEnvConfig), other may only contain the copied values (like AcFileConfig).
Reimplemented from AnyConfig::AcConfiguration. |
|
Extract a sub-configuration containing only the indicated section.
If your implementation returns a specialized sub-class for this, make sure it is either not an AcWriteableConfig implementation or if it is that writing to it does not alter the original section's information. Probably your best solution is to return an AcMemConfig with a copy of the section, like the original classes do. Reimplemented from AnyConfig::AcConfiguration. |
|
Mostly for debugging purposes, write out the configuration to stdout.
Reimplemented from AnyConfig::AcConfiguration. |
|
Like getStr() but can fetch keys from another section than the current one. The default implementation just pushes _currentSection on stack, replaces it with the supplied section and calls the regular getStr() function.
Reimplemented from AnyConfig::AcConfiguration. |
|
Retrieve a string from the configuration for the specified key.
Reimplemented from AnyConfig::AcConfiguration. |
|
Returns true if the derived AcConfiguration requires to be initialized. See the initialize() function for the various derived classes for more details. Note that this function must return false once the initialization has been done once. Reimplemented from AnyConfig::AcConfiguration. |
|
Initialize the configuration using another, probably more primitive, parent configuration.
Reimplemented from AnyConfig::AcConfiguration. |
|
Check if a given key exists.
Reimplemented from AnyConfig::AcConfiguration. |
|
Perform the query to obtain the value for the key.
|
|
Release the result of a MySQL query.
|
|
Like setStr() but can set keys in another section than the current one. The default implementation just pushes _currentSection on stack, replaces it with the supplied section and calls the regular setStr() function.
Reimplemented from AnyConfig::AcWriteableConfig. |
|
Set the configuration item to the passed string value.
Reimplemented from AnyConfig::AcWriteableConfig. |