KiCad PCB EDA Suite
KIGFX::QUERY_VISITOR< CONTAINER > Struct Template Reference

Public Types

typedef CONTAINER::value_type item_type
 

Public Member Functions

 QUERY_VISITOR (CONTAINER &aCont, int aLayer)
 
bool operator() (VIEW_ITEM *aItem)
 

Public Attributes

CONTAINER & m_cont
 
int m_layer
 

Detailed Description

template<class CONTAINER>
struct KIGFX::QUERY_VISITOR< CONTAINER >

Definition at line 407 of file view.cpp.

Member Typedef Documentation

◆ item_type

template<class CONTAINER>
typedef CONTAINER::value_type KIGFX::QUERY_VISITOR< CONTAINER >::item_type

Definition at line 409 of file view.cpp.

Constructor & Destructor Documentation

◆ QUERY_VISITOR()

template<class CONTAINER>
KIGFX::QUERY_VISITOR< CONTAINER >::QUERY_VISITOR ( CONTAINER &  aCont,
int  aLayer 
)
inline

Definition at line 411 of file view.cpp.

411  :
412  m_cont( aCont ), m_layer( aLayer )
413  {
414  }
CONTAINER & m_cont
Definition: view.cpp:424

Member Function Documentation

◆ operator()()

template<class CONTAINER>
bool KIGFX::QUERY_VISITOR< CONTAINER >::operator() ( VIEW_ITEM aItem)
inline

Definition at line 416 of file view.cpp.

417  {
418  if( aItem->viewPrivData()->getFlags() & VISIBLE )
419  m_cont.push_back( VIEW::LAYER_ITEM_PAIR( aItem, m_layer ) );
420 
421  return true;
422  }
CONTAINER & m_cont
Definition: view.cpp:424
Item is visible (in general)
Definition: view_item.h:65
std::pair< VIEW_ITEM *, int > LAYER_ITEM_PAIR
Definition: view.h:73

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

Member Data Documentation

◆ m_cont

template<class CONTAINER>
CONTAINER& KIGFX::QUERY_VISITOR< CONTAINER >::m_cont

Definition at line 424 of file view.cpp.

Referenced by KIGFX::QUERY_VISITOR< CONTAINER >::operator()().

◆ m_layer

template<class CONTAINER>
int KIGFX::QUERY_VISITOR< CONTAINER >::m_layer

Definition at line 425 of file view.cpp.

Referenced by KIGFX::QUERY_VISITOR< CONTAINER >::operator()().


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