1 /* 2 * PrinterData.h 3 * Copyright 1999-2000 Y.Takagi All Rights Reserved. 4 */ 5 6 #ifndef __PRINTERDATA_H 7 #define __PRINTERDATA_H 8 9 #include <string> 10 #include <SerialPort.h> 11 12 #if (!__MWERKS__ || defined(MSIPL_USING_NAMESPACE)) 13 using namespace std; 14 #else 15 #define std 16 #endif 17 18 class BNode; 19 20 class PrinterData { 21 public: 22 PrinterData(BNode *node = NULL); 23 virtual ~PrinterData(); 24 virtual void load(); 25 virtual void save(); 26 27 const string &getDriverName() const; 28 const string &getPrinterName() const; 29 const string &getComments() const; 30 const string &getTransport() const; 31 int getProtocolClass() const; 32 33 void setPrinterName(const char *printer_name); 34 void setComments(const char *comments); 35 void setProtocolClass(int protocolClass); 36 37 bool getPath(string &path) const; 38 39 protected: 40 PrinterData(const PrinterData &printer_data); 41 PrinterData &operator = (const PrinterData &printer_data); 42 43 BNode *fNode; 44 private: 45 string fDriverName; 46 string fPrinterName; 47 string fComments; 48 string fTransport; 49 int fProtocolClass; 50 }; 51 52 inline const string &PrinterData::getDriverName() const 53 { 54 return fDriverName; 55 } 56 57 inline const string &PrinterData::getPrinterName() const 58 { 59 return fPrinterName; 60 } 61 62 inline const string &PrinterData::getComments() const 63 { 64 return fComments; 65 } 66 67 inline const string &PrinterData::getTransport() const 68 { 69 return fTransport; 70 } 71 72 inline int PrinterData::getProtocolClass() const 73 { 74 return fProtocolClass; 75 } 76 77 inline void PrinterData::setPrinterName(const char *printer_name) 78 { 79 fPrinterName = printer_name; 80 } 81 82 inline void PrinterData::setComments(const char *comments) 83 { 84 fComments = comments; 85 } 86 87 inline void PrinterData::setProtocolClass(int protocolClass) 88 { 89 fProtocolClass = protocolClass; 90 } 91 92 #endif // __PRINTERDATA_H 93