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 400 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 402 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 404 of file view.cpp.

404 :
405 m_cont( aCont ), m_layer( aLayer )
406 {
407 }
CONTAINER & m_cont
Definition: view.cpp:417

Member Function Documentation

◆ operator()()

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

Definition at line 409 of file view.cpp.

410 {
411 if( aItem->viewPrivData()->GetFlags() & VISIBLE )
412 m_cont.push_back( VIEW::LAYER_ITEM_PAIR( aItem, m_layer ) );
413
414 return true;
415 }
std::pair< VIEW_ITEM *, int > LAYER_ITEM_PAIR
Definition: view.h:73
@ VISIBLE
Item is visible (in general)
Definition: view_item.h:60

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

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


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