SketcherGui::ConstraintFilter Namespace Reference

Typedefs

using FilterValueBitset = std::bitset< FilterValueLength >
 A std::bitset sized to provide one bit per FilterValue value. More...
 

Enumerations

enum class  FilterValue {
  All = 0 , Geometric = 1 , Datums = 2 , Named = 3 ,
  NonDriving = 4 , Coincident = 5 , PointOnObject = 6 , Vertical = 7 ,
  Horizontal = 8 , Parallel = 9 , Perpendicular = 10 , Tangent = 11 ,
  Equality = 12 , Symmetric = 13 , Block = 14 , HorizontalDistance = 15 ,
  VerticalDistance = 16 , Distance = 17 , Radius = 18 , Weight = 19 ,
  Diameter = 20 , Angle = 21 , SnellsLaw = 22 , InternalAlignment = 23 ,
  NumFilterValue
}
 
enum class  SpecialFilterValue { Multiple = FilterValueLength , Selection , AssociatedConstraints , NumSpecialFilterValue }
 

Functions

template<typename... Args>
constexpr decltype(auto) buildBitset (Args... args)
 Helper function expanding a parameter pack value of enum classes to create a integral underlying type having the bits corresponding to the parameter pack set. More...
 
bool checkFilterBitset (FilterValueBitset set, FilterValue filter)
 Helper function to test whether a FilterValue value is set in a FilterValueBitset. More...
 
template<typename T >
auto getFilterIntegral (T filterValue)
 Helper function to retrieve the underlying integral type of a filter value. More...
 
template<typename T >
bool isFilterMatch (T filterValue, std::underlying_type_t< T > integralTypeValue)
 Helper function to test whether a provided integral value corresponds to the provided filter value. More...
 

Variables

constexpr std::array< FilterValueBitset, FilterValueLengthfilterAggregates
 Array of FilterValue bit sets of size the the number of FilterValues indicating for each FilterValue, which other FilterValues are comprised therein. More...
 
constexpr auto FilterValueLength = static_cast<std::underlying_type_t<FilterValue>>(FilterValue::NumFilterValue)
 
constexpr auto SpecialFilterValue = static_cast<std::underlying_type_t<FilterValue>>(SpecialFilterValue::NumSpecialFilterValue)
 

Typedef Documentation

◆ FilterValueBitset

A std::bitset sized to provide one bit per FilterValue value.

Enumeration Type Documentation

◆ FilterValue

Enumerator
All 
Geometric 
Datums 
Named 
NonDriving 
Coincident 
PointOnObject 
Vertical 
Horizontal 
Parallel 
Perpendicular 
Tangent 
Equality 
Symmetric 
Block 
HorizontalDistance 
VerticalDistance 
Distance 
Radius 
Weight 
Diameter 
Angle 
SnellsLaw 
InternalAlignment 
NumFilterValue 

◆ SpecialFilterValue

Enumerator
Multiple 
Selection 
AssociatedConstraints 
NumSpecialFilterValue 

Function Documentation

◆ buildBitset()

template<typename... Args>
constexpr decltype(auto) SketcherGui::ConstraintFilter::buildBitset ( Args...  args)
constexpr

Helper function expanding a parameter pack value of enum classes to create a integral underlying type having the bits corresponding to the parameter pack set.

◆ checkFilterBitset()

bool SketcherGui::ConstraintFilter::checkFilterBitset ( FilterValueBitset  set,
FilterValue  filter 
)

Helper function to test whether a FilterValue value is set in a FilterValueBitset.

◆ getFilterIntegral()

template<typename T >
auto SketcherGui::ConstraintFilter::getFilterIntegral ( filterValue)

Helper function to retrieve the underlying integral type of a filter value.

Referenced by SketcherGui::TaskSketcherConstraints::on_multipleFilterButton_clicked().

◆ isFilterMatch()

template<typename T >
bool SketcherGui::ConstraintFilter::isFilterMatch ( filterValue,
std::underlying_type_t< T >  integralTypeValue 
)

Helper function to test whether a provided integral value corresponds to the provided filter value.

Referenced by SketcherGui::TaskSketcherConstraints::on_comboBoxFilter_currentIndexChanged(), and SketcherGui::TaskSketcherConstraints::on_multipleFilterButton_clicked().

Variable Documentation

◆ filterAggregates

constexpr std::array< FilterValueBitset, FilterValueLength> SketcherGui::ConstraintFilter::filterAggregates
constexpr

Array of FilterValue bit sets of size the the number of FilterValues indicating for each FilterValue, which other FilterValues are comprised therein.

It defines the dependencies between filters.

Referenced by SketcherGui::ConstraintMultiFilterDialog::on_listMultiFilter_itemChanged().

◆ FilterValueLength

constexpr auto SketcherGui::ConstraintFilter::FilterValueLength = static_cast<std::underlying_type_t<FilterValue>>(FilterValue::NumFilterValue)
constexpr

◆ SpecialFilterValue

constexpr auto SketcherGui::ConstraintFilter::SpecialFilterValue = static_cast<std::underlying_type_t<FilterValue>>(SpecialFilterValue::NumSpecialFilterValue)
constexpr