KiCad PCB EDA Suite
Loading...
Searching...
No Matches
lib_symbol.cpp File Reference
#include <font/outline_font.h>
#include <sch_draw_panel.h>
#include <plotters/plotter.h>
#include <sch_screen.h>
#include <template_fieldnames.h>
#include <transform.h>
#include <settings/color_settings.h>
#include <sch_pin.h>
#include <sch_shape.h>
#include <trace_helpers.h>
#include <common.h>
#include <text_eval/text_eval_wrapper.h>
#include <libraries/legacy_symbol_library.h>
#include <algorithm>
#include <memory>
#include <unordered_set>
#include <advanced_config.h>

Go to the source code of this file.

Classes

struct  null_deleter
 http://www.boost.org/doc/libs/1_55_0/libs/smart_ptr/sp_techniques.html#weak_without_shared More...
 
struct  LIB_SYMBOL_DESC
 

Macros

#define REPORT(msg)
 
#define ITEM_DESC(item)
 

Functions

static std::shared_ptr< LIB_SYMBOLGetSafeRootSymbol (const LIB_SYMBOL *aSymbol, const char *aCallerName)
 Helper to safely get the root symbol, detecting and logging circular inheritance.
 
bool operator< (const LIB_SYMBOL &aItem1, const LIB_SYMBOL &aItem2)
 

Variables

static struct LIB_SYMBOL_DESC _LIB_SYMBOL_DESC
 

Macro Definition Documentation

◆ ITEM_DESC

#define ITEM_DESC ( item)
Value:
( item )->GetItemDescription( &unitsProvider, false )

Definition at line 1844 of file lib_symbol.cpp.

Referenced by LIB_SYMBOL::Compare(), and FOOTPRINT::FootprintNeedsUpdate().

◆ REPORT

#define REPORT ( msg)
Value:
{ \
if( aReporter ) \
aReporter->Report( msg ); \
}

Definition at line 1839 of file lib_symbol.cpp.

Referenced by LIB_SYMBOL::Compare(), DRC_ENGINE::EvalRules(), DRC_ENGINE::EvalZoneConnection(), FOOTPRINT::FootprintNeedsUpdate(), and DRC_ENGINE::ProcessAssertions().

Function Documentation

◆ GetSafeRootSymbol()

static std::shared_ptr< LIB_SYMBOL > GetSafeRootSymbol ( const LIB_SYMBOL * aSymbol,
const char * aCallerName )
static

Helper to safely get the root symbol, detecting and logging circular inheritance.

Parameters
aSymbolThe symbol to start from
aCallerNameName of the calling function for logging
Returns
The root symbol, or the input symbol if a cycle is detected or no parent exists

Definition at line 56 of file lib_symbol.cpp.

References chain, LIB_SYMBOL::GetLibId(), LIB_ID::GetLibNickname(), LIB_SYMBOL::GetName(), LIB_SYMBOL::GetParent(), LIB_SYMBOL::SharedPtr(), traceSymbolInheritance, and UTF8::wx_str().

Referenced by LIB_SYMBOL::GetGraphicalPins(), LIB_SYMBOL::GetMaxPinNumber(), LIB_SYMBOL::GetShownDescription(), LIB_SYMBOL::GetUnitBoundingBox(), LIB_SYMBOL::GetUnitCount(), LIB_SYMBOL::HasLegacyAlternateBodyStyle(), LIB_SYMBOL::IsGlobalPower(), LIB_SYMBOL::IsLocalPower(), LIB_SYMBOL::IsNormal(), LIB_SYMBOL::SetGlobalPower(), LIB_SYMBOL::SetLocalPower(), and LIB_SYMBOL::SetNormal().

◆ operator<()

bool operator< ( const LIB_SYMBOL & aItem1,
const LIB_SYMBOL & aItem2 )

Definition at line 168 of file lib_symbol.cpp.

References LIB_SYMBOL::GetName().

Variable Documentation

◆ _LIB_SYMBOL_DESC

struct LIB_SYMBOL_DESC _LIB_SYMBOL_DESC
static