mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-13 20:09:59 +02:00
Use the new approach for creating plugin factory
Directly serializing and deserializing into objects was and more boilerplate heavy (since we now need two implementations even though we only use one), and also much less flexible because we can't wrap payloads in structs or provide optional values that way.
This commit is contained in:
+14
-15
@@ -45,18 +45,18 @@ void Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPluginFactory::Construct&) {
|
||||
log_request_base(is_host_vst,
|
||||
[](auto& message) { message << "GetPluginFactory()"; });
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst, const WantsConfiguration&) {
|
||||
log_request_base(is_host_vst, [](auto& message) {
|
||||
message << "Requesting <Configuration>";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst, const WantsPluginFactory&) {
|
||||
log_request_base(is_host_vst, [](auto& message) {
|
||||
message << "Requesting <IPluginFactory*>";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(bool is_host_vst, const Ack&) {
|
||||
log_response_base(is_host_vst, [&](auto& message) { message << "ACK"; });
|
||||
}
|
||||
@@ -76,16 +76,15 @@ void Vst3Logger::log_response(
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(bool is_host_vst,
|
||||
const YaPluginFactory::ConstructArgs& args) {
|
||||
log_response_base(is_host_vst, [&](auto& message) {
|
||||
message << "<IPluginFactory*> with " << args.num_classes
|
||||
<< " registered classes";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(bool is_host_vst, const Configuration&) {
|
||||
log_response_base(is_host_vst,
|
||||
[](auto& message) { message << "<Configuration"; });
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(bool is_host_vst,
|
||||
const YaPluginFactory& factory) {
|
||||
log_response_base(is_host_vst, [&](auto& message) {
|
||||
message << "<IPluginFactory*> with "
|
||||
<< const_cast<YaPluginFactory&>(factory).countClasses()
|
||||
<< " registered classes";
|
||||
});
|
||||
}
|
||||
|
||||
@@ -50,15 +50,15 @@ class Vst3Logger {
|
||||
void log_request(bool is_host_vst, const YaComponent::Construct&);
|
||||
void log_request(bool is_host_vst, const YaComponent::Destruct&);
|
||||
void log_request(bool is_host_vst, const YaComponent::Terminate&);
|
||||
void log_request(bool is_host_vst, const YaPluginFactory::Construct&);
|
||||
void log_request(bool is_host_vst, const WantsConfiguration&);
|
||||
void log_request(bool is_host_vst, const WantsPluginFactory&);
|
||||
|
||||
void log_response(bool is_host_vst, const Ack&);
|
||||
void log_response(
|
||||
bool is_host_vst,
|
||||
const std::variant<YaComponent::ConstructArgs, UniversalTResult>&);
|
||||
void log_response(bool is_host_vst, const YaPluginFactory::ConstructArgs&);
|
||||
void log_response(bool is_host_vst, const Configuration&);
|
||||
void log_response(bool is_host_vst, const YaPluginFactory&);
|
||||
|
||||
Logger& logger;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user