#include <message.h>
|
enum | Type : message_t {
NONE
, PING
, MOVE_PICK_UP
, OPEN
,
CLOSE
, LOCK
, UNLOCK
, TOGGLE
,
KILL
, TRIGGER
, START
, STOP
,
ACTIVATE
, ACTIVATE_ONCE
, SELECT
, SET_PROGRESS
,
SET_ANIMATION
, LAST_MESSAGE
} |
|
◆ Type
Enumerator |
---|
NONE | |
PING | |
MOVE_PICK_UP | |
OPEN | |
CLOSE | |
LOCK | |
UNLOCK | |
TOGGLE | |
KILL | |
TRIGGER | |
START | |
STOP | |
ACTIVATE | |
ACTIVATE_ONCE | |
SELECT | |
SET_PROGRESS | |
SET_ANIMATION | |
LAST_MESSAGE | |
◆ AllocateData() [1/3]
template<typename T >
static T * tram::Message::AllocateData |
( |
| ) |
|
|
inlinestatic |
◆ AllocateData() [2/3]
template<typename T >
static T * tram::Message::AllocateData |
( |
const T & |
data | ) |
|
|
inlinestatic |
◆ AllocateData() [3/3]
void * tram::Message::AllocateData |
( |
size_t |
ammount | ) |
|
|
static |
Allocates space for message data.
This allocation is useful for storing the additional data (Message::data pointer), for messages, since all allocated space will be cleared once all messages have been dispatched. This only applies to messages that are sent without a time delay, if you're sending messages with a delay, then you'll need to allocate memory for their data yourself.
- Note
- Remember to only use POD data types.
◆ Dispatch()
void tram::Message::Dispatch |
( |
| ) |
|
|
static |
Dispatches sent messsages.
Dispatches the messages that have been sent using the Message::Send() function.
◆ GetLast()
◆ GetName()
Gets a nessage type name.
◆ GetType()
Finds a message type from a name.
◆ Register()
message_t tram::Message::Register |
( |
const char * |
name | ) |
|
|
static |
Registers a new message type.
- Returns
- Unique message type number.
◆ Send() [1/2]
void tram::Message::Send |
( |
const Message & |
message | ) |
|
|
static |
◆ Send() [2/2]
void tram::Message::Send |
( |
const Message & |
message, |
|
|
float |
delay |
|
) |
| |
|
static |
Semds a message into the future.
Same as Message::Send(), but the actual sending will be delayed until specified ammount of ticks have passed.
- Parameters
-
message | Message to be sent. |
when | How many ticks need to pass until the message will be sent out, i.e. if you want to send a message out in 1 secons, set this parameter to 60. |
◆ SetInterceptCallback()
void tram::Message::SetInterceptCallback |
( |
void(const Message &) |
| ) |
|
|
static |
union { ... } tram::Message::@28 |
◆ data
void* tram::Message::data = nullptr |
◆ data_int
int64_t tram::Message::data_int |
◆ data_value
Value* tram::Message::data_value |
◆ receiver
id_t tram::Message::receiver |
◆ sender
id_t tram::Message::sender |
◆ type
The documentation for this struct was generated from the following files:
- C:/Users/Poga/Desktop/painis/tram-sdk/src/framework/message.h
- C:/Users/Poga/Desktop/painis/tram-sdk/src/framework/message.cpp