92 if( !visitor(
this ) )
97 child->IterateTree( visitor, depth + 1 );
116 m_reporter( aReporter )
180 int aSize,
const wxString& aName,
185 sh->
Append( aP.
x - aSize, aP.
y - aSize );
186 sh->
Append( aP.
x + aSize, aP.
y + aSize );
188 sh->
Append( aP.
x - aSize, aP.
y + aSize );
189 sh->
Append( aP.
x + aSize, aP.
y - aSize );
206 int aOverrideWidth,
const wxString& aName,
225 int aOverrideWidth,
const wxString& aName,
245 ent->
m_msg = msg.c_str();
249 printf(
"PNS: %s\n", msg.c_str().AsChar() );
252 static wxString lastMsg;
292 for(
SHAPE* sh : ent->m_shapes )
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
A color representation with 4 components: red, green, blue, alpha.
static const COLOR4D WHITE
void SetDebugEnabled(bool aEnabled)
Base class for PNS router board items.
virtual const SHAPE * Shape(int aLayer) const
Return the geometrical shape of the item.
std::vector< SHAPE * > m_shapes
PNS_DEBUG_SHAPE * NewChild()
PNS_DEBUG_SHAPE(PNS_DEBUG_SHAPE *aParent=nullptr)
void IterateTree(std::function< bool(PNS_DEBUG_SHAPE *)> visitor, int depth=0)
void AddChild(PNS_DEBUG_SHAPE *ent)
PNS_DEBUG_SHAPE * m_parent
PNS::DEBUG_DECORATOR::SRC_LOCATION_INFO m_srcLoc
std::vector< PNS_DEBUG_SHAPE * > m_children
virtual void AddPoint(const VECTOR2I &aP, const KIGFX::COLOR4D &aColor, int aSize, const wxString &aName=wxT(""), const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
void addEntry(PNS_DEBUG_SHAPE *ent)
PNS_DEBUG_SHAPE * m_activeEntry
virtual void AddItem(const PNS::ITEM *aItem, const KIGFX::COLOR4D &aColor, int aOverrideWidth=0, const wxString &aName=wxT(""), const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
std::vector< PNS_DEBUG_STAGE * > m_stages
BOX2I GetStageExtents(int stage) const
virtual void Message(const wxString &msg, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
PNS_DEBUG_STAGE * currentStage()
virtual ~PNS_TEST_DEBUG_DECORATOR()
virtual void BeginGroup(const wxString &name, int aLevel=0, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
virtual void EndGroup(const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
virtual void AddShape(const SHAPE *aShape, const KIGFX::COLOR4D &aColor, int aOverrideWidth=0, const wxString &aName=wxT(""), const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
virtual void NewStage(const wxString &name, int iter, const SRC_LOCATION_INFO &aSrcLoc=SRC_LOCATION_INFO()) override
PNS_TEST_DEBUG_DECORATOR(REPORTER *aReporter)
void SetCurrentStageStatus(bool stat)
A pure virtual class used to derive REPORTER objects from.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
An abstract shape on 2D plane.
virtual SHAPE * Clone() const
Return a dynamically allocated copy of the shape.
virtual const BOX2I BBox(int aClearance=0) const =0
Compute a bounding box of the shape, with a margin of aClearance a collision.
PNS_DEBUG_SHAPE * m_entries