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

Member Typedef Documentation

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

Definition at line 398 of file view.cpp.

Constructor & Destructor Documentation

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

Definition at line 400 of file view.cpp.

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

Member Function Documentation

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

Definition at line 405 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.

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

Member Data Documentation

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

Definition at line 413 of file view.cpp.

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

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

Definition at line 414 of file view.cpp.

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


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