]> cygwin.com Git - cygwin-apps/cygutils.git/blame - src/lpr/PrinterException.hh
Fold in latest clip fixes
[cygwin-apps/cygutils.git] / src / lpr / PrinterException.hh
CommitLineData
21006e63
CW
1/*
2 * lpr for cygwin/windows
3 *
4 * Copyright (C) 2000-2003 Rick Rankin
5 * http://www.cygwin.com/ml/cygwin/2000-07/msg00320.html
6 *
d76073f1 7 * This program is free software: you can redistribute it and/or modify
21006e63 8 * it under the terms of the GNU General Public License as published by
d76073f1
CW
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
21006e63
CW
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
d76073f1
CW
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * See the COPYING file for full license information.
21006e63
CW
21 */
22
23#if !defined(PrinterException_hh)
24#define PrinterException_hh
25
26#include <iostream>
27#include <string>
28
29using namespace std;
30
31class PrinterException
32{
33public:
34 PrinterException()
35 : m_msg("")
36 {
37 }
38
39 PrinterException(const string & msg)
40 : m_msg(msg)
41 {
42 }
43
44 PrinterException(const PrinterException & rhs)
45 : m_msg(rhs.m_msg)
46 {
47 }
48
49 ~PrinterException()
50 {
51 }
52
53 PrinterException & operator = (const PrinterException & rhs)
54 {
55 if (this != &rhs)
56 m_msg = rhs.m_msg;
57 return *this;
58 }
59
60 const string & getMessage() const
61 {
62 return m_msg;
63 }
64
65private:
66 string m_msg;
67};
68
69inline ostream & operator << (ostream & stream, const PrinterException & pe)
70{
71 stream << pe.getMessage();
72 return stream;
73}
74
75#endif /* PrinterException_hh */
This page took 0.033376 seconds and 6 git commands to generate.