SST  6.0.0
StructuralSimulationToolkit
serialize_packer.h
1 // Copyright 2009-2016 Sandia Corporation. Under the terms
2 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2016, Sandia Corporation
6 // All rights reserved.
7 //
8 // This file is part of the SST software package. For license
9 // information, see the LICENSE file in the top level directory of the
10 // distribution.
11 
12 #ifndef SERIALIZE_PACKER_H
13 #define SERIALIZE_PACKER_H
14 
15 #include <sst/core/serialization/serialize_buffer_accessor.h>
16 #include <string>
17 
18 namespace SST {
19 namespace Core {
20 namespace Serialization {
21 namespace pvt {
22 
23 class ser_packer :
24  public ser_buffer_accessor
25 {
26  public:
27  template <class T>
28  void
29  pack(T& t){
30  T* buf = ser_buffer_accessor::next<T>();
31  *buf = t;
32  }
33 
34  void
35  pack_buffer(void* buf, int size);
36 
37  void
38  pack_string(std::string& str);
39 
40 };
41 
42 } }
43 }
44 }
45 
46 #endif // SERIALIZE_PACKER_H
Definition: action.cc:17
Definition: serialize_packer.h:23
Definition: serialize_buffer_accessor.h:34