KiCad PCB EDA Suite
Loading...
Searching...
No Matches
FOOTPRINT_MATCH_RESULT Struct Reference

The outcome of a footprint match query, and the JSON encoding used to move it across the Pcbnew kiface. More...

#include <footprint_library_query.h>

Public Member Functions

wxString ToJsonStr () const
 Serialise to the JSON object that carries a result over the Pcbnew kiface.
 

Static Public Member Functions

static FOOTPRINT_MATCH_RESULT FromJsonStr (const wxString &aJson)
 Parse the JSON object written by ToJsonStr().
 

Public Attributes

bool m_Success = false
 False if the query could not be performed, in which case MatchingNames is empty.
 
std::vector< wxString > m_MatchingNames
 The matching "library:footprint" names.
 
bool m_IsLimited = false
 True if the result set is limited by the maximum number of results.
 

Detailed Description

The outcome of a footprint match query, and the JSON encoding used to move it across the Pcbnew kiface.

Definition at line 54 of file footprint_library_query.h.

Member Function Documentation

◆ FromJsonStr()

FOOTPRINT_MATCH_RESULT FOOTPRINT_MATCH_RESULT::FromJsonStr ( const wxString & aJson)
static

Parse the JSON object written by ToJsonStr().

Anything else, including a result whose Success is false, yields a failed result with no names.

Definition at line 29 of file footprint_library_query.cpp.

References result.

Referenced by QueryMatchingFootprints().

◆ ToJsonStr()

wxString FOOTPRINT_MATCH_RESULT::ToJsonStr ( ) const

Serialise to the JSON object that carries a result over the Pcbnew kiface.

Definition at line 73 of file footprint_library_query.cpp.

References m_IsLimited, m_MatchingNames, and m_Success.

Member Data Documentation

◆ m_IsLimited

bool FOOTPRINT_MATCH_RESULT::m_IsLimited = false

True if the result set is limited by the maximum number of results.

Definition at line 63 of file footprint_library_query.h.

Referenced by FP_FILTER_MATCHER::GetMatches(), and ToJsonStr().

◆ m_MatchingNames

std::vector<wxString> FOOTPRINT_MATCH_RESULT::m_MatchingNames

The matching "library:footprint" names.

Definition at line 60 of file footprint_library_query.h.

Referenced by FP_FILTER_MATCHER::GetMatches(), ToJsonStr(), and FOOTPRINT_SELECT_WIDGET::UpdateList().

◆ m_Success

bool FOOTPRINT_MATCH_RESULT::m_Success = false

False if the query could not be performed, in which case MatchingNames is empty.

Definition at line 57 of file footprint_library_query.h.

Referenced by FP_FILTER_MATCHER::GetMatches(), ToJsonStr(), and FOOTPRINT_SELECT_WIDGET::UpdateList().


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