KiCad PCB EDA Suite
pcb_plot_params_parser.h
Go to the documentation of this file.
1 #ifndef PCB_PLOT_PARAMS_PARSER_H_
2 #define PCB_PLOT_PARAMS_PARSER_H_
3 /*
4  * This program source code file is part of KiCad, a free EDA CAD application.
5  *
6  * Copyright (C) 1992-2011 KiCad Developers, see change_log.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 #include <pcb_plot_params_lexer.h>
27 
28 class PCB_PLOT_PARAMS;
29 class LINE_READER;
30 
31 
37 {
38 public:
40  PCB_PLOT_PARAMS_PARSER( char* aLine, const wxString& aSource );
41 
42  LINE_READER* GetReader() { return reader; };
43 
44  void Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) throw( PARSE_ERROR, IO_ERROR );
45 
46 private:
47  bool parseBool();
48 
56  int parseInt( int aMin, int aMax );
57 
63  double parseDouble();
64 
70  void skipCurrent() throw( IO_ERROR, PARSE_ERROR );
71 };
72 
73 #endif // PCB_PLOT_PARAMS_PARSER_H_
Class LINE_READER is an abstract class from which implementation specific LINE_READERs may be derived...
Definition: richio.h:81
double parseDouble()
Function parseDouble parses a double.
Class PCB_PLOT_PARAMS_PARSER is the parser class for PCB_PLOT_PARAMS.
Class PCB_PLOT_PARAMS_LEXER is an automatically generated class using the TokenList2DnsLexer.cmake technology, based on keywords provided by file: /home/kicad/workspace/kicad-doxygen/common/pcb_plot_params.keywords.
PCB_PLOT_PARAMS_PARSER(LINE_READER *aReader)
Class PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board...
LINE_READER * reader
no ownership. ownership is via readerStack, maybe, if iOwnReaders
Definition: dsnlexer.h:92
Struct PARSE_ERROR contains a filename or source description, a problem input line, a line number, a byte offset, and an error message which contains the the caller's report and his call site information: CPP source file, function, and line number.
Definition: ki_exception.h:94
void skipCurrent()
Function skipCurrent Skip the current token level, i.e search for the RIGHT parenthesis which closes ...
int parseInt(int aMin, int aMax)
Function parseInt parses an integer and constrains it between two values.
void Parse(PCB_PLOT_PARAMS *aPcbPlotParams)
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:47