SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Handle class for database callbacks, encapsulating a reference-counted pointer to the RWDBDatabaseCallbackImp body class. More...
#include <rw/db/dbasecb.h>
Public Member Functions | |
RWDBDatabaseCallback () | |
RWDBDatabaseCallback (const RWDBDatabaseCallback &dbasecb) | |
RWDBDatabaseCallback & | operator= (const RWDBDatabaseCallback &dbasecb) |
RWDBDatabaseCallbackImp * | operator() () const |
RWDBStatus | status () const |
Related Functions | |
(Note that these are not member functions.) | |
RWDBDATABASECALLBACK(CALLBACK) |
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.
#include <rw/db/dbasecb.h> RWDBDatabase dBase = RWDBManager::database("accessLib", "Servername", "Username", "PassWord", "DatabaseName", RWDBDATABASECALLBACK(MyDBaseCallbackImp));
RWDBDatabaseCallback::RWDBDatabaseCallback | ( | ) | [inline] |
Default constructor that creates an uninitialized database callback with all callback methods as no-ops. The status of the RWDBDatabaseCallback will be RWDBStatus::notInitialized. This constructor is provided for convenience; usable RWDBDatabaseCallback objects must be obtained by using the macro RWDBDATABASECALLBACK(CALLBACK).
RWDBDatabaseCallback::RWDBDatabaseCallback | ( | const RWDBDatabaseCallback & | dbasecb | ) | [inline] |
Copy constructor. The object created shares an implementation with dbasecb.
RWDBDatabaseCallbackImp * RWDBDatabaseCallback::operator() | ( | ) | const [inline] |
Returns a pointer to the database callback implementation encapsulated by self.
RWDBDatabaseCallback & RWDBDatabaseCallback::operator= | ( | const RWDBDatabaseCallback & | dbasecb | ) | [inline] |
Assignment operator. Self shares an implementation with dbasecb. Returns a reference to self.
RWDBStatus RWDBDatabaseCallback::status | ( | ) | const [inline] |
Returns the current status of self.
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 arguments along with it. For example:
RWDBDATABASECALLBACK(MyDBaseCallbackImp(100, "abc"))
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.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.