Real Time Open Sound Control librtosc
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
Public Member Functions | Public Attributes | List of all members
rtosc::Ports Struct Reference

#include <ports.h>

Public Member Functions

auto begin () const -> decltype(ports.begin())
 
auto end () const -> decltype(ports.end())
 
const Portoperator[] (unsigned i) const
 
 Ports (std::initializer_list< Port > l)
 
 Ports (const Ports &)=delete
 
void dispatch (char *loc, size_t loc_size, msg_t m, void *v)
 
const Portoperator[] (const char *name) const
 
msg_t snip (msg_t m) const
 
const Portapropos (const char *path) const
 

Public Attributes

std::vector< Portports
 

Detailed Description

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)

Constructor & Destructor Documentation

rtosc::Ports::Ports ( std::initializer_list< Port l)
inline
rtosc::Ports::Ports ( const Ports )
delete

Member Function Documentation

const Port* rtosc::Ports::apropos ( const char *  path) const
inline

Find the best match for a given path or NULL

auto rtosc::Ports::begin ( ) const -> decltype(ports.begin())
inline

Forwards to builtin container

void rtosc::Ports::dispatch ( char *  loc,
size_t  loc_size,
msg_t  m,
void *  v 
)
inline

Dispatches message to all matching ports. This uses simple pattern matching available in rtosc::match.

Parameters
locA buffer for storing path information or NULL
loc_sizeThe length of the provided buffer
ma valid OSC message
va pointer to data or NULL
auto rtosc::Ports::end ( ) const -> decltype(ports.end())
inline

Forwards to builtin container

const Port& rtosc::Ports::operator[] ( unsigned  i) const
inline

Forwards to builtin container

const Port* rtosc::Ports::operator[] ( const char *  name) const
inline

Retrieve local port by name TODO implement full matching

msg_t rtosc::Ports::snip ( msg_t  m) const
inline

Member Data Documentation

std::vector<Port> rtosc::Ports::ports

The documentation for this struct was generated from the following file: