Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

cCursor.cpp

Go to the documentation of this file.
00001 /******************************************************************************/
00002 /*                                                                            */
00003 /* POLiTe - Persistent Object Library Test                                    */
00004 /*                                        Ph.D. Thesis by Mgr. Michal Kopecky */
00005 /*                                                                            */
00006 /* Charles University Prague                                                  */
00007 /*                                                                            */
00008 /******************************************************************************/
00009 /*                                                                            */
00010 /* File name: ...                                                             */
00011 /* Module: ......                                                             */
00012 /*                                                                            */
00013 /******************************************************************************/
00014 
00015 // Standard Header(s)
00016 #include <malloc.h>
00017 #include <string.h>
00018 
00019 // Common POLiTe Header(s)
00020 #include <lDefs.h>
00021 #include <lTypes.h>
00022 #include <lTrace.h>
00023 #include <lCmds.h>
00024 
00025 // Own Header
00026 #include <cCursor.h>
00027 
00028 // Other POLiTe Header(s)
00029 #include <cConnection.h>
00030 
00031 Cursor::Cursor(
00032                         class Connection *DbC
00033                         )
00034 //Creates a new cursor
00035 {
00036   #ifdef C_CURSOR_TRACE
00037          logmsg("Cursor::Cursor() invoked");
00038          #endif
00039 
00040   _DatabaseConnection = DbC;
00041   _Opened = false;
00042 
00043   #ifdef C_CURSOR_TRACE
00044          logmsg("Cursor::Cursor() finished");
00045          #endif
00046   };
00047 
00048 Cursor::~Cursor()
00049 //Cursor object destructor
00050 {
00051   #ifdef C_CURSOR_TRACE
00052          logmsg("Cursor::~Cursor() invoked");
00053          #endif
00054 
00055   #ifdef C_CURSOR_TRACE
00056          logmsg("Cursor::~Cursor() finished");
00057          #endif
00058   };
00059 
00060 bool Cursor::_Open()
00061 {
00062         if (_Opened)
00063                 _Close();
00064         _Opened = true;
00065         return true;
00066 };
00067 
00068 bool Cursor::_Close()
00069 {
00070         _Opened = false;
00071         return true;
00072 };
00073 
00074 char *Cursor::_GetUserName() {
00075         return _DatabaseConnection == NULL
00076                 ? NULL
00077                 : _DatabaseConnection->_GetUserName();
00078         };
00079 
00080 char *Cursor::_GetPassword() {
00081         return _DatabaseConnection == NULL
00082                 ? NULL
00083                 : _DatabaseConnection->_GetPassword();
00084         };
00085 

Generated on Sun Jul 14 20:51:13 2002 for POLiTe by doxygen1.2.16