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-2018 KiCad Developers, see AUTHORS.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 
36 class PCB_PLOT_PARAMS_PARSER : public PCB_PLOT_PARAMS_LEXER
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 );
45 
46 private:
47  bool parseBool();
48 
56  int parseInt( int aMin, int aMax );
57 
63  double parseDouble();
64 
70  void skipCurrent();
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.
PCB_PLOT_PARAMS_PARSER(LINE_READER *aReader)
Class PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board...
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)