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 ~PrinterData(); 24 void load(); 25 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 private: 44 string fDriverName; 45 string fPrinterName; 46 string fComments; 47 string fTransport; 48 int fProtocolClass; 49 50 BNode *fNode; 51 }; 52 53 inline const string &PrinterData::getDriverName() const 54 { 55 return fDriverName; 56 } 57 58 inline const string &PrinterData::getPrinterName() const 59 { 60 return fPrinterName; 61 } 62 63 inline const string &PrinterData::getComments() const 64 { 65 return fComments; 66 } 67 68 inline const string &PrinterData::getTransport() const 69 { 70 return fTransport; 71 } 72 73 inline int PrinterData::getProtocolClass() const 74 { 75 return fProtocolClass; 76 } 77 78 inline void PrinterData::setPrinterName(const char *printer_name) 79 { 80 fPrinterName = printer_name; 81 } 82 83 inline void PrinterData::setComments(const char *comments) 84 { 85 fComments = comments; 86 } 87 88 inline void PrinterData::setProtocolClass(int protocolClass) 89 { 90 fProtocolClass = protocolClass; 91 } 92 93 #endif // __PRINTERDATA_H 94