CMS 3D CMS Logo

IOChannel.h
Go to the documentation of this file.
1 #ifndef STORAGE_FACTORY_IO_CHANNEL_H
2 #define STORAGE_FACTORY_IO_CHANNEL_H
3 
6 
9 class IOChannel : public virtual IOInput, public virtual IOOutput {
10 public:
12  ~IOChannel(void) override;
13  // implicit copy constructor
14  // implicit assignment operator
15 
16  using IOInput::read;
17  using IOOutput::write;
18 
19  IOSize read(void *into, IOSize n) override;
20  IOSize readv(IOBuffer *into, IOSize buffers) override;
21 
22  IOSize write(const void *from, IOSize n) override;
23  IOSize writev(const IOBuffer *from, IOSize buffers) override;
24 
25  virtual IOFD fd(void) const;
26  virtual void fd(IOFD value); // FIXME: dangerous?
27 
28  virtual void close(void);
29 
30  virtual void setBlocking(bool value);
31  virtual bool isBlocking(void) const;
32 
33 protected:
34  // System implementation
35  bool sysclose(IOFD fd, int *error = nullptr);
36 
37 private:
38  IOFD m_fd; /*< System file descriptor. */
39 };
40 
41 #endif // STORAGE_FACTORY_IO_CHANNEL_H
IOChannel::readv
IOSize readv(IOBuffer *into, IOSize buffers) override
Definition: UnixIOChannel.cc:21
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
IOChannel::close
virtual void close(void)
Definition: IOChannel.cc:84
IOChannel::IOChannel
IOChannel(IOFD fd=-1)
Definition: IOChannel.cc:61
IOOutput.h
IOChannel::isBlocking
virtual bool isBlocking(void) const
Definition: UnixIOChannel.cc:112
relativeConstraints.error
error
Definition: relativeConstraints.py:53
IOOutput
Definition: IOOutput.h:7
IOChannel::writev
IOSize writev(const IOBuffer *from, IOSize buffers) override
Definition: UnixIOChannel.cc:65
IOChannel::setBlocking
virtual void setBlocking(bool value)
Definition: UnixIOChannel.cc:97
IOInput.h
IOBuffer
Definition: IOBuffer.h:7
value
Definition: value.py:1
IOChannel
Definition: IOChannel.h:9
IOFD
int IOFD
Definition: IOTypes.h:22
IOInput
Definition: IOInput.h:7
IOChannel::~IOChannel
~IOChannel(void) override
Definition: IOChannel.cc:63
IOChannel::sysclose
bool sysclose(IOFD fd, int *error=nullptr)
Definition: UnixIOChannel.cc:127
IOChannel::m_fd
IOFD m_fd
Definition: IOChannel.h:38
EDM_IOFD_INVALID
#define EDM_IOFD_INVALID
Definition: IOTypes.h:8
IOChannel::write
IOSize write(const void *from, IOSize n) override
Definition: UnixIOChannel.cc:53
IOInput::read
int read(void)
Definition: IOInput.cc:52
IOOutput::write
IOSize write(unsigned char byte)
Definition: IOOutput.cc:39
IOChannel::fd
virtual IOFD fd(void) const
Definition: IOChannel.cc:69
IOSize
size_t IOSize
Definition: IOTypes.h:14