#include <SimpleDBFactory.h>
Collaboration diagram for SimpleDB::SimpleDBFactory:
Static Public Member Functions | |
static SimpleDBFactory * | Instance () |
Return the single instance of the SimpleDB Factory. | |
static std::auto_ptr< Database > | getDBHandle (const std::string dsn) |
Create an auto_ptr and return it, then ownership has to be transferred to the caller. | |
static void | Kill () |
Destroy the factory for normal cleanup. | |
Protected Member Functions | |
SimpleDBFactory () | |
Hidden constructor. | |
Static Protected Attributes | |
static SimpleDBFactory * | _instance = 0 |
From persistent singleton pattern. |
Currently this factory is not useful. It will be used in future for connection pooling. Work needs to be done to make it thread safe and exception safe.
SimpleDB | Exceptions (same as those thrown during normal creation) |
|
Create an auto_ptr and return it, then ownership has to be transferred to the caller.
|
|
From persistent singleton pattern. Make sure only one instance of the factory will be created. |