summaryrefslogtreecommitdiffstats
path: root/src/event_to_string.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-05-08 20:16:54 -0400
committerDavid Robillard <d@drobilla.net>2021-05-08 20:16:54 -0400
commita280246c3043fc2ea1f50fa695539ac0bec44be1 (patch)
treeb1f223247ebe295c446c7732c00f879ea0f54d7f /src/event_to_string.cpp
parentd8e2cff7a55c71d8c364898b651423ffebfba5d3 (diff)
downloadpatchage-a280246c3043fc2ea1f50fa695539ac0bec44be1.tar.gz
patchage-a280246c3043fc2ea1f50fa695539ac0bec44be1.tar.bz2
patchage-a280246c3043fc2ea1f50fa695539ac0bec44be1.zip
Put events in a namespace and simplify their names
Diffstat (limited to 'src/event_to_string.cpp')
-rw-r--r--src/event_to_string.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/event_to_string.cpp b/src/event_to_string.cpp
index 43c4eb6..4b23875 100644
--- a/src/event_to_string.cpp
+++ b/src/event_to_string.cpp
@@ -56,22 +56,22 @@ struct EventPrinter {
PATCHAGE_UNREACHABLE();
}
- std::string operator()(const DriverAttachmentEvent& event)
+ std::string operator()(const event::DriverAttached& event)
{
return fmt::format("Attached to {}", (*this)(event.type));
}
- std::string operator()(const DriverDetachmentEvent& event)
+ std::string operator()(const event::DriverDetached& event)
{
return fmt::format("Detached from {}", (*this)(event.type));
}
- std::string operator()(const ClientCreationEvent& event)
+ std::string operator()(const event::ClientCreated& event)
{
return fmt::format(R"(Add client "{}" ("{}"))", event.id, event.info.label);
}
- std::string operator()(const ClientDestructionEvent& event)
+ std::string operator()(const event::ClientDestroyed& event)
{
return fmt::format(R"(Remove client "{}")", event.id);
}
@@ -108,7 +108,7 @@ struct EventPrinter {
PATCHAGE_UNREACHABLE();
}
- std::string operator()(const PortCreationEvent& event)
+ std::string operator()(const event::PortCreated& event)
{
auto result = fmt::format(R"(Add{} {} {} port "{}" ("{}"))",
event.info.is_terminal ? " terminal" : "",
@@ -124,17 +124,17 @@ struct EventPrinter {
return result;
}
- std::string operator()(const PortDestructionEvent& event)
+ std::string operator()(const event::PortDestroyed& event)
{
return fmt::format(R"("Remove port "{}")", event.id);
}
- std::string operator()(const ConnectionEvent& event)
+ std::string operator()(const event::PortsConnected& event)
{
return fmt::format(R"(Connect "{}" to "{}")", event.tail, event.head);
}
- std::string operator()(const DisconnectionEvent& event)
+ std::string operator()(const event::PortsDisconnected& event)
{
return fmt::format(R"(Disconnect "{}" from "{}")", event.tail, event.head);
}