router: use one global logger object

This commit is contained in:
Tomasz Wlostowski 2020-02-19 18:21:56 +01:00
parent 4281bd8207
commit dbe90e163e
4 changed files with 11 additions and 15 deletions

View File

@ -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;
};
}

View File

@ -397,13 +397,4 @@ const ITEM_SET DRAGGER::Traces()
return m_draggedItems;
}
LOGGER* DRAGGER::Logger()
{
if( m_shove )
return m_shove->Logger();
return NULL;
}
}

View File

@ -97,9 +97,6 @@ public:
*/
const ITEM_SET Traces();
/// @copydoc ALGO_BASE::Logger()
virtual LOGGER* Logger() override;
void SetMode( int aDragMode );
private: