KiCad PCB EDA Suite
selection_conditions.h File Reference
#include <functional>
#include <core/typeinfo.h>
#include <vector>
#include <tool/selection.h>

Go to the source code of this file.

Classes

class  SELECTION_CONDITIONS
 Class that groups generic conditions for selected items. More...
 

Typedefs

typedef std::function< bool(const SELECTION &)> SELECTION_CONDITION
 

Functor type that checks a specific condition for selected items.

More...
 

Functions

SELECTION_CONDITION operator|| (const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB)
 
SELECTION_CONDITION operator&& (const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB)
 

Typedef Documentation

typedef std::function<bool (const SELECTION&)> SELECTION_CONDITION

Functor type that checks a specific condition for selected items.

Definition at line 35 of file selection_conditions.h.

Function Documentation

SELECTION_CONDITION operator&& ( const SELECTION_CONDITION aConditionA,
const SELECTION_CONDITION aConditionB 
)

Definition at line 188 of file selection_conditions.cpp.

References SELECTION_CONDITIONS::andFunc().

190 {
191  return std::bind( &SELECTION_CONDITIONS::andFunc, aConditionA, aConditionB, _1 );
192 }
static bool andFunc(const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB, const SELECTION &aSelection)
Helper function used by operator&&
SELECTION_CONDITION operator|| ( const SELECTION_CONDITION aConditionA,
const SELECTION_CONDITION aConditionB 
)

Definition at line 181 of file selection_conditions.cpp.

References SELECTION_CONDITIONS::orFunc().

183 {
184  return std::bind( &SELECTION_CONDITIONS::orFunc, aConditionA, aConditionB, _1 );
185 }
static bool orFunc(const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB, const SELECTION &aSelection)
Helper function used by operator||