111 return static_cast<SCHEMATIC*>( parent );
144 wxT(
"Shouldn't be asking for connection if connectivity is dirty!" ) );
188 if( set.size() == set.capacity() )
189 set.reserve( set.size() + 4096 );
191 set.emplace_back( aItem );
258 wxFAIL_MSG( wxT(
"Plot() method not implemented for class " ) +
GetClass() );
virtual bool IsConnectable() const
NETCLASSPTR Find(const wxString &aName) const
Search this container for a NETCLASS given by aName.
SCH_CONNECTION * GetOrInitConnection(const SCH_SHEET_PATH &aPath, CONNECTION_GRAPH *aGraph)
Holds all the data relating to one schematic.
const wxString & GetNetclassName(const wxString &aNetName) const
Calculates the connectivity of a schematic and generates netlists.
void AddConnectionTo(const SCH_SHEET_PATH &aPath, SCH_ITEM *aItem)
Add a connection link between this item and another.
virtual PROJECT_FILE & GetProjectFile() const
SCHEMATIC * Schematic() const
Searches the item hierarchy to find a SCHEMATIC.
NET_SETTINGS & NetSettings()
void SetSheet(SCH_SHEET_PATH aSheet)
virtual wxPoint GetPosition() const
FIELDS_AUTOPLACED m_fieldsAutoplaced
bool IsConnectivityDirty() const
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
virtual EDA_ITEM * Clone() const
Create a duplicate of this item with linked list members set to NULL.
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
NETCLASSPTR NetClass(const SCH_SHEET_PATH *aSheet=nullptr) const
std::vector< SCH_ITEM * > SCH_ITEM_SET
virtual void RunOnChildren(const std::function< void(SCH_ITEM *)> &aFunction)
SCH_CONNECTION * InitializeConnection(const SCH_SHEET_PATH &aPath, CONNECTION_GRAPH *aGraph)
Create a new connection object associated with this object.
wxString Name(bool aIgnoreSheet=false) const
virtual void Plot(PLOTTER *aPlotter) const
Plot the schematic item to aPlotter.
SCH_ITEM * Duplicate(bool doClone=false) const
Routine to create a new copy of given item.
virtual void SwapData(SCH_ITEM *aItem)
Swap the internal data structures aItem with the schematic item.
void Reset()
Clears connectivity information.
void SetGraph(CONNECTION_GRAPH *aGraph)
#define UNIMPLEMENTED_FOR(type)
EDA_ITEM * GetParent() const
#define STRUCT_DELETED
flag indication structures to be erased
NET_SETTINGS stores various net-related settings in a project context.
bool m_connectivity_dirty
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
wxLogTrace helper definitions.
std::unordered_map< SCH_SHEET_PATH, SCH_CONNECTION * > m_connection_map
Store connectivity information, per sheet.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
std::unordered_map< SCH_SHEET_PATH, SCH_ITEM_SET > m_connected_items
Store pointers to other items that are connected to this one, per sheet.
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the layers the item is drawn on (which may be more than its "home" layer)
PROJECT & Prj() const override
Return a reference to the project this schematic is part of.
Base plotter engine class.
#define SKIP_STRUCT
flag indicating that the structure should be ignored
SCH_ITEM_SET & ConnectedItems(const SCH_SHEET_PATH &aPath)
Retrieve the set of items connected to this item on the given sheet.
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
A base class for most all the KiCad significant classes used in schematics and boards.
virtual wxString GetClass() const override
Return the class name.
virtual bool operator<(const SCH_ITEM &aItem) const
virtual bool doIsConnected(const wxPoint &aPosition) const
Provide the object specific test to see if it is connected to aPosition.
SCH_SHEET_PATH & CurrentSheet() const override
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
Base class for any item which can be embedded within the SCHEMATIC container class,...
bool IsConnected(const wxPoint &aPoint) const
Test the item to see if it is connected to aPoint.
SCH_ITEM & operator=(const SCH_ITEM &aPin)
void SetConnectivityDirty(bool aDirty=true)
KICAD_T Type() const
Returns the type of object.
#define BRIGHTENED
item is drawn with a bright contour
SCH_ITEM(EDA_ITEM *aParent, KICAD_T aType)