KiCad PCB EDA Suite
pns_algo_base.h
Go to the documentation of this file.
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 
27 namespace PNS {
28 
29 class ROUTER;
30 class LOGGER;
31 class DEBUG_DECORATOR;
32 
39 class ALGO_BASE
40 {
41 public:
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 
55  ROUTING_SETTINGS& Settings() const;
56 
58  virtual LOGGER* Logger();
59 
65  void SetDebugDecorator( DEBUG_DECORATOR* aDecorator )
66  {
67  m_debugDecorator = aDecorator;
68  }
69 
71  {
72  return m_debugDecorator;
73  }
74 
75 private:
78 };
79 
80 }
81 
82 #endif
Class ROUTING_SETTINGS.
DEBUG_DECORATOR * Dbg() const
Definition: pns_algo_base.h:70
Class ALGO_BASE.
Definition: pns_algo_base.h:39
virtual LOGGER * Logger()
Returns the logger object, allowing to dump geometry to a file.
ROUTING_SETTINGS & Settings() const
Returns current router settings
ROUTER * m_router
Definition: pns_algo_base.h:77
ALGO_BASE(ROUTER *aRouter)
Definition: pns_algo_base.h:42
ROUTER * Router() const
Returns the instance of our router
Definition: pns_algo_base.h:49
DEBUG_DECORATOR * m_debugDecorator
Definition: pns_algo_base.h:76
void SetDebugDecorator(DEBUG_DECORATOR *aDecorator)
Function SetDebugDecorator.
Definition: pns_algo_base.h:65
virtual ~ALGO_BASE()
Definition: pns_algo_base.h:46
Push and Shove diff pair dimensions (gap) settings dialog.