Redesign how interface instantiation works

Transferring some argument pack is much easier than trying to
deserialize into an existing object when you also have to transfer more
information than just that object.
This commit is contained in:
Robbert van der Helm
2020-12-08 17:33:51 +01:00
parent f4a5aa91fb
commit 5eb1fe2de2
7 changed files with 100 additions and 42 deletions
+11 -5
View File
@@ -56,20 +56,26 @@ void Vst3Logger::log_request(bool is_host_vst, const WantsPluginFactory&) {
}
}
void Vst3Logger::log_response(bool is_host_vst, const Configuration&) {
void Vst3Logger::log_response(
bool is_host_vst,
const std::optional<YaComponent::Arguments>& args) {
if (BOOST_UNLIKELY(logger.verbosity >= Logger::Verbosity::most_events)) {
std::ostringstream message;
message << get_log_prefix(is_host_vst) << " <Configuration>";
if (args) {
message << get_log_prefix(is_host_vst) << " <IComponent* #"
<< args->instance_id << ">";
} else {
message << get_log_prefix(is_host_vst) << " <nullptr>";
}
log(message.str());
}
}
void Vst3Logger::log_response(bool is_host_vst, const YaComponent&) {
void Vst3Logger::log_response(bool is_host_vst, const Configuration&) {
if (BOOST_UNLIKELY(logger.verbosity >= Logger::Verbosity::most_events)) {
std::ostringstream message;
// TODO: Add the instance ID after we implement that
message << get_log_prefix(is_host_vst) << " <IComponent*>";
message << get_log_prefix(is_host_vst) << " <Configuration>";
log(message.str());
}