KiCad PCB EDA Suite
KIGFX::queryVisitor< Container > Struct Template Reference

Public Types

typedef Container::value_type item_type
 

Public Member Functions

 queryVisitor (Container &aCont, int aLayer)
 
bool operator() (VIEW_ITEM *aItem)
 

Public Attributes

Container & m_cont
 
int m_layer
 

Detailed Description

template<class Container>
struct KIGFX::queryVisitor< Container >

Definition at line 430 of file view.cpp.

Member Typedef Documentation

◆ item_type

template<class Container>
typedef Container::value_type KIGFX::queryVisitor< Container >::item_type

Definition at line 432 of file view.cpp.

Constructor & Destructor Documentation

◆ queryVisitor()

template<class Container>
KIGFX::queryVisitor< Container >::queryVisitor ( Container &  aCont,
int  aLayer 
)
inline

Definition at line 434 of file view.cpp.

434  :
435  m_cont( aCont ), m_layer( aLayer )
436  {
437  }
Container & m_cont
Definition: view.cpp:447

Member Function Documentation

◆ operator()()

template<class Container>
bool KIGFX::queryVisitor< Container >::operator() ( VIEW_ITEM aItem)
inline

Definition at line 439 of file view.cpp.

440  {
441  if( aItem->viewPrivData()->getFlags() & VISIBLE )
442  m_cont.push_back( VIEW::LAYER_ITEM_PAIR( aItem, m_layer ) );
443 
444  return true;
445  }
std::pair< VIEW_ITEM *, int > LAYER_ITEM_PAIR
Definition: view.h:66
Container & m_cont
Definition: view.cpp:447

References KIGFX::VIEW_ITEM_DATA::getFlags(), KIGFX::queryVisitor< Container >::m_cont, KIGFX::queryVisitor< Container >::m_layer, KIGFX::VIEW_ITEM::viewPrivData(), and KIGFX::VISIBLE.

Member Data Documentation

◆ m_cont

template<class Container>
Container& KIGFX::queryVisitor< Container >::m_cont

Definition at line 447 of file view.cpp.

Referenced by KIGFX::queryVisitor< Container >::operator()().

◆ m_layer

template<class Container>
int KIGFX::queryVisitor< Container >::m_layer

Definition at line 448 of file view.cpp.

Referenced by KIGFX::queryVisitor< Container >::operator()().


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