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)
 

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 681 of file symbol_editor.cpp.

Member Enumeration Documentation

◆ CONFLICT_STRATEGY

Enumerator
OVERWRITE 
RENAME 

Definition at line 684 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 695 of file symbol_editor.cpp.

Member Function Documentation

◆ DoSave()

◆ resolveConflict()

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

Definition at line 761 of file symbol_editor.cpp.

References m_libMgr, m_strategy, OVERWRITE, RENAME, and SYMBOL_LIBRARY_MANAGER::SymbolExists().

Referenced by DoSave().

Member Data Documentation

◆ m_libMgr

LIB_SYMBOL_LIBRARY_MANAGER& SYMBOL_SAVE_AS_HANDLER::m_libMgr
private

Definition at line 793 of file symbol_editor.cpp.

Referenced by DoSave(), and resolveConflict().

◆ m_strategy

CONFLICT_STRATEGY SYMBOL_SAVE_AS_HANDLER::m_strategy
private

Definition at line 794 of file symbol_editor.cpp.

Referenced by resolveConflict().

◆ m_valueFollowsName

bool SYMBOL_SAVE_AS_HANDLER::m_valueFollowsName
private

Definition at line 795 of file symbol_editor.cpp.

Referenced by DoSave().


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