|
KiCad PCB EDA Suite
|
#include <cstdint>#include <vector>#include <eda_units.h>#include <lset.h>#include <wx/string.h>Go to the source code of this file.
Classes | |
| struct | GENERATED_TABLE_COLUMN |
| A column as a generated table actually carries it: what a row's cell in that column holds and how it is presented. More... | |
| struct | GENERATED_TABLE_COLUMN_DEF |
| The column a schema knows how to build, independent of whether any particular table shows it. More... | |
| class | GENERATED_TABLE_SCHEMA |
| The columns one generator (the drill chart, a stackup table, ...) can produce, and the units and precision it starts from. More... | |
Enumerations | |
| enum class | GENERATED_TABLE_ALIGN { LEFT , CENTER , RIGHT } |
| enum class | GENERATED_TABLE_UNITS { MM , INCH , MILS } |
Functions | |
| wxString | FormatGeneratedTableLength (int aValue, GENERATED_TABLE_UNITS aUnits, int aPrecision) |
| Render a length the way a generated table's cell shows it. | |
| GENERATED_TABLE_UNITS | ToGeneratedTableUnits (EDA_UNITS aUnits) |
| The table units a user's display units seed. | |
| const char * | GeneratedTableUnitsToken (GENERATED_TABLE_UNITS aUnits) |
| Stable file tokens, independent of enum ordering so inserting a value later cannot change what an existing board file means. | |
| bool | GeneratedTableUnitsFromToken (const wxString &aToken, GENERATED_TABLE_UNITS &aUnits) |
| const char * | GeneratedTableAlignToken (GENERATED_TABLE_ALIGN aAlign) |
| bool | GeneratedTableAlignFromToken (const wxString &aToken, GENERATED_TABLE_ALIGN &aAlign) |
| LSET | DocumentationLayers () |
| Layers a generated table or drill map may live on. | |
Variables | |
| constexpr int | GENERATED_TABLE_MAX_COLUMN_WIDTH = 1000 * 1000000 |
| A column can be no wider than this. | |
| constexpr int | GENERATED_TABLE_MAX_PRECISION = 6 |
| The most digits a generated table prints after the decimal point. | |
| constexpr int64_t | GENERATED_TABLE_MAX_TOTAL_WIDTH = 10LL * 1000 * 1000000 |
| A column set can be no wider than this in total, summed after each column is clamped to GENERATED_TABLE_MAX_COLUMN_WIDTH. | |
|
strong |
| Enumerator | |
|---|---|
| LEFT | |
| CENTER | |
| RIGHT | |
Definition at line 31 of file generated_table_schema.h.
|
strong |
| Enumerator | |
|---|---|
| MM | |
| INCH | |
| MILS | |
Definition at line 39 of file generated_table_schema.h.
| LSET DocumentationLayers | ( | ) |
Layers a generated table or drill map may live on.
Manufacturing layers would be corrupted.
Excludes copper, silkscreen, mask, paste, adhesive, Edge.Cuts, Margin, courtyard and rescue layers. Table artwork and hole symbols must not alter fabrication outputs or DRC constraints.
Definition at line 126 of file generated_table_schema.cpp.
References LSET::AllNonCuMask(), B_CrtYd, Edge_Cuts, F_CrtYd, Margin, Rescue, and BASE_SET::reset().
Referenced by PCB_DRILL_MAP::Deserialize(), DIALOG_GENERATED_TABLE_PROPERTIES::DIALOG_GENERATED_TABLE_PROPERTIES(), PCB_IO_KICAD_SEXPR_PARSER::parseGeneratedTable(), PCB_IO_KICAD_SEXPR_PARSER::parsePCB_DRILL_MAP(), PCB_CONTROL::pickDocumentationLayer(), PCB_CONTROL::PlaceDrillMap(), PCB_CONTROL::placeGeneratedTable(), and UnpackGeneratedTable().
| wxString FormatGeneratedTableLength | ( | int | aValue, |
| GENERATED_TABLE_UNITS | aUnits, | ||
| int | aPrecision ) |
Render a length the way a generated table's cell shows it.
Every unit gets aPrecision decimals and its own suffix, so a table can switch units without needing a second precision setting and a cell never reads as a bare number with no unit attached.
Definition at line 142 of file generated_table_schema.cpp.
References INCH, MILS, MM, and pcbIUScale.
Referenced by PCB_DRILL_CHART::generate().
| bool GeneratedTableAlignFromToken | ( | const wxString & | aToken, |
| GENERATED_TABLE_ALIGN & | aAlign ) |
Definition at line 247 of file generated_table_schema.cpp.
Referenced by DRILL_CHART_TEMPLATE::LoadFromFile(), and PCB_IO_KICAD_SEXPR_PARSER::parseGeneratedTable().
| const char * GeneratedTableAlignToken | ( | GENERATED_TABLE_ALIGN | aAlign | ) |
Definition at line 241 of file generated_table_schema.cpp.
Referenced by PCB_IO_KICAD_SEXPR::format(), and DRILL_CHART_TEMPLATE::SaveToFile().
| bool GeneratedTableUnitsFromToken | ( | const wxString & | aToken, |
| GENERATED_TABLE_UNITS & | aUnits ) |
Definition at line 229 of file generated_table_schema.cpp.
Referenced by DRILL_CHART_TEMPLATE::LoadFromFile(), and PCB_IO_KICAD_SEXPR_PARSER::parseGeneratedTable().
| const char * GeneratedTableUnitsToken | ( | GENERATED_TABLE_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 223 of file generated_table_schema.cpp.
Referenced by PCB_IO_KICAD_SEXPR::format(), and DRILL_CHART_TEMPLATE::SaveToFile().
| GENERATED_TABLE_UNITS ToGeneratedTableUnits | ( | EDA_UNITS | aUnits | ) |
The table units a user's display units seed.
Every unit that is neither inch nor mil maps to MM.
Definition at line 161 of file generated_table_schema.cpp.
References INCH, MILS, and MM.
Referenced by PCB_CONTROL::PlaceStackup().
|
constexpr |
A column can be no wider than this.
Bounds hostile input from any decoder. No real table column is a metre across.
Definition at line 51 of file generated_table_schema.h.
Referenced by BOOST_FIXTURE_TEST_CASE(), DIALOG_GENERATED_TABLE_PROPERTIES::harvestColumnGrid(), UnpackGeneratedTable(), and GENERATED_TABLE_SCHEMA::Validate().
|
constexpr |
The most digits a generated table prints after the decimal point.
Definition at line 54 of file generated_table_schema.h.
Referenced by PCB_GENERATED_TABLE::SetPrecision(), and UnpackGeneratedTable().
|
constexpr |
A column set can be no wider than this in total, summed after each column is clamped to GENERATED_TABLE_MAX_COLUMN_WIDTH.
Every column can pass the per-column bound on its own and still push table geometry past int range once enough of them are laid out side by side, so the total is checked separately, in int64 so the check itself cannot overflow.
Definition at line 63 of file generated_table_schema.h.
Referenced by GENERATED_TABLE_SCHEMA::Validate().