Abstract interface for making textual/string representation of a message. More...
#include <message_stringifier.h>
Public Member Functions | |
virtual std::string | stringify (const message_base_t &) const |
returns string representation of a message | |
virtual void | stringify_to (std::ostream &, const message_base_t &) const =0 |
dumps string representation of a message to output stream | |
Abstract interface for making textual/string representation of a message.
As the concrete/final message type might not be known at compile time the message stringifier tries to do it's best by guessing final message type. (In other words, because the double dispatch visitor pattern is not available).
That means that the message stringifier potentially has LOW PERFORMANCE and should NOT be used, for example, for logging every message at least in production code.
|
pure virtual |
dumps string representation of a message to output stream
Implemented in rotor::misc::default_stringifier_t.