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 395 of file view.cpp.

Member Typedef Documentation

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

Definition at line 397 of file view.cpp.

Constructor & Destructor Documentation

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

Definition at line 399 of file view.cpp.

399  :
400  m_cont( aCont ), m_layer( aLayer )
401  {
402  }
Container & m_cont
Definition: view.cpp:412

Member Function Documentation

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

Definition at line 404 of file view.cpp.

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

405  {
406  if( aItem->viewPrivData()->getFlags() & VISIBLE )
407  m_cont.push_back( VIEW::LAYER_ITEM_PAIR( aItem, m_layer ) );
408 
409  return true;
410  }
std::pair< VIEW_ITEM *, int > LAYER_ITEM_PAIR
Definition: view.h:63
Container & m_cont
Definition: view.cpp:412

Member Data Documentation

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

Definition at line 412 of file view.cpp.

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

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

Definition at line 413 of file view.cpp.

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


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