CMS 3D CMS Logo

IOBuffer.h
Go to the documentation of this file.
1 #ifndef STORAGE_FACTORY_IO_BUFFER_H
2 #define STORAGE_FACTORY_IO_BUFFER_H
3 
5 
6 namespace edm::storage {
7 
9  class IOBuffer {
10  public:
11  IOBuffer();
12  IOBuffer(void *data, IOSize length);
13  IOBuffer(const void *data, IOSize length);
14 
15  void *data() const;
16  IOSize size() const;
17 
18  private:
19  void *m_data; //< Data
20  IOSize m_length; //< Length of data in bytes.
21  };
22 
24  inline IOBuffer::IOBuffer(void) : m_data(nullptr), m_length(0) {}
25 
27  inline IOBuffer::IOBuffer(void *data, IOSize length) : m_data(data), m_length(length) {}
28 
30  inline IOBuffer::IOBuffer(const void *data, IOSize length) : m_data(const_cast<void *>(data)), m_length(length) {}
31 
33  inline void *IOBuffer::data(void) const { return m_data; }
34 
36  inline IOSize IOBuffer::size(void) const { return m_length; }
37 } // namespace edm::storage
38 #endif // STORAGE_FACTORY_IO_BUFFER_H
TEMPL(T2) struct Divides void
Definition: Factorize.h:24
void * data() const
Definition: IOBuffer.h:33
IOSize size() const
Definition: IOBuffer.h:36
size_t IOSize
Definition: IOTypes.h:15
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79