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

StDbXmlWriter.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * 00003 * $Id: StDbXmlWriter.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 WRITING XML files of DB-tables 00009 * 00010 *************************************************************************** 00011 * 00012 * $Log: StDbXmlWriter.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 2000/01/10 20:37:55 porter 00027 * expanded functionality based on planned additions or feedback from Online work. 00028 * update includes: 00029 * 1. basis for real transaction model with roll-back 00030 * 2. limited SQL access via the manager for run-log & tagDb 00031 * 3. balance obtained between enumerated & string access to databases 00032 * 4. 3-levels of diagnostic output: Quiet, Normal, Verbose 00033 * 5. restructured Node model for better XML support 00034 * 00035 * Revision 1.4 1999/12/03 17:03:24 porter 00036 * added multi-row support for the Xml reader & writer 00037 * 00038 * Revision 1.3 1999/09/30 02:06:12 porter 00039 * add StDbTime to better handle timestamps, modify SQL content (mysqlAccessor) 00040 * allow multiple rows (StDbTable), & Added the comment sections at top of 00041 * each header and src file 00042 * 00043 **************************************************************************/ 00044 #ifndef STDBXMLWRITER_HH 00045 #define STDBXMLWRITER_HH 00046 00047 #include <stdlib.h> 00048 #include <string.h> 00049 #include "stdb_streams.h" 00050 #include "tableAcceptor.hh" 00051 00052 class StDbTable; 00053 00054 class StDbXmlWriter : public tableAcceptor { 00055 00056 protected: 00057 00058 ostream* os; 00059 00060 public: 00061 00062 StDbXmlWriter(): os(0) {}; 00063 StDbXmlWriter(ostream& ofs){ os=&ofs;}; 00064 virtual ~StDbXmlWriter(){}; 00065 00066 virtual void streamHeader(const char* name); 00067 virtual void streamTableName(const char* name); 00068 virtual void streamEndTableName(); 00069 virtual void streamAccessor(); 00070 virtual void endAccessor(); 00071 virtual void streamRow(int row); 00072 virtual void streamEndRow(); 00073 virtual void streamTail(); 00074 virtual void ioTable(StDbTable* table); 00075 00076 virtual void pass(char* name, short& i, int& len) ; 00077 virtual void pass(char* name, int& i, int& len); 00078 virtual void pass(char* name, long& i, int& len); 00079 virtual void pass(char* name, unsigned short& i, int& len) ; 00080 virtual void pass(char* name, unsigned int& i, int& len) ; 00081 virtual void pass(char* name, unsigned long& i, int& len) ; 00082 virtual void pass(char* name, long long& i, int& len) ; 00083 00084 virtual void pass(char* name, float& i, int& len); 00085 virtual void pass(char* name, double& i, int& len); 00086 virtual void pass(char* name, char*& i, int& len); 00087 virtual void pass(char* name, unsigned char& i, int& len) ; 00088 virtual void pass(char* name, unsigned char*& i, int& len) ; 00089 virtual void pass(char* name, short*& i, int& len) ; 00090 virtual void pass(char* name, int*& i, int& len); 00091 virtual void pass(char* name, long*& i, int& len); 00092 virtual void pass(char* name, unsigned short*& i, int& len) ; 00093 virtual void pass(char* name, unsigned int*& i, int& len) ; 00094 virtual void pass(char* name, unsigned long*& i, int& len) ; 00095 virtual void pass(char* name, long long*& i, int& len) ; 00096 virtual void pass(char* name, float*& i, int& len); 00097 virtual void pass(char* name, double*& i, int& len); 00098 00099 //ClassDef(StDbXmlWriter,1) 00100 00101 }; 00102 00103 #endif 00104 00105

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