| 
    KiCad PCB EDA Suite
    
   | 
 
Management class for layer pairs in a PCB. More...
#include <layer_pairs.h>
 Public Member Functions | |
| LAYER_PAIR_SETTINGS () | |
| Construct a new layer pair manager.   | |
| LAYER_PAIR_SETTINGS (const LAYER_PAIR_SETTINGS &aOther) | |
| bool | AddLayerPair (LAYER_PAIR_INFO aPair) | 
| bool | RemoveLayerPair (const LAYER_PAIR &aPair) | 
| Remove the matching layer pair from the store, if present.   | |
| std::span< const LAYER_PAIR_INFO > | GetLayerPairs () const | 
| Returns a span of all stored layer pairs.   | |
| std::span< LAYER_PAIR_INFO > | GetLayerPairs () | 
| std::vector< LAYER_PAIR_INFO > | GetEnabledLayerPairs (int &aCurrentIndex) const | 
| Get a vector of all enabled layer pairs, in order.   | |
| void | SetLayerPairs (std::span< const LAYER_PAIR_INFO > aPairs) | 
| Replace the stored layer pairs with the given list.   | |
| const LAYER_PAIR & | GetCurrentLayerPair () const | 
| void | SetCurrentLayerPair (const LAYER_PAIR &aPair) | 
| Set the "active" layer pair.   | |
Private Member Functions | |
| bool | addLayerPairInternal (LAYER_PAIR_INFO aPair) | 
| bool | removeLayerPairInternal (const LAYER_PAIR &aPair) | 
Private Attributes | |
| std::vector< LAYER_PAIR_INFO > | m_pairs | 
| std::optional< LAYER_PAIR > | m_lastManualPair | 
| LAYER_PAIR | m_currentPair | 
Management class for layer pairs in a PCB.
Definition at line 46 of file layer_pairs.h.
      
  | 
  inline | 
Construct a new layer pair manager.
Definition at line 52 of file layer_pairs.h.
References B_Cu, F_Cu, and m_currentPair.
Referenced by LAYER_PAIR_SETTINGS().
| LAYER_PAIR_SETTINGS::LAYER_PAIR_SETTINGS | ( | const LAYER_PAIR_SETTINGS & | aOther | ) | 
Definition at line 44 of file layer_pairs.cpp.
References LAYER_PAIR_SETTINGS(), m_currentPair, and m_pairs.
| bool LAYER_PAIR_SETTINGS::AddLayerPair | ( | LAYER_PAIR_INFO | aPair | ) | 
Definition at line 78 of file layer_pairs.cpp.
References addLayerPairInternal().
      
  | 
  private | 
Definition at line 51 of file layer_pairs.cpp.
References LAYER_PAIR_INFO::GetLayerPair(), LAYER_PAIR::HasSameLayers(), m_lastManualPair, and m_pairs.
Referenced by AddLayerPair(), and SetLayerPairs().
      
  | 
  inline | 
Definition at line 87 of file layer_pairs.h.
References m_currentPair.
Referenced by ROUTER_TOOL::SelectCopperLayerPair().
| std::vector< LAYER_PAIR_INFO > LAYER_PAIR_SETTINGS::GetEnabledLayerPairs | ( | int & | aCurrentIndex | ) | const | 
Get a vector of all enabled layer pairs, in order.
This includes a "manual" pair, if one is set and isn't in the list of presets.
Definition at line 127 of file layer_pairs.cpp.
References _, m_currentPair, m_lastManualPair, and m_pairs.
Referenced by PCB_CONTROL::CycleLayerPresets(), and PCB_CONTROL::LayerPresetFeedback().
| std::span< LAYER_PAIR_INFO > LAYER_PAIR_SETTINGS::GetLayerPairs | ( | ) | 
Definition at line 122 of file layer_pairs.cpp.
References m_pairs.
| std::span< const LAYER_PAIR_INFO > LAYER_PAIR_SETTINGS::GetLayerPairs | ( | ) | const | 
Returns a span of all stored layer pairs.
Definition at line 117 of file layer_pairs.cpp.
References m_pairs.
Referenced by IsAnEnabledPreset().
| bool LAYER_PAIR_SETTINGS::RemoveLayerPair | ( | const LAYER_PAIR & | aPair | ) | 
Remove the matching layer pair from the store, if present.
Definition at line 107 of file layer_pairs.cpp.
References removeLayerPairInternal().
      
  | 
  private | 
| void LAYER_PAIR_SETTINGS::SetCurrentLayerPair | ( | const LAYER_PAIR & | aPair | ) | 
Set the "active" layer pair.
This doesn't have to be a preset pair.
Definition at line 179 of file layer_pairs.cpp.
References IsAnEnabledPreset(), m_currentPair, and m_lastManualPair.
Referenced by PCB_CONTROL::CycleLayerPresets().
| void LAYER_PAIR_SETTINGS::SetLayerPairs | ( | std::span< const LAYER_PAIR_INFO > | aPairs | ) | 
Replace the stored layer pairs with the given list.
The same conditions are maintained as for AddLayerPair
Definition at line 163 of file layer_pairs.cpp.
References addLayerPairInternal(), and m_pairs.
      
  | 
  private | 
Definition at line 105 of file layer_pairs.h.
Referenced by GetCurrentLayerPair(), GetEnabledLayerPairs(), LAYER_PAIR_SETTINGS(), LAYER_PAIR_SETTINGS(), and SetCurrentLayerPair().
      
  | 
  private | 
Definition at line 103 of file layer_pairs.h.
Referenced by addLayerPairInternal(), GetEnabledLayerPairs(), and SetCurrentLayerPair().
      
  | 
  private | 
Definition at line 99 of file layer_pairs.h.
Referenced by addLayerPairInternal(), GetEnabledLayerPairs(), GetLayerPairs(), GetLayerPairs(), LAYER_PAIR_SETTINGS(), removeLayerPairInternal(), and SetLayerPairs().