00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef LIBLOOKDB_LOOKTYPES_H
00019 #define LIBLOOKDB_LOOKTYPES_H
00020
00021
00022
00023 #include "lookcompileropts.h"
00024 #include "string.h"
00025
00026 namespace look {
00027
00028
00029 #ifdef WIN32
00030 #ifdef LOOKTYPES_BUILD
00031 #define LOOKTYPES_DLL __declspec(dllexport)
00032 #else
00033 #define LOOKTYPES_DLL __declspec(dllimport)
00034 #endif
00035 #else
00036 #define LOOKTYPES_DLL
00037 #endif
00038
00039
00040 const long LookFloatID = 1;
00041 const long LookStringID = 2;
00042 const long LookIntegerID = 3;
00043 const long LookMoneyID = 4;
00044 const long LookDateID = 5;
00045 const long LookTimeID = 6;
00046 const long LookDateTimeID = 7;
00047 const long LookNULLValueID = 8;
00048 const long LookLongStringID = 9;
00049
00050 const long LookNumericID = 10;
00051 const long LookRawDataID = 11;
00052 const long LookLongRawDataID = 12;
00053
00054
00056
00060 class LOOKTYPES_DLL LookException
00061 {
00062 public:
00063
00064
00066
00070 LookException( int theErrorNumber, const char* theMessage )
00071 : itsErrorNumber( theErrorNumber )
00072 {
00073 itsMessage = new char[strlen(theMessage)+1];
00074 strcpy( itsMessage, theMessage );
00075 }
00076
00078 ~LookException()
00079 {
00080 delete [] itsMessage;
00081 }
00082
00084 LookException( const LookException& theOther )
00085 : itsErrorNumber( theOther.itsErrorNumber )
00086 {
00087 itsMessage = new char[strlen(theOther.itsMessage)+1];
00088 strcpy( itsMessage, theOther.itsMessage );
00089 }
00090
00092 LookException& operator=( const LookException& theOther )
00093 {
00094 itsErrorNumber = theOther.itsErrorNumber;
00095 delete [] itsMessage;
00096
00097 itsMessage = new char[strlen(theOther.itsMessage)+1];
00098 strcpy( itsMessage, theOther.itsMessage );
00099
00100 return *this;
00101 }
00102
00103 int itsErrorNumber;
00104 char* itsMessage;
00105 };
00106
00107
00108
00109
00110 const int sprintfError = 1;
00111
00112
00113
00114
00115
00116
00117
00118
00119 }
00120 #endif