Files
harbour-core/harbour/samples/cccppc/freader.cls
1999-11-09 01:37:27 +00:00

62 lines
1.8 KiB
OpenEdge ABL
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// $Id$
//
//*******************************************************************
// freader.cls: Filb“l karaktereket olvas˘ oszt ly. A CREADER-t“l
// ”r”k”l.
// 1999, Csisz r Levente
class FREADER CREADER
attrib path // Az olvasott fil path-a. (Az fil neve a
// name-ben van.) Mj.: A nvben is lehet path.
attrib fid // Az olvasott fil azonosˇt˘ja. (Ha nyitva van)
attrib buffer // A fil olvas sakor a buffer. Ha nil, akkor
// EOF-on vagyunk.
attrib ibuffer // A fil olvas sakor a bufferben a pozˇci˘.
nmethod pathName()
// Megadja a teljes filnevet (az elrsi Łttal egy<67>tt).
// Ha a fileName abszolŁt nv ('/' kezd“dik vagy (dos-on)
// drive nv van benne), akkor a path-t nem teszi el.
nmethod open(path,fileName)
// Megnyitja az adott filt az adott path-al.
// Mj.: A fileName-ben is lehet path.
// Ret: this, ha siker<65>lt a megnyit s, nil, ha nem.
// Hiba esetn a this:error-t be llˇtja.
nmethod close()
// Lez rja a filt. Ha a nincs nyitva, nem csin l semmit.
nmethod dOpen(pathArray,fileName)
// Vgigpr˘b lgatja a path-okat, s amelyikben megtal lja a
// filt, akkor abban megpr˘b lja megnyitni.
// Mj.: A fileName-ben is lehet path.
// Ret: this, ha siker<65>lt a megnyit s, nil, ha nem.
// Hiba esetn a this:error-t be llˇtja.
nmethod isOpen()
// Igaz, ha a fil nyitva van.
rmethod readItem()
// Olvas egy karaktert.
// Ret: A karakter, ha OK, nil, ha vge van a streamnek, vagy ha
// hiba volt.
rmethod destruct()
// T”rli az objektumhoz kapcsol˘d˘ k<>ls“ eszk”z”ket. (Pl. lez rja
// a filt etc.)
rmethod oinit(errorStream)
// Inicializ lja az objektumot.
metaclass
rmethod onew(errorStream)
rmethod oinitclass()