DLFileBasedIO.h

Go to the documentation of this file.
00001 #ifndef DLFILEBASEDIO_H
00002 #define DLFILEBASEDIO_H
00003 #include <cstdio>
00004 #include "DLIOStream.h"
00005 
00006 
00019 class DLFileBasedIO : public DLIOStream
00020 {
00021    public:
00031    DLFileBasedIO(const char* filename, const char* mode);
00032 
00036    ~DLFileBasedIO(void);
00037 
00049    int dlRead(void* buff, int size);
00050 
00063    int dlGets(void* buff, int size);
00064 
00073    string dlGetLine();
00074 
00082    int dlWrite(void* buff, int size);  
00083 
00097    int dlGetInt(DLEndian endian);
00098 
00112    short dlGetShort(DLEndian endian);
00113 
00127    void dlWriteInt(int intVal, DLEndian endian);
00141    void dlWriteShort(short shortVal,  DLEndian endian);
00142      
00148    int dlClose ();
00149 
00155    int dlFlush();
00156 
00157 
00158    private:
00159 
00161    FILE *fp;
00162 };
00163 
00164 #endif // DLFILEBASEDIO_H

DOCLIB is being developed under contract by a collaboration between:
The Laboratory for Language and Media Processing
Unviersity of Maryland, College Park
and
Booz | Allen | Hamilton

All Rights Reserved, 2003-2007