KiCad PCB EDA Suite
Loading...
Searching...
No Matches
IMPORT_PROJ_PROPS Namespace Reference

Property keys and codec threaded through IMPORT_PROJ_HELPER::m_properties to coordinate a non-KiCad project import across the schematic and PCB editors. More...

Functions

wxString ManagedCacheOption ()
 Options string identifying a library-table row as a generated import cache.
 
wxString JoinList (const wxArrayString &aItems)
 Encode library nicknames into a single list-property value.
 
std::vector< wxString > SplitList (const wxString &aValue)
 Decode a list-property value back into nicknames, dropping empties.
 
void ReadFootprintProps (const std::map< std::string, UTF8 > *aProps, wxString &aCacheNickname, std::vector< wxString > &aSourceFpLibs)
 Read the footprint-import coordination properties out of a properties map.
 
void ReadSymbolProps (const std::map< std::string, UTF8 > *aProps, wxString &aCacheNickname, std::vector< wxString > &aSourceSymLibs)
 Read the symbol-import coordination properties out of a properties map.
 
wxString MakeCacheNickname (const wxString &aStem)
 Derive the generated footprint-cache nickname from a project or file stem.
 
wxString MakeSymbolCacheNickname (const wxString &aStem)
 Derive the generated symbol-cache nickname from a project or file stem.
 

Variables

constexpr char FP_CACHE_NICKNAME [] = "import_fp_cache_nickname"
 
constexpr char SOURCE_FP_LIBS [] = "import_source_fp_libs"
 
constexpr char SYM_CACHE_NICKNAME [] = "import_sym_cache_nickname"
 
constexpr char SOURCE_SYM_LIBS [] = "import_source_sym_libs"
 
constexpr char LIST_SEPARATOR = '\x1f'
 Separator joining a list value within a single property.
 
constexpr char MANAGED_CACHE_KEY [] = "kicad_import_cache"
 Library-table row option key marking a row as a generated import cache.
 

Detailed Description

Property keys and codec threaded through IMPORT_PROJ_HELPER::m_properties to coordinate a non-KiCad project import across the schematic and PCB editors.

Values ride the MAIL_IMPORT_FILE payload, whose framing forbids '
' inside a value, so list values join with the unit-separator control character (a library nickname cannot contain it). The codec lives here next to the contract so the manager (encode) and both editor frames (decode) cannot drift.

Function Documentation

◆ JoinList()

wxString IMPORT_PROJ_PROPS::JoinList ( const wxArrayString & aItems)
inline

Encode library nicknames into a single list-property value.

Definition at line 59 of file import_proj_properties.h.

References LIST_SEPARATOR.

Referenced by IMPORT_PROJ_HELPER::EasyEDAProProjectHandler(), and IMPORT_PROJ_HELPER::joinSourceLibNicknames().

◆ MakeCacheNickname()

wxString IMPORT_PROJ_PROPS::MakeCacheNickname ( const wxString & aStem)
inline

Derive the generated footprint-cache nickname from a project or file stem.

Definition at line 107 of file import_proj_properties.h.

References LIB_ID::FixIllegalChars(), and UTF8::wx_str().

Referenced by ReconcileImportedFootprints(), and IMPORT_PROJ_HELPER::setImportCacheNickname().

◆ MakeSymbolCacheNickname()

wxString IMPORT_PROJ_PROPS::MakeSymbolCacheNickname ( const wxString & aStem)
inline

Derive the generated symbol-cache nickname from a project or file stem.

Definition at line 113 of file import_proj_properties.h.

References LIB_ID::FixIllegalChars(), and UTF8::wx_str().

Referenced by ReconcileImportedSymbols().

◆ ManagedCacheOption()

wxString IMPORT_PROJ_PROPS::ManagedCacheOption ( )
inline

Options string identifying a library-table row as a generated import cache.

Definition at line 53 of file import_proj_properties.h.

References MANAGED_CACHE_KEY.

Referenced by FOOTPRINT_IMPORT_RECONCILER::registerCacheRow(), and SYMBOL_IMPORT_RECONCILER::registerCacheRow().

◆ ReadFootprintProps()

void IMPORT_PROJ_PROPS::ReadFootprintProps ( const std::map< std::string, UTF8 > * aProps,
wxString & aCacheNickname,
std::vector< wxString > & aSourceFpLibs )
inline

Read the footprint-import coordination properties out of a properties map.

Definition at line 79 of file import_proj_properties.h.

References FP_CACHE_NICKNAME, SOURCE_FP_LIBS, and SplitList().

Referenced by SCH_EDIT_FRAME::importFile(), and ReconcileImportedFootprints().

◆ ReadSymbolProps()

void IMPORT_PROJ_PROPS::ReadSymbolProps ( const std::map< std::string, UTF8 > * aProps,
wxString & aCacheNickname,
std::vector< wxString > & aSourceSymLibs )
inline

Read the symbol-import coordination properties out of a properties map.

Definition at line 93 of file import_proj_properties.h.

References SOURCE_SYM_LIBS, SplitList(), and SYM_CACHE_NICKNAME.

Referenced by ReconcileImportedSymbols().

◆ SplitList()

std::vector< wxString > IMPORT_PROJ_PROPS::SplitList ( const wxString & aValue)
inline

Decode a list-property value back into nicknames, dropping empties.

Definition at line 65 of file import_proj_properties.h.

References LIST_SEPARATOR.

Referenced by ReadFootprintProps(), and ReadSymbolProps().

Variable Documentation

◆ FP_CACHE_NICKNAME

char IMPORT_PROJ_PROPS::FP_CACHE_NICKNAME[] = "import_fp_cache_nickname"
inlineconstexpr

◆ LIST_SEPARATOR

char IMPORT_PROJ_PROPS::LIST_SEPARATOR = '\x1f'
inlineconstexpr

Separator joining a list value within a single property.

Definition at line 47 of file import_proj_properties.h.

Referenced by JoinList(), and SplitList().

◆ MANAGED_CACHE_KEY

char IMPORT_PROJ_PROPS::MANAGED_CACHE_KEY[] = "kicad_import_cache"
inlineconstexpr

Library-table row option key marking a row as a generated import cache.

Definition at line 50 of file import_proj_properties.h.

Referenced by ManagedCacheOption().

◆ SOURCE_FP_LIBS

char IMPORT_PROJ_PROPS::SOURCE_FP_LIBS[] = "import_source_fp_libs"
inlineconstexpr

◆ SOURCE_SYM_LIBS

char IMPORT_PROJ_PROPS::SOURCE_SYM_LIBS[] = "import_source_sym_libs"
inlineconstexpr

Definition at line 44 of file import_proj_properties.h.

Referenced by ReadSymbolProps().

◆ SYM_CACHE_NICKNAME

char IMPORT_PROJ_PROPS::SYM_CACHE_NICKNAME[] = "import_sym_cache_nickname"
inlineconstexpr

Definition at line 43 of file import_proj_properties.h.

Referenced by ReadSymbolProps().