File indexing completed on 2024-04-06 12:31:51
0001 #ifndef STORAGE_FACTORY_IO_BUFFER_H
0002 #define STORAGE_FACTORY_IO_BUFFER_H
0003
0004 #include "Utilities/StorageFactory/interface/IOTypes.h"
0005
0006 namespace edm::storage {
0007
0008
0009 class IOBuffer {
0010 public:
0011 IOBuffer();
0012 IOBuffer(void *data, IOSize length);
0013 IOBuffer(const void *data, IOSize length);
0014
0015 void *data() const;
0016 IOSize size() const;
0017
0018 private:
0019 void *m_data;
0020 IOSize m_length;
0021 };
0022
0023
0024 inline IOBuffer::IOBuffer(void) : m_data(nullptr), m_length(0) {}
0025
0026
0027 inline IOBuffer::IOBuffer(void *data, IOSize length) : m_data(data), m_length(length) {}
0028
0029
0030 inline IOBuffer::IOBuffer(const void *data, IOSize length) : m_data(const_cast<void *>(data)), m_length(length) {}
0031
0032
0033 inline void *IOBuffer::data(void) const { return m_data; }
0034
0035
0036 inline IOSize IOBuffer::size(void) const { return m_length; }
0037 }
0038 #endif