KiCad PCB EDA Suite
Loading...
Searching...
No Matches
BASE_SET Class Reference

#include <base_set.h>

Inheritance diagram for BASE_SET:
LSET

Classes

class  set_bits_iterator
 
class  set_bits_reverse_iterator
 

Public Types

using iterator = std::vector< int >::iterator
 
using const_iterator = std::vector< int >::const_iterator
 

Public Member Functions

 BASE_SET (size_t size=64)
 
bool test (size_t pos) const
 
bool any () const
 
bool all () const
 
bool none () const
 
BASE_SETset (size_t pos=std::numeric_limits< size_t >::max(), bool value=true)
 
BASE_SETreset (size_t pos=std::numeric_limits< size_t >::max())
 
BASE_SETflip (size_t pos=std::numeric_limits< size_t >::max())
 
size_t count () const
 
size_t size () const
 
void resize (size_t newSize)
 
int & operator[] (size_t pos)
 
const int & operator[] (size_t pos) const
 
int compare (const BASE_SET &other) const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
bool operator== (const BASE_SET &other) const
 
bool operator< (const BASE_SET &other) const
 
template<typename CharT = char>
std::basic_string< CharT > to_string (CharT zero=CharT( '0'), CharT one=CharT( '1')) const
 
BASE_SEToperator&= (const BASE_SET &rhs)
 
BASE_SEToperator|= (const BASE_SET &rhs)
 
BASE_SEToperator^= (const BASE_SET &rhs)
 
BASE_SET operator~ () const
 
set_bits_iterator set_bits_begin () const
 
set_bits_iterator set_bits_end () const
 
set_bits_reverse_iterator set_bits_rbegin () const
 
set_bits_reverse_iterator set_bits_rend () const
 

Private Attributes

std::vector< int > m_bits
 

Friends

std::ostream & operator<< (std::ostream &os, const BASE_SET &set)
 

Detailed Description

Definition at line 39 of file base_set.h.

Member Typedef Documentation

◆ const_iterator

using BASE_SET::const_iterator = std::vector<int>::const_iterator

Definition at line 43 of file base_set.h.

◆ iterator

using BASE_SET::iterator = std::vector<int>::iterator

Definition at line 42 of file base_set.h.

Constructor & Destructor Documentation

◆ BASE_SET()

BASE_SET::BASE_SET ( size_t  size = 64)
inline

Definition at line 45 of file base_set.h.

Member Function Documentation

◆ all()

bool BASE_SET::all ( ) const
inline

Definition at line 57 of file base_set.h.

Referenced by LSET::AllCuMask().

◆ any()

◆ begin() [1/2]

iterator BASE_SET::begin ( )
inline

Definition at line 123 of file base_set.h.

◆ begin() [2/2]

const_iterator BASE_SET::begin ( ) const
inline

Definition at line 125 of file base_set.h.

◆ compare()

int BASE_SET::compare ( const BASE_SET other) const
inline

Definition at line 116 of file base_set.h.

References m_bits.

Referenced by PAD::Compare().

◆ count()

◆ end() [1/2]

iterator BASE_SET::end ( )
inline

Definition at line 124 of file base_set.h.

◆ end() [2/2]

const_iterator BASE_SET::end ( ) const
inline

Definition at line 126 of file base_set.h.

◆ flip()

BASE_SET & BASE_SET::flip ( size_t  pos = std::numeric_limits<size_t>::max())
inline

Definition at line 91 of file base_set.h.

Referenced by DRC_TEST_PROVIDER_MISC::testDisabledLayers().

◆ none()

bool BASE_SET::none ( ) const
inline

◆ operator&=()

BASE_SET & BASE_SET::operator&= ( const BASE_SET rhs)
inline

Definition at line 174 of file base_set.h.

References m_bits.

◆ operator<()

bool BASE_SET::operator< ( const BASE_SET other) const
inline

Definition at line 145 of file base_set.h.

References m_bits.

◆ operator==()

bool BASE_SET::operator== ( const BASE_SET other) const
inline

Definition at line 129 of file base_set.h.

References m_bits, minSize, and size().

◆ operator[]() [1/2]

int & BASE_SET::operator[] ( size_t  pos)
inline

Definition at line 112 of file base_set.h.

◆ operator[]() [2/2]

const int & BASE_SET::operator[] ( size_t  pos) const
inline

Definition at line 114 of file base_set.h.

◆ operator^=()

BASE_SET & BASE_SET::operator^= ( const BASE_SET rhs)
inline

Definition at line 190 of file base_set.h.

References m_bits.

