Message

struct used to hold an OSC message that will be written or read.

The list of arguments is exposed as a sort of queue. You "pop" arguments from the front of the queue when reading, you push arguments at the back of the queue when writing.

Many functions return *this, so they can be chained: init("/foo").pushInt32(2).pushStr("kllk")...

Example of use:

creation of a message: @code msg.init("/foo").pushInt32(4).pushStr("bar"); @endcode reading a message, with error detection: @code if (msg.match("/foo/b*ar/plop")) { int i; std::string s; std::vector<char> b; if (msg.arg().popInt32(i).popStr(s).popBlob(b).isOkNoMoreArgs()) { process message...; } else arguments mismatch; } @endcode

Constructors

this
this(string address, TimeTag timeTag)
Undocumented in source.

Members

Classes

ArgReader
class ArgReader

ArgReader is used for popping arguments from a Message, holds a pointer to the original Message, and maintains a local error code

Functions

clear
void clear()

reset the message to a clean state

getError
ErrorCode getError()
Undocumented in source. Be warned that the author may not have intended to support it.
init
void init(string address, TimeTag timeTag)

clear the message and start a new message with the supplied address and timeTag.

isOk
bool isOk()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

address
string address;
Undocumented in source.
error
ErrorCode error;
Undocumented in source.
storage
ArgumentStorage storage;
Undocumented in source.
timeTag
TimeTag timeTag;
Undocumented in source.
typeTags
string typeTags;
Undocumented in source.

Meta