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 121 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 150 of file dialog_board_statistics.h.

151  {
152  return ascending ? aLeft < aRight : aLeft > aRight;
153  }

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 126 of file dialog_board_statistics.h.

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

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 155 of file dialog_board_statistics.h.

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

◆ colId

COL_ID DIALOG_BOARD_STATISTICS::drillType_t::COMPARE::colId

Definition at line 154 of file dialog_board_statistics.h.

Referenced by operator()().


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