Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

StDbXmlReader.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * 00003 * $Id: StDbXmlReader.h,v 1.9 2004/01/15 00:02:25 fisyak Exp $ 00004 * 00005 * Author: R. Jeff Porter 00006 *************************************************************************** 00007 * 00008 * Description: implement typeAcceptor for READING XML files of DB-tables 00009 * 00010 *************************************************************************** 00011 * 00012 * $Log: StDbXmlReader.h,v $ 00013 * Revision 1.9 2004/01/15 00:02:25 fisyak 00014 * Replace ostringstream => StString, add option for alpha 00015 * 00016 * Revision 1.8 2003/09/16 22:44:18 porter 00017 * got rid of all ostrstream objects; replaced with StString+string. 00018 * modified rules.make and added file stdb_streams.h for standalone compilation 00019 * 00020 * Revision 1.7 2003/09/02 17:57:50 perev 00021 * gcc 3.2 updates + WarnOff 00022 * 00023 * Revision 1.6 2001/10/24 04:05:20 porter 00024 * added long long type to I/O and got rid of obsolete dataIndex table 00025 * 00026 * Revision 1.5 2001/02/09 23:06:25 porter 00027 * replaced ostrstream into a buffer with ostrstream creating the 00028 * buffer. The former somehow clashed on Solaris with CC5 iostream (current .dev) 00029 * 00030 * Revision 1.4 2000/01/10 20:37:55 porter 00031 * expanded functionality based on planned additions or feedback from Online work. 00032 * update includes: 00033 * 1. basis for real transaction model with roll-back 00034 * 2. limited SQL access via the manager for run-log & tagDb 00035 * 3. balance obtained between enumerated & string access to databases 00036 * 4. 3-levels of diagnostic output: Quiet, Normal, Verbose 00037 * 5. restructured Node model for better XML support 00038 * 00039 * Revision 1.3 1999/12/03 17:03:24 porter 00040 * added multi-row support for the Xml reader & writer 00041 * 00042 * Revision 1.2 1999/09/30 02:06:12 porter 00043 * add StDbTime to better handle timestamps, modify SQL content (mysqlAccessor) 00044 * allow multiple rows (StDbTable), & Added the comment sections at top of 00045 * each header and src file 00046 * 00047 **************************************************************************/ 00048 #ifndef STDBXmlReader_HH 00049 #define STDBXmlReader_HH 00050 #include <stdlib.h> 00051 #include <string.h> 00052 00053 #include "typeAcceptor.hh" 00054 #include "stdb_streams.h" 00055 00056 00057 class dbTable; 00058 class elem; 00059 class accessor; 00060 00061 class StDbXmlReader : public typeAcceptor { 00062 00063 protected: 00064 00065 00066 char* loca[20024]; 00067 dbTable* tab; 00068 int maxlines; 00069 00070 void buildDbTable(); 00071 void buildStruct(); 00072 void fillElements(accessor* a); 00073 elem* findElement(char* name); 00074 00075 public: 00076 00077 StDbXmlReader(); 00078 // StDbXmlReader(ofstream& ofs){ os=&ofs;}; 00079 virtual ~StDbXmlReader(); 00080 00081 void readTable(ifstream &is); 00082 00083 virtual void pass(char* name, short& i, int& len) ; 00084 virtual void pass(char* name, int& i, int& len); 00085 virtual void pass(char* name, long& i, int& len); 00086 virtual void pass(char* name, unsigned short& i, int& len) ; 00087 virtual void pass(char* name, unsigned int& i, int& len) ; 00088 virtual void pass(char* name, unsigned long& i, int& len) ; 00089 virtual void pass(char* name, long long& i, int& len) ; 00090 00091 virtual void pass(char* name, float& i, int& len); 00092 virtual void pass(char* name, double& i, int& len); 00093 virtual void pass(char* name, char*& i, int& len); 00094 virtual void pass(char* name, unsigned char& i, int& len) ; 00095 virtual void pass(char* name, unsigned char*& i, int& len) ; 00096 virtual void pass(char* name, short*& i, int& len) ; 00097 virtual void pass(char* name, int*& i, int& len); 00098 virtual void pass(char* name, long*& i, int& len); 00099 virtual void pass(char* name, unsigned short*& i, int& len) ; 00100 virtual void pass(char* name, unsigned int*& i, int& len) ; 00101 virtual void pass(char* name, unsigned long*& i, int& len) ; 00102 virtual void pass(char* name, long long*& i, int& len) ; 00103 virtual void pass(char* name, float*& i, int& len); 00104 virtual void pass(char* name, double*& i, int& len); 00105 00106 //ClassDef(StDbXmlReader,1) 00107 00108 }; 00109 00110 #endif 00111 00112 00113 00114 00115 00116

Generated on Thu Aug 24 14:45:28 2006 for Doxygen by doxygen 1.3.7