CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DCacheFile.h
Go to the documentation of this file.
1 #ifndef DCACHE_ADAPTOR_DCACHE_FILE_H
2 # define DCACHE_ADAPTOR_DCACHE_FILE_H
3 
6 # include <string>
7 
8 class DCacheFile : public Storage
9 {
10 public:
11  DCacheFile (void);
12  DCacheFile (IOFD fd);
13  DCacheFile (const char *name, int flags = IOFlags::OpenRead, int perms = 0666);
14  DCacheFile (const std::string &name, int flags = IOFlags::OpenRead, int perms = 0666);
15  ~DCacheFile (void);
16 
17  virtual void create (const char *name,
18  bool exclusive = false,
19  int perms = 0666);
20  virtual void create (const std::string &name,
21  bool exclusive = false,
22  int perms = 0666);
23  virtual void open (const char *name,
25  int perms = 0666);
26  virtual void open (const std::string &name,
28  int perms = 0666);
29 
30  using Storage::read;
31  using Storage::write;
32  using Storage::position;
33 
34  virtual IOSize read (void *into, IOSize n);
35  virtual IOSize readv (IOBuffer *into, IOSize buffers);
36  virtual IOSize readv (IOPosBuffer *into, IOSize buffers);
37  virtual IOSize write (const void *from, IOSize n);
38 
39  virtual IOOffset position (IOOffset offset, Relative whence = SET);
40  virtual void resize (IOOffset size);
41 
42  virtual void close (void);
43  virtual void abort (void);
44 
45 private:
47  bool m_close;
49 };
50 
51 #endif // DCACHE_ADAPTOR_DCACHE_FILE_H
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
Relative
Definition: Storage.h:23
virtual void abort(void)
Definition: DCacheFile.cc:180
virtual void resize(IOOffset size)
Definition: DCacheFile.cc:380
virtual IOSize write(const void *from, IOSize n, IOOffset pos)
Definition: Storage.cc:59
DCacheFile(void)
Definition: DCacheFile.cc:11
virtual IOSize write(const void *from, IOSize n)
Definition: DCacheFile.cc:237
IOFD m_fd
Definition: DCacheFile.h:46
virtual void create(const char *name, bool exclusive=false, int perms=0666)
Definition: DCacheFile.cc:45
virtual IOOffset position(void) const
Definition: Storage.cc:95
~DCacheFile(void)
Definition: DCacheFile.cc:35
virtual IOSize readv(IOBuffer *into, IOSize buffers)
Definition: DCacheFile.cc:265
virtual void open(const char *name, int flags=IOFlags::OpenRead, int perms=0666)
Definition: DCacheFile.cc:73
int read(void)
Definition: IOInput.cc:54
virtual void close(void)
Definition: DCacheFile.cc:154
bool m_close
Definition: DCacheFile.h:47
virtual IOOffset size(void) const
Definition: Storage.cc:102
int64_t IOOffset
Definition: IOTypes.h:19
int IOFD
Definition: IOTypes.h:22
std::string m_name
Definition: DCacheFile.h:48
size_t IOSize
Definition: IOTypes.h:14