TRF Language Model
|
used to read more than one objects More...
#include <wb-file.h>
Public Member Functions | |
ObjFile () | |
constructor More... | |
ObjFile (const char *path, const char *mode) | |
constructor More... | |
void | WriteHeadT () |
��txt��write the head More... | |
void | ReadHeadT () |
��txt��read the head More... | |
void | WriteObjT () |
��txt��write the object More... | |
bool | ReadObjT () |
��txt��read the object More... | |
void | WriteHeadB () |
��bin��write the head More... | |
void | ReadHeadB () |
��bin��read the head More... | |
void | WriteObjB () |
��bin��write the object More... | |
bool | ReadObjB () |
��bin��read the object More... | |
Public Member Functions inherited from wb::File | |
File () | |
constructor More... | |
File (const char *path, const char *mode, bool bHardOpen=true) | |
constructor More... | |
~File () | |
destructor More... | |
virtual bool | Open (const char *path, const char *mode, bool bHardOpen=true) |
Open file. More... | |
virtual bool | Reopen (const char *model) |
re-open the file More... | |
virtual void | Close () |
close the file More... | |
operator FILE * () | |
transform the class to FILE pointer More... | |
virtual char * | GetLine (bool bPrecent=false) |
Read a line into the buffer. More... | |
virtual bool | GetLine (char *str, int maxLen=MAX_SENTENCE_LEN) |
read a line into buffer str. More... | |
virtual void | Print (const char *p_pMessage,...) |
print More... | |
virtual int | Scanf (const char *p_pMessage,...) |
scanf More... | |
void | Flush () |
clean buffer More... | |
void | Reset () |
reset position More... | |
bool | Good () const |
return if the file is accessible. More... | |
template<typename TYPE > | |
void | PrintArray (const char *pformat, TYPE *pbuf, int num) |
print a array into file More... | |
Public Attributes | |
int | m_nTotalNum |
object number More... | |
int | m_nCurNum |
current object number More... | |
IO_Obj * | m_pObj |
object pointer More... | |
Public Attributes inherited from wb::File | |
FILE * | fp |
file pointer More... | |
int | nLine |
the number of reading from file More... | |
char * | pStrLine |
store the string get from file More... | |
string | strFileName |
stroe the file name More... | |
bool | bOver |
record the if the buffer is overflow More... | |
short | nBuf |
record the buffer is nBuf times of GS_SENTENCE_LEN More... | |
|
inline |
void wb::ObjFile::ReadHeadB | ( | ) |
��bin��read the head
Definition at line 190 of file wb-file.cpp.
void wb::ObjFile::ReadHeadT | ( | ) |
��txt��read the head
Definition at line 154 of file wb-file.cpp.
bool wb::ObjFile::ReadObjB | ( | ) |
��bin��read the object
Definition at line 203 of file wb-file.cpp.
bool wb::ObjFile::ReadObjT | ( | ) |
��txt��read the object
Definition at line 169 of file wb-file.cpp.
void wb::ObjFile::WriteHeadB | ( | ) |
��bin��write the head
Definition at line 184 of file wb-file.cpp.
void wb::ObjFile::WriteHeadT | ( | ) |
��txt��write the head
Definition at line 148 of file wb-file.cpp.
void wb::ObjFile::WriteObjB | ( | ) |
��bin��write the object
Definition at line 196 of file wb-file.cpp.
void wb::ObjFile::WriteObjT | ( | ) |
��txt��write the object
Definition at line 161 of file wb-file.cpp.