Remove shadowed member variables.
This commit is contained in:
parent
e5cdf3785b
commit
cc78196f81
|
@ -99,7 +99,6 @@ static LIB_SYMBOL* dummy()
|
||||||
SCH_SYMBOL::SCH_SYMBOL() :
|
SCH_SYMBOL::SCH_SYMBOL() :
|
||||||
SYMBOL( nullptr, SCH_SYMBOL_T )
|
SYMBOL( nullptr, SCH_SYMBOL_T )
|
||||||
{
|
{
|
||||||
m_DNP = false;
|
|
||||||
Init( VECTOR2I( 0, 0 ) );
|
Init( VECTOR2I( 0, 0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +138,6 @@ SCH_SYMBOL::SCH_SYMBOL( const LIB_SYMBOL& aSymbol, const LIB_ID& aLibId,
|
||||||
m_excludedFromSim = m_part->GetExcludedFromSim();
|
m_excludedFromSim = m_part->GetExcludedFromSim();
|
||||||
m_excludedFromBOM = m_part->GetExcludedFromBOM();
|
m_excludedFromBOM = m_part->GetExcludedFromBOM();
|
||||||
m_excludedFromBoard = m_part->GetExcludedFromBoard();
|
m_excludedFromBoard = m_part->GetExcludedFromBoard();
|
||||||
m_DNP = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -222,9 +220,6 @@ void SCH_SYMBOL::Init( const VECTOR2I& pos )
|
||||||
|
|
||||||
m_prefix = wxString( wxT( "U" ) );
|
m_prefix = wxString( wxT( "U" ) );
|
||||||
m_isInNetlist = true;
|
m_isInNetlist = true;
|
||||||
m_excludedFromSim = false;
|
|
||||||
m_excludedFromBOM = false;
|
|
||||||
m_excludedFromBoard = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2754,14 +2749,12 @@ static struct SCH_SYMBOL_DESC
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
propMgr.AddProperty( new PROPERTY<SCH_SYMBOL, bool>( _HKI( "Pin numbers" ),
|
propMgr.AddProperty( new PROPERTY<SYMBOL, bool>( _HKI( "Pin numbers" ),
|
||||||
&SCH_SYMBOL::SetShowPinNumbers,
|
&SYMBOL::SetShowPinNumbers, &SYMBOL::GetShowPinNumbers ) )
|
||||||
&SCH_SYMBOL::GetShowPinNumbers ) )
|
|
||||||
.SetAvailableFunc( hasLibPart );
|
.SetAvailableFunc( hasLibPart );
|
||||||
|
|
||||||
propMgr.AddProperty( new PROPERTY<SCH_SYMBOL, bool>( _HKI( "Pin names" ),
|
propMgr.AddProperty( new PROPERTY<SYMBOL, bool>( _HKI( "Pin names" ),
|
||||||
&SCH_SYMBOL::SetShowPinNames,
|
&SYMBOL::SetShowPinNames, &SYMBOL::GetShowPinNames ) )
|
||||||
&SCH_SYMBOL::GetShowPinNames ) )
|
|
||||||
.SetAvailableFunc( hasLibPart );
|
.SetAvailableFunc( hasLibPart );
|
||||||
|
|
||||||
const wxString groupFields = _HKI( "Fields" );
|
const wxString groupFields = _HKI( "Fields" );
|
||||||
|
@ -2784,18 +2777,18 @@ static struct SCH_SYMBOL_DESC
|
||||||
|
|
||||||
const wxString groupAttributes = _HKI( "Attributes" );
|
const wxString groupAttributes = _HKI( "Attributes" );
|
||||||
|
|
||||||
propMgr.AddProperty( new PROPERTY<SCH_SYMBOL, bool>( _HKI( "Exclude From Board" ),
|
propMgr.AddProperty( new PROPERTY<SYMBOL, bool>( _HKI( "Exclude From Board" ),
|
||||||
&SCH_SYMBOL::SetExcludedFromBoard, &SCH_SYMBOL::GetExcludedFromBoard ),
|
&SYMBOL::SetExcludedFromBoard, &SYMBOL::GetExcludedFromBoard ),
|
||||||
groupAttributes );
|
groupAttributes );
|
||||||
propMgr.AddProperty( new PROPERTY<SCH_SYMBOL, bool>( _HKI( "Exclude From Simulation" ),
|
propMgr.AddProperty( new PROPERTY<SYMBOL, bool>( _HKI( "Exclude From Simulation" ),
|
||||||
&SCH_SYMBOL::SetExcludedFromSim, &SCH_SYMBOL::GetExcludedFromSim ),
|
&SYMBOL::SetExcludedFromSim, &SYMBOL::GetExcludedFromSim ),
|
||||||
groupAttributes );
|
groupAttributes );
|
||||||
propMgr.AddProperty( new PROPERTY<SCH_SYMBOL, bool>( _HKI( "Exclude From Bill of Materials" ),
|
propMgr.AddProperty( new PROPERTY<SYMBOL, bool>( _HKI( "Exclude From Bill of Materials" ),
|
||||||
&SCH_SYMBOL::SetExcludedFromBOM, &SCH_SYMBOL::GetExcludedFromBOM ),
|
&SYMBOL::SetExcludedFromBOM, &SYMBOL::GetExcludedFromBOM ),
|
||||||
groupAttributes );
|
groupAttributes );
|
||||||
propMgr.AddProperty( new PROPERTY<SCH_SYMBOL, bool>( _HKI( "Do not Populate" ),
|
propMgr.AddProperty( new PROPERTY<SYMBOL, bool>( _HKI( "Do not Populate" ),
|
||||||
&SCH_SYMBOL::SetDNP, &SCH_SYMBOL::GetDNP ),
|
&SYMBOL::SetDNP, &SYMBOL::GetDNP ),
|
||||||
groupAttributes );
|
groupAttributes );
|
||||||
}
|
}
|
||||||
} _SCH_SYMBOL_DESC;
|
} _SCH_SYMBOL_DESC;
|
||||||
|
|
||||||
|
|
|
@ -831,37 +831,6 @@ public:
|
||||||
|
|
||||||
bool HasBrightenedPins();
|
bool HasBrightenedPins();
|
||||||
|
|
||||||
bool GetExcludedFromSim() const override { return m_excludedFromSim; }
|
|
||||||
void SetExcludedFromSim( bool aExclude ) override { m_excludedFromSim = aExclude; }
|
|
||||||
|
|
||||||
bool GetExcludedFromBOM() const { return m_excludedFromBOM; }
|
|
||||||
void SetExcludedFromBOM( bool aIncludeInBOM ) { m_excludedFromBOM = aIncludeInBOM; }
|
|
||||||
|
|
||||||
bool GetExcludedFromBoard() const { return m_excludedFromBoard; }
|
|
||||||
void SetExcludedFromBoard( bool aIncludeOnBoard ) { m_excludedFromBoard = aIncludeOnBoard; }
|
|
||||||
|
|
||||||
bool GetDNP() const { return m_DNP; }
|
|
||||||
void SetDNP( bool aDNP ) { m_DNP = aDNP; }
|
|
||||||
|
|
||||||
bool GetShowPinNumbers() const
|
|
||||||
{
|
|
||||||
return m_part && m_part->GetShowPinNumbers();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetShowPinNumbers( bool aShow )
|
|
||||||
{
|
|
||||||
if( m_part )
|
|
||||||
m_part->SetShowPinNumbers( aShow );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GetShowPinNames() const { return m_part && m_part->GetShowPinNames(); }
|
|
||||||
|
|
||||||
void SetShowPinNames( bool aShow )
|
|
||||||
{
|
|
||||||
if( m_part )
|
|
||||||
m_part->SetShowPinNames( aShow );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsPointClickableAnchor( const VECTOR2I& aPos ) const override;
|
bool IsPointClickableAnchor( const VECTOR2I& aPos ) const override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -899,25 +868,21 @@ private:
|
||||||
* multiple variants of the same library symbol. Set this member in order to preserve the
|
* multiple variants of the same library symbol. Set this member in order to preserve the
|
||||||
* link to the original symbol library. If empty, #LIB_ID::GetLibItemName() should be used.
|
* link to the original symbol library. If empty, #LIB_ID::GetLibItemName() should be used.
|
||||||
*/
|
*/
|
||||||
wxString m_schLibSymbolName;
|
wxString m_schLibSymbolName;
|
||||||
|
|
||||||
TRANSFORM m_transform; ///< The rotation/mirror transformation.
|
TRANSFORM m_transform; ///< The rotation/mirror transformation.
|
||||||
std::vector<SCH_FIELD> m_fields; ///< Variable length list of fields.
|
std::vector<SCH_FIELD> m_fields; ///< Variable length list of fields.
|
||||||
|
|
||||||
std::unique_ptr< LIB_SYMBOL > m_part; ///< a flattened copy of the LIB_SYMBOL
|
std::unique_ptr<LIB_SYMBOL> m_part; ///< A flattened copy of the LIB_SYMBOL from the
|
||||||
///< from the PROJECT's libraries.
|
///< PROJECT's libraries.
|
||||||
std::vector<std::unique_ptr<SCH_PIN>> m_pins; ///< a SCH_PIN for every LIB_PIN (all units)
|
bool m_isInNetlist; ///< True if the symbol should appear in netlist
|
||||||
std::unordered_map<LIB_PIN*, SCH_PIN*> m_pinMap; ///< library pin pointer : SCH_PIN's index
|
|
||||||
|
|
||||||
bool m_isInNetlist; ///< True if the symbol should appear in the netlist
|
std::vector<std::unique_ptr<SCH_PIN>> m_pins; ///< a SCH_PIN for every LIB_PIN (all units)
|
||||||
bool m_excludedFromSim; ///< True to exclude from simulation.
|
std::unordered_map<LIB_PIN*, SCH_PIN*> m_pinMap; ///< library pin pointer : SCH_PIN's index
|
||||||
bool m_excludedFromBOM; ///< True to exclude from bill of materials export.
|
|
||||||
bool m_excludedFromBoard; ///< True to exclude from netlist when updating board.
|
|
||||||
bool m_DNP; ///< True if symbol is set to 'Do Not Populate'.
|
|
||||||
|
|
||||||
// Defines the hierarchical path and reference of the symbol. This allows support
|
// Defines the hierarchical path and reference of the symbol. This allows support for multiple
|
||||||
// for multiple references to a single sub-sheet.
|
// references to a single sub-sheet.
|
||||||
std::vector<SCH_SYMBOL_INSTANCE> m_instanceReferences;
|
std::vector<SCH_SYMBOL_INSTANCE> m_instanceReferences;
|
||||||
|
|
||||||
/// @see SCH_SYMBOL::GetOrientation
|
/// @see SCH_SYMBOL::GetOrientation
|
||||||
static std::unordered_map<TRANSFORM, int> s_transformToOrientationCache;
|
static std::unordered_map<TRANSFORM, int> s_transformToOrientationCache;
|
||||||
|
|
|
@ -41,6 +41,7 @@ public:
|
||||||
m_excludedFromSim = false;
|
m_excludedFromSim = false;
|
||||||
m_excludedFromBOM = false;
|
m_excludedFromBOM = false;
|
||||||
m_excludedFromBoard = false;
|
m_excludedFromBoard = false;
|
||||||
|
m_DNP = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
SYMBOL( KICAD_T idType ) :
|
SYMBOL( KICAD_T idType ) :
|
||||||
|
@ -152,7 +153,13 @@ public:
|
||||||
void SetExcludedFromBoard( bool aExcludeFromBoard ) { m_excludedFromBoard = aExcludeFromBoard; }
|
void SetExcludedFromBoard( bool aExcludeFromBoard ) { m_excludedFromBoard = aExcludeFromBoard; }
|
||||||
bool GetExcludedFromBoard() const { return m_excludedFromBoard; }
|
bool GetExcludedFromBoard() const { return m_excludedFromBoard; }
|
||||||
|
|
||||||
void ViewGetLayers( int aLayers[], int& aCount ) const override;
|
/**
|
||||||
|
* Set or clear the 'Do Not Populate' flaga
|
||||||
|
*/
|
||||||
|
bool GetDNP() const { return m_DNP; }
|
||||||
|
void SetDNP( bool aDNP ) { m_DNP = aDNP; }
|
||||||
|
|
||||||
|
void ViewGetLayers( int aLayers[], int& aCount ) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_pinNameOffset; ///< The offset in mils to draw the pin name. Set to
|
int m_pinNameOffset; ///< The offset in mils to draw the pin name. Set to
|
||||||
|
@ -163,6 +170,7 @@ protected:
|
||||||
bool m_excludedFromSim;
|
bool m_excludedFromSim;
|
||||||
bool m_excludedFromBOM;
|
bool m_excludedFromBOM;
|
||||||
bool m_excludedFromBoard;
|
bool m_excludedFromBoard;
|
||||||
|
bool m_DNP; ///< True if symbol is set to 'Do Not Populate'.
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SYMBOL_H
|
#endif // SYMBOL_H
|
||||||
|
|
Loading…
Reference in New Issue