router: use one global logger object
This commit is contained in:
parent
4281bd8207
commit
dbe90e163e
|
@ -40,7 +40,9 @@ class ALGO_BASE
|
|||
{
|
||||
public:
|
||||
ALGO_BASE( ROUTER* aRouter ) :
|
||||
m_debugDecorator( nullptr ), m_router( aRouter )
|
||||
m_debugDecorator( nullptr ),
|
||||
m_router( aRouter ),
|
||||
m_logger( nullptr )
|
||||
{}
|
||||
|
||||
virtual ~ALGO_BASE() {}
|
||||
|
@ -57,6 +59,11 @@ public:
|
|||
///> Returns the logger object, allowing to dump geometry to a file.
|
||||
virtual LOGGER* Logger();
|
||||
|
||||
void SetLogger( LOGGER* aLogger )
|
||||
{
|
||||
m_logger = aLogger;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function SetDebugDecorator
|
||||
*
|
||||
|
@ -72,9 +79,10 @@ public:
|
|||
return m_debugDecorator;
|
||||
}
|
||||
|
||||
private:
|
||||
protected:
|
||||
DEBUG_DECORATOR *m_debugDecorator;
|
||||
ROUTER* m_router;
|
||||
LOGGER* m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -397,13 +397,4 @@ const ITEM_SET DRAGGER::Traces()
|
|||
return m_draggedItems;
|
||||
}
|
||||
|
||||
|
||||
LOGGER* DRAGGER::Logger()
|
||||
{
|
||||
if( m_shove )
|
||||
return m_shove->Logger();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -97,9 +97,6 @@ public:
|
|||
*/
|
||||
const ITEM_SET Traces();
|
||||
|
||||
/// @copydoc ALGO_BASE::Logger()
|
||||
virtual LOGGER* Logger() override;
|
||||
|
||||
void SetMode( int aDragMode );
|
||||
|
||||
private:
|
||||
|
|
|
@ -178,7 +178,7 @@ bool ROUTER::isStartingPointRoutable( const VECTOR2I& aWhere, int aLayer )
|
|||
}
|
||||
|
||||
bool ROUTER::StartRouting( const VECTOR2I& aP, ITEM* aStartItem, int aLayer )
|
||||
{
|
||||
{
|
||||
|
||||
if( ! isStartingPointRoutable( aP, aLayer ) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue