26#ifndef CLASS_NETCLASS_H
27#define CLASS_NETCLASS_H
46 static const char Default[];
54 NETCLASS(
const wxString& aName,
bool aInitWithDefaults =
true );
62 return wxT(
"NETCLASS" );
69 void ResetParameters();
74 const std::vector<NETCLASS*>& GetConstituentNetclasses()
const;
77 void SetConstituentNetclasses( std::vector<NETCLASS*>&& constituents );
81 const wxString GetVariableSubstitutionName()
const;
85 bool ContainsNetclassWithName(
const wxString& netclass )
const;
91 const wxString GetName()
const;
96 if( aName == Default )
107 void SetClearance( std::optional<int> aClearance ) { m_Clearance = aClearance; }
131 void SetViaDrill( std::optional<int> aSize ) { m_ViaDrill = aSize; }
181 if( aIsForSave || !m_isDefault )
194 void SetWireWidth( std::optional<int> aWidth ) { m_wireWidth = aWidth; }
202 void SetBusWidth( std::optional<int> aWidth ) { m_busWidth = aWidth; }
211 if( aIsForSave || !m_isDefault )
212 return m_schematicColor;
224 void SetLineStyle( std::optional<int> aStyle ) { m_lineStyle = aStyle; }
bool operator==(const wxAuiPaneInfo &aLhs, const wxAuiPaneInfo &aRhs)
A color representation with 4 components: red, green, blue, alpha.
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
A collection of nets and the parameters used to route or test these nets.
void SetViaDiameter(int aDia)
void SetViaDrill(int aSize)
bool HasLineStyle() const
int GetViaDiameter() const
void SetWireWidthParent(NETCLASS *parent)
void SetWireWidth(std::optional< int > aWidth)
COLOR4D m_pcbColor
Optional PCB color override for this netclass.
void SetuViaDrillParent(NETCLASS *parent)
void SetPriority(int aPriority)
void SetViaDrill(std::optional< int > aSize)
void SetClearance(std::optional< int > aClearance)
bool HasuViaDrill() const
NETCLASS * m_pcbColorParent
void SetDiffPairWidthParent(NETCLASS *parent)
void SetuViaDiameter(int aSize)
void SetDiffPairWidth(int aSize)
NETCLASS * m_diffPairWidthParent
NETCLASS * m_uViaDrillParent
std::optional< int > m_ViaDrill
via drill hole diameter
int GetDiffPairViaGap() const
void SetViaDrillParent(NETCLASS *parent)
std::optional< int > m_wireWidth
bool m_isDefault
Mark if this instance is the default netclass.
std::optional< int > m_busWidth
void SetDiffPairGapParent(NETCLASS *parent)
NETCLASS * GetViaDrillParent() const
int GetDiffPairGap() const
NETCLASS * m_diffPairGapParent
std::optional< int > GetBusWidthOpt() const
void SetViaDiameter(std::optional< int > aDia)
void SetLineStyle(int aStyle)
bool HasViaDiameter() const
NETCLASS * GetBusWidthParent() const
std::optional< int > m_TrackWidth
track width used to route nets
NETCLASS * m_viaDiameterParent
int m_Priority
The priority for multiple netclass resolution.
void SetSchematicColor(COLOR4D aColor)
std::optional< int > m_diffPairWidth
bool HasDiffPairWidth() const
std::optional< int > GetTrackWidthOpt() const
std::optional< int > m_diffPairViaGap
void SetLineStyleParent(NETCLASS *parent)
bool IsDefault() const
@ brief Determines if this is marked as the default netclass
std::optional< int > m_ViaDia
via diameter
void SetDiffPairViaGap(int aSize)
std::optional< int > GetViaDiameterOpt() const
std::optional< int > GetWireWidthOpt() const
bool HasuViaDiameter() const
void SetTrackWidthParent(NETCLASS *parent)
std::optional< int > m_lineStyle
int GetuViaDiameter() const
wxString GetClass() const
void SetDiffPairViaGap(std::optional< int > aSize)
NETCLASS * GetTrackWidthParent() const
NETCLASS * GetClearanceParent() const
std::optional< int > GetClearanceOpt() const
void SetLineStyle(std::optional< int > aStyle)
std::optional< int > GetuViaDiameterOpt() const
bool HasTrackWidth() const
void SetViaDiameterParent(NETCLASS *parent)
void SetPcbColor(const COLOR4D &aColor)
NETCLASS * m_viaDrillParent
NETCLASS * m_lineStyleParent
void SetuViaDiameter(std::optional< int > aSize)
std::optional< int > GetDiffPairViaGapOpt() const
std::optional< int > m_Clearance
clearance when routing
void SetTrackWidth(std::optional< int > aWidth)
void SetDiffPairWidth(std::optional< int > aSize)
std::optional< int > m_uViaDia
microvia diameter
NETCLASS * GetLineStyleParent() const
int GetDiffPairWidth() const
void SetuViaDrill(int aSize)
std::optional< int > GetViaDrillOpt() const
NETCLASS * m_uViaDiaParent
void SetDiffPairGap(int aSize)
void SetBusWidthParent(NETCLASS *parent)
NETCLASS * GetDiffPairWidthParent() const
void SetClearance(int aClearance)
NETCLASS * m_clearanceParent
NETCLASS * GetuViaDrillParent() const
NETCLASS * m_diffPairViaGapParent
COLOR4D GetPcbColor(bool aIsForSave=false) const
NETCLASS * GetDiffPairViaGapParent() const
bool HasDiffPairGap() const
void SetDescription(const wxString &aDesc)
COLOR4D GetSchematicColor(bool aIsForSave=false) const
const wxString & GetDescription() const
void SetPcbColorParent(NETCLASS *parent)
NETCLASS * m_schematicColorParent
void SetuViaDrill(std::optional< int > aSize)
NETCLASS * m_busWidthParent
std::optional< int > m_uViaDrill
microvia drill hole diameter
void SetBusWidth(int aWidth)
std::optional< int > GetDiffPairWidthOpt() const
void SetClearanceParent(NETCLASS *parent)
int GetTrackWidth() const
void SetWireWidth(int aWidth)
void SetDiffPairViaGapParent(NETCLASS *parent)
bool HasWireWidth() const
NETCLASS * m_wireWidthParent
std::optional< int > GetuViaDrillOpt() const
void SetuViaDiameterParent(NETCLASS *parent)
NETCLASS * m_trackWidthParent
void SetSchematicColorParent(NETCLASS *parent)
void SetBusWidth(std::optional< int > aWidth)
void SetName(const wxString &aName)
std::optional< int > GetLineStyleOpt() const
void SetTrackWidth(int aWidth)
std::vector< NETCLASS * > m_constituents
NETCLASSes contributing to an aggregate.
std::optional< int > GetDiffPairGapOpt() const
void SetDiffPairGap(std::optional< int > aSize)
NETCLASS * GetWireWidthParent() const
NETCLASS * GetSchematicColorParent() const
NETCLASS * GetDiffPairGapParent() const
std::optional< int > m_diffPairGap
bool HasDiffPairViaGap() const
NETCLASS * GetPcbColorParent() const
NETCLASS * GetViaDiameterParent() const
bool HasClearance() const
wxString m_Name
Name of the net class.
NETCLASS * GetuViaDiameterParent() const
wxString m_Description
what this NETCLASS is for.
This file contains macros just for swig binding.
#define DECL_SET_FOR_SWIG(TypeName, MemberType)