KiCad PCB EDA Suite
KIWAY_EXPRESS Class Reference

Carry a payload from one KIWAY_PLAYER to another within a PROJECT. More...

#include <kiway_express.h>

Inheritance diagram for KIWAY_EXPRESS:

Public Member Functions

FRAME_T Dest ()
 Return the destination player id of the message. More...
 
MAIL_T Command ()
 Returns the MAIL_T associated with this mail. More...
 
std::string & GetPayload ()
 Return the payload, which can be any text but it typically self identifying s-expression. More...
 
void SetPayload (const std::string &aPayload)
 
KIWAY_EXPRESSClone () const override
 
 KIWAY_EXPRESS (FRAME_T aDestination, MAIL_T aCommand, std::string &aPayload, wxWindow *aSource=nullptr)
 
 KIWAY_EXPRESS (const KIWAY_EXPRESS &anOther)
 

Static Public Attributes

static const wxEventType wxEVENT_ID = 30000
 The wxEventType argument to wxEvent() and identifies an event class in a hurry. More...
 

Private Attributes

FRAME_T m_destination
 could have been a bitmap indicating multiple recipients. More...
 
std::string & m_payload
 very often s-expression text, but not always. More...
 

Detailed Description

Carry a payload from one KIWAY_PLAYER to another within a PROJECT.

Definition at line 38 of file kiway_express.h.

Constructor & Destructor Documentation

◆ KIWAY_EXPRESS() [1/2]

KIWAY_EXPRESS::KIWAY_EXPRESS ( FRAME_T  aDestination,
MAIL_T  aCommand,
std::string &  aPayload,
wxWindow *  aSource = nullptr 
)

Definition at line 52 of file kiway_express.cpp.

53  :
54  wxEvent( aCommand, wxEVENT_ID ),
55  m_destination( aDestination ),
56  m_payload( aPayload )
57 {
58  SetEventObject( aSource );
59 }
static const wxEventType wxEVENT_ID
The wxEventType argument to wxEvent() and identifies an event class in a hurry.
Definition: kiway_express.h:72
FRAME_T m_destination
could have been a bitmap indicating multiple recipients.
Definition: kiway_express.h:77
std::string & m_payload
very often s-expression text, but not always.
Definition: kiway_express.h:78

Referenced by Clone().

◆ KIWAY_EXPRESS() [2/2]

KIWAY_EXPRESS::KIWAY_EXPRESS ( const KIWAY_EXPRESS anOther)

Definition at line 44 of file kiway_express.cpp.

44  :
45  wxEvent( anOther ),
46  m_destination( anOther.m_destination ),
47  m_payload( anOther.m_payload )
48 {
49 }
FRAME_T m_destination
could have been a bitmap indicating multiple recipients.
Definition: kiway_express.h:77
std::string & m_payload
very often s-expression text, but not always.
Definition: kiway_express.h:78

Member Function Documentation

◆ Clone()

KIWAY_EXPRESS* KIWAY_EXPRESS::Clone ( ) const
inlineoverride

Definition at line 60 of file kiway_express.h.

60 { return new KIWAY_EXPRESS( *this ); }
KIWAY_EXPRESS(FRAME_T aDestination, MAIL_T aCommand, std::string &aPayload, wxWindow *aSource=nullptr)

References KIWAY_EXPRESS().

◆ Command()

MAIL_T KIWAY_EXPRESS::Command ( )
inline

Returns the MAIL_T associated with this mail.

Definition at line 49 of file kiway_express.h.

50  {
51  return (MAIL_T) GetId(); // re-purposed control id.
52  }
MAIL_T
The set of mail types sendable via KIWAY::ExpressMail() and supplied as the aCommand parameter to tha...
Definition: mail_type.h:37

Referenced by CVPCB_MAINFRAME::KiwayMailIn(), PCB_EDIT_FRAME::KiwayMailIn(), SCH_EDIT_FRAME::KiwayMailIn(), FOOTPRINT_EDIT_FRAME::KiwayMailIn(), and SYMBOL_EDIT_FRAME::KiwayMailIn().

◆ Dest()

FRAME_T KIWAY_EXPRESS::Dest ( )
inline

Return the destination player id of the message.

Definition at line 44 of file kiway_express.h.

44 { return m_destination; }
FRAME_T m_destination
could have been a bitmap indicating multiple recipients.
Definition: kiway_express.h:77

References m_destination.

Referenced by KIWAY::ProcessEvent().

◆ GetPayload()

std::string& KIWAY_EXPRESS::GetPayload ( )
inline

Return the payload, which can be any text but it typically self identifying s-expression.

Definition at line 57 of file kiway_express.h.

57 { return m_payload; }
std::string & m_payload
very often s-expression text, but not always.
Definition: kiway_express.h:78

References m_payload.

Referenced by CVPCB_MAINFRAME::KiwayMailIn(), PCB_EDIT_FRAME::KiwayMailIn(), SCH_EDIT_FRAME::KiwayMailIn(), FOOTPRINT_EDIT_FRAME::KiwayMailIn(), and SYMBOL_EDIT_FRAME::KiwayMailIn().

◆ SetPayload()

void KIWAY_EXPRESS::SetPayload ( const std::string &  aPayload)
inline

Definition at line 58 of file kiway_express.h.

58 { m_payload = aPayload; }
std::string & m_payload
very often s-expression text, but not always.
Definition: kiway_express.h:78

References m_payload.

Member Data Documentation

◆ m_destination

FRAME_T KIWAY_EXPRESS::m_destination
private

could have been a bitmap indicating multiple recipients.

Definition at line 77 of file kiway_express.h.

Referenced by Dest().

◆ m_payload

std::string& KIWAY_EXPRESS::m_payload
private

very often s-expression text, but not always.

Definition at line 78 of file kiway_express.h.

Referenced by GetPayload(), and SetPayload().

◆ wxEVENT_ID

const wxEventType KIWAY_EXPRESS::wxEVENT_ID = 30000
static

The wxEventType argument to wxEvent() and identifies an event class in a hurry.

These wxEventTypes also allow a common class to be used multiple ways. Should be allocated at startup by wxNewEventType();

Definition at line 72 of file kiway_express.h.


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