29#include <boost/algorithm/string/join.hpp>
38 wxASSERT( wxThread::IsMain() );
46 if( !schematic || !schematic->
IsValid() )
55 name = connection->Name();
56 isBus = connection->IsBus();
61 auto appendAlias = [&](
const std::shared_ptr<BUS_ALIAS>& alias )
63 aList.emplace_back( wxString::Format(
_(
"Bus Alias %s Members" ), alias->GetName() ),
64 boost::algorithm::join( alias->Members(),
" " ) );
66 const wxString localName = connection->Name(
true );
68 if(
const auto alias = schematic->
GetBusAlias( localName ) )
75 std::vector<wxString> members;
79 for(
const wxString& member : members )
81 if(
const auto memberAlias = schematic->
GetBusAlias( member ) )
82 appendAlias( memberAlias );
89 aList.emplace_back(
"Subgraph Code", wxString::Format(
"%u", connection->SubgraphCode() ) );
91 if(
SCH_ITEM* driver = connection->Driver() )
94 aList.emplace_back(
"Connection Source", wxString::Format(
"%s at %p",
95 driver->GetItemDescription( &units,
false ), driver ) );
108 isBus = connection->
IsBus();
114 aList.emplace_back(
_(
"Resolved Netclass" ),
constexpr EDA_IU_SCALE schIUScale
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
const wxString GetHumanReadableName() const
Gets the consolidated name of this netclass (which may be an aggregate).
static bool ParseBusGroup(const wxString &aGroup, wxString *name, std::vector< wxString > *aMemberList, size_t *aPrefixEnd=nullptr)
Parse a bus group label into the name and a list of components.
Holds all the data relating to one schematic.
std::shared_ptr< BUS_ALIAS > GetBusAlias(const wxString &aLabel) const
Return a pointer to a bus alias object for the given label, or null if one doesn't exist.
SCH_CONNECTIVITY::FACADE & Connectivity() const
bool IsValid() const
A simple test if the schematic is loaded, not a complete one.
SCH_SHEET_PATH & CurrentSheet() const
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
wxString Name(bool aIgnoreSheet=false) const
void AppendInfoToMsgPanel(std::vector< MSG_PANEL_ITEM > &aList) const
Adds information about the connection object to aList.
std::optional< ITEM_VIEW > Connection(const KIID &aItem, const KIID_PATH &aPath) const
Base class for any item which can be embedded within the SCHEMATIC container class,...
SCHEMATIC * Schematic() const
Search the item hierarchy to find a SCHEMATIC.
std::shared_ptr< NETCLASS > GetEffectiveNetClass(const SCH_SHEET_PATH *aSheet=nullptr) const
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Message panel definition file.
std::optional< wxString > AppendConnectionInfo(const SCH_ITEM &aItem, std::vector< MSG_PANEL_ITEM > &aList, const SCH_SHEET_PATH *aPath=nullptr)
Append connection details; return its name for a signal, or no value for a bus/missing row.
wxString UnescapeString(const wxString &aSource)