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
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