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