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 
7 class IOBuffer
8 {
9 public:
10  IOBuffer (void);
11  IOBuffer (void *data, IOSize length);
12  IOBuffer (const void *data, IOSize length);
13 
14  void * data (void) const;
15  IOSize size (void) const;
16 
17 private:
18  void *m_data; //< Data
19  IOSize m_length; //< Length of data in bytes.
20 };
21 
23 inline
25  : m_data (0),
26  m_length (0)
27 {}
28 
30 inline
32  : m_data (data),
33  m_length (length)
34 {}
35 
37 inline
38 IOBuffer::IOBuffer (const void *data, IOSize length)
39  : m_data (const_cast<void *> (data)),
40  m_length (length)
41 {}
42 
44 inline void *
45 IOBuffer::data (void) const
46 { return m_data; }
47 
49 inline IOSize
50 IOBuffer::size (void) const
51 { return m_length; }
52 
53 #endif // STORAGE_FACTORY_IO_BUFFER_H
void * data(void) const
Definition: IOBuffer.h:45
void * m_data
Definition: IOBuffer.h:18
IOSize size(void) const
Definition: IOBuffer.h:50
IOBuffer(void)
Definition: IOBuffer.h:24
size_t IOSize
Definition: IOTypes.h:14
IOSize m_length
Definition: IOBuffer.h:19