20#ifndef TEST_PCAD_SCH_IMPORT_FIXTURE_H
21#define TEST_PCAD_SCH_IMPORT_FIXTURE_H
76 std::set<SCH_SCREEN*> seenScreens;
83 if( !screen || !seenScreens.insert( screen ).second )
88 if( item->Type() == aType )
98 std::set<SCH_SCREEN*> seenScreens;
102 if(
SCH_SCREEN* screen = sheetPath.LastScreen() )
103 seenScreens.insert( screen );
106 return static_cast<int>( seenScreens.size() );
147 if( !
result && symbol->
GetRef( &sheetPath,
false ) == aRefdes )
163 if( !
result && symbol->
GetRef( &sheetPath,
false ) == aRefdes
164 && symbol->
GetUnit() == aUnit )
181 if(
pin->GetNumber() == aNumber )
209 if( !
result &&
static_cast<SCH_TEXT*
>( item )->GetText() == aText )
224 if(
static_cast<SCH_SHAPE*
>( item )->GetStroke().GetLineStyle() == aStyle )
231 template <
typename FUNC>
234 std::set<SCH_SCREEN*> seenScreens;
240 if( !screen || !seenScreens.insert( screen ).second )
244 aFunc( item, sheetPath );
EE_TYPE OfType(KICAD_T aType) const
Define a library symbol object.
std::vector< SCH_PIN * > GetPins() const override
Holds all the data relating to one schematic.
A SCH_IO derivation for loading P-CAD 2006 ASCII schematic files (.SCH).
Base class for any item which can be embedded within the SCHEMATIC container class,...
Segment description base class to describe items which have 2 end points (track, wire,...
EE_RTREE & Items()
Get the full RTree, usually for iterating.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
std::unique_ptr< LIB_SYMBOL > & GetLibSymbolRef()
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const override
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
LINE_STYLE
Dashed line types.
int CountShapesWithStyle(LINE_STYLE aStyle)
Count wire or graphic lines drawn with the given stroke style anywhere in the design.
void forEachItemOfType(KICAD_T aType, FUNC aFunc)
std::unique_ptr< SCHEMATIC > m_schematic
void LoadSchematic(const std::string &aFile)
SCH_TEXT * FindText(const wxString &aText)
SCH_PIN * LibPin(LIB_SYMBOL *aSymbol, const wxString &aNumber)
The library pin with the given number, searched across all units.
SCH_SYMBOL * SymbolForRefdesUnit(const wxString &aRefdes, int aUnit)
int CountItemsOfType(KICAD_T aType)
LIB_SYMBOL * LibSymbolForRefdes(const wxString &aRefdes)
The embedded library symbol of the first placed symbol matching the reference.
PCAD_SCH_IMPORT_FIXTURE()
int CountImportedScreens()
std::string GetTestDataDir()
bool HasLabel(const wxString &aText, KICAD_T aType=SCH_LABEL_T)
SETTINGS_MANAGER m_manager
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
wxString result
Test unit parsing edge cases and error handling.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.