Module: DB Interface Module Group: Callback Classes
Does not inherit
#include <rw/db/dbasecb.h> RWDBDatabase dBase = RWDBManager::database("accessLib", "Servername", "Username", "PassWord", "DatabaseName", RWDBDATABASECALLBACK(MyDBaseCallbackImp));
RWDBDatabaseCallback is the interface handle class for database callbacks which encapsulates a reference-counted pointer to the RWDBDatabaseCallbackImp body class. Please refer to the RWDBDatabaseCallbackImp class for implementing database callbacks.
RWDBDatabaseCallback();
This default constructor 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 (const RWDBDatabaseCallback& dbasecb);
Copy constructor. The object created shares an implementation with dbasecb.
RWDBDatabaseCallback& operator=(const RWDBDatabaseCallback& dbasecb);
Assignment operator. Self shares an implementation with dbasecb. Returns a reference to self.
RWDBDatabaseCallbackImp* operator()() const;
Returns a pointer to the database callback implementation encapsulated by self.
RWDBStatus status() const;
Returns the current status of self.
#define RWDBDATABASECALLBACK(CALLBACK)
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 will create 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.