| 
    KiCad PCB EDA Suite
    
   | 
 
Functions | |
| template<typename _Type, typename _Function> | |
| void | run_on_pair (std::pair< _Type, _Type > &__pair, _Function __f) | 
| Apply a function to the first and second element of a std::pair.   | |
| template<typename _InputIterator, typename _Function> | |
| void | adjacent_pairs (_InputIterator __first, _InputIterator __last, _Function __f) | 
| Apply a function to every sequential pair of elements of a sequence.   | |
| template<typename _InputIterator, typename _Function> | |
| void | for_all_pairs (_InputIterator __first, _InputIterator __last, _Function __f) | 
| Apply a function to every possible pair of elements of a sequence.   | |
| template<class _Container, typename _Value> | |
| bool | contains (const _Container &__container, _Value __value) | 
| Returns true if the container contains the given value.   | |
| template<typename _Type, typename _Value> | |
| bool | pair_contains (const std::pair< _Type, _Type > __pair, _Value __value) | 
| Returns true if either of the elements in an std::pair contains the given value.   | |
| template<class T> | |
| bool | within_wrapped_range (T __val, T __minval, T __maxval, T __wrap) | 
| Test if __val lies within __minval and __maxval in a wrapped range.   | |
| template<class _Container> | |
| void | remove_duplicates (_Container &__c) | 
| Deletes all duplicate values from __c.   | |
| template<class _Container, class _Function> | |
| void | remove_duplicates (_Container &__c, _Function &&__f) | 
| template<typename T, std::enable_if_t< std::is_integral< T >::value, int > = 0> | |
| bool | signbit (T v) | 
| Integral version of std::signbit that works all compilers.   | |
| template<class _Container> | |
| size_t | longest_common_subset (const _Container &__c1, const _Container &__c2) | 
| Returns the length of the longest common subset of values between two containers.   | |
| template<class Container1Iter, class Container2Iter> | |
| int | lexicographical_compare_three_way (Container1Iter aC1_first, Container1Iter aC1_last, Container2Iter aC2_first, Container2Iter aC2_last) | 
| Compares two containers lexicographically.   | |
| void alg::adjacent_pairs | ( | _InputIterator | __first, | 
| _InputIterator | __last, | ||
| _Function | __f ) | 
Apply a function to every sequential pair of elements of a sequence.
| __first | An input iterator. | 
| __last | An input iterator. | 
| __f | A unary function object. | 
Applies the function object __f to each sequential pair of elements in the range [first,last). __f must not modify the order of the sequence. If __f has a return value it is ignored. 
Definition at line 62 of file kicad_algo.h.
| bool alg::contains | ( | const _Container & | __container, | 
| _Value | __value ) | 
Returns true if the container contains the given value.
Definition at line 100 of file kicad_algo.h.
Referenced by PROJECT_TREE_PANE::addItemToProjectTree(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), BOARD::AddListener(), SCHEMATIC::AddListener(), TEARDROP_MANAGER::AddTeardropsOnTracks(), TMATCH::CONNECTION_GRAPH::BuildConnectivity(), CVPCB_MAINFRAME::BuildLibrariesList(), FOOTPRINT::CheckShortingPads(), CN_CLUSTER::Contains(), PNS::ITEM_SET::Contains(), PNS::LINK_HOLDER::ContainsLink(), SCH_IO_LTSPICE_PARSER::CreateKicadSYMBOLs(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), DIALOG_PLOT::DIALOG_PLOT(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), SCH_EDIT_TOOL::DoDelete(), KIGFX::SCH_PAINTER::draw(), BOARD::GetContextualTextVars(), SCH_SHEET::GetContextualTextVars(), SCHEMATIC::GetContextualTextVars(), TITLE_BLOCK::GetContextualTextVars(), DRC_ITEMS_PROVIDER::GetCount(), ENV_VAR::GetEnvVarAutocompleteTokens(), PCB_BASE_FRAME::GetLibraryItemsForListDialog(), SCH_BASE_FRAME::GetLibraryItemsForListDialog(), WX_GRID::GetOptionalUnitValue(), WX_GRID::GetUnitValue(), SYMBOL_EDIT_FRAME::HardRedraw(), TOOL_MANAGER::isActive(), CONNECTIVITY_DATA::IsConnectedOnLayer(), isKeyModifierOnly(), isKeySpecialCode(), EESCHEMA_JOBS_HANDLER::JobExportBom(), PNS::LINK_HOLDER::Link(), CADSTAR_SCH_ARCHIVE_LOADER::loadNets(), SCH_COMMIT::makeImage(), EDIT_TOOL::ModifyLines(), WX_GRID::onCellEditorHidden(), WX_GRID::onCellEditorShown(), SEARCH_PANE_LISTVIEW::OnColClicked(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::onLayerGridRowAddUserLayer(), DIALOG_UPDATE_SYMBOL_FIELDS::onOkButtonClicked(), PANEL_SYMBOL_CHOOSER::PANEL_SYMBOL_CHOOSER(), PCB_IO_KICAD_SEXPR_PARSER::parseSetup(), PNS::TOOL_BASE::pickSingleItem(), PROJECT::PinLibrary(), PCB_CONTROL::placeBoardItems(), DIALOG_CHANGE_SYMBOLS::processSymbols(), LIB_TREE_NODE::RebuildSearchTerms(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SELECTION_TOOL::RemoveItemsFromSel(), TEARDROP_MANAGER::RemoveTeardrops(), EDA_DRAW_FRAME::saveCanvasTypeSetting(), DRC_ITEMS_PROVIDER::SetSeverities(), DRILL_SEARCH_HANDLER::Sort(), PCB_SEARCH_HANDLER::Sort(), SCH_SEARCH_HANDLER::Sort(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer(), PNS::LINK_HOLDER::Unlink(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::UpdateConflicts(), DIALOG_CHANGE_SYMBOLS::updateFieldsList(), APPEARANCE_CONTROLS_3D::UpdateLayerCtls(), LIB_TREE::updateRecentSearchMenu(), and TEARDROP_MANAGER::UpdateTeardrops().
| void alg::for_all_pairs | ( | _InputIterator | __first, | 
| _InputIterator | __last, | ||
| _Function | __f ) | 
Apply a function to every possible pair of elements of a sequence.
| __first | An input iterator. | 
| __last | An input iterator. | 
| __f | A unary function object. | 
Applies the function object __f to every possible pair of elements in the range [first,last). __f must not modify the order of the sequence. If __f has a return value it is ignored. 
Definition at line 84 of file kicad_algo.h.
Referenced by SCHEMATIC::CleanUp(), SCH_EDIT_FRAME::DeleteJunction(), DRC_TEST_PROVIDER_CREEPAGE::GetMaxConstraint(), EDIT_TOOL::ModifyLines(), ALTIUM_PCB::ParseFootprint(), DRC_TEST_PROVIDER_CREEPAGE::testCreepage(), and DRC_TEST_PROVIDER_CREEPAGE::testCreepage().
| int alg::lexicographical_compare_three_way | ( | Container1Iter | aC1_first, | 
| Container1Iter | aC1_last, | ||
| Container2Iter | aC2_first, | ||
| Container2Iter | aC2_last ) | 
Compares two containers lexicographically.
Returns a negative value if the first container is less than the second, zero if they are equal, and a positive value if the first container is greater than the second. This is a re-implementation of std::lexicographical_compare_three_way because it is not available in all compilers.
Definition at line 224 of file kicad_algo.h.
Referenced by BASE_SET::compare(), and BASE_SET::operator<().
| size_t alg::longest_common_subset | ( | const _Container & | __c1, | 
| const _Container & | __c2 ) | 
Returns the length of the longest common subset of values between two containers.
Definition at line 186 of file kicad_algo.h.
References table.
Referenced by EDA_SHAPE::Similarity(), and ZONE::Similarity().
| bool alg::pair_contains | ( | const std::pair< _Type, _Type > | __pair, | 
| _Value | __value ) | 
Returns true if either of the elements in an std::pair contains the given value.
__value is contained in __pair Definition at line 113 of file kicad_algo.h.
Referenced by SHAPE_LINE_CHAIN::NextShape().
| void alg::remove_duplicates | ( | _Container & | __c | ) | 
Deletes all duplicate values from __c.
Definition at line 161 of file kicad_algo.h.
Referenced by BOOST_FIXTURE_TEST_CASE(), NETLIST_EXPORTER_ALLEGRO::extractComponentsInfo(), SCH_REFERENCE_LIST::GetRefsInUse(), SCH_REFERENCE_LIST::GetUnitsMatchingRef(), NETLIST_EXPORTER_XML::makeListOfNets(), CONNECTION_GRAPH::updateItemConnectivity(), and TUNER_SLIDER::updateValueText().
| void alg::remove_duplicates | ( | _Container & | __c, | 
| _Function && | __f ) | 
Definition at line 167 of file kicad_algo.h.
| void alg::run_on_pair | ( | std::pair< _Type, _Type > & | __pair, | 
| _Function | __f ) | 
Apply a function to the first and second element of a std::pair.
| __pair | A pair of elements (both elements must be the same type). | 
| __f | A unary function object. | 
Applies the function object __f to __pair.first and __pair.second If __f has a return value it is ignored. 
Definition at line 45 of file kicad_algo.h.
Referenced by SHAPE_LINE_CHAIN::Append(), SHAPE_LINE_CHAIN::convertArc(), SHAPE_LINE_CHAIN::Insert(), SHAPE_LINE_CHAIN::Remove(), SHAPE_LINE_CHAIN::Replace(), SHAPE_LINE_CHAIN::Reverse(), SHAPE_LINE_CHAIN::SetPoint(), and SHAPE_LINE_CHAIN::splitArc().
| bool alg::signbit | ( | T | v | ) | 
Integral version of std::signbit that works all compilers.
Definition at line 176 of file kicad_algo.h.
References T.
Referenced by SCH_LINE_WIRE_BUS_TOOL::computeBreakPoint(), SCH_IO_ALTIUM::CreateAliases(), and SCH_MOVE_TOOL::performItemMove().
Test if __val lies within __minval and __maxval in a wrapped range.
| __val | A value to test | 
| __minval | Lowest permissible value within the wrapped range | 
| __maxval | Highest permissible value within the wrapped range | 
| __wrap | Value at which the range wraps around itself (must be positive) | 
__val lies in the wrapped range Definition at line 129 of file kicad_algo.h.
References T.