20#ifndef QA_PCBNEW_ODBPP_TEST_UTILS_H
21#define QA_PCBNEW_ODBPP_TEST_UTILS_H
47 m_ok = std::setlocale( LC_CTYPE,
"C" ) !=
nullptr;
66std::filesystem::path
ExportOdb(
const BOARD& aBoard,
const std::filesystem::path& aDir,
67 const std::string& aUnits =
"mm",
const std::string& aSigfig =
"6",
73std::vector<std::string>
ReadLines(
const std::filesystem::path& aFile );
91 std::map<std::string, std::string>
m_names;
101 explicit ODB_PRODUCT(
const std::filesystem::path& aRoot );
106 wxString
LayerFile(
const wxString& aLayer,
const wxString& aFile )
const;
Information pertinent to a Pcbnew printed circuit board.
std::vector< ODB_MATRIX_ROW > m_matrix
std::filesystem::path m_stepDir
wxString LayerFile(const wxString &aLayer, const wxString &aFile) const
Path of a file in a layer directory, matched to the directory name without regard to case.
const std::vector< ODB_MATRIX_ROW > & Matrix() const
ODB_PRODUCT(const std::filesystem::path &aRoot)
std::map< std::string, std::string > m_names
std::vector< std::string > m_records
size_t CountRecordsWithInteger(const std::string &aName, int aValue) const
size_t CountRecordsWithOption(const std::string &aName, const std::string &aOption) const
OdbFeatureFile(const std::filesystem::path &aFile)
size_t CountRecordsWithValue(const std::string &aName, const std::string &aValue) const
size_t CountRecordsWithFlag(const std::string &aName) const
A pure virtual class used to derive REPORTER objects from.
PCB_LAYER_ID
A quick note on layer IDs:
size_t CountPads(const BOARD &aBoard, PAD_PROP aProperty, PCB_LAYER_ID aLayer)
std::vector< std::string > ReadLines(const std::filesystem::path &aFile)
Read a text file into one string per line, with no trailing newline characters.
const KI_TEST::SCOPED_TEMP_DIR & TempDir()
std::filesystem::path ExportOdb(const BOARD &aBoard, const std::filesystem::path &aDir, const std::string &aUnits="mm", const std::string &aSigfig="6", REPORTER *aReporter=nullptr)
Export a board to an ODB++ product model tree rooted at aDir and return aDir.
PAD_PROP
The set of pad properties used in Gerber files (Draw files, and P&P files) to define some properties ...