KiCad PCB EDA Suite
selection_conditions.cpp File Reference
#include <tool/selection.h>
#include <tool/selection_conditions.h>
#include <functional>
#include <eda_item.h>

Go to the source code of this file.

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)
 
SELECTION_CONDITION operator|| (const SELECTION_CONDITION &aConditionA, SELECTION_BOOL aConditionB)
 
SELECTION_CONDITION operator|| (SELECTION_BOOL aConditionA, const SELECTION_CONDITION &aConditionB)
 
SELECTION_CONDITION operator && (const SELECTION_CONDITION &aConditionA, SELECTION_BOOL aConditionB)
 
SELECTION_CONDITION operator && (SELECTION_BOOL aConditionA, const SELECTION_CONDITION &aConditionB)
 

Function Documentation

◆ operator &&() [1/3]

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

Definition at line 164 of file selection_conditions.cpp.

166 {
167  return std::bind( &SELECTION_CONDITIONS::andFunc, aConditionA, aConditionB, _1 );
168 }
static bool andFunc(const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB, const SELECTION &aSelection)
Helper function used by operator!

References SELECTION_CONDITIONS::andFunc().

◆ operator &&() [2/3]

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

Definition at line 190 of file selection_conditions.cpp.

192 {
193  return std::bind( &SELECTION_CONDITIONS::andBoolFunc, aConditionA, std::ref( aConditionB ), _1 );
194 }
static bool andBoolFunc(const SELECTION_CONDITION &aConditionA, SELECTION_BOOL &aConditionB, const SELECTION &aSelection)

References SELECTION_CONDITIONS::andBoolFunc().

◆ operator &&() [3/3]

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

Definition at line 196 of file selection_conditions.cpp.

198 {
199  return aConditionB && aConditionA;
200 }

◆ operator!()

SELECTION_CONDITION operator! ( const SELECTION_CONDITION aCondition)

Definition at line 171 of file selection_conditions.cpp.

172 {
173  return std::bind( &SELECTION_CONDITIONS::notFunc, aCondition, _1 );
174 }
static bool notFunc(const SELECTION_CONDITION &aCondition, const SELECTION &aSelection)
Helper function used by operator||.

References SELECTION_CONDITIONS::notFunc().

◆ operator||() [1/3]

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

Definition at line 157 of file selection_conditions.cpp.

159 {
160  return std::bind( &SELECTION_CONDITIONS::orFunc, aConditionA, aConditionB, _1 );
161 }
static bool orFunc(const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB, const SELECTION &aSelection)
Helper function used by operator&&.

References SELECTION_CONDITIONS::orFunc().

◆ operator||() [2/3]

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

Definition at line 177 of file selection_conditions.cpp.

179 {
180  return std::bind( &SELECTION_CONDITIONS::orBoolFunc, aConditionA, std::ref( aConditionB ), _1 );
181 }
static bool orBoolFunc(const SELECTION_CONDITION &aConditionA, SELECTION_BOOL &aConditionB, const SELECTION &aSelection)
Helper function used by operator&&.

References SELECTION_CONDITIONS::orBoolFunc().

◆ operator||() [3/3]

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

Definition at line 183 of file selection_conditions.cpp.

185 {
186  return aConditionB || aConditionA;
187 }