Handle class for database callbacks, encapsulating a reference-counted pointer to the RWDBDatabaseCallbackImp body class.
More...
#include <rw/db/dbasecb.h>
RWDBDatabaseCallback is the interface handle class for database callbacks that encapsulate a reference-counted pointer to the RWDBDatabaseCallbackImp body class. Please refer to the RWDBDatabaseCallbackImp class for implementing database callbacks.
- Synopsis
#include <rw/db/dbasecb.h>
"accessLib", "Servername", "Username", "Password", "DatabaseName",
#define RWDBDATABASECALLBACK(CALLBACK)
Definition dbasecb.h:40
Manages connections with database servers.
Definition dbase.h:91
static RWDBDatabase database(const RWCString &serverType, const RWCString &serverName, const RWCString &userName, const RWCString &password, const RWCString &databaseName, const RWDBDatabaseCallback &databasecb=RWDBDatabaseCallback())
◆ RWDBDatabaseCallback() [1/2]
RWDBDatabaseCallback::RWDBDatabaseCallback |
( |
| ) |
|
|
inline |
◆ RWDBDatabaseCallback() [2/2]
Copy constructor. The object created shares an implementation with dbasecb.
◆ operator()()
Returns a pointer to the database callback implementation encapsulated by self.
◆ operator=()
Assignment operator. Self shares an implementation with dbasecb. Returns a reference to self.
◆ status()
Returns the current status of self.
◆ RWDBDATABASECALLBACK
#define RWDBDATABASECALLBACK |
( |
| CALLBACK | ) |
|
|
related |
The macro takes as argument the name of the user-implemented database callback implementation class. The user database callback implementation class must have been derived from the RWDBDatabaseCallbackImp class. Providing simply the name of the callback implementation class creates its instance using its default constructor. To use a different constructor, pass the class and parameter values. For example:
This macro must be used while supplying an instance of database callback implementation class in the method RWDBManager::database(). This macro ensures that a new instance of the database callback implementation class is produced.