CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
11 public:
13  virtual ~IOChannel (void);
14  // implicit copy constructor
15  // implicit assignment operator
16 
17  using IOInput::read;
18  using IOOutput::write;
19 
20  virtual IOSize read (void *into, IOSize n);
21  virtual IOSize readv (IOBuffer *into, IOSize buffers);
22 
23  virtual IOSize write (const void *from, IOSize n);
24  virtual IOSize writev (const IOBuffer *from, IOSize buffers);
25 
26  virtual IOFD fd (void) const;
27  virtual void fd (IOFD value); // FIXME: dangerous?
28 
29  virtual void close (void);
30 
31  virtual void setBlocking (bool value);
32  virtual bool isBlocking (void) const;
33 
34 protected:
35  // System implementation
36  bool sysclose (IOFD fd, int *error = 0);
37 
38 private:
39  IOFD m_fd; /*< System file descriptor. */
40 };
41 
42 #endif // STORAGE_FACTORY_IO_CHANNEL_H
IOSize write(unsigned char byte)
Definition: IOOutput.cc:41
virtual IOSize writev(const IOBuffer *from, IOSize buffers)
virtual void close(void)
Definition: IOChannel.cc:92
bool sysclose(IOFD fd, int *error=0)
virtual IOSize write(const void *from, IOSize n)
virtual void setBlocking(bool value)
int read(void)
Definition: IOInput.cc:54
virtual ~IOChannel(void)
Definition: IOChannel.cc:65
int IOFD
Definition: IOTypes.h:22
IOChannel(IOFD fd=EDM_IOFD_INVALID)
Definition: IOChannel.cc:61
virtual bool isBlocking(void) const
#define EDM_IOFD_INVALID
Definition: IOTypes.h:8
size_t IOSize
Definition: IOTypes.h:14
IOFD m_fd
Definition: IOChannel.h:39
virtual IOFD fd(void) const
Definition: IOChannel.cc:73
virtual IOSize readv(IOBuffer *into, IOSize buffers)
Definition: IOInput.h:7