00001 /* 00002 * SystemPrinter.h 00003 * 00004 * Created on: Apr 29, 2010 00005 * Author: green 00006 */ 00007 00008 #ifndef _SYSTEMPRINTER_H_ 00009 #define _SYSTEMPRINTER_H_ 00010 00011 #include "SystemManager.h" 00012 #include <vector> 00013 00017 class SystemPrinter { 00018 public: 00033 SystemPrinter(const RelationAttributeInfo* attributes, int count); 00034 00049 SystemPrinter(const char* relName, const AttributeInfo* attributes, int count); 00050 00054 ~SystemPrinter(); 00055 00063 void printHeader(); 00064 00075 void printRecord(const char* data); 00076 00084 void printFooter(); 00085 00086 private: 00087 bool isQuiet(); 00088 00089 char relName_[MAX_RELATION_NAME]; 00090 RelationAttributeInfo* attributes_; 00091 int nAttributes_; 00092 int nTuples_; 00093 }; 00094 00095 #endif /* _SYSTEMPRINTER_H_ */