|
| PL_DECLARE_MESSAGE_TYPE (plEventMessage, plMessage) |
|
PL_ALWAYS_INLINE void | FillFromSenderComponent (const plComponent *pSenderComponent) |
|
virtual plInt32 | GetSortingKey () const |
| Derived message types can override this method to influence sorting order. Smaller keys are processed first.
|
|
PL_ALWAYS_INLINE plMessageId | GetId () const |
| Returns the id for this message type.
|
|
PL_ALWAYS_INLINE plUInt16 | GetSize () const |
| Returns the size in byte of this message.
|
|
PL_ALWAYS_INLINE plUInt64 | GetHash () const |
| Calculates a hash of the message.
|
|
virtual void | Serialize (plStreamWriter &inout_stream) const |
| Implement this for efficient transmission across process boundaries (e.g. network transfer etc.)
|
|
virtual void | Deserialize (plStreamReader &inout_stream, plUInt8 uiTypeVersion) |
|
virtual const plRTTI * | GetDynamicRTTI () const |
|
bool | IsInstanceOf (const plRTTI *pType) const |
| Returns whether the type of this instance is of the given type or derived from it.
|
|
template<typename T > |
PL_ALWAYS_INLINE bool | IsInstanceOf () const |
| Returns whether the type of this instance is of the given type or derived from it.
|
|
static void | PackageForTransfer (const plMessage &msg, plStreamWriter &inout_stream) |
| Writes msg to stream in such a way that ReplicatePackedMessage() can restore it even in another process.
|
|
static plUniquePtr< plMessage > | ReplicatePackedMessage (plStreamReader &inout_stream) |
| Restores a message that was written by PackageForTransfer()
|
|
static const plRTTI * | GetStaticRTTI () |
|
plGameObjectHandle | m_hSenderObject |
|
plComponentHandle | m_hSenderComponent |
|
| plMessage (size_t messageSize) |
|
static PL_ALWAYS_INLINE plMessageId | GetNextMsgId () |
|
plMessageId | m_Id |
|
plUInt16 | m_uiSize |
|
static plMessageId | s_NextMsgId = 0 |
|
This event is posted by plPowerConnectorComponent whenever the power input on a connector changes.
When a connector gets input through it's connection to another connector, this message is sent. This can then be used by scripts on parent nodes to switch other functionality on or off. Both the previous and new value are sent, so that the difference can be calculated. This is useful in case a script has multiple connectors and needs to keep track of the total amount of power available.