◆ operator|=()

BASE_SET & BASE_SET::operator|= ( const BASE_SET rhs)
inline

Definition at line 182 of file base_set.h.

References m_bits.

◆ operator~()

BASE_SET BASE_SET::operator~ ( ) const
inline

Definition at line 198 of file base_set.h.

References m_bits.

◆ reset()

◆ resize()

void BASE_SET::resize ( size_t  newSize)
inline

Definition at line 110 of file base_set.h.

Referenced by BOOST_AUTO_TEST_CASE().

◆ set()

BASE_SET & BASE_SET::set ( size_t  pos = std::numeric_limits<size_t>::max(),
bool  value = true 
)
inline

Definition at line 61 of file base_set.h.

Referenced by SCOPED_LAYERSET::Add(), LSET::AllCuMask(), DIALOG_PLOT::applyPlotSettings(), LSET::BackMask(), BOARD::BOARD(), BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS(), BOARD_PRINTOUT_SETTINGS::BOARD_PRINTOUT_SETTINGS(), BOOST_AUTO_TEST_CASE(), AR_AUTOPLACER::buildFpAreas(), BOARD::ComputeBoundingBox(), ALTIUM_PCB::ConvertFills6ToFootprintItemOnLayer(), ALTIUM_PCB::ConvertShapeBasedRegions6ToFootprintItemOnLayer(), ZONE_CREATE_HELPER::createNewZone(), CONVERT_TOOL::CreatePolys(), PCB_IO_EAGLE::defaultKicadLayer(), FOOTPRINT::Deserialize(), DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES(), DIALOG_GLOBAL_DELETION::DoGlobalDeletions(), PCBEXPR_LAYER_VALUE::EqualTo(), existsOnLayerFunc(), EXPORTER_STEP::Export(), PCB_SELECTION_TOOL::FilterCollectorForFootprints(), LSET::Flip(), LSET::FrontMask(), AR_AUTOPLACER::genModuleOnRoutingMatrix(), DIALOG_EXPORT_SVG::getCheckBoxSelectedLayers(), PCB_VIA::GetLayerSet(), PANEL_SETUP_LAYERS::GetUILayerMask(), APPEARANCE_CONTROLS::getVisibleLayers(), BOARD_ADAPTER::GetVisibleLayers(), ROUTER_TOOL::handleLayerSwitch(), ALTIUM_PCB::HelperSetZoneLayers(), intersectsAreaFunc(), PARAM_LAYER_PRESET::jsonToPresets(), PCB_IO_KICAD_LEGACY::leg_mask2new(), BOARD_PRINTOUT_SETTINGS::Load(), FABMASTER::loadLayers(), LSET::LSET(), DIALOG_DRC::OnDRCItemSelected(), DIALOG_COPPER_ZONE::OnLayerSelection(), DIALOG_NON_COPPER_ZONES_EDITOR::OnLayerSelection(), DIALOG_RULE_AREA_PROPERTIES::OnLayerSelection(), APPEARANCE_CONTROLS::onLayerVisibilityToggled(), PCBNEW_PRINTOUT::OnPrintPage(), DIALOG_FOOTPRINT_CHECKER::OnSelectItem(), PCB_PLOT_PARAMS_PARSER::Parse(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_KICAD_SEXPR_PARSER::parseFOOTPRINT_unchecked(), LSET::ParseHex(), DRC_RULES_PARSER::parseLayer(), PCB_IO_KICAD_SEXPR_PARSER::parseLayers(), DRAWING_TOOL::PlaceCharacteristics(), DRAWING_TOOL::PlaceStackup(), PRIVATE_LAYERS_GRID_TABLE::PRIVATE_LAYERS_GRID_TABLE(), GERBVIEW_FRAME::RemapLayers(), PCB_SELECTION_CONDITIONS::sameLayerFunc(), PCB_SELECTION_TOOL::Selectable(), PAD::SetAttribute(), BOARD_DESIGN_SETTINGS::SetEnabledLayers(), ZONE::SetFillFlag(), DIALOG_PRINT_GERBVIEW::setLayerSetFromList(), DIALOG_PRINT_PCBNEW::setLayerSetFromList(), APPEARANCE_CONTROLS::SetLayerVisible(), GENERAL_COLLECTORS_GUIDE::SetLayerVisible(), ZONE_SETTINGS::SetupLayersList(), GLOBAL_EDIT_TOOL::swapBoardItem(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataFromWindow(), DIALOG_PAD_PROPERTIES::transferDataToPad(), kiapi::board::UnpackLayerSet(), PANEL_SETUP_BOARD_STACKUP::updateCopperLayerCount(), RATSNEST_VIEW_ITEM::ViewDraw(), and ZONE_SETTINGS::ZONE_SETTINGS().

◆ set_bits_begin()

set_bits_iterator BASE_SET::set_bits_begin ( ) const
inline

Definition at line 295 of file base_set.h.

Referenced by BOOST_AUTO_TEST_CASE().

◆ set_bits_end()

set_bits_iterator BASE_SET::set_bits_end ( ) const
inline

Definition at line 296 of file base_set.h.

Referenced by BOOST_AUTO_TEST_CASE().

◆ set_bits_rbegin()

set_bits_reverse_iterator BASE_SET::set_bits_rbegin ( ) const
inline

Definition at line 298 of file base_set.h.

Referenced by BOOST_AUTO_TEST_CASE().

◆ set_bits_rend()

set_bits_reverse_iterator BASE_SET::set_bits_rend ( ) const
inline

Definition at line 302 of file base_set.h.

Referenced by BOOST_AUTO_TEST_CASE().

◆ size()

◆ test()

bool BASE_SET::test ( size_t  pos) const
inline

Definition at line 47 of file base_set.h.

Referenced by BOOST_AUTO_TEST_CASE(), collidesWithArea(), DIALOG_PLOT::DIALOG_PLOT(), BOARD_COMMIT::dirtyIntersectingZones(), APPEARANCE_CONTROLS::doApplyLayerPreset(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), DRAWING_TOOL::DrawVia(), PCB_VIA::FlashLayer(), LSET::Flip(), FOOTPRINT::GetBoundingBox(), FOOTPRINT::GetBoundingHull(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), ZONE::GetFillFlag(), FOOTPRINT::GetLayerBoundingBox(), PCB_VIA::GetLayerSet(), BOARD_ADAPTER::GetVisibleLayers(), ROUTER_TOOL::handleLayerSwitch(), BOARD_INSPECTION_TOOL::InspectClearance(), PCB_LAYER_BOX_SELECTOR::isLayerEnabled(), PAD::IsOnLayer(), PCB_VIA::IsOnLayer(), ZONE::IsOnLayer(), LoadBoard(), DIALOG_DRC::OnDRCItemSelected(), APPEARANCE_CONTROLS::OnLayerContextMenu(), APPEARANCE_CONTROLS::onLayerVisibilityToggled(), DIALOG_CLEANUP_GRAPHICS::OnSelectItem(), DIALOG_FOOTPRINT_CHECKER::OnSelectItem(), DIALOG_PAD_PROPERTIES::OnUpdateUI(), PCB_EDIT_FRAME::OpenProjectFiles(), CN_VISITOR::operator()(), BRDITEMS_PLOTTER::PlotFootprintGraphicItems(), BRDITEMS_PLOTTER::PlotFootprintTextItems(), PCB_CONTROL::pruneItemLayers(), PCB_BASE_EDIT_FRAME::PutDataInPreviousState(), PAD::Recombine(), DRC_TEST_PROVIDER_DISALLOW::Run(), BOARD_PRINTOUT_SETTINGS::Save(), PAD::SetAttribute(), APPEARANCE_CONTROLS::SetLayerVisible(), PCB_BASE_FRAME::SetPlotSettings(), ZONE_SETTINGS::SetupLayersList(), PCBNEW_PRINTOUT::setupViewLayers(), DRC_TEST_PROVIDER_MISC::testDisabledLayers(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testKnockoutTextAgainstZone(), DRC_TEST_PROVIDER_SOLDER_MASK::testMaskItemAgainstZones(), FOOTPRINT::TextOnly(), DIALOG_SWAP_LAYERS::TransferDataFromWindow(), DIALOG_SWAP_LAYERS::TransferDataToWindow(), DIALOG_PAD_PROPERTIES::updatePadLayersList(), and PCB_EDIT_FRAME::UpdateUserInterface().

◆ to_string()

template<typename CharT = char>
std::basic_string< CharT > BASE_SET::to_string ( CharT  zero = CharT( '0' ),
CharT  one = CharT( '1' ) 
) const
inline

Definition at line 158 of file base_set.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const BASE_SET set 
)
friend

Definition at line 151 of file base_set.h.

Member Data Documentation

◆ m_bits

std::vector<int> BASE_SET::m_bits
private

Definition at line 308 of file base_set.h.

Referenced by compare(), operator&=(), operator<(), operator==(), operator^=(), operator|=(), and operator~().


The documentation for this class was generated from the following file: