KiCad PCB EDA Suite
DIALOG_BOARD_STATISTICS::drillType_t::COMPARE Struct Reference

#include <dialog_board_statistics.h>

Public Member Functions

 COMPARE (COL_ID aColId, bool aAscending)
 
bool operator() (const drillType_t &aLeft, const drillType_t &aRight)
 
bool compareDrillParameters (int aLeft, int aRight)
 

Public Attributes

COL_ID colId
 
bool ascending
 

Detailed Description

Definition at line 122 of file dialog_board_statistics.h.

Constructor & Destructor Documentation

◆ COMPARE()

DIALOG_BOARD_STATISTICS::drillType_t::COMPARE::COMPARE ( COL_ID  aColId,
bool  aAscending 
)
inline

Member Function Documentation

◆ compareDrillParameters()

bool DIALOG_BOARD_STATISTICS::drillType_t::COMPARE::compareDrillParameters ( int  aLeft,
int  aRight 
)
inline

Definition at line 152 of file dialog_board_statistics.h.

153  {
154  return ascending ? aLeft < aRight : aLeft > aRight;
155  }

References ascending.

Referenced by operator()().

◆ operator()()

bool DIALOG_BOARD_STATISTICS::drillType_t::COMPARE::operator() ( const drillType_t aLeft,
const drillType_t aRight 
)
inline

Definition at line 127 of file dialog_board_statistics.h.

128  {
129  switch( colId )
130  {
131  case COL_COUNT:
132  return compareDrillParameters( aLeft.qty, aRight.qty );
133  case COL_SHAPE:
134  return compareDrillParameters( aLeft.shape, aRight.shape );
135  case COL_X_SIZE:
136  return compareDrillParameters( aLeft.xSize, aRight.xSize );
137  case COL_Y_SIZE:
138  return compareDrillParameters( aLeft.ySize, aRight.ySize );
139  case COL_PLATED:
140  return ascending ? aLeft.isPlated : aRight.isPlated;
141  case COL_VIA_PAD:
142  return ascending ? aLeft.isPad : aRight.isPad;
143  case COL_START_LAYER:
144  return compareDrillParameters( aLeft.startLayer, aRight.startLayer );
145  case COL_STOP_LAYER:
146  return compareDrillParameters( aLeft.stopLayer, aRight.stopLayer );
147  }
148 
149  return false;
150  }

References ascending, DIALOG_BOARD_STATISTICS::drillType_t::COL_COUNT, DIALOG_BOARD_STATISTICS::drillType_t::COL_PLATED, DIALOG_BOARD_STATISTICS::drillType_t::COL_SHAPE, DIALOG_BOARD_STATISTICS::drillType_t::COL_START_LAYER, DIALOG_BOARD_STATISTICS::drillType_t::COL_STOP_LAYER, DIALOG_BOARD_STATISTICS::drillType_t::COL_VIA_PAD, DIALOG_BOARD_STATISTICS::drillType_t::COL_X_SIZE, DIALOG_BOARD_STATISTICS::drillType_t::COL_Y_SIZE, colId, compareDrillParameters(), DIALOG_BOARD_STATISTICS::drillType_t::isPad, DIALOG_BOARD_STATISTICS::drillType_t::isPlated, DIALOG_BOARD_STATISTICS::drillType_t::qty, DIALOG_BOARD_STATISTICS::drillType_t::shape, DIALOG_BOARD_STATISTICS::drillType_t::startLayer, DIALOG_BOARD_STATISTICS::drillType_t::stopLayer, DIALOG_BOARD_STATISTICS::drillType_t::xSize, and DIALOG_BOARD_STATISTICS::drillType_t::ySize.

Member Data Documentation

◆ ascending

bool DIALOG_BOARD_STATISTICS::drillType_t::COMPARE::ascending

Definition at line 158 of file dialog_board_statistics.h.

Referenced by compareDrillParameters(), and operator()().

◆ colId

COL_ID DIALOG_BOARD_STATISTICS::drillType_t::COMPARE::colId

Definition at line 157 of file dialog_board_statistics.h.

Referenced by operator()().


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