00001 // ZenLib::FileB - standart files functions 00002 // Copyright (C) 2002-2003 Jérôme Martinez, Zen@MediaArea.net 00003 // 00004 // This software is provided 'as-is', without any express or implied 00005 // warranty. In no event will the authors be held liable for any damages 00006 // arising from the use of this software. 00007 // 00008 // Permission is granted to anyone to use this software for any purpose, 00009 // including commercial applications, and to alter it and redistribute it 00010 // freely, subject to the following restrictions: 00011 // 00012 // 1. The origin of this software must not be misrepresented; you must not 00013 // claim that you wrote the original software. If you use this software 00014 // in a product, an acknowledgment in the product documentation would be 00015 // appreciated but is not required. 00016 // 2. Altered source versions must be plainly marked as such, and must not be 00017 // misrepresented as being the original software. 00018 // 3. This notice may not be removed or altered from any source distribution. 00019 // 00020 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00021 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00022 // File 00023 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00024 // 00025 // Version 0.0.1 00026 // ------------- 00027 // 00028 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00029 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00030 // TODO : 00031 00032 00033 //--------------------------------------------------------------------------- 00034 #ifndef FileTH 00035 #define FileTH 00036 //--------------------------------------------------------------------------- 00037 00038 //--------------------------------------------------------------------------- 00039 #include <ZenLib/File_.h> 00040 #include <stdio.h> 00041 //--------------------------------------------------------------------------- 00042 00043 namespace ZenLib 00044 { 00045 00046 //*************************************************************************** 00047 // Classe CFichier_Texte 00048 //*************************************************************************** 00049 00050 class FileT : public File_ 00051 { 00052 public : 00053 //Gestion de la classe 00054 FileT (); 00055 ~FileT (); 00056 00057 //Ouverture/fermeture 00058 int Ouvrir (const Ztring &Fichier, bool Nouveau=false, bool Ajout=false, bool Ecriture=false); 00059 void Fermer (); 00060 00061 //Gestion texte 00062 Ztring Lire (); 00063 void Ecrire (const Ztring &Ligne); 00064 00065 //Divers 00066 bool Eof(); //Fin de fichier 00067 00068 protected : 00069 FILE* F; 00070 bool End; 00071 Ztring Nom; 00072 }; 00073 00074 } //Namespace 00075 00076 #endif