RMF
BufferHandle.h
Go to the documentation of this file.
1 /**
2  * \file RMF/BufferHandle.h
3  * \brief Declare RMF::BufferHandle.
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef RMF_BUFFER_HANDLE_H
10 #define RMF_BUFFER_HANDLE_H
11 
12 #include "RMF/config.h"
13 #include "infrastructure_macros.h"
14 #include "exceptions.h"
15 #include "BufferConstHandle.h"
16 #include <limits>
17 
18 RMF_ENABLE_WARNINGS
19 
20 namespace RMF {
21 //! Manage a shared buffer for storing a RMF
23  public:
24  //! Empty buffer
25  BufferHandle() : BufferConstHandle(std::vector<char>()) {}
26 #if !defined(IMP_DOXYGEN)
27  // for pickling
28  BufferHandle(const std::vector<char> &st) : BufferConstHandle(st) {}
29 #endif
30 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
31  std::vector<char> &access_buffer() const { return *data_; }
32 #endif
33 };
34 
35 } /* namespace RMF */
36 
37 RMF_DISABLE_WARNINGS
38 
39 #endif /* RMF_BUFFER_HANDLE_H */
BufferHandle()
Empty buffer.
Definition: BufferHandle.h:25
Manage a shared buffer for loading a RMF.
Declarations of the various exception types.
Declare RMF::BufferConstHandle.
Manage a shared buffer for storing a RMF.
Definition: BufferHandle.h:22
Various general useful macros for IMP.