60 if( item && item->
Parent() )
68 const std::vector<ITEM*>& aAddedItems,
69 const std::set<KIID>& aRemovedItems,
70 const std::vector<ITEM*>& aHeads,
71 const std::vector<LOGGER::EVENT_ENTRY>& aEvents )
73 wxString result = wxString::Format(
"mode %d\n", aMode );
78 for(
const KIID& uuid : aRemovedItems )
79 result += wxString::Format(
"removed %s\n", uuid.AsString().c_str() );
81 for(
ITEM* item : aAddedItems )
82 result += wxString::Format(
"added %s\n", item->Format().c_str() );
84 for(
ITEM* item : aHeads )
85 result += wxString::Format(
"head %s\n", item->Format().c_str() );
93 return wxString::Format(
94 "event %d %d %d %s %d %d %d %d %d %d %d\n", aEvent.
p.
x, aEvent.
p.
y, aEvent.
type,
105 wxStringTokenizer tokens( aLine );
106 wxString cmd = tokens.GetNextToken();
108 wxCHECK_MSG( cmd == wxT(
"event" ),
EVENT_ENTRY(),
"Line doesn't contain an event!" );
111 evt.
p.
x = wxAtoi( tokens.GetNextToken() );
112 evt.
p.
y = wxAtoi( tokens.GetNextToken() );
114 evt.
uuid =
KIID( tokens.GetNextToken() );
wxString AsString() const
Base class for PNS router board items.
BOARD_ITEM * Parent() const
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)
std::vector< EVENT_ENTRY > m_events
void Log(EVENT_TYPE evt, const VECTOR2I &pos=VECTOR2I(), const ITEM *item=nullptr, const SIZES_SETTINGS *sizes=nullptr)
static EVENT_ENTRY ParseEvent(const wxString &aLine)
int GetLayerBottom() const
bool TrackWidthIsExplicit() const
Push and Shove diff pair dimensions (gap) settings dialog.