DABC (Data Acquisition Backbone Core)  2.9.9
Public Types | Public Member Functions
dabc::FileInterface Class Reference

Defines and implements basic POSIX file interface. More...

#include <dabc/BinaryFile.h>

Inheritance diagram for dabc::FileInterface:
ltsm::FileInterface rfio::FileInterface

Public Types

typedef void * Handle
 File handle descriptor. More...
 

Public Member Functions

virtual void fclose (Handle f)
 
virtual bool feof (Handle f)
 
virtual bool fflush (Handle f)
 
virtual Objectfmatch (const char *fmask, bool select_files=true)
 Produce list of files, object must be explicitly destroyed with ref.Destroy call One could decide if files or directories should be listed. More...
 
virtual Handle fopen (const char *fname, const char *mode, const char *=0)
 
virtual size_t fread (void *ptr, size_t sz, size_t nmemb, Handle f)
 
virtual bool fseek (Handle f, long int offset, bool relative=true)
 
virtual size_t fwrite (const void *ptr, size_t sz, size_t nmemb, Handle f)
 
virtual int GetFileIntPar (Handle h, const char *parname)
 Method returns file-specific int parameter. More...
 
virtual bool GetFileStrPar (Handle h, const char *parname, char *sbuf, int sbuflen)
 Method returns file-specific string parameter. More...
 
virtual bool mkdir (const char *path)
 
virtual ~FileInterface ()
 

Detailed Description

Defines and implements basic POSIX file interface.

Used to virtualize access to file system and be able to replace such access by other file engines

Definition at line 33 of file BinaryFile.h.

Member Typedef Documentation

◆ Handle

File handle descriptor.

Definition at line 37 of file BinaryFile.h.

Constructor & Destructor Documentation

◆ ~FileInterface()

virtual dabc::FileInterface::~FileInterface ( )
inlinevirtual

Reimplemented in rfio::FileInterface, and ltsm::FileInterface.

Definition at line 39 of file BinaryFile.h.

Member Function Documentation

◆ fopen()

virtual Handle dabc::FileInterface::fopen ( const char *  fname,
const char *  mode,
const char *  = 0 
)
inlinevirtual

Reimplemented in rfio::FileInterface, and ltsm::FileInterface.

Definition at line 41 of file BinaryFile.h.

◆ fclose()

virtual void dabc::FileInterface::fclose ( Handle  f)
inlinevirtual

Reimplemented in rfio::FileInterface, and ltsm::FileInterface.

Definition at line 43 of file BinaryFile.h.

◆ fwrite()

virtual size_t dabc::FileInterface::fwrite ( const void *  ptr,
size_t  sz,
size_t  nmemb,
Handle  f 
)
inlinevirtual

Reimplemented in rfio::FileInterface, and ltsm::FileInterface.

Definition at line 45 of file BinaryFile.h.

◆ fread()

virtual size_t dabc::FileInterface::fread ( void *  ptr,
size_t  sz,
size_t  nmemb,
Handle  f 
)
inlinevirtual

Reimplemented in rfio::FileInterface, and ltsm::FileInterface.

Definition at line 48 of file BinaryFile.h.

◆ feof()

virtual bool dabc::FileInterface::feof ( Handle  f)
inlinevirtual

Reimplemented in rfio::FileInterface, and ltsm::FileInterface.

Definition at line 51 of file BinaryFile.h.

◆ fflush()

virtual bool dabc::FileInterface::fflush ( Handle  f)
inlinevirtual

Reimplemented in rfio::FileInterface, and ltsm::FileInterface.

Definition at line 54 of file BinaryFile.h.

◆ fseek()

virtual bool dabc::FileInterface::fseek ( Handle  f,
long int  offset,
bool  relative = true 
)
inlinevirtual

Reimplemented in rfio::FileInterface, and ltsm::FileInterface.

Definition at line 57 of file BinaryFile.h.

◆ fmatch()

dabc::Object * dabc::FileInterface::fmatch ( const char *  fmask,
bool  select_files = true 
)
virtual

Produce list of files, object must be explicitly destroyed with ref.Destroy call One could decide if files or directories should be listed.

Reimplemented in rfio::FileInterface, and ltsm::FileInterface.

Definition at line 60 of file BinaryFile.cxx.

◆ mkdir()

bool dabc::FileInterface::mkdir ( const char *  path)
virtual

Definition at line 29 of file BinaryFile.cxx.

◆ GetFileIntPar()

virtual int dabc::FileInterface::GetFileIntPar ( Handle  h,
const char *  parname 
)
inlinevirtual

Method returns file-specific int parameter.

Reimplemented in rfio::FileInterface, and ltsm::FileInterface.

Definition at line 67 of file BinaryFile.h.

◆ GetFileStrPar()

virtual bool dabc::FileInterface::GetFileStrPar ( Handle  h,
const char *  parname,
char *  sbuf,
int  sbuflen 
)
inlinevirtual

Method returns file-specific string parameter.

Reimplemented in rfio::FileInterface, and ltsm::FileInterface.

Definition at line 70 of file BinaryFile.h.


The documentation for this class was generated from the following files: