KiCad PCB EDA Suite
drc_engine.h File Reference
#include <memory>
#include <vector>
#include <unordered_map>
#include <units_provider.h>
#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

namespace  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 VECTOR2I &aPos, int aLayer)> 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 58 of file drc_engine.h.

Typedef Documentation

◆ DRC_VIOLATION_HANDLER

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

Definition at line 69 of file drc_engine.h.

Function Documentation

◆ drcPrintDebugMessage()

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

Definition at line 52 of file drc_engine.cpp.

53{
54 wxString valueStr;
55
56 if( wxGetEnv( wxT( "DRC_DEBUG" ), &valueStr ) )
57 {
58 int setLevel = wxAtoi( valueStr );
59
60 if( level <= setLevel )
61 printf( "%-30s:%d | %s\n", function, line, (const char *) msg.c_str() );
62 }
63}