KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SYMBOL_SAVE_AS_HANDLER Class Reference

This is a class that handles state involved in saving a symbol copy as a new symbol. More...

Public Types

enum class  CONFLICT_STRATEGY { OVERWRITE , RENAME }
 

Public Member Functions

 SYMBOL_SAVE_AS_HANDLER (LIB_SYMBOL_LIBRARY_MANAGER &aLibMgr, CONFLICT_STRATEGY aStrategy, bool aValueFollowsName)
 
bool DoSave (LIB_SYMBOL &symbol, const wxString &aNewSymName, const wxString &aNewLibName, bool aFlattenSymbol)
 

Private Member Functions

wxString resolveConflict (const wxString &proposed, const wxString &aNewLibName) const
 

Private Attributes

LIB_SYMBOL_LIBRARY_MANAGERm_libMgr
 
CONFLICT_STRATEGY m_strategy
 
bool m_valueFollowsName
 

Detailed Description

This is a class that handles state involved in saving a symbol copy as a new symbol.

This isn't as simple as it sounds, because you also have to copy all the parent symbols (which is a chain affair).

Definition at line 616 of file symbol_editor.cpp.

Member Enumeration Documentation

◆ CONFLICT_STRATEGY

Enumerator
OVERWRITE 
RENAME 

Definition at line 619 of file symbol_editor.cpp.

Constructor & Destructor Documentation

◆ SYMBOL_SAVE_AS_HANDLER()

SYMBOL_SAVE_AS_HANDLER::SYMBOL_SAVE_AS_HANDLER ( LIB_SYMBOL_LIBRARY_MANAGER & aLibMgr,
CONFLICT_STRATEGY aStrategy,
bool aValueFollowsName )
inline

Definition at line 630 of file symbol_editor.cpp.

References m_libMgr, m_strategy, and m_valueFollowsName.

Member Function Documentation

◆ DoSave()

◆ resolveConflict()

wxString SYMBOL_SAVE_AS_HANDLER::resolveConflict ( const wxString & proposed,
const wxString & aNewLibName ) const
inlineprivate

Definition at line 715 of file symbol_editor.cpp.

References m_libMgr, m_strategy, OVERWRITE, and RENAME.

Referenced by DoSave().

Member Data Documentation

◆ m_libMgr

LIB_SYMBOL_LIBRARY_MANAGER& SYMBOL_SAVE_AS_HANDLER::m_libMgr
private

Definition at line 747 of file symbol_editor.cpp.

Referenced by DoSave(), resolveConflict(), and SYMBOL_SAVE_AS_HANDLER().

◆ m_strategy

CONFLICT_STRATEGY SYMBOL_SAVE_AS_HANDLER::m_strategy
private

Definition at line 748 of file symbol_editor.cpp.

Referenced by resolveConflict(), and SYMBOL_SAVE_AS_HANDLER().

◆ m_valueFollowsName

bool SYMBOL_SAVE_AS_HANDLER::m_valueFollowsName
private

Definition at line 749 of file symbol_editor.cpp.

Referenced by DoSave(), and SYMBOL_SAVE_AS_HANDLER().


The documentation for this class was generated from the following file: