61 const struct Ports* ports;
83 bool operator()(
const char* msg) {
return do_dispatch(msg); }
85 static int default_response(
size_t nargs,
bool first_round,
91 virtual int on_dispatch(
size_t portname_max,
char* portname,
92 size_t maxargs,
size_t nargs,
96 virtual bool do_dispatch(
const char* msg);
99 const struct Ports& ports,
104 const struct Ports& ports,
void* runtime,
123 const struct Ports& ports,
void* runtime,
138 std::string file_str =
"");
153 const struct Ports& ports,
void* runtime,
Class to modify and dispatch messages loaded from savefiles.
Definition savefile.h:60
friend int dispatch_printed_messages(const char *messages, const struct Ports &ports, void *runtime, savefile_dispatcher_t *dispatcher)
Scan OSC messages from human readable format and dispatch them.
proceed
Definition savefile.h:66
@ abort
the message shall lead to abort the savefile loading
Definition savefile.h:67
@ discard
the message shall not be dispatched
Definition savefile.h:68
rtosc_version app_filever
app version savefile was written with
Definition savefile.h:79
rtosc_version app_curver
current app version
Definition savefile.h:80
rtosc_version rtosc_filever
rtosc versinon savefile was written with
Definition savefile.h:77
dependency_t
Definition savefile.h:71
@ not_specified
default values do depend on others
Definition savefile.h:74
@ has_dependencies
default values don't depend on others
Definition savefile.h:73
bool operator()(const char *msg)
call this to dispatch a message
Definition savefile.h:83
rtosc_version rtosc_curver
rtosc version of this library
Definition savefile.h:78
friend int load_from_file(const char *file_content, const struct Ports &ports, void *runtime, const char *appname, rtosc_version appver, savefile_dispatcher_t *dispatcher)
Read save file and dispatch contained parameters.
Definition of rtosc's version struct.
Functions handling messages and arguments.
std::string get_changed_values(const struct Ports &ports, void *runtime)
Return a string list of all changed values.
std::string save_to_file(const struct Ports &ports, void *runtime, const char *appname, rtosc_version appver, std::string file_str="")
Return a savefile containing all values that differ from the default values.
int dispatch_printed_messages(const char *messages, const struct Ports &ports, void *runtime, savefile_dispatcher_t *dispatcher=NULL)
Scan OSC messages from human readable format and dispatch them.
int load_from_file(const char *file_content, const struct Ports &ports, void *runtime, const char *appname, rtosc_version appver, savefile_dispatcher_t *dispatcher=NULL)
Read save file and dispatch contained parameters.
Ports - a dispatchable collection of Port entries.
Definition ports.h:159
struct containing an rtosc version
Definition rtosc-version.h:42