Real Time Open Sound Control librtosc
default-value.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Johannes Lorenz
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice (including the next
12  * paragraph) shall be included in all copies or substantial portions of the
13  * Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 
32 #ifndef RTOSC_DEFAULT_VALUE
33 #define RTOSC_DEFAULT_VALUE
34 
35 #include <cstdint>
36 #include <rtosc/rtosc.h>
37 
38 namespace rtosc {
39 
49 const char* get_default_value(const char* port_name, const struct Ports& ports,
50  void* runtime,
51  const struct Port* port_hint = nullptr,
52  int32_t idx = -1, int recursive = 1);
53 
79 int get_default_value(const char* port_name, const char *port_args,
80  const struct Ports& ports,
81  void* runtime, const struct Port* port_hint,
82  int32_t idx,
83  std::size_t n, rtosc_arg_val_t* res,
84  char *strbuf, size_t strbufsize);
85 
86 }
87 
88 #endif // RTOSC_DEFAULT_VALUE
const char * get_default_value(const char *port_name, const struct Ports &ports, void *runtime, const struct Port *port_hint=nullptr, int32_t idx=-1, int recursive=1)
Return a port's default value.
Definition: rtosc.h:86
Functions handling messages and arguments.