Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HammerSerial.hh
Go to the documentation of this file.
1 ///
2 /// @file HammerSerial.hh
3 /// @brief Serialization related typedefs and includes
4 ///
5 
6 //**** This file is a part of the HAMMER library
7 //**** Copyright (C) 2016 - 2020 The HAMMER Collaboration
8 //**** HAMMER is licensed under version 3 of the GPL; see COPYING for details
9 //**** Please note the MCnet academic guidelines; see GUIDELINES for details
10 
11 // -*- C++ -*-
12 #ifndef HAMMER_HammerSerial_HH
13 #define HAMMER_HammerSerial_HH
14 
15 #pragma clang diagnostic push
16 #pragma clang diagnostic ignored "-Wold-style-cast"
17 #pragma clang diagnostic ignored "-Wcovered-switch-default"
18 #pragma clang diagnostic ignored "-Wextra-semi"
19 #pragma clang diagnostic ignored "-Wsign-conversion"
20 #pragma clang diagnostic ignored "-Wdocumentation"
21 #pragma clang diagnostic ignored "-Wfloat-equal"
22 #pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
23 #pragma clang diagnostic ignored "-Wundef"
24 #pragma clang diagnostic ignored "-Wreserved-id-macro"
25 
26 #include "Hammer/Tools/HammerSerial_generated.h"
27 
28 #pragma clang diagnostic pop
29 
30 namespace Hammer {
31 
32  namespace Serial {
33 
35  public:
36 
37  DetachedBuffers() = default;
38  DetachedBuffers(const DetachedBuffers&) = delete;
39  DetachedBuffers& operator=(const DetachedBuffers&) = delete;
40  DetachedBuffers(DetachedBuffers&&) = default;
42  ~DetachedBuffers() = default;
43 
44  void add(flatbuffers::DetachedBuffer&& elem, char kind);
45 
46  size_t size() const;
47 
48  void clear();
49 
50  const flatbuffers::DetachedBuffer& buffer(size_t pos) const;
51  char bufferType(size_t pos) const;
52 
53  private:
54 
55  std::vector<flatbuffers::DetachedBuffer> _data;
56  std::vector<char> _types;
57 
58  };
59 
60  }
61 
62 }
63 
64 #endif
void add(flatbuffers::DetachedBuffer &&elem, char kind)
Definition: HammerSerial.cc:20
DetachedBuffers & operator=(const DetachedBuffers &)=delete
char bufferType(size_t pos) const
Definition: HammerSerial.cc:38
std::vector< flatbuffers::DetachedBuffer > _data
Definition: HammerSerial.hh:55
std::vector< char > _types
Definition: HammerSerial.hh:56
const flatbuffers::DetachedBuffer & buffer(size_t pos) const
Definition: HammerSerial.cc:34