20#ifndef KICAD_DATABASE_AUTOFILL_H
21#define KICAD_DATABASE_AUTOFILL_H
56 const std::vector<ROLE>& aRoles );
59KICOMMON_API std::string
MatchTable(
const std::vector<std::string>& aTables,
const std::string& aLibraryName );
66RepeatCounts(
const std::vector<std::map<std::string, std::any>>& aRows );
Guesses the table and column mappings of a new database library from their names.
std::vector< std::string > AssignColumns(const std::vector< std::string > &aColumns, const std::vector< ROLE > &aRoles)
Chooses a column for each role, best scores first, so no column serves two roles.
void RememberChoice(std::vector< std::string > &aHistory, const std::string &aColumn)
Moves aColumn to the front of a role's history, dropping repeats and the oldest entries.
std::string MatchTable(const std::vector< std::string > &aTables, const std::string &aLibraryName)
std::map< std::string, size_t > RepeatCounts(const std::vector< std::map< std::string, std::any > > &aRows)
Counts, per column, the rows whose value already appeared in an earlier row, with NULL counted as emp...
One mapping to fill, such as the key column or the Value field.
std::vector< std::string > remembered
Columns the user chose before, most recent first.
std::set< std::string > excluded
Columns this role must not take, even when remembered.
std::vector< wxString > terms
Words to look for, in English and translated.