varconf  1.0.2
parse_error.h
1 /*
2  * parse_error.h - interface for parse error handling class.
3  * Copyright (C) 2001, Stefanus Du Toit, Joseph Zupko
4  * (C) 2004 Alistair Riddoch
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  * Contact: Joseph Zupko
21  * jaz147@psu.edu
22  *
23  * 189 Reese St.
24  * Old Forge, PA 18518
25  */
26 
27 #ifndef VARCONF_PARSEERROR_H
28 #define VARCONF_PARSEERROR_H
29 
30 #include <varconf/varconf_defs.h>
31 #include <iostream>
32 #include <string>
33 
34 namespace varconf {
35 
36 class VARCONF_API ParseError {
37 public:
38  ParseError() {}
39  ParseError(const ParseError& p);
40  ParseError(const std::string& exp, int line, int col);
41 
42  virtual ~ParseError();
43 
44  VARCONF_API friend std::ostream& operator<<(std::ostream& os, const ParseError& p);
45 
46  operator std::string();
47  operator std::string() const;
48 
49 private:
50  std::string m_exp;
51  int m_line, m_col;
52 };
53 
54 VARCONF_API std::ostream& operator<<(std::ostream& os, const ParseError& p);
55 
56 } // namespace varconf
57 
58 #endif
Definition: config.cpp:96
Definition: parse_error.h:36