00001 /*************************************************************************** 00002 * 00003 * $Id: StTableDescriptorI.h,v 1.9 2009/09/10 18:06:08 dmitry Exp $ 00004 * 00005 * Author: R. Jeff Porter 00006 *************************************************************************** 00007 * 00008 * Description: Abstract class defining access to a table-description 00009 * 00010 *************************************************************************** 00011 * 00012 * $Log: StTableDescriptorI.h,v $ 00013 * Revision 1.9 2009/09/10 18:06:08 dmitry 00014 * struct alignment fix, does not rely on fixed 4 byte cap anymore - runtime align calculation is now in use 00015 * 00016 * Revision 1.8 2005/09/07 22:04:02 deph 00017 * update to correct padding issue for packed tables 00018 * 00019 * Revision 1.7 2001/10/24 04:05:20 porter 00020 * added long long type to I/O and got rid of obsolete dataIndex table 00021 * 00022 * Revision 1.6 2001/01/22 18:38:02 porter 00023 * Update of code needed in next year running. This update has little 00024 * effect on the interface (only 1 method has been changed in the interface). 00025 * Code also preserves backwards compatibility so that old versions of 00026 * StDbLib can read new table structures. 00027 * -Important features: 00028 * a. more efficient low-level table structure (see StDbSql.cc) 00029 * b. more flexible indexing for new systems (see StDbElememtIndex.cc) 00030 * c. environment variable override KEYS for each database 00031 * d. StMessage support & clock-time logging diagnostics 00032 * -Cosmetic features 00033 * e. hid stl behind interfaces (see new *Impl.* files) to again allow rootcint access 00034 * f. removed codes that have been obsolete for awhile (e.g. db factories) 00035 * & renamed some classes for clarity (e.g. tableQuery became StDataBaseI 00036 * and mysqlAccessor became StDbSql) 00037 * 00038 * Revision 1.5 2000/03/28 17:03:19 porter 00039 * Several upgrades: 00040 * 1. configuration by timestamp for Conditions 00041 * 2. query by whereClause made more systematic 00042 * 3. conflict between db-stored comments & number lists resolved 00043 * 4. ensure endtime is correct for certain query falures 00044 * 5. dbstl.h->handles ObjectSpace & RogueWave difference (Online vs Offline) 00045 * 00046 * Revision 1.4 1999/12/29 13:49:35 porter 00047 * fix for Solaris-CC4.2 within StRoot make (cons)... 00048 * replaced #include <config.h> with #include <ospace/config.h> 00049 * 00050 * Revision 1.3 1999/12/28 21:31:42 porter 00051 * added 'using std::vector' and 'using std::list' for Solaris CC5 compilation. 00052 * Also fixed some warnings arising from the CC5 compiles 00053 * 00054 * Revision 1.2 1999/09/30 02:06:12 porter 00055 * add StDbTime to better handle timestamps, modify SQL content (mysqlAccessor) 00056 * allow multiple rows (StDbTable), & Added the comment sections at top of 00057 * each header and src file 00058 * 00059 **************************************************************************/ 00060 #ifndef StTableDescriptorI_HH 00061 #define StTableDescriptorI_HH 00062 00063 enum StTypeE {Stchar = 0, Stuchar, Stshort, Stushort, Stint, Stuint, Stlong, Stulong, Stlonglong, Stfloat, Stdouble, Stmaxtype }; 00064 00065 #ifndef ROOT_CINT 00066 const int StTypeSize[]={sizeof(char), sizeof(unsigned char), sizeof(short), sizeof(unsigned short), sizeof(int), sizeof(unsigned int), sizeof(long), sizeof(unsigned long), sizeof(long long), sizeof(float), sizeof(double)}; 00067 #endif 00068 00069 class StTableDescriptorI { 00070 00071 public: 00072 00073 virtual ~StTableDescriptorI(){}; 00074 virtual StTableDescriptorI* getCpy() = 0; 00075 virtual unsigned int getNumElements() const = 0; 00076 virtual unsigned int getTotalSizeInBytes() const = 0; 00077 virtual char* getElementName(int elementNum) const = 0; 00078 virtual unsigned int getElementOffset(int elementNum) const = 0; 00079 virtual unsigned int getElementSize(int elementNum) const = 0; 00080 //MPD 00081 virtual int getTrowSize() = 0; 00082 virtual unsigned int getMaxAlign() = 0; 00083 virtual StTypeE getElementType(int elementNum) const = 0; 00084 virtual unsigned int* getElementDimensions(int elementNum) const = 0; 00085 virtual unsigned int getElementLength(int elementNum) const = 0; 00086 virtual unsigned int getElementNumDimensions(int elementNum) const = 0; 00087 virtual unsigned int getElementIndexLength(int elementNum, int dimensionNum) const = 0; 00088 00089 }; 00090 00091 #endif 00092 00093
1.5.9