mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-18 12:19:06 -04:00
Implement ostream operator<< for RsSerializable
So it is not necessary to define it for each class we want to print in debug
This commit is contained in:
parent
e449ffba04
commit
f84824271f
4 changed files with 39 additions and 2 deletions
libretroshare/src/serialiser
|
@ -20,8 +20,11 @@
|
|||
* *
|
||||
*******************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "serialiser/rsserializer.h"
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
|
||||
/** @brief Minimal ancestor for all serializable structs in RetroShare.
|
||||
* If you want your struct to be easly serializable you should inherit from this
|
||||
|
@ -49,3 +52,5 @@ struct RsSerializable
|
|||
#define RS_SERIAL_PROCESS(I) do { \
|
||||
RsTypeSerializer::serial_process(j, ctx, I, #I ); \
|
||||
} while(0)
|
||||
|
||||
std::ostream &operator<<(std::ostream& out, const RsSerializable& serializable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue