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)
 
SELECTION_CONDITION operator! (const SELECTION_CONDITION &aCondition)
 

Typedef Documentation

◆ SELECTION_CONDITION

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

Functor type that checks a specific condition for selected items.

Definition at line 34 of file selection_conditions.h.

Function Documentation

◆ operator &&()

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

Definition at line 145 of file selection_conditions.cpp.

147 {
148  return std::bind( &SELECTION_CONDITIONS::andFunc, aConditionA, aConditionB, _1 );
149 }
static bool andFunc(const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB, const SELECTION &aSelection)
Helper function used by operator&&

References SELECTION_CONDITIONS::andFunc().

◆ operator!()

SELECTION_CONDITION operator! ( const SELECTION_CONDITION aCondition)

Definition at line 152 of file selection_conditions.cpp.

153 {
154  return std::bind( &SELECTION_CONDITIONS::notFunc, aCondition, _1 );
155 }
static bool notFunc(const SELECTION_CONDITION &aCondition, const SELECTION &aSelection)
Helper function used by operator!

References SELECTION_CONDITIONS::notFunc().

◆ operator||()

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

Definition at line 138 of file selection_conditions.cpp.

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

References SELECTION_CONDITIONS::orFunc().