KiCad PCB EDA Suite
Loading...
Searching...
No Matches
corpus.h File Reference
#include <vector>
#include <wx/string.h>
#include <drc/drc_rule.h>

Go to the source code of this file.

Classes

struct  CORPUS_ENTRY
 One board+rules pairing from the out-of-tree corpus manifest. More...
 
class  CORPUS
 Read and resolve the corpus manifest pointed at by KICAD_DRC_BENCH_CORPUS. More...
 

Functions

const char * ConstraintTypeName (DRC_CONSTRAINT_T aType)
 Human-readable token for a DRC_CONSTRAINT_T, matching the .kicad_dru keyword where one exists.
 
const std::vector< DRC_CONSTRAINT_T > & AllConstraintTypes ()
 Every DRC_CONSTRAINT_T the engine can carry rules for, in enum order, excluding NULL_CONSTRAINT.
 
const std::vector< wxString > & AllPredicateNames ()
 Every pcbexpr predicate registered in pcbexpr_functions.cpp, used for textual coverage scans.
 
std::vector< wxString > ScanPredicatesInRules (const wxString &aRulesText)
 Scan raw .kicad_dru text for occurrences of each registered predicate name.
 

Function Documentation

◆ AllConstraintTypes()

◆ AllPredicateNames()

const std::vector< wxString > & AllPredicateNames ( )

Every pcbexpr predicate registered in pcbexpr_functions.cpp, used for textual coverage scans.

Definition at line 230 of file corpus.cpp.

Referenced by ScanPredicatesInRules().

◆ ConstraintTypeName()

◆ ScanPredicatesInRules()

std::vector< wxString > ScanPredicatesInRules ( const wxString & aRulesText)

Scan raw .kicad_dru text for occurrences of each registered predicate name.

A predicate is counted present when its name appears followed by an open paren, which is how the expression grammar invokes it. Returns the set of predicate names found.

Definition at line 257 of file corpus.cpp.

References AllPredicateNames(), and name.