|
KiCad PCB EDA Suite
|
#include <drill/drill_chart_template.h>#include <algorithm>#include <set>#include <fstream>#include <json_common.h>#include <wx/translation.h>Go to the source code of this file.
Functions | |
| bool | ValidateDrillChartColumns (std::vector< DRILL_CHART_COLUMN > &aColumns) |
| Reject a column set that repeats an id or is implausibly wide. | |
| LSET | DrillDocumentationLayers () |
| Layers a chart or map may live on. | |
| bool | DrillChartDefaultColumn (DRILL_CHART_COLUMN_ID aId, DRILL_CHART_COLUMN &aColumn) |
| The heading and alignment a column starts with, so the writer can leave them out of the file and the parser can put the same values back. | |
| const char * | DrillChartUnitsToken (DRILL_CHART_UNITS aUnits) |
| Stable file tokens, independent of enum ordering so inserting a value later cannot change what an existing board file means. | |
| const char * | DrillChartColumnToken (DRILL_CHART_COLUMN_ID aId) |
| const char * | DrillChartAlignToken (DRILL_CHART_ALIGN aAlign) |
| bool | DrillChartUnitsFromToken (const wxString &aToken, DRILL_CHART_UNITS &aUnits) |
| bool | DrillChartColumnFromToken (const wxString &aToken, DRILL_CHART_COLUMN_ID &aId) |
| bool | DrillChartAlignFromToken (const wxString &aToken, DRILL_CHART_ALIGN &aAlign) |
| bool DrillChartAlignFromToken | ( | const wxString & | aToken, |
| DRILL_CHART_ALIGN & | aAlign ) |
Definition at line 251 of file drill_chart_template.cpp.
Referenced by DRILL_CHART_TEMPLATE::LoadFromFile(), and PCB_IO_KICAD_SEXPR_PARSER::parsePCB_DRILL_CHART().
| const char * DrillChartAlignToken | ( | DRILL_CHART_ALIGN | aAlign | ) |
Definition at line 221 of file drill_chart_template.cpp.
Referenced by PCB_IO_KICAD_SEXPR::format(), and DRILL_CHART_TEMPLATE::SaveToFile().
| bool DrillChartColumnFromToken | ( | const wxString & | aToken, |
| DRILL_CHART_COLUMN_ID & | aId ) |
Definition at line 239 of file drill_chart_template.cpp.
Referenced by DRILL_CHART_TEMPLATE::LoadFromFile(), and PCB_IO_KICAD_SEXPR_PARSER::parsePCB_DRILL_CHART().
| const char * DrillChartColumnToken | ( | DRILL_CHART_COLUMN_ID | aId | ) |
Definition at line 215 of file drill_chart_template.cpp.
Referenced by PCB_IO_KICAD_SEXPR::format(), and DRILL_CHART_TEMPLATE::SaveToFile().
| bool DrillChartDefaultColumn | ( | DRILL_CHART_COLUMN_ID | aId, |
| DRILL_CHART_COLUMN & | aColumn ) |
The heading and alignment a column starts with, so the writer can leave them out of the file and the parser can put the same values back.
False for a column with no default.
Definition at line 112 of file drill_chart_template.cpp.
References DRILL_CHART_COLUMN::m_Align, DRILL_CHART_COLUMN::m_Heading, and DRILL_CHART_COLUMN::m_Id.
Referenced by PCB_IO_KICAD_SEXPR::format(), DRILL_CHART_TEMPLATE::MakeDefault(), and PCB_IO_KICAD_SEXPR_PARSER::parsePCB_DRILL_CHART().
| bool DrillChartUnitsFromToken | ( | const wxString & | aToken, |
| DRILL_CHART_UNITS & | aUnits ) |
Definition at line 227 of file drill_chart_template.cpp.
Referenced by DRILL_CHART_TEMPLATE::LoadFromFile(), and PCB_IO_KICAD_SEXPR_PARSER::parsePCB_DRILL_CHART().
| const char * DrillChartUnitsToken | ( | DRILL_CHART_UNITS | aUnits | ) |
Stable file tokens, independent of enum ordering so inserting a value later cannot change what an existing board file means.
Definition at line 209 of file drill_chart_template.cpp.
Referenced by PCB_IO_KICAD_SEXPR::format(), and DRILL_CHART_TEMPLATE::SaveToFile().
| LSET DrillDocumentationLayers | ( | ) |
Layers a chart or map may live on.
Excludes copper, silkscreen, mask, paste, adhesive, Edge.Cuts, Margin, courtyard and rescue layers. Chart artwork and hole symbols must not alter fabrication outputs or DRC constraints.
Definition at line 74 of file drill_chart_template.cpp.
References LSET::AllNonCuMask(), B_CrtYd, Edge_Cuts, F_CrtYd, Margin, Rescue, and BASE_SET::reset().
Referenced by PCB_DRILL_CHART::Deserialize(), PCB_DRILL_MAP::Deserialize(), DIALOG_DRILL_CHART_PROPERTIES::DIALOG_DRILL_CHART_PROPERTIES(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_DRILL_CHART(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_DRILL_MAP(), PCB_CONTROL::PlaceDrillChart(), and PCB_CONTROL::PlaceDrillMap().
| bool ValidateDrillChartColumns | ( | std::vector< DRILL_CHART_COLUMN > & | aColumns | ) |
Reject a column set that repeats an id or is implausibly wide.
Shared so the s-expression parser, the protobuf decoder and template import cannot disagree about what is acceptable.
Definition at line 55 of file drill_chart_template.cpp.
References DRILL_CHART_MAX_COLUMN_WIDTH, and DRILL_CHART_MAX_TOTAL_WIDTH.
Referenced by PCB_DRILL_CHART::Deserialize(), DRILL_CHART_TEMPLATE::LoadFromFile(), and PCB_IO_KICAD_SEXPR_PARSER::parsePCB_DRILL_CHART().