tekfileasciibare.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Kevin McBride                                   *
00003  *   kevin@planetsaphire.com                                               *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Library General Public License as       *
00007  *   published by the Free Software Foundation; either version 2 of the    *
00008  *   License, or (at your option) any later version.                       *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU Library General Public     *
00016  *   License along with this program; if not, write to the                 *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef TEKFILEASCIIBARE_H
00021 #define TEKFILEASCIIBARE_H
00022 
00023 #ifndef     TEKLTI_H_C35A2A4C_D475_11D9_90BC_000BDBC434D9
00024 #error      This file must be included from <teklti.h>
00025 #endif      /* TEKLTI_H_C35A2A4C_D475_11D9_90BC_000BDBC434D9 */
00026 
00027 
00028 TEKUUIDIMPORT(UTekFileASCIIBare);
00029 
00030 
00038 class TekFileASCIIBare : public TekFileASCII
00039 {
00040 private:
00041     uchar_t PrivFileName;
00042     FILE * PrivFileDesc;
00043     TekFileMode PrivFileMode;
00044     TekFileType PrivTekFileType;
00045     uchar_t PrivBuffer;
00046     uchar_t PrivBufferPtr;
00047 
00048 public:
00049     TekFileASCIIBare();
00050 
00051     ~TekFileASCIIBare();
00052 
00053     virtual TEKERR ReadLine(uchar_t** Buffer, unsigned long ReadMax);
00054     virtual TEKERR WriteLine(const uchar_t* Buffer);
00055 
00056     virtual TEKERR Close();
00057     virtual TEKERR Flush();
00058     virtual TEKERR get_FILE(FILE** FileDescriptor);
00059     virtual TEKERR get_Filename(uchar_t** Name);
00060     virtual TEKERR get_Mode(TekFileMode* ModeID);
00061     virtual TEKERR get_Type(TekFileType* FileTypePointer);
00062     virtual TEKERR Open();
00063     virtual TEKERR Open64();
00064     virtual TEKERR put_FILE(FILE* FileDescriptor);
00065     virtual TEKERR put_Filename(uchar_t* Name);
00066     virtual TEKERR put_Mode(TekFileMode ModeID);
00067     virtual TEKERR Read64(void* Buffer, uint64_t BytesToRead, uint64_t* BytesRead);
00068     virtual TEKERR Read(void* Buffer, unsigned long BytesToRead, unsigned long* BytesRead);
00069     virtual TEKERR Seek64(TekFileSeek SeekWhere, int64_t NewLocation);
00070     virtual TEKERR Seek(TekFileSeek SeekWhere, signed long NewLocation);
00071     virtual TEKERR Write64(void* Buffer, uint64_t BytesToWrite, uint64_t* BytesWrote);
00072     virtual TEKERR Write(void* Buffer, unsigned long BytesToWrite, unsigned long* BytesWrote);
00073     virtual TEKERR get_Location(unsigned long * Location);
00074     virtual TEKERR get_Location64(uint64_t * Location);
00075 
00076     TEKSTD_HEADER_VARS;
00077 };
00078 
00079 #endif
SourceForge.net Logo  Technical Library Template Interface Project Page