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 55 of file dialog_drclistbox.h.

Constructor & Destructor Documentation

DRC_LIST_MARKERS::DRC_LIST_MARKERS ( BOARD aBoard)
inline

Definition at line 61 of file dialog_drclistbox.h.

61  :
62  m_board(aBoard)
63  {
64  }

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 73 of file dialog_drclistbox.h.

References BOARD::DeleteMARKERs().

74  {
76  }
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 87 of file dialog_drclistbox.h.

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

88  {
89  MARKER_PCB* marker = m_board->GetMARKER( aIndex );
90  if( marker )
91  m_board->Delete( marker );
92  }
MARKER_PCB * GetMARKER(int index) const
Function GetMARKER returns the MARKER at a given index.
Definition: class_board.h:324
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 99 of file dialog_drclistbox.h.

References BOARD::GetMARKERCount().

100  {
101  return m_board->GetMARKERCount();
102  }
int GetMARKERCount() const
Function GetMARKERCount.
Definition: class_board.h:336
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 79 of file dialog_drclistbox.h.

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

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

Member Data Documentation

BOARD* DRC_LIST_MARKERS::m_board
private

Definition at line 57 of file dialog_drclistbox.h.


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