KiCad PCB EDA Suite
Loading...
Searching...
No Matches
TOOL_EVENT_LIST Class Reference

A list of TOOL_EVENTs, with overloaded || operators allowing for concatenating TOOL_EVENTs with little code. More...

#include <tool_event.h>

Public Types

typedef TOOL_EVENT value_type
 
typedef std::deque< TOOL_EVENT >::iterator iterator
 
typedef std::deque< TOOL_EVENT >::const_iterator const_iterator
 

Public Member Functions

 TOOL_EVENT_LIST ()
 Default constructor. Creates an empty list.
 
 TOOL_EVENT_LIST (const TOOL_EVENT &aSingleEvent)
 Constructor for a list containing only one TOOL_EVENT.
 
 TOOL_EVENT_LIST (const TOOL_EVENT_LIST &aEventList)
 Copy an existing TOOL_EVENT_LIST.
 
const std::string Format () const
 Return information about event in form of a human-readable string.
 
const std::string Names () const
 Return a string containing the names of all the events in this list.
 
OPT_TOOL_EVENT Matches (const TOOL_EVENT &aEvent) const
 
void Add (const TOOL_EVENT &aEvent)
 Add a tool event to the list.
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
int size () const
 
void clear ()
 
TOOL_EVENT_LISToperator= (const TOOL_EVENT_LIST &aEventList)
 
TOOL_EVENT_LISToperator= (const TOOL_EVENT &aEvent)
 
TOOL_EVENT_LISToperator|| (const TOOL_EVENT &aEvent)
 
TOOL_EVENT_LISToperator|| (const TOOL_EVENT_LIST &aEvent)
 

Private Attributes

std::deque< TOOL_EVENTm_events
 

Detailed Description

A list of TOOL_EVENTs, with overloaded || operators allowing for concatenating TOOL_EVENTs with little code.

Definition at line 647 of file tool_event.h.

Member Typedef Documentation

◆ const_iterator

typedef std::deque<TOOL_EVENT>::const_iterator TOOL_EVENT_LIST::const_iterator

Definition at line 652 of file tool_event.h.

◆ iterator

typedef std::deque<TOOL_EVENT>::iterator TOOL_EVENT_LIST::iterator

Definition at line 651 of file tool_event.h.

◆ value_type

Definition at line 650 of file tool_event.h.

Constructor & Destructor Documentation

◆ TOOL_EVENT_LIST() [1/3]

TOOL_EVENT_LIST::TOOL_EVENT_LIST ( )
inline

Default constructor. Creates an empty list.

Definition at line 655 of file tool_event.h.

Referenced by operator=(), operator=(), operator||(), operator||(), and TOOL_EVENT_LIST().

◆ TOOL_EVENT_LIST() [2/3]

TOOL_EVENT_LIST::TOOL_EVENT_LIST ( const TOOL_EVENT & aSingleEvent)
inline

Constructor for a list containing only one TOOL_EVENT.

Definition at line 659 of file tool_event.h.

References m_events.

◆ TOOL_EVENT_LIST() [3/3]

TOOL_EVENT_LIST::TOOL_EVENT_LIST ( const TOOL_EVENT_LIST & aEventList)
inline

Copy an existing TOOL_EVENT_LIST.

Definition at line 665 of file tool_event.h.

References m_events, and TOOL_EVENT_LIST().

Member Function Documentation

◆ Add()

void TOOL_EVENT_LIST::Add ( const TOOL_EVENT & aEvent)
inline

Add a tool event to the list.

Parameters
aEventis the tool event to be added.

Definition at line 703 of file tool_event.h.

References m_events.

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

◆ begin()

iterator TOOL_EVENT_LIST::begin ( )
inline

Definition at line 708 of file tool_event.h.

References m_events.

◆ cbegin()

const_iterator TOOL_EVENT_LIST::cbegin ( ) const
inline

Definition at line 718 of file tool_event.h.

References m_events.

◆ cend()

const_iterator TOOL_EVENT_LIST::cend ( ) const
inline

Definition at line 723 of file tool_event.h.

References m_events.

◆ clear()

void TOOL_EVENT_LIST::clear ( )
inline

Definition at line 733 of file tool_event.h.

References m_events.

Referenced by TOOL_MANAGER::dispatchInternal(), and TOOL_MANAGER::ShutdownTool().

◆ end()

iterator TOOL_EVENT_LIST::end ( )
inline

Definition at line 713 of file tool_event.h.

References m_events.

◆ Format()

const std::string TOOL_EVENT_LIST::Format ( ) const

Return information about event in form of a human-readable string.

Returns
Event information.

Definition at line 190 of file tool_event.cpp.

References m_events.

◆ Matches()

OPT_TOOL_EVENT TOOL_EVENT_LIST::Matches ( const TOOL_EVENT & aEvent) const
inline

Definition at line 687 of file tool_event.h.

References m_events.

Referenced by TOOL_MANAGER::dispatchInternal().

◆ Names()

const std::string TOOL_EVENT_LIST::Names ( ) const

Return a string containing the names of all the events in this list.

Returns
Event names.

Definition at line 201 of file tool_event.cpp.

References m_events.

Referenced by SCH_TOOL_BASE< SCH_EDIT_FRAME >::SetContextMenu().

◆ operator=() [1/2]

TOOL_EVENT_LIST & TOOL_EVENT_LIST::operator= ( const TOOL_EVENT & aEvent)
inline

Definition at line 748 of file tool_event.h.

References m_events, and TOOL_EVENT_LIST().

◆ operator=() [2/2]

TOOL_EVENT_LIST & TOOL_EVENT_LIST::operator= ( const TOOL_EVENT_LIST & aEventList)
inline

Definition at line 738 of file tool_event.h.

References m_events, and TOOL_EVENT_LIST().

◆ operator||() [1/2]

TOOL_EVENT_LIST & TOOL_EVENT_LIST::operator|| ( const TOOL_EVENT & aEvent)
inline

Definition at line 755 of file tool_event.h.

References Add(), and TOOL_EVENT_LIST().

◆ operator||() [2/2]

TOOL_EVENT_LIST & TOOL_EVENT_LIST::operator|| ( const TOOL_EVENT_LIST & aEvent)
inline

Definition at line 761 of file tool_event.h.

References m_events, and TOOL_EVENT_LIST().

◆ size()

int TOOL_EVENT_LIST::size ( ) const
inline

Definition at line 728 of file tool_event.h.

References m_events.

Member Data Documentation

◆ m_events

std::deque<TOOL_EVENT> TOOL_EVENT_LIST::m_events
private

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