KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ref_suffix_split.h File Reference
#include <map>
#include <optional>
#include <string>
#include <kiid.h>
#include <pcb_item_containers.h>
#include <wx/string.h>

Go to the source code of this file.

Classes

struct  SHEET_REF_SUFFIX
 A schematic sheet path's composed reference suffix and its position in page order. More...
 
struct  FOOTPRINT_REF_SPLIT
 

Typedefs

using SHEET_REF_SUFFIXES = std::map<wxString, SHEET_REF_SUFFIX>
 Sheet suffixes keyed by the sheet path string that starts the paths of its footprints, and package suffixes keyed by the full path of a footprint whose package takes another sheet's.
 

Functions

std::optional< SHEET_REF_SUFFIXES > ParseRefSuffixes (const std::string &aPayload)
 
std::map< KIID, FOOTPRINT_REF_SPLIT > SplitRefSuffixes (const FOOTPRINTS &aFootprints, const SHEET_REF_SUFFIXES *aSuffixes, bool aSuffixMode)
 Split each footprint reference into its base and sheet suffix.
 

Typedef Documentation

◆ SHEET_REF_SUFFIXES

using SHEET_REF_SUFFIXES = std::map<wxString, SHEET_REF_SUFFIX>

Sheet suffixes keyed by the sheet path string that starts the paths of its footprints, and package suffixes keyed by the full path of a footprint whose package takes another sheet's.

Definition at line 41 of file ref_suffix_split.h.

Function Documentation

◆ ParseRefSuffixes()

std::optional< SHEET_REF_SUFFIXES > ParseRefSuffixes ( const std::string & aPayload)
Returns
the suffixes in a MAIL_SCH_GET_REF_SUFFIXES reply, or nothing when no schematic answered.

Definition at line 29 of file ref_suffix_split.cpp.

References MAIL_SCH_REF_SUFFIXES_TAG, SHEET_REF_SUFFIX::Rank, and SHEET_REF_SUFFIX::Suffix.

Referenced by BOOST_AUTO_TEST_CASE(), and DIALOG_BOARD_REANNOTATE::BuildFootprintList().

◆ SplitRefSuffixes()

std::map< KIID, FOOTPRINT_REF_SPLIT > SplitRefSuffixes ( const FOOTPRINTS & aFootprints,
const SHEET_REF_SUFFIXES * aSuffixes,
bool aSuffixMode )

Split each footprint reference into its base and sheet suffix.

Copies of one symbol on reused sheets that share a base form a group, which is numbered from the copy on the first page so every copy keeps the same base.

Parameters
aSuffixesare the schematic's sheet suffixes, or null when there is no schematic to ask.
aSuffixModeis true when the project numbers reused sheets by suffix, which leaves a reference ambiguous whenever there is no schematic to name the suffix.

Definition at line 56 of file ref_suffix_split.cpp.

References KIID_PATH::AsString(), FOOTPRINT::GetPath(), group, SHEET_REF_SUFFIX::Rank, split(), and SHEET_REF_SUFFIX::Suffix.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and DIALOG_BOARD_REANNOTATE::BuildFootprintList().