KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PNS::LOGGER Class Reference

#include <pns_logger.h>

Classes

struct  EVENT_ENTRY
 

Public Types

enum  EVENT_TYPE {
  EVT_START_ROUTE = 0 , EVT_START_DRAG , EVT_FIX , EVT_MOVE ,
  EVT_ABORT , EVT_TOGGLE_VIA , EVT_UNFIX , EVT_START_MULTIDRAG
}
 

Public Member Functions

 LOGGER ()
 
 ~LOGGER ()
 
void Clear ()
 
void LogM (EVENT_TYPE evt, const VECTOR2I &pos=VECTOR2I(), std::vector< ITEM * > items={}, const SIZES_SETTINGS *sizes=nullptr, int aLayer=0)
 
void Log (EVENT_TYPE evt, const VECTOR2I &pos=VECTOR2I(), const ITEM *item=nullptr, const SIZES_SETTINGS *sizes=nullptr, int aLayer=0)
 
const std::vector< EVENT_ENTRY > & GetEvents ()
 

Static Public Member Functions

static wxString FormatLogFileAsString (int aMode, const std::vector< ITEM * > &aAddedItems, const std::set< KIID > &aRemovedItems, const std::vector< ITEM * > &aHeads, const std::vector< EVENT_ENTRY > &aEvents)
 
static wxString FormatEvent (const EVENT_ENTRY &aEvent)
 
static EVENT_ENTRY ParseEvent (const wxString &aLine)
 

Private Attributes

std::vector< EVENT_ENTRYm_events
 

Detailed Description

Definition at line 42 of file pns_logger.h.

Member Enumeration Documentation

◆ EVENT_TYPE

Enumerator
EVT_START_ROUTE 
EVT_START_DRAG 
EVT_FIX 
EVT_MOVE 
EVT_ABORT 
EVT_TOGGLE_VIA 
EVT_UNFIX 
EVT_START_MULTIDRAG 

Definition at line 46 of file pns_logger.h.

Constructor & Destructor Documentation

◆ LOGGER()

PNS::LOGGER::LOGGER ( )

Definition at line 30 of file pns_logger.cpp.

◆ ~LOGGER()

PNS::LOGGER::~LOGGER ( )

Definition at line 35 of file pns_logger.cpp.

Member Function Documentation

◆ Clear()

void PNS::LOGGER::Clear ( )

Definition at line 40 of file pns_logger.cpp.

References m_events.

Referenced by PNS::ROUTER::StartDragging(), and PNS::ROUTER::StartRouting().

◆ FormatEvent()

◆ FormatLogFileAsString()

wxString PNS::LOGGER::FormatLogFileAsString ( int  aMode,
const std::vector< ITEM * > &  aAddedItems,
const std::set< KIID > &  aRemovedItems,
const std::vector< ITEM * > &  aHeads,
const std::vector< EVENT_ENTRY > &  aEvents 
)
static

Definition at line 79 of file pns_logger.cpp.

References FormatEvent().

Referenced by PNS_LOG_FILE::SaveLog(), and ROUTER_TOOL::saveRouterDebugLog().

◆ GetEvents()

const std::vector< EVENT_ENTRY > & PNS::LOGGER::GetEvents ( )
inline

Definition at line 83 of file pns_logger.h.

References m_events.

◆ Log()

void PNS::LOGGER::Log ( LOGGER::EVENT_TYPE  evt,
const VECTOR2I pos = VECTOR2I(),
const ITEM item = nullptr,
const SIZES_SETTINGS sizes = nullptr,
int  aLayer = 0 
)

◆ LogM()

void PNS::LOGGER::LogM ( LOGGER::EVENT_TYPE  evt,
const VECTOR2I pos = VECTOR2I(),
std::vector< ITEM * >  items = {},
const SIZES_SETTINGS sizes = nullptr,
int  aLayer = 0 
)

◆ ParseEvent()

Member Data Documentation

◆ m_events

std::vector<EVENT_ENTRY> PNS::LOGGER::m_events
private

Definition at line 99 of file pns_logger.h.

Referenced by Clear(), GetEvents(), and LogM().


The documentation for this class was generated from the following files: