|
LMMS
|
#include <ports.h>
Public Types | |
| typedef std::vector< Port >::const_iterator | itr_t |
Public Member Functions | |
| itr_t | begin () const |
| itr_t | end () const |
| size_t | size () const |
| const Port & | operator[] (unsigned i) const |
| const Port * | operator[] (const char *name) const |
| Ports (std::initializer_list< Port > l) | |
| Ports (const Ports &)=delete | |
| ~Ports (void) | |
| void | dispatch (const char *m, RtData &d, bool base_dispatch=false) const |
| const Port * | apropos (const char *path) const |
Static Public Member Functions | |
| static char * | collapsePath (char *p) |
Public Attributes | |
| std::vector< Port > | ports |
| std::function< void(msg_t, RtData &)> | default_handler |
Protected Member Functions | |
| void | refreshMagic (void) |
Private Attributes | |
| class Port_Matcher * | impl |
| unsigned | elms |
Ports - a dispatchable collection of Port entries
This structure makes it somewhat easier to perform actions on collections of port entries and it is responsible for the dispatching of OSC messages to their respective ports. That said, it is a very simple structure, which uses a stl container to store all data in a simple dispatch table. All methods post-initialization are RT safe (assuming callbacks are RT safe)
| typedef std::vector<Port>::const_iterator rtosc::Ports::itr_t |
| Ports::Ports | ( | std::initializer_list< Port > | l | ) |
|
delete |
| Ports::~Ports | ( | void | ) |
Find the best match for a given path
@parameter path partial OSC path
Example usage:
|
inline |
Forwards to builtin container
|
static |
Collapse path with parent path identifiers "/.."
e.g. /foo/bar/../baz => /foo/baz
| void Ports::dispatch | ( | const char * | m, |
| rtosc::RtData & | d, | ||
| bool | base_dispatch = false ) const |
Dispatches message to all matching ports. This uses simple pattern matching available in rtosc::match.
| m | A valid OSC message. Note that the address part shall not contain any type specifier. |
| d | The RtData object shall contain a path buffer (or null), the length of the buffer, a pointer to data. It must also contain the location if an answer is being expected. |
| base_dispatch | Whether the OSC path is to be interpreted as a full OSC path beginning at the root |
|
inline |
Forwards to builtin container
Retrieve local port by name TODO implement full matching
|
inline |
Forwards to builtin container
| std::function<void(msg_t, RtData&)> rtosc::Ports::default_handler |
|
private |
|
private |
| std::vector<Port> rtosc::Ports::ports |