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

lDefs.h

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: ... lDefs.h                                                     */
00011 /* Module: ...... none                                                        */
00012 /*                                                                            */
00013 /******************************************************************************/
00014 /*                                                                            */
00015 /* lDefs.h : Declares preprocessor label definitions for the library          */
00016 /*                                                                            */
00017 /******************************************************************************/
00018 
00019 #ifndef __L_DEFS_H__
00020 #define __L_DEFS_H__
00021 
00022 // POLite Header(s)
00023 #include <lDefsX.h>     // include platform dependent definitions
00024 
00026 // Temporary definitions - for development only
00027 #define NOTDEF
00028 
00030 // POLiTe version definition
00031 
00032 #define POLITE_VERSION "1.0"                            // Version info
00033 
00035 // POLiTe testing
00036 
00037 #define POLITE_TEST_FRIEND void POLiTe_Test_Procedure()
00038 // Used in time of library testing
00039 // if defined, all classes declare this friend
00040 
00042 // POLiTe tracing labels
00043 
00044 #define TL_INFO         0x01
00045 #define TL_INFO_SQL     0x02
00046 #define TL_WARNING      0x08                            // 0x04 is not used
00047 #define TL_ERROR        0x20                            // 0x10 is not used
00048 
00049 #define POLITE_TRACE_MASK (TL_INFO_SQL | TL_WARNING | TL_ERROR)
00050 #define POLITE_TRACE_MASK_TTY   TL_INFO_SQL
00051 // Mask for the type of messages,
00052 // which should be logged in the logfile or on the standard output
00053 // Zero means no messages, 0xFF means all messages
00054 
00055 #define POLITE_TRACE                   // Tracing enabled
00056 #ifdef POLITE_TRACE
00057         #define L_CMDS_TRACE
00058         #define L_EXCEPTIONS_TRACE
00059         #define L_STR_TRACE
00060         #define C_CURSOR_TRACE
00061         #define C_ORACLECURSOR_TRACE
00062         #define C_DATABASE_TRACE
00063         #define C_ORACLEDATABASE_TRACE
00064         #define C_CONNECTION_TRACE
00065         #define C_ORACLECONNECTION_TRACE
00066         #define C_QUEREFPROTO_TRACE
00067         #define C_QUERY_TRACE
00068         #define C_COMPLEXQUERY_TRACE
00069         #define C_PROTOBASE_TRACE
00070         #define C_QUEREFPROTO_TRACE
00071         #define C_QUERY_TRACE
00072         #define C_OBJECTBUFFER_TRACE
00073         #define C_OBJREF_TRACE
00074         #define C_OBJECT_TRACE
00075         #define C_IMMUTABLEOBJECT_TRACE
00076         #define C_DATABASEOBJECT_TRACE
00077         #define C_PERSISTENTOBJECT_TRACE
00078         #define C_REFBASE_TRACE
00079         #define T_REF_TRACE
00080         #define C_PROTOBASE_TRACE
00081         #define T_PROTO_TRACE
00082         #define C_QUERYRESULT_TRACE
00083         #define C_RELATION_TRACE
00084         #define C_ONETOONERELATION_TRACE
00085         #define C_ONETOMANYRELATION_TRACE
00086         #define C_MANYTOONERELATION_TRACE
00087         #define C_MANYTOMANYRELATION_TRACE
00088         #define GC_CHAINEDRELATION_TRACE
00089 #endif //POLITE_TRACE
00090 
00091 #define POLITE_TRACE_FILE "stdlog.txt" // name of standard log file
00092 
00094 // POLiTe default settings
00095 
00096 #define DEFAULT_UPDATING_STRATEGY US_OnDemand
00097 #define DEFAULT_LOCKING_STRATEGY LS_None
00098 #define DEFAULT_WAITING_STRATEGY WS_Nowait
00099 #define DEFAULT_READING_STRATEGY RS_Cache
00100 #define DEFAULT_STRATEGIES (DEFAULT_UPDATING_STRATEGY|DEFAULT_LOCKING_STRATEGY|DEFAULT_WAITING_STRATEGY|DEFAULT_READING_STRATEGY)
00101 
00103 // Database Abstraction Layer parameters
00104 
00105 #define MAX_CONNECTION 32
00106 #define MAX_CONNECTION_PER_DATABASE 16
00107 
00108 //#define NO_DATABASE_CASCADE_DELETE
00109 //if defined, object is deleted piece by piece from each table
00110 //if not defined, object is deleted only from the main table
00111 
00112 #define AUTO_VIRTUAL_OBJECT_LOAD
00113 //if defined, query results provide an automatic object virtualisation
00114 
00115 #define SQL_EXECUTION_VERSION_6 0x00
00116 #define SQL_EXECUTION_VERSION_7 0x02
00117 #define SQL_EXECUTION_NATIVE    0x01
00118 //defines various compatibility modes of SQL statement execution
00119 
00120 #define SQL_EXECUTION_MODE SQL_EXECUTION_NATIVE
00121 //defines the SQL statement execution mode used in the GEN.LIB
00122 
00124 // Object Buffer parameters
00125 
00126 #define HASH_TABLE_SIZE 64
00127 #define MAX_OBJECTS_IN_BUFFER 2048
00128 
00130 // Name of table associated with PersistentObject class
00131 
00132 #define PERSISTENT_OBJECT_TABLE "OID_ROOT"
00133 
00135 // Maximal length of the PERSISTENT_OBJECT_TABLE.CLASS_NAME column
00136 // Used for the RefBase virtualisation
00137 
00138 #define MAX_CLASS_NAME_LEN 64
00139 
00141 // Defines number of lines fetched, when no database is available
00142 // Used in ResultBase::Next(), ifdef NO_DATABASE_PRESENT
00143 
00144 #define MAX_FETCHES_FROM_DUMMY_DATABASE 3
00145 
00147 // Defines the alias for the name of table associated with object
00148 // Instead of TPERSON.COLUMN it is possible to use #THIS.COLUMN
00149 
00150 #define THIS_TABLE "#THIS"
00151 
00153 // Defines the prefixes of aliases used for tables and relations
00154 // in Chained relations
00155 
00156 #define R_PREFIX "R$_"
00157 #define T_PREFIX "T$_"
00158 #define X_PREFIX "X$_"
00159 
00160 #endif //__L_DEFS_H__

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