DABC (Data Acquisition Backbone Core)  2.9.9
FileInterface.h
Go to the documentation of this file.
1 #ifndef RFIO_FileInterface
2 #define RFIO_FileInterface
3 
4 #ifndef DABC_BinaryFile
5 #include "dabc/BinaryFile.h"
6 #endif
7 
8 namespace rfio {
9 
11  protected:
12  void* fRemote;
15  char fDataMoverName[64];
16 
17  public:
18 
19  FileInterface();
20 
21  virtual ~FileInterface();
22 
23  virtual Handle fopen(const char* fname, const char* mode, const char* opt = 0);
24 
25  virtual void fclose(Handle f);
26 
27  virtual size_t fwrite(const void* ptr, size_t sz, size_t nmemb, Handle f);
28 
29  virtual size_t fread(void* ptr, size_t sz, size_t nmemb, Handle f);
30 
31  virtual bool feof(Handle f);
32 
33  virtual bool fflush(Handle f);
34 
35  virtual bool fseek(Handle f, long int offset, bool realtive = true);
36 
37  virtual dabc::Object* fmatch(const char* fmask, bool select_files = true);
38 
39  virtual int GetFileIntPar(Handle h, const char* parname);
40 
41  virtual bool GetFileStrPar(Handle h, const char* parname, char* sbuf, int sbuflen);
42 
43  };
44 
45 }
46 
47 #endif
Defines and implements basic POSIX file interface.
Definition: BinaryFile.h:33
void * Handle
File handle descriptor.
Definition: BinaryFile.h:37
Base class for most of the DABC classes.
Definition: Object.h:116
char fDataMoverName[64]
obtained data mover index
Definition: FileInterface.h:15
virtual void fclose(Handle f)
virtual bool fseek(Handle f, long int offset, bool realtive=true)
virtual bool feof(Handle f)
virtual bool GetFileStrPar(Handle h, const char *parname, char *sbuf, int sbuflen)
Method returns file-specific string parameter.
virtual size_t fread(void *ptr, size_t sz, size_t nmemb, Handle f)
virtual int GetFileIntPar(Handle h, const char *parname)
Method returns file-specific int parameter.
FileInterface()
obtained data mover name
virtual size_t fwrite(const void *ptr, size_t sz, size_t nmemb, Handle f)
int fDataMoverIndx
counter of opened files via special connection to datamover
Definition: FileInterface.h:14
virtual Handle fopen(const char *fname, const char *mode, const char *opt=0)
int fOpenedCounter
connection to datamover, done once when any special argument is appearing
Definition: FileInterface.h:13
virtual dabc::Object * fmatch(const char *fmask, bool select_files=true)
Produce list of files, object must be explicitly destroyed with ref.Destroy call One could decide if ...
virtual bool fflush(Handle f)
Definition: Factory.h:21