KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ref_suffix_split.cpp File Reference
#include "ref_suffix_split.h"
#include <set>
#include <sstream>
#include <footprint.h>
#include <mail_type.h>

Go to the source code of this file.

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.
 

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().