Horizon
pns_algo_base.h
1/*
2 * KiRouter - a push-and-(sometimes-)shove PCB router
3 *
4 * Copyright (C) 2013-2014 CERN
5 * Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
6 * Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#ifndef __PNS_ALGO_BASE_H
23#define __PNS_ALGO_BASE_H
24
25#include "pns_routing_settings.h"
26
27namespace PNS {
28
29class ROUTER;
30class LOGGER;
31class DEBUG_DECORATOR;
32
40{
41public:
42 ALGO_BASE( ROUTER* aRouter ) :
43 m_debugDecorator( nullptr ), m_router( aRouter )
44 {}
45
46 virtual ~ALGO_BASE() {}
47
49 ROUTER* Router() const
50 {
51 return m_router;
52 }
53
56
58 virtual LOGGER* Logger();
59
66 {
67 m_debugDecorator = aDecorator;
68 }
69
70 DEBUG_DECORATOR* Dbg() const
71 {
72 return m_debugDecorator;
73 }
74
75private:
76 DEBUG_DECORATOR *m_debugDecorator;
77 ROUTER* m_router;
78};
79
80}
81
82#endif
Class ALGO_BASE.
Definition: pns_algo_base.h:40
void SetDebugDecorator(DEBUG_DECORATOR *aDecorator)
Function SetDebugDecorator.
Definition: pns_algo_base.h:65
virtual LOGGER * Logger()
‍Returns the logger object, allowing to dump geometry to a file.
Definition: pns_algo_base.cpp:34
ROUTER * Router() const
‍Returns the instance of our router
Definition: pns_algo_base.h:49
ROUTING_SETTINGS & Settings() const
‍Returns current router settings
Definition: pns_algo_base.cpp:28
Definition: pns_debug_decorator.h:33
Definition: pns_logger.h:40
Definition: pns_router.h:113
Class ROUTING_SETTINGS.
Definition: pns_routing_settings.h:58