#include <Message.hpp>
Definition at line 38 of file Message.hpp.
System filtering bits
Enumerator |
---|
Subsystem |
|
SharedScene |
|
Scene |
|
Object |
|
Component |
|
Global |
|
Definition at line 48 of file Message.hpp.
Message result
Enumerator |
---|
Continue |
Continue to process the message.
|
Escape |
Return from sendMessage.
|
Definition at line 60 of file Message.hpp.
jop::Message::Message |
( |
const std::string & |
message | ) |
|
Constructor.
- Parameters
-
message | The message. May include just a filter or be empty, in which case you must push the command & arguments separately |
const std::string& jop::Message::getString |
( |
| ) |
const |
Get a string with the command and arguments.
- Returns
- A new string with the internal buffer's contents
jop::Message::operator bool |
( |
| ) |
const |
Check the internal command/argument buffer.
- Returns
- True if the buffer has at least a command
bool jop::Message::passFilter |
( |
const unsigned short |
filter | ) |
const |
Check if the given bit field should pass the filter.
- Parameters
-
filter | The bits to check. Only one match is required for a pass |
- Returns
- True if the filter was passed
bool jop::Message::passFilter |
( |
const std::string & |
id | ) |
const |
Check if the given id should pass the filter.
- Parameters
-
- Returns
- True if the filter was passed
bool jop::Message::passFilter |
( |
const std::unordered_set< std::string > & |
tags | ) |
const |
Check if the given tags should pass the filter.
- Parameters
-
- Returns
- True if the filter was passed
template<typename T >
Message& jop::Message::push |
( |
const T & |
arg | ) |
|
Push an argument value.
- Parameters
-
- Returns
- Reference to self
Message& jop::Message::push |
( |
const std::string & |
str | ) |
|
Push a string argument.
This can be used to push the command, if the message passed to the constructor didn't have it.
- Parameters
-
- Returns
- Reference to self
Message& jop::Message::push |
( |
const char * |
str | ) |
|
Push a string argument.
This can be used to push the command, if the message passed to the constructor didn't have it.
- Parameters
-
- Returns
- Reference to self
Message& jop::Message::pushPointer |
( |
const void * |
ptrArg | ) |
|
Push a pointer argument.
The pointer will be converted into a hex string and then interpreted by the command handler to recreate the pointer.
- Parameters
-
ptrArg | The pointer to push |
- Returns
- Reference to self
template<typename T >
Message& jop::Message::pushReference |
( |
const T & |
ref | ) |
|
Push a reference argument.
Essentially does the same as pushPointer().
- Parameters
-
- Returns
- Reference to self
Message& jop::Message::setFilter |
( |
const std::string & |
filter | ) |
|
Set the filter.
- Parameters
-
filter | A filter field in the correct form |
- Returns
- Reference to self
The documentation for this class was generated from the following file: