add msg.ToString()
All checks were successful
Linux arm64 / Build (push) Successful in 15s

This commit is contained in:
2025-03-04 20:26:42 +01:00
parent 81c9dbadd6
commit 7f8d9e3f96
14 changed files with 105 additions and 40 deletions

View File

@@ -1,23 +0,0 @@
#pragma once
#include <ostream>
#include <sp/common/Reflection.h>
#include <sp/protocol/message/MessagePrinterImpl.h>
namespace sp {
/**
* \brief Prints a message in a human readable string
*/
template <typename TBase, typename... TOptions>
std::ostream& operator<<(std::ostream& a_Stream, const sp::MessageBase<TBase, TOptions...>& a_Message) {
a_Stream
<< sp::GetClassName(a_Message)
<< sp::details::IdPrinter<TOptions...>::PrintMessageId()
<< "["
<< sp::details::PrintFields(a_Message.GetFields())
<< "]";
return a_Stream;
}
} // namespace sp