Classdesc 3.44
pack_stream.h
1/*
2 @copyright Russell Standish 2000-2013
3 @author Russell Standish
4 This file is part of Classdesc
5
6 Open source licensed under the MIT license. See LICENSE for details.
7*/
8
9#ifndef CLASSDESC_PACK_STREAM_H
10#define CLASSDESC_PACK_STREAM_H
11#include "pack_base.h"
12
13namespace classdesc
14{
15 template <class T>
16 pack_t& operator<<(pack_t& y,const T&x)
17 {::pack(y,string(),x); return y;}
18
19 template <class T>
20 pack_t& operator>>(pack_t& y,T&x)
21 {::unpack(y,string(),x); return y;}
22
23}
24
25#ifdef CLASSDESCMP_H
26namespace classdesc {
27 template <class T> inline MPIbuf& MPIbuf::operator<<(const T&x)
28 {::pack((MPIbuf_base&)*this,string(),const_cast<T&>(x)); return *this;}
29}
30
31#endif
32#endif
buffer object providing MPI functionality
Definition classdescMP.h:76
Definition pack_base.h:138
Contains definitions related to classdesc functionality.
void pack(pack_t &targ, const string &desc, is_treenode dum, const T *const &arg)
serialise a tree (or DAG)
Definition pack_graph.h:28
void unpack(unpack_t &targ, const string &desc, is_treenode dum, T *&arg)
unserialise a tree.
Definition pack_graph.h:44
serialisation descriptor