Handle class for connection callbacks that encapsulate a reference-counted pointer to the RWDBConnCallbackImp body class.
More...
#include <rw/db/conncb.h>
RWDBConnCallback is the interface handle class for connection callbacks that encapsulate a reference-counted pointer to the RWDBConnCallbackImp body class. Please refer to the RWDBConnCallbackImp class for implementing connection callbacks.
- Synopsis
#include <rw/db/conncb.h>
#define RWDBCONNCALLBACK(CALLBACK)
Definition conncb.h:34
Represents an explicit database connection object that can be used in place of the implicit database ...
Definition connect.h:81
◆ RWDBConnCallback() [1/2]
RWDBConnCallback::RWDBConnCallback |
( |
| ) |
|
|
inline |
◆ RWDBConnCallback() [2/2]
Copy constructor. The object created shares an implementation with conncb.
◆ databaseCallback()
◆ operator()()
Returns a pointer to the connection callback implementation encapsulated by self.
◆ operator=()
Assignment operator. Self shares an implementation with conncb. Returns a reference to self.
◆ status()
Returns the current status of self.
◆ RWDBCONNCALLBACK
#define RWDBCONNCALLBACK |
( |
| CALLBACK | ) |
|
|
related |
This macro takes as a parameter the name of an implemented connection callback implementation class, which must derive from RWDBConnCallbackImp. To create an instance with the default constructor, just provide the name of the class. To use a different constructor, pass the class and parameter values. For example:
This macro must be used while supplying an instance of the connection callback implementation class in the method RWDBDatabase::connection() or while producing new connection callbacks in the method redefined from RWDBDatabaseCallbackImp::produceConnCallback(). This macro ensures that a new instance of the connection callback implementation class is produced.