KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 The 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, see <https://www.gnu.org/licenses/>.
20 */
21
22#include <pcb_plot_params_lexer.h>
23
24
25class wxString;
26class PCB_PLOT_PARAMS;
27class LINE_READER;
28
29
33class PCB_PLOT_PARAMS_PARSER : public PCB_PLOT_PARAMS_LEXER
34{
35public:
36 PCB_PLOT_PARAMS_PARSER( LINE_READER* aReader, int aBoardFileVersion );
37 PCB_PLOT_PARAMS_PARSER( char* aLine, const wxString& aSource );
38
39 LINE_READER* GetReader() { return reader; };
40
41 void Parse( PCB_PLOT_PARAMS* aPcbPlotParams );
42
43private:
44 bool parseBool();
45
53 int parseInt( int aMin, int aMax );
54
60 double parseDouble();
61
67 void skipCurrent();
68
70};
71
72#endif // PCB_PLOT_PARAMS_PARSER_H_
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
Definition richio.h:62
void skipCurrent()
Skip the current token level.
PCB_PLOT_PARAMS_PARSER(LINE_READER *aReader, int aBoardFileVersion)
int parseInt(int aMin, int aMax)
Parse an integer and constrains it between two values.
double parseDouble()
Parse a double precision floating point number.
void Parse(PCB_PLOT_PARAMS *aPcbPlotParams)
Parameters and options when plotting/printing a board.