// with header
inline operator string() const { return buf_.substr(0,index_); }
// without header
- inline string content() { return buf_.substr(RPC_HEADER_SZ,index_-RPC_HEADER_SZ); }
+ inline string content() const { return buf_.substr(RPC_HEADER_SZ,index_-RPC_HEADER_SZ); }
// letting S be a defaulted template parameter forces the compiler to
// delay looking up operator<<(marshall&, rpc_sz_t) until we define it
return u;
}
+//
+// Recursive marshalling
+//
+
+inline marshall & operator<<(marshall &m, marshall &n) {
+ return m << n.content();
+}
+
+inline unmarshall & operator>>(unmarshall &u, unmarshall &v) {
+ v = unmarshall(u._grab<string>(), false);
+ return u;
+}
+
#endif