1 #ifndef CORE_ReadingFile_H 2 #define CORE_ReadingFile_H 60 inline static SP::CORE_ReadingFile
New(){
84 if (mF!=
null)
return mF->tellg();
115 if (mF==
null)
return false;
116 mF->getline(mToken,mLen);
146 tString ret=
read(mCurrentIndex,mCurrentIndex+nChars);
199 "impossible to write in file because the file is not opened");
char * mToken
Definition: CORE_ReadingFile.h:31
virtual tBoolean search(const tString &word, const tULInt &from, const tULInt &to, tULInt &cur)
search the worf in file between position from and end
Definition: CORE_ReadingFile.cpp:112
virtual tBoolean open(const tString &fileName)
open file fileName for reading.
Definition: CORE_ReadingFile.cpp:25
CORE_ReadingFile()
build a CORE_File
Definition: CORE_ReadingFile.cpp:6
virtual tString read(const tULInt &from, const tULInt &to)
read the file between included position [from,to]
Definition: CORE_ReadingFile.cpp:66
virtual tULInt getCurrentIndex() const
get the current index of the file
Definition: CORE_ReadingFile.h:83
const tBoolean & isClosed() const
return true if the file is closed @ return true if the file is closed
Definition: CORE_File.h:134
tBoolean readLine(tString &l)
read the line into l
Definition: CORE_ReadingFile.h:114
this class describes a file
Definition: CORE_File.h:15
ifstream * mF
Definition: CORE_ReadingFile.h:26
#define tBoolean
Definition: types.h:139
virtual tBoolean moveTo(const tULInt &index)
move the current index position of the file to index
Definition: CORE_ReadingFile.h:92
virtual tBoolean translate(const tLInt &dx)
translate the current index position of the file
Definition: CORE_ReadingFile.h:105
#define tLInt
Definition: types.h:42
SP_OBJECT(CORE_ReadingFile)
#define null
Definition: types.h:144
this class describes a file open for reading
Definition: CORE_ReadingFile.h:16
tString readTo(const tULInt &to)
read the file until to index from the current index
Definition: CORE_ReadingFile.h:135
#define tULInt
Definition: types.h:39
tBoolean search(const tString &word, const tULInt &from, tULInt &cur)
search the word in file between from the from index of the file
Definition: CORE_ReadingFile.h:169
virtual ~CORE_ReadingFile(void)
destroy a CORE_File
Definition: CORE_ReadingFile.cpp:14
this class describes the exceptions raised for CORE package
Definition: CORE_Exception.h:15
static SP::CORE_ReadingFile New()
create a CORE_out class
Definition: CORE_ReadingFile.h:60
istream & operator>>(T &obj)
reading operator
Definition: CORE_ReadingFile.h:196
DEFINE_SPTR(CORE_ReadingFile)
#define tUInt
Definition: types.h:33
virtual void close()
close the file
Definition: CORE_ReadingFile.cpp:57
tUInt mLen
Definition: CORE_ReadingFile.h:30
#define tString
Definition: types.h:135
tULInt mCurrentIndex
Definition: CORE_ReadingFile.h:32
virtual tString readChars(const tULInt &nChars)
read the n-chars files
Definition: CORE_ReadingFile.h:144
virtual tBoolean isEndOfFile() const
test if the cursor is at the end of file
Definition: CORE_ReadingFile.h:187
tBoolean search(const tString &word, tULInt &cur)
search the word in file from the current index
Definition: CORE_ReadingFile.h:179
const tULInt & getLength() const
get the length of the file
Definition: CORE_File.h:91
#define ASSERT_IN(a)
Definition: types.h:196
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141