You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#pragma once
|
|
|
|
#include <sstream>
|
|
#include <string>
|
|
|
|
class RpcSerializer {
|
|
public:
|
|
template<typename T>
|
|
static void write(std::ostringstream& out, const T& v) {
|
|
out << v << ' ';
|
|
}
|
|
|
|
template<typename T>
|
|
static T read(std::istringstream& in) {
|
|
T v;
|
|
in >> v;
|
|
return v;
|
|
}
|
|
};
|
|
|
|
|