KiCad PCB EDA Suite
KIWAY_EXPRESS Class Reference

Class KIWAY_EXPRESS carries 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 ()
 Function Dest returns the destination player id of the message. More...
 
MAIL_T Command ()
 Function Command returns the MAIL_T associated with this mail. More...
 
const std::string & GetPayload ()
 Function Payload returns the payload, which can be any text but it typicall self identifying s-expression. More...
 
void SetPayload (const std::string &aPayload)
 
KIWAY_EXPRESSClone () const override
 
 KIWAY_EXPRESS (FRAME_T aDestination, MAIL_T aCommand, const std::string &aPayload, wxWindow *aSource=NULL)
 
 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

Class KIWAY_EXPRESS carries a payload from one KIWAY_PLAYER to another within a PROJECT.

Definition at line 39 of file kiway_express.h.

Constructor & Destructor Documentation

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

Definition at line 52 of file kiway_express.cpp.

Referenced by Clone().

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

Definition at line 44 of file kiway_express.cpp.

References m_destination, and m_payload.

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

Member Function Documentation

KIWAY_EXPRESS* KIWAY_EXPRESS::Clone ( ) const
inlineoverride

Definition at line 65 of file kiway_express.h.

References KIWAY_EXPRESS().

65 { return new KIWAY_EXPRESS( *this ); }
KIWAY_EXPRESS(FRAME_T aDestination, MAIL_T aCommand, const std::string &aPayload, wxWindow *aSource=NULL)
MAIL_T KIWAY_EXPRESS::Command ( )
inline

Function Command returns the MAIL_T associated with this mail.

Definition at line 52 of file kiway_express.h.

Referenced by KIWAY_PLAYER::kiway_express(), CVPCB_MAINFRAME::KiwayMailIn(), PCB_EDIT_FRAME::KiwayMailIn(), and SCH_EDIT_FRAME::KiwayMailIn().

53  {
54  return (MAIL_T) GetId(); // re-purposed control id.
55  }
MAIL_T
Enum MAIL_T is the set of mail types sendable via KIWAY::ExpressMail() and supplied as the aCommand p...
Definition: mail_type.h:37
FRAME_T KIWAY_EXPRESS::Dest ( )
inline

Function Dest returns the destination player id of the message.

Definition at line 46 of file kiway_express.h.

References m_destination.

Referenced by KIWAY::ProcessEvent().

46 { return m_destination; }
FRAME_T m_destination
could have been a bitmap indicating multiple recipients
Definition: kiway_express.h:84
const std::string& KIWAY_EXPRESS::GetPayload ( )
inline

Function Payload returns the payload, which can be any text but it typicall self identifying s-expression.

Definition at line 62 of file kiway_express.h.

References m_payload.

Referenced by KIWAY_PLAYER::kiway_express(), CVPCB_MAINFRAME::KiwayMailIn(), PCB_EDIT_FRAME::KiwayMailIn(), and SCH_EDIT_FRAME::KiwayMailIn().

62 { return m_payload; }
std::string m_payload
very often s-expression text, but not always
Definition: kiway_express.h:85
void KIWAY_EXPRESS::SetPayload ( const std::string &  aPayload)
inline

Definition at line 63 of file kiway_express.h.

References m_payload.

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

Member Data Documentation

FRAME_T KIWAY_EXPRESS::m_destination
private

could have been a bitmap indicating multiple recipients

Definition at line 84 of file kiway_express.h.

Referenced by Dest(), and KIWAY_EXPRESS().

std::string KIWAY_EXPRESS::m_payload
private

very often s-expression text, but not always

Definition at line 85 of file kiway_express.h.

Referenced by GetPayload(), KIWAY_EXPRESS(), and SetPayload().

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 79 of file kiway_express.h.


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