libmapper 2.4.12
|
#include <mapper_cpp.h>
Data Structures | |
class | Instance |
Public Types | |
enum class | Event { } |
enum class | InstanceStatus { NEW = MPR_STATUS_NEW , STAGED = MPR_STATUS_STAGED , ACTIVE = MPR_STATUS_ACTIVE , HAS_VALUE = MPR_STATUS_HAS_VALUE , NEW_VALUE = MPR_STATUS_NEW_VALUE , UPDATE_LOC = MPR_STATUS_UPDATE_LOC , UPDATE_REM = MPR_STATUS_UPDATE_REM , REL_UPSTRM = MPR_STATUS_REL_UPSTRM , REL_DNSTRM = MPR_STATUS_REL_DNSTRM , INST_OFLW = MPR_STATUS_OVERFLOW , ANY = MPR_STATUS_ANY } |
enum class | Stealing { NONE = MPR_STEAL_NONE , OLDEST = MPR_STEAL_OLDEST , NEWEST = MPR_STEAL_NEWEST } |
![]() | |
enum class | Status { UNDEFINED = MPR_STATUS_UNDEFINED , EXPIRED = MPR_STATUS_EXPIRED , NEW = MPR_STATUS_NEW , MODIFIED = MPR_STATUS_MODIFIED , STAGED = MPR_STATUS_STAGED , ACTIVE = MPR_STATUS_ACTIVE , REMOVED = MPR_STATUS_REMOVED , HAS_VALUE = MPR_STATUS_HAS_VALUE , NEW_VALUE = MPR_STATUS_NEW_VALUE , UPDATE_LOC = MPR_STATUS_UPDATE_LOC , UPDATE_REM = MPR_STATUS_UPDATE_REM , REL_UPSTRM = MPR_STATUS_REL_UPSTRM , REL_DNSTRM = MPR_STATUS_REL_DNSTRM , INST_OFLW = MPR_STATUS_OVERFLOW , ANY = MPR_STATUS_ANY } |
Public Member Functions | |
Device | device () const |
List< Map > | maps (Direction dir=Direction::ANY) const |
template<typename... Values> | |
Signal & | set_value (Values... vals) |
template<typename H > | |
Signal & | set_callback (H &h, Signal::Event events=Signal::Event::UPDATE) |
Signal & | remove_callback () |
Instance | instance () |
Instance | instance (Id id) |
Signal & | reserve_instances (int num) |
Signal & | reserve_instances (int num, mpr_id *ids) |
Signal & | reserve_instances (int num, Id *ids, void **data) |
Signal & | reserve_instance () |
Signal & | reserve_instance (mpr_id id) |
Signal & | reserve_instance (mpr_id id, void *data) |
Instance | instance (int idx, InstanceStatus status=InstanceStatus::ANY) const |
Signal & | remove_instance (Instance instance) |
Instance | oldest_instance () |
Instance | newest_instance () |
int | num_instances (Status status=Status::ACTIVE) const |
const Signal & | push () const |
![]() | |
operator bool () const | |
Type | type () const |
Graph | graph () const |
int | get_status () const |
Object & | reset_status () |
template<typename... Values> | |
Object & | set_property (const Values... vals) |
template<typename... Values> | |
Object & | set_local_property (const Values... vals) |
virtual Object & | remove_property (Property prop) |
virtual Object & | remove_property (const str_type &key) |
int | num_props (bool staged=false) const |
PropVal | property (const str_type &key=NULL) const |
PropVal | property (Property prop) const |
PropVal | property (int idx) const |
Signals define inputs or outputs for Devices. A Signal consists of a scalar or vector value of some integer or floating-point type. A Signal is created by adding an input or output to a Device. It can optionally be provided with some metadata such as a range, unit, or other properties. Signals can be mapped by creating Maps using remote requests on the network, usually generated by a standalone GUI.
|
strong |
|
strong |
The set of possible voice-stealing modes for instances.
Enumerator | |
---|---|
NEW | Instance is new since last check. |
STAGED | Instance is reserved but not active. |
ACTIVE | Instance is active. |
HAS_VALUE | Instance has a value. |
NEW_VALUE | Value has changed since last check. |
UPDATE_LOC | Value was set locally since last check. |
UPDATE_REM | Value was set remotely since last check. |
REL_UPSTRM | Released upstream since last check. |
REL_DNSTRM | Released downstream since last check. |
INST_OFLW | No local instances left. |
|
strong |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Push "staged" property changes out to the distributed graph.
Reimplemented from mapper::Object.
|
inline |
|
inline |
|
inline |
Reserve a number of Instances.
num | The number of Instances to reserve. |
|
inline |
Reserve a number of Instances with provided ids and user_data
.
num | The number of Instances to reserve. |
ids | An array of num ids to associate with the reserved Instances. Must be NULL or have size num. |
data | An array of num data pointers to associate with the reserved Instances. Must be NULL or have size num. |
|
inline |
Reserve a number of Instances with provided ids.
num | The number of Instances to reserve. |
ids | An array of ids to associate with the reserved Instances. Must be NULL or have size num. |
|
inline |
Add an Event Callback to a signal.
h | Callback function to call on Signal Events. Function signature can be any of the following:
|
events | Types of Events to listen for. |