KiCad PCB EDA Suite
DRC_LIST_MARKERS Class Reference

Class DRC_LIST_MARKERS is an implementation of the interface named DRC_ITEM_LIST which uses a BOARD instance to fulfill the interface. More...

#include <dialog_drclistbox.h>

Inheritance diagram for DRC_LIST_MARKERS:
DRC_ITEM_LIST

Public Member Functions

 DRC_LIST_MARKERS (BOARD *aBoard)
 
void DeleteAllItems () override
 Function DeleteAllItems removes and deletes all the items in the list. More...
 
const DRC_ITEMGetItem (int aIndex) override
 Function GetItem retrieves a DRC_ITEM by pointer. More...
 
void DeleteItem (int aIndex) override
 Function DeleteAllItems removes and deletes desired item from the list. More...
 
int GetCount () override
 Function GetCount returns the number of items in the list. More...
 

Private Attributes

BOARDm_board
 

Detailed Description

Class DRC_LIST_MARKERS is an implementation of the interface named DRC_ITEM_LIST which uses a BOARD instance to fulfill the interface.

No ownership is taken of the BOARD.

Definition at line 56 of file dialog_drclistbox.h.

Constructor & Destructor Documentation

DRC_LIST_MARKERS::DRC_LIST_MARKERS ( BOARD aBoard)
inline

Definition at line 62 of file dialog_drclistbox.h.

62  :
63  m_board(aBoard)
64  {
65  }

Member Function Documentation

void DRC_LIST_MARKERS::DeleteAllItems ( )
inlineoverridevirtual

Function DeleteAllItems removes and deletes all the items in the list.

Implements DRC_ITEM_LIST.

Definition at line 74 of file dialog_drclistbox.h.

References BOARD::DeleteMARKERs().

75  {
77  }
void DeleteMARKERs()
Function DeleteMARKERs deletes ALL MARKERS from the board.
void DRC_LIST_MARKERS::DeleteItem ( int  aIndex)
inlineoverridevirtual

Function DeleteAllItems removes and deletes desired item from the list.

Parameters
aIndexThe 0 based index into the list of the desired item which is to be deleted.

Implements DRC_ITEM_LIST.

Definition at line 88 of file dialog_drclistbox.h.

References BOARD_ITEM_CONTAINER::Delete(), and BOARD::GetMARKER().

89  {
90  MARKER_PCB* marker = m_board->GetMARKER( aIndex );
91  if( marker )
92  m_board->Delete( marker );
93  }
MARKER_PCB * GetMARKER(int index) const
Function GetMARKER returns the MARKER at a given index.
Definition: class_board.h:321
virtual void Delete(BOARD_ITEM *aItem)
Removes an item from the containter and deletes it.
int DRC_LIST_MARKERS::GetCount ( )
inlineoverridevirtual

Function GetCount returns the number of items in the list.

Implements DRC_ITEM_LIST.

Definition at line 100 of file dialog_drclistbox.h.

References BOARD::GetMARKERCount().

101  {
102  return m_board->GetMARKERCount();
103  }
int GetMARKERCount() const
Function GetMARKERCount.
Definition: class_board.h:333
const DRC_ITEM* DRC_LIST_MARKERS::GetItem ( int  aIndex)
inlineoverridevirtual

Function GetItem retrieves a DRC_ITEM by pointer.

The actual item remains owned by the list container.

Parameters
aIndexThe 0 based index into the list of the desired item.
Returns
const DRC_ITEM* - the desired item or NULL if aIndex is out of range.

Implements DRC_ITEM_LIST.

Definition at line 80 of file dialog_drclistbox.h.

References BOARD::GetMARKER(), and MARKER_BASE::GetReporter().

81  {
82  const MARKER_PCB* marker = m_board->GetMARKER( aIndex );
83  if( marker )
84  return &marker->GetReporter();
85  return NULL;
86  }
MARKER_PCB * GetMARKER(int index) const
Function GetMARKER returns the MARKER at a given index.
Definition: class_board.h:321
const DRC_ITEM & GetReporter() const
Function GetReporter returns the DRC_ITEM held within this MARKER so that its interface may be used...

Member Data Documentation

BOARD* DRC_LIST_MARKERS::m_board
private

Definition at line 58 of file dialog_drclistbox.h.


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