EnglishJapanese Reload Front page List of pages Search Recent changes RSS of recent changes

Back to the top page
Back to the upper page

Function Members

public

private

ifstream fFile
Name of loaded file.
char* fDelim
Deliminator for loaded file.
Default = " ,\t"
char* fComment
Symbol of comment line.
Default = "#"
char fEOL
Symbol means end of line.
Default = ";"
char fLine[1024]
Entire line read from fFile.
char* fLast
Pointer of the current token.

Function documents

  • TArtConfigFile( const char* filename, const char* delim, const char* comment, const char eol)

Open file assigned by filename, and assign other arguments to each private members.
delim -> fDelim, comment -> fComment, eol -> fEOL.

  • TArtConfigFile()

Close the file opened by TArtConfigFile().

  • const char* GetNextToken()

Read string from fFile to fLine, and parse the string into a sequence of token divided by fDelim.
Return the pointer of the current token when this function is called.
If the first character of this string is fComment, this string is taken as a comment line.
If the token is fEOL, the token is taken as line break.
If this function reach the end of file, this function returns 0.

  • int GetNextTokenAsInt(int &lval)

Change the token to integer and assign the pointer of lval.
If the token is not number, this function returns 1.

Last-modified: Tue, 31 Jan 2012 23:43:00 HADT (3548d)