22#ifndef _SCH_CONNECTION_H 
   23#define _SCH_CONNECTION_H 
   26#include <unordered_set> 
  143    wxString 
Name( 
bool aIgnoreSheet = 
false ) 
const;
 
  161    void SetPrefix( 
const wxString& aPrefix );
 
  166    void SetSuffix( 
const wxString& aSuffix );
 
  192    const std::vector< std::shared_ptr< SCH_CONNECTION > >& 
Members()
 const 
 
  197    const std::vector< std::shared_ptr< SCH_CONNECTION > > 
AllMembers() 
const;
 
  225    static bool IsBusLabel( 
const wxString& aLabel );
 
  307    std::vector< std::shared_ptr< SCH_CONNECTION > > 
m_members;
 
 
Calculate the connectivity of a schematic and generates netlists.
 
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
 
wxString FullLocalName() const
 
long m_vector_start
Highest member of a vector bus.
 
bool IsMemberOfBus(SCH_CONNECTION *aOther) const
Returns true if this connection is a member of bus connection aOther.
 
wxString BusPrefix() const
 
void ConfigureFromLabel(const wxString &aLabel)
Configures the connection given a label.
 
SCH_ITEM * m_parent
The SCH_ITEM this connection is owned by.
 
SCH_SHEET_PATH LocalSheet() const
 
SCH_SHEET_PATH m_sheet
The hierarchical sheet this connection is on.
 
bool operator!=(const SCH_CONNECTION &aOther) const
 
void SetSubgraphCode(int aCode)
 
void SetSuffix(const wxString &aSuffix)
 
void SetBusCode(int aCode)
 
void SetName(const wxString &aName)
 
wxString m_name
Name of the connection.
 
SCH_ITEM * Parent() const
 
wxString GetNetName() const
 
long m_vector_end
Lowest member of a vector bus.
 
SCH_SHEET_PATH Sheet() const
 
CONNECTION_TYPE Type() const
 
bool HasDriverChanged() const
 
const std::vector< std::shared_ptr< SCH_CONNECTION > > AllMembers() const
 
SCH_CONNECTION(SCH_ITEM *aParent=nullptr, const SCH_SHEET_PATH &aPath=SCH_SHEET_PATH())
Buses can be defined in multiple ways.
 
void Reset()
Clears connectivity information.
 
bool operator==(const SCH_CONNECTION &aOther) const
Note: the equality operator for SCH_CONNECTION only tests the net properties, not the ownership / she...
 
void SetNetCode(int aCode)
 
std::vector< std::shared_ptr< SCH_CONNECTION > > m_members
For bus connections, store a list of member connections.
 
wxString m_local_prefix
Local prefix for group bus members (used with m_local_name)
 
SCH_ITEM * m_driver
The SCH_ITEM that drives this connection's net.
 
bool IsDriver() const
Checks if the SCH_ITEM this connection is attached to can drive connections Drivers can be labels,...
 
void SetType(CONNECTION_TYPE aType)
 
void SetPrefix(const wxString &aPrefix)
 
wxString LocalName() const
 
wxString Name(bool aIgnoreSheet=false) const
 
bool IsSubsetOf(SCH_CONNECTION *aOther) const
Returns true if this connection is contained within aOther (but not the same as aOther)
 
void SetDriver(SCH_ITEM *aItem)
 
SCH_SHEET_PATH m_local_sheet
When a connection is overridden by one on a different hierarchical sheet, it will be cloned and m_she...
 
void * GetLastDriver() const
 
wxString m_prefix
Prefix if connection is member of a labeled bus group (or "" if not)
 
void Clone(const SCH_CONNECTION &aOther)
Copies connectivity information (but not parent) from another connection.
 
void * m_lastDriver
WEAK POINTER (there is no guarantee it is still allocated) Equality comparisons are OK,...
 
wxString m_cached_name_with_path
Full name including sheet path (if not global)
 
long m_vector_index
Index of bus vector member nets.
 
wxString VectorPrefix() const
 
void SetGraph(CONNECTION_GRAPH *aGraph)
 
SCH_ITEM * Driver() const
 
void AppendInfoToMsgPanel(std::vector< MSG_PANEL_ITEM > &aList) const
Adds information about the connection object to aList.
 
static bool IsBusLabel(const wxString &aLabel)
Test if aLabel has a bus notation.
 
wxString m_suffix
Name suffix (used only for disambiguation)
 
wxString m_bus_prefix
Optional prefix of a bus group (always empty for nets and vector buses)
 
const std::vector< std::shared_ptr< SCH_CONNECTION > > & Members() const
 
wxString m_cached_name
Full name, including prefix and suffix.
 
bool IsUnconnected() const
 
CONNECTION_GRAPH * m_graph
Pointer to the connection graph for the schematic this connection exists on.
 
static wxString PrintBusForUI(const wxString &aString)
 
wxString m_local_name
For bus members, we want to keep track of the "local" name of a member, that is, the name it takes on...
 
void SetSheet(const SCH_SHEET_PATH &aSheet)
 
void ClearDriverChanged()
 
int m_subgraph_code
Groups directly-connected items.
 
wxString m_vector_prefix
Prefix name of the vector, if m_type == CONNECTION_BUS (or "" if not).
 
static bool MightBeBusLabel(const wxString &aLabel)
Test if aLabel looks like a bus notation.
 
Base class for any item which can be embedded within the SCHEMATIC container class,...
 
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
 
Message panel definition file.
 
@ BUS
This item represents a bus vector.
 
@ NET
This item represents a net.
 
@ NONE
No connection to this item.
 
@ BUS_GROUP
This item represents a bus group.
 
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.