KiCad PCB EDA Suite
drc_engine.h File Reference
#include <memory>
#include <vector>
#include <unordered_map>
#include <geometry/shape.h>
#include <drc/drc_rule.h>

Go to the source code of this file.

Classes

class  DRC_ENGINE
 Design Rule Checker object that performs all the DRC tests. More...
 
struct  DRC_ENGINE::DRC_ENGINE_CONSTRAINT
 

Namespaces

 KIGFX
 The Cairo implementation of the graphics abstraction layer.
 

Macros

#define drc_dbg(level, fmt, ...)   drcPrintDebugMessage(level, wxString::Format( fmt, __VA_ARGS__ ), __FUNCTION__, __LINE__ );
 

Typedefs

typedef std::function< void(const std::shared_ptr< DRC_ITEM > &aItem, const wxPoint &aPos)> DRC_VIOLATION_HANDLER
 

Functions

void drcPrintDebugMessage (int level, const wxString &msg, const char *function, int line)
 

Macro Definition Documentation

◆ drc_dbg

#define drc_dbg (   level,
  fmt,
  ... 
)    drcPrintDebugMessage(level, wxString::Format( fmt, __VA_ARGS__ ), __FUNCTION__, __LINE__ );

Definition at line 57 of file drc_engine.h.

Typedef Documentation

◆ DRC_VIOLATION_HANDLER

typedef std::function<void( const std::shared_ptr<DRC_ITEM>& aItem, const wxPoint& aPos )> DRC_VIOLATION_HANDLER

Definition at line 63 of file drc_engine.h.

Function Documentation

◆ drcPrintDebugMessage()

void drcPrintDebugMessage ( int  level,
const wxString &  msg,
const char *  function,
int  line 
)

Definition at line 45 of file drc_engine.cpp.

46 {
47  wxString valueStr;
48 
49  if( wxGetEnv( "DRC_DEBUG", &valueStr ) )
50  {
51  int setLevel = wxAtoi( valueStr );
52 
53  if( level <= setLevel )
54  {
55  printf("%-30s:%d | %s\n", function, line, (const char *) msg.c_str() );
56  }
57  }
58 }